diff --git a/compose.yaml b/compose.yaml index bcab0f7d792..66704e84a1b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -33,8 +33,20 @@ services: # https://docs.docker.com/reference/compose-file/services/#environment environment: - API_ADMINISTRATOR_USER_EMAIL_ADDRESS=${API_ADMINISTRATOR_USER_EMAIL_ADDRESS:?error} + - API_ADMINISTRATOR_USER_NAME=${API_ADMINISTRATOR_USER_NAME:?error} - API_ADMINISTRATOR_USER_PASSWORD=${API_ADMINISTRATOR_USER_PASSWORD:?error} - API_BASE_URL=${API_BASE_URL:?error} + - API_COMMUNITY_FACEBOOK_URL=${API_COMMUNITY_FACEBOOK_URL:?error} + - API_COMMUNITY_GITHUB_URL=${API_COMMUNITY_GITHUB_URL:?error} + - API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION=${API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION:?error} + - API_COMMUNITY_INSTAGRAM_URL=${API_COMMUNITY_INSTAGRAM_URL:?error} + - API_COMMUNITY_LINKEDIN_URL=${API_COMMUNITY_LINKEDIN_URL:?error} + - API_COMMUNITY_NAME=${API_COMMUNITY_NAME:?error} + - API_COMMUNITY_REDDIT_URL=${API_COMMUNITY_REDDIT_URL:?error} + - API_COMMUNITY_SLACK_URL=${API_COMMUNITY_SLACK_URL:?error} + - API_COMMUNITY_WEBSITE_URL=${API_COMMUNITY_WEBSITE_URL:?error} + - API_COMMUNITY_X_URL=${API_COMMUNITY_X_URL:?error} + - API_COMMUNITY_YOUTUBE_URL=${API_COMMUNITY_YOUTUBE_URL:?error} - API_HOST=${API_HOST:?error} - API_IS_APPLY_DRIZZLE_MIGRATIONS=${API_IS_APPLY_DRIZZLE_MIGRATIONS:?error} - API_IS_GRAPHIQL=${API_IS_GRAPHIQL:?error} diff --git a/documentation/environment_variables.md b/documentation/environment_variables.md index 26dc6fc4460..54d69e5b2f1 100644 --- a/documentation/environment_variables.md +++ b/documentation/environment_variables.md @@ -14,6 +14,10 @@ At runtime, talawa api requires certain environment variables to be defined in i This environment variable is used to configure the email address for the administrator user that talawa-api will make sure exists in the database at the time of server startup. +## API_ADMINISTRATOR_USER_NAME + +This environment variable is used to configure the name for the administrator user that talawa-api will make sure exists in the database at the time of server startup. + ## API_ADMINISTRATOR_USER_PASSWORD This environment variable is used to configure the password for the administrator user that talawa-api will make sure exists in the database at the time of server startup. @@ -22,6 +26,50 @@ This environment variable is used to configure the password for the administrato This environment variable is used to configure the base url of the talawa api at runtime that clients making requests to the talawa api will make use of. +## API_COMMUNITY_FACEBOOK_URL + +This environment variable is used to configure the url to the [facebook](https://facebook.com) account of the community. + +## API_COMMUNITY_GITHUB_URL + +This environment variable is used to configure the url to the [github](https://github.com) account of the community. + +## API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION + +This environment variable is used to configure the duration in seconds it should take for inactive clients to get timed out of their authenticated session within client-side talawa applications. + +## API_COMMUNITY_INSTAGRAM_URL + +This environment variable is used to configure the url to the [instagram](https://instagram.com) account of the community. + +## API_COMMUNITY_LINKEDIN_URL + +This environment variable is used to configure the url to the [linkedin](https://linkedin.com) account of the community. + +## API_COMMUNITY_NAME + +This environment variable is used to configure the name of the community. + +## API_COMMUNITY_REDDIT_URL + +This environment variable is used to configure the url to the [reddit](https://reddit.com) account of the community. + +## API_COMMUNITY_SLACK_URL + +This environment variable is used to configure the url to the [slack](https://slack.com) account of the community. + +## API_COMMUNITY_WEBSITE_URL + +This environment variable is used to configure the url to the website of the community. + +## API_COMMUNITY_X_URL + +This environment variable is used to configure the url to the [x](https://x.com) account of the community. + +## API_COMMUNITY_YOUTUBE_URL + +This environment variable is used to configure the url to the [youtube](https://youtube.com) account of the community. + ## API_DEBUGGER_HOST This environment variable is used to configure the host ip that can access the host port on which talawa api debugger listens to at runtime. diff --git a/drizzle_migrations/20250117125402_luxuriant_starjammers.sql b/drizzle_migrations/20250118150033_needy_tigra.sql similarity index 98% rename from drizzle_migrations/20250117125402_luxuriant_starjammers.sql rename to drizzle_migrations/20250118150033_needy_tigra.sql index e194ed020c3..a0229283388 100644 --- a/drizzle_migrations/20250117125402_luxuriant_starjammers.sql +++ b/drizzle_migrations/20250118150033_needy_tigra.sql @@ -131,6 +131,27 @@ CREATE TABLE "comments" ( "updated_at" timestamp (3) with time zone ); --> statement-breakpoint +CREATE TABLE "communities" ( + "created_at" timestamp (3) with time zone DEFAULT now() NOT NULL, + "facebook_url" text, + "github_url" text, + "id" uuid PRIMARY KEY NOT NULL, + "inactivity_timeout_duration" integer, + "instagram_url" text, + "linkedin_url" text, + "logo_mime_type" text, + "logo_name" text, + "name" text NOT NULL, + "reddit_url" text, + "slack_url" text, + "updated_at" timestamp (3) with time zone, + "updater_id" uuid, + "website_url" text, + "x_url" text, + "youtube_url" text, + CONSTRAINT "communities_name_unique" UNIQUE("name") +); +--> statement-breakpoint CREATE TABLE "event_attachments" ( "created_at" timestamp (3) with time zone DEFAULT now() NOT NULL, "creator_id" uuid, @@ -434,6 +455,7 @@ ALTER TABLE "comment_votes" ADD CONSTRAINT "comment_votes_creator_id_users_id_fk ALTER TABLE "comment_votes" ADD CONSTRAINT "comment_votes_updated_id_users_id_fk" FOREIGN KEY ("updated_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "comments" ADD CONSTRAINT "comments_creator_id_users_id_fk" FOREIGN KEY ("creator_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "comments" ADD CONSTRAINT "comments_post_id_posts_id_fk" FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint +ALTER TABLE "communities" ADD CONSTRAINT "communities_updater_id_users_id_fk" FOREIGN KEY ("updater_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "event_attachments" ADD CONSTRAINT "event_attachments_creator_id_users_id_fk" FOREIGN KEY ("creator_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "event_attachments" ADD CONSTRAINT "event_attachments_event_id_events_id_fk" FOREIGN KEY ("event_id") REFERENCES "public"."events"("id") ON DELETE cascade ON UPDATE cascade;--> statement-breakpoint ALTER TABLE "event_attachments" ADD CONSTRAINT "event_attachments_updater_id_users_id_fk" FOREIGN KEY ("updater_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE cascade;--> statement-breakpoint diff --git a/drizzle_migrations/meta/20250117125402_snapshot.json b/drizzle_migrations/meta/20250118150033_snapshot.json similarity index 97% rename from drizzle_migrations/meta/20250117125402_snapshot.json rename to drizzle_migrations/meta/20250118150033_snapshot.json index c23ca7fb7dc..6c871f8ea5e 100644 --- a/drizzle_migrations/meta/20250117125402_snapshot.json +++ b/drizzle_migrations/meta/20250118150033_snapshot.json @@ -1,5 +1,5 @@ { - "id": "8b540cae-733e-4236-8c28-4e714421d86c", + "id": "32df2a89-a895-4c5d-a4dc-cc8413ee818f", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -2048,6 +2048,144 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "public.communities": { + "name": "communities", + "schema": "", + "columns": { + "created_at": { + "name": "created_at", + "type": "timestamp (3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "facebook_url": { + "name": "facebook_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "github_url": { + "name": "github_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "inactivity_timeout_duration": { + "name": "inactivity_timeout_duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "instagram_url": { + "name": "instagram_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "linkedin_url": { + "name": "linkedin_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "logo_mime_type": { + "name": "logo_mime_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "logo_name": { + "name": "logo_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reddit_url": { + "name": "reddit_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "slack_url": { + "name": "slack_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp (3) with time zone", + "primaryKey": false, + "notNull": false + }, + "updater_id": { + "name": "updater_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "website_url": { + "name": "website_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "x_url": { + "name": "x_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "youtube_url": { + "name": "youtube_url", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "communities_updater_id_users_id_fk": { + "name": "communities_updater_id_users_id_fk", + "tableFrom": "communities", + "tableTo": "users", + "columnsFrom": [ + "updater_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "communities_name_unique": { + "name": "communities_name_unique", + "nullsNotDistinct": false, + "columns": [ + "name" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "public.event_attachments": { "name": "event_attachments", "schema": "", diff --git a/drizzle_migrations/meta/_journal.json b/drizzle_migrations/meta/_journal.json index e220211586b..660d74f717a 100644 --- a/drizzle_migrations/meta/_journal.json +++ b/drizzle_migrations/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "7", - "when": 1737118442781, - "tag": "20250117125402_luxuriant_starjammers", + "when": 1737212433966, + "tag": "20250118150033_needy_tigra", "breakpoints": true } ] diff --git a/envFiles/.env.ci b/envFiles/.env.ci index 40e53361630..b54e851ad47 100644 --- a/envFiles/.env.ci +++ b/envFiles/.env.ci @@ -1,8 +1,20 @@ ########## talawa api ########## API_ADMINISTRATOR_USER_EMAIL_ADDRESS=administrator@email.com +API_ADMINISTRATOR_USER_NAME=administrator API_ADMINISTRATOR_USER_PASSWORD=password API_BASE_URL=http://127.0.0.1:4000 +API_COMMUNITY_FACEBOOK_URL=https://facebook.com +API_COMMUNITY_GITHUB_URL=https://github.com +API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION=900 +API_COMMUNITY_INSTAGRAM_URL=https://instagram.com +API_COMMUNITY_LINKEDIN_URL=https://linkedin.com +API_COMMUNITY_NAME=talawa +API_COMMUNITY_REDDIT_URL=https://reddit.com +API_COMMUNITY_SLACK_URL=https://slack.com +API_COMMUNITY_WEBSITE_URL=https://docs.talawa.com +API_COMMUNITY_X_URL=https://x.com +API_COMMUNITY_YOUTUBE_URL=https://youtube.com API_HOST=0.0.0.0 API_IS_APPLY_DRIZZLE_MIGRATIONS=true API_IS_GRAPHIQL=false diff --git a/envFiles/.env.devcontainer b/envFiles/.env.devcontainer index a088286407b..2c7f237525b 100644 --- a/envFiles/.env.devcontainer +++ b/envFiles/.env.devcontainer @@ -1,8 +1,20 @@ ########## talawa api ########## API_ADMINISTRATOR_USER_EMAIL_ADDRESS=administrator@email.com +API_ADMINISTRATOR_USER_NAME=administrator API_ADMINISTRATOR_USER_PASSWORD=password API_BASE_URL=http://127.0.0.1:4000 +API_COMMUNITY_FACEBOOK_URL=https://facebook.com +API_COMMUNITY_GITHUB_URL=https://github.com +API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION=900 +API_COMMUNITY_INSTAGRAM_URL=https://instagram.com +API_COMMUNITY_LINKEDIN_URL=https://linkedin.com +API_COMMUNITY_NAME=talawa +API_COMMUNITY_REDDIT_URL=https://reddit.com +API_COMMUNITY_SLACK_URL=https://slack.com +API_COMMUNITY_WEBSITE_URL=https://docs.talawa.com +API_COMMUNITY_X_URL=https://x.com +API_COMMUNITY_YOUTUBE_URL=https://youtube.com API_DEBUGGER_HOST=0.0.0.0 API_DEBUGGER_PORT=9229 API_HOST=0.0.0.0 diff --git a/envFiles/.env.production b/envFiles/.env.production index 837fae12739..6df24950e29 100644 --- a/envFiles/.env.production +++ b/envFiles/.env.production @@ -1,8 +1,20 @@ ########## talawa api ########## -API_ADMINISTRATOR_USER_EMAIL_ADDRESS=administrator@email.com +API_ADMINISTRATOR_USER_EMAIL_ADDRESS= +API_ADMINISTRATOR_USER_NAME= API_ADMINISTRATOR_USER_PASSWORD= API_BASE_URL= +API_COMMUNITY_FACEBOOK_URL= +API_COMMUNITY_GITHUB_URL= +API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION=900 +API_COMMUNITY_INSTAGRAM_URL= +API_COMMUNITY_LINKEDIN_URL= +API_COMMUNITY_NAME= +API_COMMUNITY_REDDIT_URL= +API_COMMUNITY_SLACK_URL= +API_COMMUNITY_WEBSITE_URL= +API_COMMUNITY_X_URL= +API_COMMUNITY_YOUTUBE_URL= API_HOST=0.0.0.0 API_IS_APPLY_DRIZZLE_MIGRATIONS=true API_IS_GRAPHIQL=false diff --git a/package.json b/package.json index 7cd7f3d786c..4d856a9f2f0 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@swc/cli": "0.6.0", "@swc/core": "^1.10.7", "@types/node": "^22.10.7", - "@vitest/coverage-v8": "^3.0.1", + "@vitest/coverage-v8": "^3.0.2", "drizzle-kit": "^0.30.2", "drizzle-seed": "^0.3.0", "gql.tada": "^1.8.10", @@ -48,7 +48,7 @@ "tsx": "^4.19.2", "typescript": "^5.7.3", "vite-tsconfig-paths": "^5.1.4", - "vitest": "^3.0.1" + "vitest": "^3.0.2" }, "engines": { "node": "22.13.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d0d0cf4390..a85d3e00fff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,8 +103,8 @@ importers: specifier: ^22.10.7 version: 22.10.7 '@vitest/coverage-v8': - specifier: ^3.0.1 - version: 3.0.1(vitest@3.0.1(@types/node@22.10.7)(tsx@4.19.2)) + specifier: ^3.0.2 + version: 3.0.2(vitest@3.0.2(@types/node@22.10.7)(tsx@4.19.2)) drizzle-kit: specifier: ^0.30.2 version: 0.30.2 @@ -133,8 +133,8 @@ importers: specifier: ^5.1.4 version: 5.1.4(typescript@5.7.3)(vite@6.0.7(@types/node@22.10.7)(tsx@4.19.2)) vitest: - specifier: ^3.0.1 - version: 3.0.1(@types/node@22.10.7)(tsx@4.19.2) + specifier: ^3.0.2 + version: 3.0.2(@types/node@22.10.7)(tsx@4.19.2) packages: @@ -1350,20 +1350,20 @@ packages: '@types/node@22.10.7': resolution: {integrity: sha512-V09KvXxFiutGp6B7XkpaDXlNadZxrzajcY50EuoLIpQ6WWYCSvf19lVIazzfIzQvhUN2HjX12spLojTnhuKlGg==} - '@vitest/coverage-v8@3.0.1': - resolution: {integrity: sha512-WpbI1QtkWpzMQTP5S3IneIWN714bOPcPFYp9Q9tXK9YgAtmMsrzKut0mFwSAu31CmbY0Q6Xsp15biO7Tjwp7UQ==} + '@vitest/coverage-v8@3.0.2': + resolution: {integrity: sha512-U+hZYb0FtgNDb6B3E9piAHzXXIuxuBw2cd6Lvepc9sYYY4KjgiwCBmo3Sird9ZRu3ggLpLBTfw1ZRr77ipiSfw==} peerDependencies: - '@vitest/browser': 3.0.1 - vitest: 3.0.1 + '@vitest/browser': 3.0.2 + vitest: 3.0.2 peerDependenciesMeta: '@vitest/browser': optional: true - '@vitest/expect@3.0.1': - resolution: {integrity: sha512-oPrXe8dwvQdzUxQFWwibY97/smQ6k8iPVeSf09KEvU1yWzu40G6naHExY0lUgjnTPWMRGQOJnhMBb8lBu48feg==} + '@vitest/expect@3.0.2': + resolution: {integrity: sha512-dKSHLBcoZI+3pmP5hiZ7I5grNru2HRtEW8Z5Zp4IXog8QYcxhlox7JUPyIIFWfN53+3HW3KPLIl6nSzUGgKSuQ==} - '@vitest/mocker@3.0.1': - resolution: {integrity: sha512-5letLsVdFhReCPws/SNwyekBCyi4w2IusycV4T7eVdt2mfellS2yKDrEmnE5KPCHr0Ez5xCZVJbJws3ckuNNgQ==} + '@vitest/mocker@3.0.2': + resolution: {integrity: sha512-Hr09FoBf0jlwwSyzIF4Xw31OntpO3XtZjkccpcBf8FeVW3tpiyKlkeUzxS/txzHqpUCNIX157NaTySxedyZLvA==} peerDependencies: msw: ^2.4.9 vite: ^5.0.0 || ^6.0.0 @@ -1373,20 +1373,20 @@ packages: vite: optional: true - '@vitest/pretty-format@3.0.1': - resolution: {integrity: sha512-FnyGQ9eFJ/Dnqg3jCvq9O6noXtxbZhOlSvNLZsCGJxhsGiZ5LDepmsTCizRfyGJt4Q6pJmZtx7rO/qqr9R9gDA==} + '@vitest/pretty-format@3.0.2': + resolution: {integrity: sha512-yBohcBw/T/p0/JRgYD+IYcjCmuHzjC3WLAKsVE4/LwiubzZkE8N49/xIQ/KGQwDRA8PaviF8IRO8JMWMngdVVQ==} - '@vitest/runner@3.0.1': - resolution: {integrity: sha512-LfVbbYOduTVx8PnYFGH98jpgubHBefIppbPQJBSlgjnRRlaX/KR6J46htECUHpf+ElJZ4xxssAfEz/Cb2iIMYA==} + '@vitest/runner@3.0.2': + resolution: {integrity: sha512-GHEsWoncrGxWuW8s405fVoDfSLk6RF2LCXp6XhevbtDjdDme1WV/eNmUueDfpY1IX3MJaCRelVCEXsT9cArfEg==} - '@vitest/snapshot@3.0.1': - resolution: {integrity: sha512-ZYV+iw2lGyc4QY2xt61b7Y3NJhSAO7UWcYWMcV0UnMrkXa8hXtfZES6WAk4g7Jr3p4qJm1P0cgDcOFyY5me+Ug==} + '@vitest/snapshot@3.0.2': + resolution: {integrity: sha512-h9s67yD4+g+JoYG0zPCo/cLTabpDqzqNdzMawmNPzDStTiwxwkyYM1v5lWE8gmGv3SVJ2DcxA2NpQJZJv9ym3g==} - '@vitest/spy@3.0.1': - resolution: {integrity: sha512-HnGJB3JFflnlka4u7aD0CfqrEtX3FgNaZAar18/KIhfo0r/WADn9PhBfiqAmNw4R/xaRcLzLPFXDwEQV1vHlJA==} + '@vitest/spy@3.0.2': + resolution: {integrity: sha512-8mI2iUn+PJFMT44e3ISA1R+K6ALVs47W6eriDTfXe6lFqlflID05MB4+rIFhmDSLBj8iBsZkzBYlgSkinxLzSQ==} - '@vitest/utils@3.0.1': - resolution: {integrity: sha512-i+Gm61rfIeSitPUsu4ZcWqucfb18ShAanRpOG6KlXfd1j6JVK5XxO2Z6lEmfjMnAQRIvvLtJ3JByzDTv347e8w==} + '@vitest/utils@3.0.2': + resolution: {integrity: sha512-Qu01ZYZlgHvDP02JnMBRpX43nRaZtNpIzw3C1clDXmn8eakgX6iQVGzTQ/NjkIr64WD8ioqOjkaYRVvHQI5qiw==} '@xhmikosr/archive-type@7.0.0': resolution: {integrity: sha512-sIm84ZneCOJuiy3PpWR5bxkx3HaNt1pqaN+vncUBZIlPZCq8ASZH+hBVdu5H8znR7qYC6sKwx+ie2Q7qztJTxA==} @@ -2898,8 +2898,8 @@ packages: resolution: {integrity: sha512-8JQkH4ooXnm1JCIhqTMbtmdnYEn6oKukBxHn1Ic9878jMkL7daTI7anTExfY18VRCX7tcdn5quzvCb6EWrR8PA==} hasBin: true - vite-node@3.0.1: - resolution: {integrity: sha512-PoH9mCNsSZQXl3gdymM5IE4WR0k0WbnFd89nAyyDvltF2jVGdFcI8vpB1PBdKTcjAR7kkYiHSlIO68X/UT8Q1A==} + vite-node@3.0.2: + resolution: {integrity: sha512-hsEQerBAHvVAbv40m3TFQe/lTEbOp7yDpyqMJqr2Tnd+W58+DEYOt+fluQgekOePcsNBmR77lpVAnIU2Xu4SvQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true @@ -2951,15 +2951,15 @@ packages: yaml: optional: true - vitest@3.0.1: - resolution: {integrity: sha512-SWKoSAkxtFHqt8biR3eN53dzmeWkigEpyipqfblcsoAghVvoFMpxQEj0gc7AajMi6Ra49fjcTN6v4AxklmS4aQ==} + vitest@3.0.2: + resolution: {integrity: sha512-5bzaHakQ0hmVVKLhfh/jXf6oETDBtgPo8tQCHYB+wftNgFJ+Hah67IsWc8ivx4vFL025Ow8UiuTf4W57z4izvQ==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.0.1 - '@vitest/ui': 3.0.1 + '@vitest/browser': 3.0.2 + '@vitest/ui': 3.0.2 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -3851,7 +3851,7 @@ snapshots: dependencies: undici-types: 6.20.0 - '@vitest/coverage-v8@3.0.1(vitest@3.0.1(@types/node@22.10.7)(tsx@4.19.2))': + '@vitest/coverage-v8@3.0.2(vitest@3.0.2(@types/node@22.10.7)(tsx@4.19.2))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -3865,47 +3865,47 @@ snapshots: std-env: 3.8.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.0.1(@types/node@22.10.7)(tsx@4.19.2) + vitest: 3.0.2(@types/node@22.10.7)(tsx@4.19.2) transitivePeerDependencies: - supports-color - '@vitest/expect@3.0.1': + '@vitest/expect@3.0.2': dependencies: - '@vitest/spy': 3.0.1 - '@vitest/utils': 3.0.1 + '@vitest/spy': 3.0.2 + '@vitest/utils': 3.0.2 chai: 5.1.2 tinyrainbow: 2.0.0 - '@vitest/mocker@3.0.1(vite@6.0.7(@types/node@22.10.7)(tsx@4.19.2))': + '@vitest/mocker@3.0.2(vite@6.0.7(@types/node@22.10.7)(tsx@4.19.2))': dependencies: - '@vitest/spy': 3.0.1 + '@vitest/spy': 3.0.2 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: vite: 6.0.7(@types/node@22.10.7)(tsx@4.19.2) - '@vitest/pretty-format@3.0.1': + '@vitest/pretty-format@3.0.2': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@3.0.1': + '@vitest/runner@3.0.2': dependencies: - '@vitest/utils': 3.0.1 + '@vitest/utils': 3.0.2 pathe: 2.0.2 - '@vitest/snapshot@3.0.1': + '@vitest/snapshot@3.0.2': dependencies: - '@vitest/pretty-format': 3.0.1 + '@vitest/pretty-format': 3.0.2 magic-string: 0.30.17 pathe: 2.0.2 - '@vitest/spy@3.0.1': + '@vitest/spy@3.0.2': dependencies: tinyspy: 3.0.2 - '@vitest/utils@3.0.1': + '@vitest/utils@3.0.2': dependencies: - '@vitest/pretty-format': 3.0.1 + '@vitest/pretty-format': 3.0.2 loupe: 3.1.2 tinyrainbow: 2.0.0 @@ -5448,7 +5448,7 @@ snapshots: uuidv7@1.0.2: {} - vite-node@3.0.1(@types/node@22.10.7)(tsx@4.19.2): + vite-node@3.0.2(@types/node@22.10.7)(tsx@4.19.2): dependencies: cac: 6.7.14 debug: 4.4.0 @@ -5490,15 +5490,15 @@ snapshots: fsevents: 2.3.3 tsx: 4.19.2 - vitest@3.0.1(@types/node@22.10.7)(tsx@4.19.2): + vitest@3.0.2(@types/node@22.10.7)(tsx@4.19.2): dependencies: - '@vitest/expect': 3.0.1 - '@vitest/mocker': 3.0.1(vite@6.0.7(@types/node@22.10.7)(tsx@4.19.2)) - '@vitest/pretty-format': 3.0.1 - '@vitest/runner': 3.0.1 - '@vitest/snapshot': 3.0.1 - '@vitest/spy': 3.0.1 - '@vitest/utils': 3.0.1 + '@vitest/expect': 3.0.2 + '@vitest/mocker': 3.0.2(vite@6.0.7(@types/node@22.10.7)(tsx@4.19.2)) + '@vitest/pretty-format': 3.0.2 + '@vitest/runner': 3.0.2 + '@vitest/snapshot': 3.0.2 + '@vitest/spy': 3.0.2 + '@vitest/utils': 3.0.2 chai: 5.1.2 debug: 4.4.0 expect-type: 1.1.0 @@ -5510,7 +5510,7 @@ snapshots: tinypool: 1.0.2 tinyrainbow: 2.0.0 vite: 6.0.7(@types/node@22.10.7)(tsx@4.19.2) - vite-node: 3.0.1(@types/node@22.10.7)(tsx@4.19.2) + vite-node: 3.0.2(@types/node@22.10.7)(tsx@4.19.2) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.10.7 diff --git a/schema.graphql b/schema.graphql index 4759fd1cc45..8b32474774e 100644 --- a/schema.graphql +++ b/schema.graphql @@ -340,6 +340,60 @@ enum CommentVoteType { up_vote } +type Community { + """Date time at the time the community was created.""" + createdAt: DateTime + + """URL to the facebook account of the community.""" + facebookURL: String + + """URL to the gitGub account of the community.""" + githubURL: String + + """Global identifier of the community.""" + id: ID! + + """ Duration in seconds it should take for inactive clients to get timed out of their authenticated session within client-side talawa applications. + """ + inactivityTimeoutDuration: Int + + """URL to the instagram account of the community.""" + instagramURL: String + + """URL to the linkedin account of the community.""" + linkedinURL: String + + """Mime type of the avatar of the community.""" + logoMimeType: String + + """URL to the logo of the community.""" + logoURL: String + + """Name of the community.""" + name: String + + """URL to the reddit account of the community.""" + redditURL: String + + """URL to the slack account of the community.""" + slackURL: String + + """Date time at the time the community was last updated.""" + updatedAt: DateTime + + """User who last updated the community.""" + updater: User + + """URL to the website of the community.""" + websiteURL: String + + """URL to the x account of the community.""" + xURL: String + + """URL to the youtube account of the community.""" + youtubeURL: String +} + """ A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. """ @@ -350,11 +404,6 @@ A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `dat """ scalar DateTime -""" -A field whose value conforms to the standard internet email address format as specified in HTML Spec: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address. -""" -scalar EmailAddress - type Event { """ GraphQL connection to traverse through the agenda folders that contain agenda items constituting a part of the agenda for the event. @@ -1162,6 +1211,9 @@ type Mutation { """Mutation field to update a comment vote.""" updateCommentVote(input: MutationUpdateCommentVoteInput!): Comment + """Mutation field to update the community.""" + updateCommunity(input: MutationUpdateCommunityInput!): Community + """Mutation field to update the current user.""" updateCurrentUser( """Input required to update the current user.""" @@ -1521,7 +1573,7 @@ input MutationCreateUserInput { educationGrade: UserEducationGrade """Email address of the user.""" - emailAddress: EmailAddress! + emailAddress: String! """Employment status of the user.""" employmentStatus: UserEmploymentStatus @@ -1753,7 +1805,7 @@ input MutationSignUpInput { educationGrade: UserEducationGrade """Email address of the user.""" - emailAddress: EmailAddress! + emailAddress: String! """Employment status of the user.""" employmentStatus: UserEmploymentStatus @@ -1902,6 +1954,47 @@ input MutationUpdateCommentVoteInput { type: CommentVoteType! } +"""""" +input MutationUpdateCommunityInput { + """URL to the facebook account of the community.""" + facebookURL: String + + """URL to the gitGub account of the community.""" + githubURL: String + + """ + Duration in seconds it should take for inactive clients to get timed out of their authenticated session within client-side talawa applications. + """ + inactivityTimeoutDuration: Int + + """URL to the instagram account of the community.""" + instagramURL: String + + """URL to the linkedin account of the community.""" + linkedinURL: String + + """Mime type of the logo of the community.""" + logo: Upload + + """Name of the community.""" + name: String + + """URL to the reddit account of the community.""" + redditURL: String + + """URL to the slack account of the community.""" + slackURL: String + + """URL to the website of the community.""" + websiteURL: String + + """URL to the x account of the community.""" + xURL: String + + """URL to the youtube account of the community.""" + youtubeURL: String +} + """""" input MutationUpdateCurrentUserInput { """Address line 1 of the user's address.""" @@ -1929,7 +2022,7 @@ input MutationUpdateCurrentUserInput { educationGrade: UserEducationGrade """Email address of the user.""" - emailAddress: EmailAddress + emailAddress: String """Employment status of the user.""" employmentStatus: UserEmploymentStatus @@ -2143,7 +2236,7 @@ input MutationUpdateUserInput { educationGrade: UserEducationGrade """Email address of the user.""" - emailAddress: EmailAddress + emailAddress: String """Employment status of the user.""" employmentStatus: UserEmploymentStatus @@ -2566,6 +2659,9 @@ type Query { """Query field to read a comment.""" comment(input: QueryCommentInput!): Comment + """Query field to read the community.""" + community: Community + """Query field to read a user.""" currentUser: User @@ -2689,7 +2785,7 @@ input QueryPostInput { """""" input QuerySignInInput { """Email address of the user.""" - emailAddress: EmailAddress! + emailAddress: String! """Password of the user to sign in to talawa.""" password: String! @@ -2873,7 +2969,7 @@ type User { educationGrade: UserEducationGrade """Email address of the user.""" - emailAddress: EmailAddress + emailAddress: String """Employment status of the user.""" employmentStatus: UserEmploymentStatus diff --git a/src/drizzle/schema.ts b/src/drizzle/schema.ts index fe5fdf6ffd9..eccf71ec636 100755 --- a/src/drizzle/schema.ts +++ b/src/drizzle/schema.ts @@ -36,6 +36,10 @@ export { commentVotesTableRelations, } from "./tables/commentVotes"; export { commentsTable, commentsTableRelations } from "./tables/comments"; +export { + communitiesTable, + communitiesTableRelations, +} from "./tables/communities"; export { eventAttachmentsTable, eventAttachmentsTableRelations, diff --git a/src/drizzle/tables/communities.ts b/src/drizzle/tables/communities.ts new file mode 100644 index 00000000000..5946a64aa33 --- /dev/null +++ b/src/drizzle/tables/communities.ts @@ -0,0 +1,129 @@ +import { relations, sql } from "drizzle-orm"; +import { integer, pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core"; +import { createInsertSchema } from "drizzle-zod"; +import { uuidv7 } from "uuidv7"; +import { imageMimeTypeEnum } from "~/src/drizzle/enums/imageMimeType"; +import { usersTable } from "./users"; + +/** + * Drizzle orm postgres table definition for a community. + */ +export const communitiesTable = pgTable("communities", { + /** + * Date time at the time the community was created. + */ + createdAt: timestamp("created_at", { + mode: "date", + precision: 3, + withTimezone: true, + }) + .notNull() + .defaultNow(), + /** + * URL to the facebook account of the community. + */ + facebookURL: text("facebook_url"), + /** + * URL to the github account of the community. + */ + githubURL: text("github_url"), + /** + * Primary unique identifier of the community. + */ + id: uuid("id").primaryKey().$default(uuidv7), + /** + * Duration in seconds it should take for inactive clients to get timed out of their authenticated session within client-side talawa applications. + */ + inactivityTimeoutDuration: integer("inactivity_timeout_duration"), + /** + * URL to the instagram account of the community. + */ + instagramURL: text("instagram_url"), + /** + * URL to the linkedin account of the community. + */ + linkedinURL: text("linkedin_url"), + /** + * Mime type of the logo of the community. + */ + logoMimeType: text("logo_mime_type", { + enum: imageMimeTypeEnum.options, + }), + /** + * Primary unique identifier of the community's logo. + */ + logoName: text("logo_name"), + /** + * Name of the community. + */ + name: text("name", {}).notNull().unique(), + /** + * URL to the reddit account of the community. + */ + redditURL: text("reddit_url"), + /** + * URL to the slack account of the community. + */ + slackURL: text("slack_url"), + /** + * Date time at the time the community was last updated. + */ + updatedAt: timestamp("updated_at", { + mode: "date", + precision: 3, + withTimezone: true, + }) + .$defaultFn(() => sql`${null}`) + .$onUpdate(() => new Date()), + /** + * Foreign key reference to the id of the user who last updated the community. + */ + updaterId: uuid("updater_id").references(() => usersTable.id, { + onDelete: "set null", + onUpdate: "cascade", + }), + /** + * URL to the website of the community. + */ + websiteURL: text("website_url"), + /** + * URL to the x account of the community. + */ + xURL: text("x_url"), + /** + * URL to the youtube account of the community. + */ + youtubeURL: text("youtube_url"), +}); + +export const communitiesTableRelations = relations( + communitiesTable, + ({ one }) => ({ + /** + * Many to one relationship from `communities` table to `users` table. + */ + updater: one(usersTable, { + fields: [communitiesTable.updaterId], + references: [usersTable.id], + relationName: "community.updater_id:users.id", + }), + }), +); + +export const communitiesTableInsertSchema = createInsertSchema( + communitiesTable, + { + facebookURL: (schema) => schema.url().optional(), + githubURL: (schema) => schema.url().optional(), + inactivityTimeoutDuration: (schema) => schema.min(1).optional(), + instagramURL: (schema) => schema.url().optional(), + linkedinURL: (schema) => schema.url().optional(), + logoName: (schema) => schema.min(1).optional(), + name: (schema) => schema.min(1).max(256), + redditURL: (schema) => schema.url().optional(), + slackURL: (schema) => schema.url().optional(), + websiteURL: (schema) => schema.url().optional(), + xURL: (schema) => schema.url().optional(), + youtubeURL: (schema) => schema.url().optional(), + }, +); diff --git a/src/drizzle/tables/users.ts b/src/drizzle/tables/users.ts index a97673edcee..6542e58f94d 100755 --- a/src/drizzle/tables/users.ts +++ b/src/drizzle/tables/users.ts @@ -29,6 +29,7 @@ import { chatMessagesTable } from "./chatMessages"; import { chatsTable } from "./chats"; import { commentVotesTable } from "./commentVotes"; import { commentsTable } from "./comments"; +import { communitiesTable } from "./communities"; import { eventAttachmentsTable } from "./eventAttachments"; import { eventAttendancesTable } from "./eventAttendances"; import { eventsTable } from "./events"; @@ -340,6 +341,12 @@ export const usersTableRelations = relations(usersTable, ({ many, one }) => ({ commentVotesWhereUpdater: many(commentVotesTable, { relationName: "comment_votes.updater_id:users.id", }), + /** + * One to many relationship from `users` table to `communities` table. + */ + communitiesWhereUpdater: many(communitiesTable, { + relationName: "communities.updater_id:users.id", + }), /** * Many to one relationship from `users` table to `users` table. */ @@ -646,6 +653,7 @@ export const usersTableInsertSchema = createInsertSchema(usersTable, { avatarName: (schema) => schema.min(1), city: (schema) => schema.min(1).max(64), description: (schema) => schema.min(1).max(2048), + emailAddress: (schema) => schema.email(), name: (schema) => schema.min(1).max(256), postalCode: (schema) => schema.min(1).max(32), state: (schema) => schema.min(1).max(64), diff --git a/src/envConfigSchema.ts b/src/envConfigSchema.ts index c7d8b843726..ed0dde8c057 100644 --- a/src/envConfigSchema.ts +++ b/src/envConfigSchema.ts @@ -12,6 +12,13 @@ export const envConfigSchema = Type.Object({ API_ADMINISTRATOR_USER_EMAIL_ADDRESS: Type.String({ format: "email", }), + /** + * Email address of the user with "administrator" role that is guaranteed to exist in the postgres database at the startup time of talawa api. + */ + API_ADMINISTRATOR_USER_NAME: Type.String({ + minLength: 1, + maxLength: 256, + }), /** * Password of the user with "administrator" role that is guaranteed to exist in the postgres database at the startup time of talawa api. */ @@ -24,6 +31,92 @@ export const envConfigSchema = Type.Object({ API_BASE_URL: Type.String({ minLength: 1, }), + /** + * URL to the facebook account of the community. + */ + API_COMMUNITY_FACEBOOK_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * URL to the github account of the community. + */ + API_COMMUNITY_GITHUB_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * URL to the instagram account of the community. + */ + API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION: Type.Optional( + Type.Integer({ + minimum: 1, + }), + ), + /** + * URL to the instagram account of the community. + */ + API_COMMUNITY_INSTAGRAM_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * URL to the linkedin account of the community. + */ + API_COMMUNITY_LINKEDIN_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * Name of the community. + */ + API_COMMUNITY_NAME: Type.String({ + minLength: 1, + }), + /** + * URL to the reddit account of the community. + */ + API_COMMUNITY_REDDIT_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * URL to the slack account of the community. + */ + API_COMMUNITY_SLACK_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * URL to the website of the community. + */ + API_COMMUNITY_WEBSITE_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * URL to the x account of the community. + */ + API_COMMUNITY_X_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), + /** + * URL to the youtube account of the community. + */ + API_COMMUNITY_YOUTUBE_URL: Type.Optional( + Type.String({ + minLength: 1, + }), + ), /** * Used for providing the host of the domain on which talawa api will run. */ diff --git a/src/graphql/inputs/MutationCreateUserInput.ts b/src/graphql/inputs/MutationCreateUserInput.ts index 87c3dbc2819..994f30c5313 100755 --- a/src/graphql/inputs/MutationCreateUserInput.ts +++ b/src/graphql/inputs/MutationCreateUserInput.ts @@ -60,10 +60,9 @@ export const MutationCreateUserInput = builder description: "Primary education grade of the user.", type: UserEducationGrade, }), - emailAddress: t.field({ + emailAddress: t.string({ description: "Email address of the user.", required: true, - type: "EmailAddress", }), employmentStatus: t.field({ description: "Employment status of the user.", diff --git a/src/graphql/inputs/MutationSignUpInput.ts b/src/graphql/inputs/MutationSignUpInput.ts index 7accaf20ee8..3d179920adb 100755 --- a/src/graphql/inputs/MutationSignUpInput.ts +++ b/src/graphql/inputs/MutationSignUpInput.ts @@ -55,10 +55,9 @@ export const MutationSignUpInput = builder description: "Primary education grade of the user.", type: UserEducationGrade, }), - emailAddress: t.field({ + emailAddress: t.string({ description: "Email address of the user.", required: true, - type: "EmailAddress", }), employmentStatus: t.field({ description: "Employment status of the user.", diff --git a/src/graphql/inputs/MutationUpdateCommunityInput.ts b/src/graphql/inputs/MutationUpdateCommunityInput.ts new file mode 100644 index 00000000000..a23e980cc85 --- /dev/null +++ b/src/graphql/inputs/MutationUpdateCommunityInput.ts @@ -0,0 +1,70 @@ +import type { FileUpload } from "graphql-upload-minimal"; +import { z } from "zod"; +import { communitiesTableInsertSchema } from "~/src/drizzle/tables/communities"; +import { builder } from "~/src/graphql/builder"; + +export const mutationUpdateCommunityInputSchema = communitiesTableInsertSchema + .omit({ + createdAt: true, + id: true, + logoMimeType: true, + logoName: true, + name: true, + updatedAt: true, + updaterId: true, + }) + .extend({ + logo: z.custom>().nullish(), + name: communitiesTableInsertSchema.shape.name.optional(), + }) + .refine((arg) => Object.values(arg).some((value) => value !== undefined), { + message: "At least one optional argument must be provided.", + }); + +export const MutationUpdateCommunityInput = builder + .inputRef>( + "MutationUpdateCommunityInput", + ) + .implement({ + description: "", + fields: (t) => ({ + facebookURL: t.string({ + description: "URL to the facebook account of the community.", + }), + githubURL: t.string({ + description: "URL to the gitGub account of the community.", + }), + inactivityTimeoutDuration: t.int({ + description: + "Duration in seconds it should take for inactive clients to get timed out of their authenticated session within client-side talawa applications.", + }), + instagramURL: t.string({ + description: "URL to the instagram account of the community.", + }), + linkedinURL: t.string({ + description: "URL to the linkedin account of the community.", + }), + logo: t.field({ + description: "Mime type of the logo of the community.", + type: "Upload", + }), + name: t.string({ + description: "Name of the community.", + }), + redditURL: t.string({ + description: "URL to the reddit account of the community.", + }), + slackURL: t.string({ + description: "URL to the slack account of the community.", + }), + websiteURL: t.string({ + description: "URL to the website of the community.", + }), + xURL: t.string({ + description: "URL to the x account of the community.", + }), + youtubeURL: t.string({ + description: "URL to the youtube account of the community.", + }), + }), + }); diff --git a/src/graphql/inputs/MutationUpdateCurrentUserInput.ts b/src/graphql/inputs/MutationUpdateCurrentUserInput.ts index 53146601b9e..5a45edc79c8 100755 --- a/src/graphql/inputs/MutationUpdateCurrentUserInput.ts +++ b/src/graphql/inputs/MutationUpdateCurrentUserInput.ts @@ -68,9 +68,8 @@ export const MutationUpdateCurrentUserInput = builder description: "Primary education grade of the user.", type: UserEducationGrade, }), - emailAddress: t.field({ + emailAddress: t.string({ description: "Email address of the user.", - type: "EmailAddress", }), employmentStatus: t.field({ description: "Employment status of the user.", diff --git a/src/graphql/inputs/MutationUpdateUserInput.ts b/src/graphql/inputs/MutationUpdateUserInput.ts index 3bdf98fcd4f..0ff8637f719 100755 --- a/src/graphql/inputs/MutationUpdateUserInput.ts +++ b/src/graphql/inputs/MutationUpdateUserInput.ts @@ -75,9 +75,8 @@ export const MutationUpdateUserInput = builder description: "Primary education grade of the user.", type: UserEducationGrade, }), - emailAddress: t.field({ + emailAddress: t.string({ description: "Email address of the user.", - type: "EmailAddress", }), employmentStatus: t.field({ description: "Employment status of the user.", diff --git a/src/graphql/inputs/QuerySignInInput.ts b/src/graphql/inputs/QuerySignInInput.ts index 5f734131dde..1ea29d37ee3 100755 --- a/src/graphql/inputs/QuerySignInInput.ts +++ b/src/graphql/inputs/QuerySignInInput.ts @@ -15,10 +15,9 @@ export const QuerySignInInput = builder .implement({ description: "", fields: (t) => ({ - emailAddress: t.field({ + emailAddress: t.string({ description: "Email address of the user.", required: true, - type: "EmailAddress", }), password: t.string({ description: "Password of the user to sign in to talawa.", diff --git a/src/graphql/inputs/index.ts b/src/graphql/inputs/index.ts index 9db114a19eb..974645c7aa1 100644 --- a/src/graphql/inputs/index.ts +++ b/src/graphql/inputs/index.ts @@ -49,6 +49,7 @@ import "./MutationUpdateChatMembershipInput"; import "./MutationUpdateChatMessageInput"; import "./MutationUpdateCommentInput"; import "./MutationUpdateCommentVoteInput"; +import "./MutationUpdateCommunityInput"; import "./MutationUpdateCurrentUserInput"; import "./MutationUpdateEventInput"; import "./MutationUpdateFundCampaignInput"; diff --git a/src/graphql/scalars/EmailAddress.ts b/src/graphql/scalars/EmailAddress.ts deleted file mode 100755 index 3f46aa92444..00000000000 --- a/src/graphql/scalars/EmailAddress.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { EmailAddressResolver } from "graphql-scalars"; -import { builder } from "~/src/graphql/builder"; - -/** - * More information at this link: {@link https://the-guild.dev/graphql/scalars/docs/scalars/email-address} - */ -export const EmailAddress = builder.addScalarType( - "EmailAddress", - EmailAddressResolver, -); - -/** - * `EmailAddress` scalar type for pothos schema. - */ -export type EmailAddress = { - Input: string; - Output: string; -}; diff --git a/src/graphql/scalars/index.ts b/src/graphql/scalars/index.ts index 602206f8ee2..572f73d80ad 100644 --- a/src/graphql/scalars/index.ts +++ b/src/graphql/scalars/index.ts @@ -1,14 +1,12 @@ import "./BigInt"; import "./Date"; import "./DateTime"; -import "./EmailAddress"; import "./PhoneNumber"; import "./Upload"; import type { _BigInt } from "./BigInt"; import type { _Date } from "./Date"; import type { DateTime } from "./DateTime"; -import type { EmailAddress } from "./EmailAddress"; import type { PhoneNumber } from "./PhoneNumber"; import type { Upload } from "./Upload"; @@ -19,7 +17,6 @@ export type CustomScalars = { BigInt: _BigInt; Date: _Date; DateTime: DateTime; - EmailAddress: EmailAddress; PhoneNumber: PhoneNumber; Upload: Upload; }; @@ -31,6 +28,5 @@ export type ClientCustomScalars = { BigInt: string; Date: string; DateTime: string; - EmailAddress: string; PhoneNumber: string; }; diff --git a/src/graphql/types/Chat/avatarURL.ts b/src/graphql/types/Chat/avatarURL.ts index 93d185d9015..f45d1cd5283 100644 --- a/src/graphql/types/Chat/avatarURL.ts +++ b/src/graphql/types/Chat/avatarURL.ts @@ -5,10 +5,12 @@ Chat.implement({ avatarURL: t.field({ description: "URL to the avatar of the chat.", resolve: async (parent, _args, ctx) => - new URL( - `/objects/${parent.name}`, - ctx.envConfig.API_BASE_URL, - ).toString(), + parent.avatarName === null + ? null + : new URL( + `/objects/${parent.avatarName}`, + ctx.envConfig.API_BASE_URL, + ).toString(), type: "String", }), }), diff --git a/src/graphql/types/Community/Community.ts b/src/graphql/types/Community/Community.ts new file mode 100644 index 00000000000..97f885748f7 --- /dev/null +++ b/src/graphql/types/Community/Community.ts @@ -0,0 +1,58 @@ +import type { communitiesTable } from "~/src/drizzle/tables/communities"; +import { builder } from "~/src/graphql/builder"; + +export type Community = typeof communitiesTable.$inferSelect; + +export const Community = builder.objectRef("Community"); + +Community.implement({ + description: + "Communitys are controlled spaces of collections of users who associate with the purpose those communities exist for.", + fields: (t) => ({ + createdAt: t.expose("createdAt", { + description: "Date time at the time the community was created.", + type: "DateTime", + }), + facebookURL: t.exposeString("facebookURL", { + description: "URL to the facebook account of the community.", + }), + githubURL: t.exposeString("githubURL", { + description: "URL to the gitGub account of the community.", + }), + id: t.exposeID("id", { + description: "Global identifier of the community.", + nullable: false, + }), + inactivityTimeoutDuration: t.exposeInt("inactivityTimeoutDuration", { + description: + " Duration in seconds it should take for inactive clients to get timed out of their authenticated session within client-side talawa applications.", + }), + instagramURL: t.exposeString("instagramURL", { + description: "URL to the instagram account of the community.", + }), + linkedinURL: t.exposeString("linkedinURL", { + description: "URL to the linkedin account of the community.", + }), + logoMimeType: t.exposeString("logoMimeType", { + description: "Mime type of the avatar of the community.", + }), + name: t.exposeString("name", { + description: "Name of the community.", + }), + redditURL: t.exposeString("redditURL", { + description: "URL to the reddit account of the community.", + }), + slackURL: t.exposeString("slackURL", { + description: "URL to the slack account of the community.", + }), + websiteURL: t.exposeString("websiteURL", { + description: "URL to the website of the community.", + }), + xURL: t.exposeString("xURL", { + description: "URL to the x account of the community.", + }), + youtubeURL: t.exposeString("youtubeURL", { + description: "URL to the youtube account of the community.", + }), + }), +}); diff --git a/src/graphql/types/Community/index.ts b/src/graphql/types/Community/index.ts new file mode 100644 index 00000000000..8cf3de0c8a8 --- /dev/null +++ b/src/graphql/types/Community/index.ts @@ -0,0 +1,4 @@ +import "./Community"; +import "./logoURL"; +import "./updatedAt"; +import "./updater"; diff --git a/src/graphql/types/Community/logoURL.ts b/src/graphql/types/Community/logoURL.ts new file mode 100644 index 00000000000..efe85b671d6 --- /dev/null +++ b/src/graphql/types/Community/logoURL.ts @@ -0,0 +1,17 @@ +import { Community } from "./Community"; + +Community.implement({ + fields: (t) => ({ + logoURL: t.field({ + description: "URL to the logo of the community.", + resolve: async (parent, _args, ctx) => + parent.logoName === null + ? null + : new URL( + `/objects/${parent.logoName}`, + ctx.envConfig.API_BASE_URL, + ).toString(), + type: "String", + }), + }), +}); diff --git a/src/graphql/types/Community/updatedAt.ts b/src/graphql/types/Community/updatedAt.ts new file mode 100644 index 00000000000..1a5fb1f9536 --- /dev/null +++ b/src/graphql/types/Community/updatedAt.ts @@ -0,0 +1,47 @@ +import { TalawaGraphQLError } from "~/src/utilities/TalawaGraphQLError"; +import { Community } from "./Community"; + +Community.implement({ + fields: (t) => ({ + updatedAt: t.field({ + description: "Date time at the time the community was last updated.", + resolve: async (parent, _args, ctx) => { + if (!ctx.currentClient.isAuthenticated) { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthenticated", + }, + }); + } + + const currentUserId = ctx.currentClient.user.id; + + const currentUser = await ctx.drizzleClient.query.usersTable.findFirst({ + columns: { + role: true, + }, + where: (fields, operators) => operators.eq(fields.id, currentUserId), + }); + + if (currentUser === undefined) { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthenticated", + }, + }); + } + + if (currentUser.role !== "administrator") { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthorized_action", + }, + }); + } + + return parent.updatedAt; + }, + type: "DateTime", + }), + }), +}); diff --git a/src/graphql/types/Community/updater.ts b/src/graphql/types/Community/updater.ts new file mode 100755 index 00000000000..fe761e4015c --- /dev/null +++ b/src/graphql/types/Community/updater.ts @@ -0,0 +1,74 @@ +import { User } from "~/src/graphql/types/User/User"; +import { TalawaGraphQLError } from "~/src/utilities/TalawaGraphQLError"; +import { Community } from "./Community"; + +Community.implement({ + fields: (t) => ({ + updater: t.field({ + description: "User who last updated the community.", + resolve: async (parent, _args, ctx) => { + if (!ctx.currentClient.isAuthenticated) { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthenticated", + }, + }); + } + + const currentUserId = ctx.currentClient.user.id; + + const currentUser = await ctx.drizzleClient.query.usersTable.findFirst({ + where: (fields, operators) => operators.eq(fields.id, currentUserId), + }); + + if (currentUser === undefined) { + throw new TalawaGraphQLError({ + extensions: { + code: "forbidden_action", + }, + }); + } + + if (currentUser.role !== "administrator") { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthorized_action", + }, + }); + } + + if (parent.updaterId === null) { + return null; + } + + if (parent.updaterId === currentUserId) { + return currentUser; + } + + const updaterId = parent.updaterId; + + const existingUser = await ctx.drizzleClient.query.usersTable.findFirst( + { + where: (fields, operators) => operators.eq(fields.id, updaterId), + }, + ); + + // Updater id existing but the associated user not existing is either a business logic error which means that the corresponding data in the database is in a corrupted state or it is a rare race condition. It must be investigated and fixed as soon as possible to prevent further data corruption if the former case is true. + if (existingUser === undefined) { + ctx.log.warn( + "Postgres select operation returned an empty array for a community's updater id that isn't null.", + ); + + throw new TalawaGraphQLError({ + extensions: { + code: "unexpected", + }, + }); + } + + return existingUser; + }, + type: User, + }), + }), +}); diff --git a/src/graphql/types/Mutation/index.ts b/src/graphql/types/Mutation/index.ts index f8bfda392dc..03c3b635d91 100644 --- a/src/graphql/types/Mutation/index.ts +++ b/src/graphql/types/Mutation/index.ts @@ -51,6 +51,7 @@ import "./updateChatMembership"; import "./updateChatMessage"; import "./updateComment"; import "./updateCommentVote"; +import "./updateCommunity"; import "./updateCurrentUser"; import "./updateEvent"; import "./updateFund"; diff --git a/src/graphql/types/Mutation/updateCommunity.ts b/src/graphql/types/Mutation/updateCommunity.ts new file mode 100644 index 00000000000..980463d1ecf --- /dev/null +++ b/src/graphql/types/Mutation/updateCommunity.ts @@ -0,0 +1,208 @@ +import type { FileUpload } from "graphql-upload-minimal"; +import { ulid } from "ulidx"; +import { z } from "zod"; +import { imageMimeTypeEnum } from "~/src/drizzle/enums/imageMimeType"; +import { communitiesTable } from "~/src/drizzle/tables/communities"; +import { builder } from "~/src/graphql/builder"; +import { + MutationUpdateCommunityInput, + mutationUpdateCommunityInputSchema, +} from "~/src/graphql/inputs/MutationUpdateCommunityInput"; +import { Community } from "~/src/graphql/types/Community/Community"; +import { TalawaGraphQLError } from "~/src/utilities/TalawaGraphQLError"; +import { isNotNullish } from "~/src/utilities/isNotNullish"; + +const mutationUpdateCommunityArgumentsSchema = z.object({ + input: mutationUpdateCommunityInputSchema.transform(async (arg, ctx) => { + let logo: + | (FileUpload & { + mimetype: z.infer; + }) + | null + | undefined; + + if (isNotNullish(arg.logo)) { + const rawAvatar = await arg.logo; + const result = imageMimeTypeEnum.safeParse(rawAvatar.mimetype); + + if (!result.success) { + ctx.addIssue({ + code: "custom", + path: ["logo"], + message: `Mime type ${rawAvatar.mimetype} not allowed for this file upload.`, + }); + } else { + logo = Object.assign(rawAvatar, { + mimetype: result.data, + }); + } + + return { + ...arg, + logo, + }; + } + + return { + ...arg, + logo: arg.logo, + }; + }), +}); + +builder.mutationField("updateCommunity", (t) => + t.field({ + args: { + input: t.arg({ + description: "", + required: true, + type: MutationUpdateCommunityInput, + }), + }, + description: "Mutation field to update the community.", + resolve: async (_parent, args, ctx) => { + if (!ctx.currentClient.isAuthenticated) { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthenticated", + }, + }); + } + + const { + success, + data: parsedArgs, + error, + } = await mutationUpdateCommunityArgumentsSchema.safeParseAsync(args); + + if (!success) { + throw new TalawaGraphQLError({ + extensions: { + code: "invalid_arguments", + issues: error.issues.map((issue) => ({ + argumentPath: issue.path, + message: issue.message, + })), + }, + }); + } + + const currentUserId = ctx.currentClient.user.id; + + const [currentUser, existingCommunity] = await Promise.all([ + ctx.drizzleClient.query.usersTable.findFirst({ + columns: { + role: true, + }, + where: (fields, operators) => operators.eq(fields.id, currentUserId), + }), + ctx.drizzleClient.query.communitiesTable.findFirst({ + columns: { + logoName: true, + }, + }), + ]); + + if (currentUser === undefined) { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthenticated", + }, + }); + } + + if (currentUser.role !== "administrator") { + throw new TalawaGraphQLError({ + extensions: { + code: "unauthorized_action", + }, + }); + } + + // Community not existing is a business logic error and means that the corresponding data in the database is in a corrupted state. It must be investigated and fixed as soon as possible to prevent additional data corruption. + if (existingCommunity === undefined) { + ctx.log.error( + "Postgres select operation returned an empty array for the community.", + ); + + throw new TalawaGraphQLError({ + extensions: { + code: "unexpected", + }, + }); + } + + let logoMimeType: z.infer; + let logoName: string; + + if (isNotNullish(parsedArgs.input.logo)) { + logoName = + existingCommunity.logoName === null + ? ulid() + : existingCommunity.logoName; + logoMimeType = parsedArgs.input.logo.mimetype; + } + + return await ctx.drizzleClient.transaction(async (tx) => { + const [updatedCommunity] = await tx + .update(communitiesTable) + .set({ + facebookURL: parsedArgs.input.facebookURL, + githubURL: parsedArgs.input.githubURL, + inactivityTimeoutDuration: + parsedArgs.input.inactivityTimeoutDuration, + logoMimeType: isNotNullish(parsedArgs.input.logo) + ? logoMimeType + : null, + logoName: isNotNullish(parsedArgs.input.logo) ? logoName : null, + instagramURL: parsedArgs.input.instagramURL, + linkedinURL: parsedArgs.input.linkedinURL, + name: parsedArgs.input.name, + redditURL: parsedArgs.input.redditURL, + slackURL: parsedArgs.input.slackURL, + updaterId: currentUserId, + websiteURL: parsedArgs.input.websiteURL, + xURL: parsedArgs.input.xURL, + youtubeURL: parsedArgs.input.youtubeURL, + }) + .returning(); + + // Updated community not being returned is a business logic error and means that the corresponding data in the database is in a corrupted state. It must be investigated and fixed as soon as possible to prevent additional data corruption. + if (updatedCommunity === undefined) { + ctx.log.error( + "Postgres update operation returned an empty array for the community.", + ); + + throw new TalawaGraphQLError({ + extensions: { + code: "unexpected", + }, + }); + } + + if (isNotNullish(parsedArgs.input.logo)) { + await ctx.minio.client.putObject( + ctx.minio.bucketName, + logoName, + parsedArgs.input.logo.createReadStream(), + undefined, + { + "content-type": parsedArgs.input.logo.mimetype, + }, + ); + } else if ( + parsedArgs.input.logo !== undefined && + existingCommunity.logoName !== null + ) { + await ctx.minio.client.removeObject( + ctx.minio.bucketName, + existingCommunity.logoName, + ); + } + + return updatedCommunity; + }); + }, + type: Community, + }), +); diff --git a/src/graphql/types/Organization/avatarURL.ts b/src/graphql/types/Organization/avatarURL.ts index f474c89b299..99591038a98 100644 --- a/src/graphql/types/Organization/avatarURL.ts +++ b/src/graphql/types/Organization/avatarURL.ts @@ -5,10 +5,12 @@ Organization.implement({ avatarURL: t.field({ description: "URL to the avatar of the organization.", resolve: async (parent, _args, ctx) => - new URL( - `/objects/${parent.avatarName}`, - ctx.envConfig.API_BASE_URL, - ).toString(), + parent.avatarName === null + ? null + : new URL( + `/objects/${parent.avatarName}`, + ctx.envConfig.API_BASE_URL, + ).toString(), type: "String", }), }), diff --git a/src/graphql/types/Query/community.ts b/src/graphql/types/Query/community.ts new file mode 100644 index 00000000000..3eb5d0a0c2f --- /dev/null +++ b/src/graphql/types/Query/community.ts @@ -0,0 +1,29 @@ +import { builder } from "~/src/graphql/builder"; +import { Community } from "~/src/graphql/types/Community/Community"; +import { TalawaGraphQLError } from "~/src/utilities/TalawaGraphQLError"; + +builder.queryField("community", (t) => + t.field({ + description: "Query field to read the community.", + resolve: async (_parent, _args, ctx) => { + const community = + await ctx.drizzleClient.query.communitiesTable.findFirst({}); + + // Community not existing is a business logic error and means that the corresponding data in the database is in a corrupted state. It must be investigated and fixed as soon as possible to prevent additional data corruption. + if (community === undefined) { + ctx.log.error( + "Postgres select operation returned an empty array for the community.", + ); + + throw new TalawaGraphQLError({ + extensions: { + code: "unexpected", + }, + }); + } + + return community; + }, + type: Community, + }), +); diff --git a/src/graphql/types/Query/index.ts b/src/graphql/types/Query/index.ts index c975e0843c5..41c208b462a 100644 --- a/src/graphql/types/Query/index.ts +++ b/src/graphql/types/Query/index.ts @@ -5,6 +5,7 @@ import "./agendaItem"; import "./chat"; import "./chatMessage"; import "./comment"; +import "./community"; import "./currentUser"; import "./event"; import "./fund"; diff --git a/src/graphql/types/User/avatarURL.ts b/src/graphql/types/User/avatarURL.ts index fee763c1854..dd9c9094053 100644 --- a/src/graphql/types/User/avatarURL.ts +++ b/src/graphql/types/User/avatarURL.ts @@ -5,10 +5,12 @@ User.implement({ avatarURL: t.field({ description: "URL to the avatar of the user.", resolve: async (parent, _args, ctx) => - new URL( - `/objects/${parent.avatarName}`, - ctx.envConfig.API_BASE_URL, - ).toString(), + parent.avatarName === null + ? null + : new URL( + `/objects/${parent.avatarName}`, + ctx.envConfig.API_BASE_URL, + ).toString(), type: "String", }), }), diff --git a/src/graphql/types/User/emailAddress.ts b/src/graphql/types/User/emailAddress.ts index c27e372dfaa..8b9e8df8a7c 100644 --- a/src/graphql/types/User/emailAddress.ts +++ b/src/graphql/types/User/emailAddress.ts @@ -3,7 +3,7 @@ import { User } from "./User"; User.implement({ fields: (t) => ({ - emailAddress: t.field({ + emailAddress: t.string({ description: "Email address of the user.", resolve: async (parent, _args, ctx) => { if (!ctx.currentClient.isAuthenticated) { @@ -44,7 +44,6 @@ User.implement({ return parent.emailAddress; }, - type: "EmailAddress", }), }), }); diff --git a/src/graphql/types/index.ts b/src/graphql/types/index.ts index a9525f0a016..2fe75b9ce2f 100644 --- a/src/graphql/types/index.ts +++ b/src/graphql/types/index.ts @@ -6,6 +6,7 @@ import "./AuthenticationPayload"; import "./Chat/index"; import "./ChatMessage/index"; import "./Comment/index"; +import "./Community/index"; import "./Event/index"; import "./EventAttachment/index"; import "./Fund/index"; diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 08a8ff02b52..8c1655a0d5b 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -1,12 +1,12 @@ import fastifyPlugin from "fastify-plugin"; import drizzleClient from "./drizzleClient"; import minioClient from "./minioClient"; -import seedDatabase from "./seedPostgres"; +import seedInitialData from "./seedInitialData"; export const plugins = fastifyPlugin(async (fastify) => { fastify.register(drizzleClient); - fastify.register(seedDatabase); fastify.register(minioClient); + fastify.register(seedInitialData); }); export default plugins; diff --git a/src/plugins/seedPostgres.ts b/src/plugins/seedInitialData.ts similarity index 55% rename from src/plugins/seedPostgres.ts rename to src/plugins/seedInitialData.ts index a25b4260e26..670b25330ca 100644 --- a/src/plugins/seedPostgres.ts +++ b/src/plugins/seedInitialData.ts @@ -3,6 +3,10 @@ import type { FastifyPluginAsync } from "fastify"; import fastifyPlugin from "fastify-plugin"; import { uuidv7 } from "uuidv7"; import type { z } from "zod"; +import { + communitiesTable, + communitiesTableInsertSchema, +} from "~/src/drizzle/tables/communities"; import { usersTable, usersTableInsertSchema } from "~/src/drizzle/tables/users"; // TODO: Will be replaced with a different implementation in the future. @@ -65,7 +69,7 @@ const plugin: FastifyPluginAsync = async (fastify) => { emailAddress: fastify.envConfig.API_ADMINISTRATOR_USER_EMAIL_ADDRESS, id: userId, isEmailAddressVerified: true, - name: "name", + name: fastify.envConfig.API_ADMINISTRATOR_USER_NAME, passwordHash: await hash( fastify.envConfig.API_ADMINISTRATOR_USER_PASSWORD, ), @@ -86,6 +90,63 @@ const plugin: FastifyPluginAsync = async (fastify) => { fastify.log.info("Successfully created the administrator in the database."); } + + fastify.log.info("Checking if the community already exists in the database."); + + let existingCommunity: + | Pick + | undefined; + + try { + existingCommunity = + await fastify.drizzleClient.query.communitiesTable.findFirst({ + columns: { + logoMimeType: true, + }, + }); + } catch (error) { + throw new Error( + "Failed to check if the community already exists in the database.", + { + cause: error, + }, + ); + } + + if (existingCommunity !== undefined) { + fastify.log.info( + "Community already exists in the database. Skipping, the community creation.", + ); + } else { + fastify.log.info( + "Community does not exist in the database. Creating the community.", + ); + + try { + await fastify.drizzleClient.insert(communitiesTable).values( + communitiesTableInsertSchema.parse({ + facebookURL: fastify.envConfig.API_COMMUNITY_FACEBOOK_URL, + githubURL: fastify.envConfig.API_COMMUNITY_GITHUB_URL, + inactivityTimeoutDuration: + fastify.envConfig.API_COMMUNITY_INACTIVITY_TIMEOUT_DURATION, + instagramURL: fastify.envConfig.API_COMMUNITY_INSTAGRAM_URL, + linkedinURL: fastify.envConfig.API_COMMUNITY_LINKEDIN_URL, + name: fastify.envConfig.API_COMMUNITY_NAME, + redditURL: fastify.envConfig.API_COMMUNITY_REDDIT_URL, + slackURL: fastify.envConfig.API_COMMUNITY_SLACK_URL, + websiteURL: fastify.envConfig.API_COMMUNITY_WEBSITE_URL, + xURL: fastify.envConfig.API_COMMUNITY_X_URL, + youtubeURL: fastify.envConfig.API_COMMUNITY_YOUTUBE_URL, + }), + ); + } catch (error) { + throw new Error("Failed to create the community in the database.", { + cause: error, + }); + } + + fastify.log.info("Successfully created the community in the database."); + } }; export default fastifyPlugin(plugin, { diff --git a/test/drizzle.config.ts b/test/drizzle.config.ts index 886a09e6390..593f7bc702f 100644 --- a/test/drizzle.config.ts +++ b/test/drizzle.config.ts @@ -1,5 +1,5 @@ /** - * More information at this link: {@link https://orm.drizzle.team/kit-docs/config-reference} + * This file is required for `package.json` scripts specific to the postgres test database to work. More information at this link: {@link https://orm.drizzle.team/kit-docs/config-reference} */ import { type Static, Type } from "@sinclair/typebox"; import { defineConfig } from "drizzle-kit"; diff --git a/test/routes/graphql/gql.tada.d.ts b/test/routes/graphql/gql.tada.d.ts index ec114887ad4..519697b1e98 100644 --- a/test/routes/graphql/gql.tada.d.ts +++ b/test/routes/graphql/gql.tada.d.ts @@ -28,9 +28,9 @@ export type introspection_types = { 'CommentUpVotersConnection': { kind: 'OBJECT'; name: 'CommentUpVotersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'CommentUpVotersConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'CommentUpVotersConnectionEdge': { kind: 'OBJECT'; name: 'CommentUpVotersConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'CommentVoteType': { name: 'CommentVoteType'; enumValues: 'down_vote' | 'up_vote'; }; + 'Community': { kind: 'OBJECT'; name: 'Community'; fields: { 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'facebookURL': { name: 'facebookURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'githubURL': { name: 'githubURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'inactivityTimeoutDuration': { name: 'inactivityTimeoutDuration'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'instagramURL': { name: 'instagramURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'linkedinURL': { name: 'linkedinURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'logoMimeType': { name: 'logoMimeType'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'logoURL': { name: 'logoURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'redditURL': { name: 'redditURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'slackURL': { name: 'slackURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'websiteURL': { name: 'websiteURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'xURL': { name: 'xURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'youtubeURL': { name: 'youtubeURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; 'Date': unknown; 'DateTime': unknown; - 'EmailAddress': unknown; 'Event': { kind: 'OBJECT'; name: 'Event'; fields: { 'agendaFolders': { name: 'agendaFolders'; type: { kind: 'OBJECT'; name: 'EventAgendaFoldersConnection'; ofType: null; } }; 'attachments': { name: 'attachments'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EventAttachment'; ofType: null; }; }; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'endAt': { name: 'endAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'organization': { name: 'organization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'startAt': { name: 'startAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'venues': { name: 'venues'; type: { kind: 'OBJECT'; name: 'EventVenuesConnection'; ofType: null; } }; }; }; 'EventAgendaFoldersConnection': { kind: 'OBJECT'; name: 'EventAgendaFoldersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'EventAgendaFoldersConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'EventAgendaFoldersConnectionEdge': { kind: 'OBJECT'; name: 'EventAgendaFoldersConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; }; }; @@ -48,7 +48,7 @@ export type introspection_types = { 'Int': unknown; 'Iso3166Alpha2CountryCode': { name: 'Iso3166Alpha2CountryCode'; enumValues: 'ad' | 'ae' | 'af' | 'ag' | 'ai' | 'al' | 'am' | 'ao' | 'aq' | 'ar' | 'as' | 'at' | 'au' | 'aw' | 'ax' | 'az' | 'ba' | 'bb' | 'bd' | 'be' | 'bf' | 'bg' | 'bh' | 'bi' | 'bj' | 'bl' | 'bm' | 'bn' | 'bo' | 'bq' | 'br' | 'bs' | 'bt' | 'bv' | 'bw' | 'by' | 'bz' | 'ca' | 'cc' | 'cd' | 'cf' | 'cg' | 'ch' | 'ci' | 'ck' | 'cl' | 'cm' | 'cn' | 'co' | 'cr' | 'cu' | 'cv' | 'cw' | 'cx' | 'cy' | 'cz' | 'de' | 'dj' | 'dk' | 'dm' | 'do' | 'dz' | 'ec' | 'ee' | 'eg' | 'eh' | 'er' | 'es' | 'et' | 'fi' | 'fj' | 'fk' | 'fm' | 'fo' | 'fr' | 'ga' | 'gb' | 'gd' | 'ge' | 'gf' | 'gg' | 'gh' | 'gi' | 'gl' | 'gm' | 'gn' | 'gp' | 'gq' | 'gr' | 'gs' | 'gt' | 'gu' | 'gw' | 'gy' | 'hk' | 'hm' | 'hn' | 'hr' | 'ht' | 'hu' | 'id' | 'ie' | 'il' | 'im' | 'in' | 'io' | 'iq' | 'ir' | 'is' | 'it' | 'je' | 'jm' | 'jo' | 'jp' | 'ke' | 'kg' | 'kh' | 'ki' | 'km' | 'kn' | 'kp' | 'kr' | 'kw' | 'ky' | 'kz' | 'la' | 'lb' | 'lc' | 'li' | 'lk' | 'lr' | 'ls' | 'lt' | 'lu' | 'lv' | 'ly' | 'ma' | 'mc' | 'md' | 'me' | 'mf' | 'mg' | 'mh' | 'mk' | 'ml' | 'mm' | 'mn' | 'mo' | 'mp' | 'mq' | 'mr' | 'ms' | 'mt' | 'mu' | 'mv' | 'mw' | 'mx' | 'my' | 'mz' | 'na' | 'nc' | 'ne' | 'nf' | 'ng' | 'ni' | 'nl' | 'no' | 'np' | 'nr' | 'nu' | 'nz' | 'om' | 'pa' | 'pe' | 'pf' | 'pg' | 'ph' | 'pk' | 'pl' | 'pm' | 'pn' | 'pr' | 'ps' | 'pt' | 'pw' | 'py' | 'qa' | 're' | 'ro' | 'rs' | 'ru' | 'rw' | 'sa' | 'sb' | 'sc' | 'sd' | 'se' | 'sg' | 'sh' | 'si' | 'sj' | 'sk' | 'sl' | 'sm' | 'sn' | 'so' | 'sr' | 'ss' | 'st' | 'sv' | 'sx' | 'sy' | 'sz' | 'tc' | 'td' | 'tf' | 'tg' | 'th' | 'tj' | 'tk' | 'tl' | 'tm' | 'tn' | 'to' | 'tr' | 'tt' | 'tv' | 'tw' | 'tz' | 'ua' | 'ug' | 'um' | 'us' | 'uy' | 'uz' | 'va' | 'vc' | 've' | 'vg' | 'vi' | 'vn' | 'vu' | 'wf' | 'ws' | 'ye' | 'yt' | 'za' | 'zm' | 'zw'; }; 'Iso4217CurrencyCode': { name: 'Iso4217CurrencyCode'; enumValues: 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLE' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VED' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWG'; }; - 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'createAdvertisement': { name: 'createAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'createAgendaFolder': { name: 'createAgendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'createAgendaItem': { name: 'createAgendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'createChat': { name: 'createChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'createChatMembership': { name: 'createChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'createChatMessage': { name: 'createChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'createComment': { name: 'createComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createCommentVote': { name: 'createCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createEvent': { name: 'createEvent'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'createFund': { name: 'createFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'createFundCampaign': { name: 'createFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'createFundCampaignPledge': { name: 'createFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'createOrganization': { name: 'createOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createOrganizationMembership': { name: 'createOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createPost': { name: 'createPost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createPostVote': { name: 'createPostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createTag': { name: 'createTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'createTagFolder': { name: 'createTagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'createUser': { name: 'createUser'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'createVenue': { name: 'createVenue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'createVenueBooking': { name: 'createVenueBooking'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'deleteAdvertisement': { name: 'deleteAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'deleteAgendaFolder': { name: 'deleteAgendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'deleteAgendaItem': { name: 'deleteAgendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'deleteChat': { name: 'deleteChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'deleteChatMembership': { name: 'deleteChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'deleteChatMessage': { name: 'deleteChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'deleteComment': { name: 'deleteComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCommentVote': { name: 'deleteCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCurrentUser': { name: 'deleteCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'deleteEvent': { name: 'deleteEvent'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'deleteFund': { name: 'deleteFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'deleteFundCampaign': { name: 'deleteFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'deleteFundCampaignPledge': { name: 'deleteFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'deleteOrganization': { name: 'deleteOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deleteOrganizationMembership': { name: 'deleteOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deletePost': { name: 'deletePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deletePostVote': { name: 'deletePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deleteTag': { name: 'deleteTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'deleteTagFolder': { name: 'deleteTagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'deleteUser': { name: 'deleteUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'deleteVenue': { name: 'deleteVenue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'deleteVenueBooking': { name: 'deleteVenueBooking'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'signUp': { name: 'signUp'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'updateAdvertisement': { name: 'updateAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'updateAgendaFolder': { name: 'updateAgendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'updateAgendaItem': { name: 'updateAgendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'updateChat': { name: 'updateChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'updateChatMembership': { name: 'updateChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'updateChatMessage': { name: 'updateChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'updateComment': { name: 'updateComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCommentVote': { name: 'updateCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCurrentUser': { name: 'updateCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'updateEvent': { name: 'updateEvent'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'updateFund': { name: 'updateFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'updateFundCampaign': { name: 'updateFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'updateFundCampaignPledge': { name: 'updateFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'updateOrganization': { name: 'updateOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updateOrganizationMembership': { name: 'updateOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updatePost': { name: 'updatePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updatePostVote': { name: 'updatePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updateTag': { name: 'updateTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'updateTagFolder': { name: 'updateTagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'updateUser': { name: 'updateUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'updateVenue': { name: 'updateVenue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; }; }; + 'Mutation': { kind: 'OBJECT'; name: 'Mutation'; fields: { 'createAdvertisement': { name: 'createAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'createAgendaFolder': { name: 'createAgendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'createAgendaItem': { name: 'createAgendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'createChat': { name: 'createChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'createChatMembership': { name: 'createChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'createChatMessage': { name: 'createChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'createComment': { name: 'createComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createCommentVote': { name: 'createCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'createEvent': { name: 'createEvent'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'createFund': { name: 'createFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'createFundCampaign': { name: 'createFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'createFundCampaignPledge': { name: 'createFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'createOrganization': { name: 'createOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createOrganizationMembership': { name: 'createOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'createPost': { name: 'createPost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createPostVote': { name: 'createPostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'createTag': { name: 'createTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'createTagFolder': { name: 'createTagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'createUser': { name: 'createUser'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'createVenue': { name: 'createVenue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'createVenueBooking': { name: 'createVenueBooking'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'deleteAdvertisement': { name: 'deleteAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'deleteAgendaFolder': { name: 'deleteAgendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'deleteAgendaItem': { name: 'deleteAgendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'deleteChat': { name: 'deleteChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'deleteChatMembership': { name: 'deleteChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'deleteChatMessage': { name: 'deleteChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'deleteComment': { name: 'deleteComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCommentVote': { name: 'deleteCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'deleteCurrentUser': { name: 'deleteCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'deleteEvent': { name: 'deleteEvent'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'deleteFund': { name: 'deleteFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'deleteFundCampaign': { name: 'deleteFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'deleteFundCampaignPledge': { name: 'deleteFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'deleteOrganization': { name: 'deleteOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deleteOrganizationMembership': { name: 'deleteOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'deletePost': { name: 'deletePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deletePostVote': { name: 'deletePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'deleteTag': { name: 'deleteTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'deleteTagFolder': { name: 'deleteTagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'deleteUser': { name: 'deleteUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'deleteVenue': { name: 'deleteVenue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'deleteVenueBooking': { name: 'deleteVenueBooking'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; 'signUp': { name: 'signUp'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'updateAdvertisement': { name: 'updateAdvertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'updateAgendaFolder': { name: 'updateAgendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'updateAgendaItem': { name: 'updateAgendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'updateChat': { name: 'updateChat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'updateChatMembership': { name: 'updateChatMembership'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'updateChatMessage': { name: 'updateChatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'updateComment': { name: 'updateComment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCommentVote': { name: 'updateCommentVote'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'updateCommunity': { name: 'updateCommunity'; type: { kind: 'OBJECT'; name: 'Community'; ofType: null; } }; 'updateCurrentUser': { name: 'updateCurrentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'updateEvent': { name: 'updateEvent'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'updateFund': { name: 'updateFund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'updateFundCampaign': { name: 'updateFundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'updateFundCampaignPledge': { name: 'updateFundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'updateOrganization': { name: 'updateOrganization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updateOrganizationMembership': { name: 'updateOrganizationMembership'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'updatePost': { name: 'updatePost'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updatePostVote': { name: 'updatePostVote'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'updateTag': { name: 'updateTag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'updateTagFolder': { name: 'updateTagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'updateUser': { name: 'updateUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'updateVenue': { name: 'updateVenue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; }; }; 'MutationCreateAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'attachments'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; }; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'organizationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'startAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'AdvertisementType'; ofType: null; }; }; defaultValue: null }]; }; 'MutationCreateAgendaFolderInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateAgendaFolderInput'; isOneOf: false; inputFields: [{ name: 'eventId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'isAgendaItemFolder'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'parentFolderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }]; }; 'MutationCreateAgendaItemInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateAgendaItemInput'; isOneOf: false; inputFields: [{ name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'duration'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'folderId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'key'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'AgendaItemType'; ofType: null; }; }; defaultValue: null }]; }; @@ -67,7 +67,7 @@ export type introspection_types = { 'MutationCreatePostVoteInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreatePostVoteInput'; isOneOf: false; inputFields: [{ name: 'postId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'PostVoteType'; ofType: null; }; }; defaultValue: null }]; }; 'MutationCreateTagFolderInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateTagFolderInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'organizationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'parentFolderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }]; }; 'MutationCreateTagInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateTagInput'; isOneOf: false; inputFields: [{ name: 'folderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'organizationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; - 'MutationCreateUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateUserInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatar'; type: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'isEmailAddressVerified'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'role'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'UserRole'; ofType: null; }; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; + 'MutationCreateUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateUserInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatar'; type: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'isEmailAddressVerified'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'role'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'UserRole'; ofType: null; }; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; 'MutationCreateVenueBookingInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateVenueBookingInput'; isOneOf: false; inputFields: [{ name: 'eventId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'venueId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationCreateVenueInput': { kind: 'INPUT_OBJECT'; name: 'MutationCreateVenueInput'; isOneOf: false; inputFields: [{ name: 'attachments'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; }; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'organizationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationDeleteAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; @@ -91,7 +91,7 @@ export type introspection_types = { 'MutationDeleteUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteUserInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationDeleteVenueBookingInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteVenueBookingInput'; isOneOf: false; inputFields: [{ name: 'eventId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'venueId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationDeleteVenueInput': { kind: 'INPUT_OBJECT'; name: 'MutationDeleteVenueInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; - 'MutationSignUpInput': { kind: 'INPUT_OBJECT'; name: 'MutationSignUpInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; + 'MutationSignUpInput': { kind: 'INPUT_OBJECT'; name: 'MutationSignUpInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'type'; type: { kind: 'ENUM'; name: 'AdvertisementType'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateAgendaFolderInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateAgendaFolderInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'parentFolderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateAgendaItemInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateAgendaItemInput'; isOneOf: false; inputFields: [{ name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'duration'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'folderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'key'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; @@ -100,7 +100,8 @@ export type introspection_types = { 'MutationUpdateChatMessageInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateChatMessageInput'; isOneOf: false; inputFields: [{ name: 'body'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationUpdateCommentInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCommentInput'; isOneOf: false; inputFields: [{ name: 'body'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }]; }; 'MutationUpdateCommentVoteInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCommentVoteInput'; isOneOf: false; inputFields: [{ name: 'commentId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'CommentVoteType'; ofType: null; }; }; defaultValue: null }]; }; - 'MutationUpdateCurrentUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCurrentUserInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatar'; type: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; + 'MutationUpdateCommunityInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCommunityInput'; isOneOf: false; inputFields: [{ name: 'facebookURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'githubURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'inactivityTimeoutDuration'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'instagramURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'linkedinURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'logo'; type: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'redditURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'slackURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'websiteURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'xURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'youtubeURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; + 'MutationUpdateCurrentUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateCurrentUserInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatar'; type: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateEventInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateEventInput'; isOneOf: false; inputFields: [{ name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'endAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateFundCampaignInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateFundCampaignInput'; isOneOf: false; inputFields: [{ name: 'endAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }, { name: 'goalAmount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'startAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateFundCampaignPledgeInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateFundCampaignPledgeInput'; isOneOf: false; inputFields: [{ name: 'amount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'note'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; @@ -111,7 +112,7 @@ export type introspection_types = { 'MutationUpdatePostVoteInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdatePostVoteInput'; isOneOf: false; inputFields: [{ name: 'postId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'PostVoteType'; ofType: null; }; }; defaultValue: null }]; }; 'MutationUpdateTagFolderInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateTagFolderInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'parentFolderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateTagInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateTagInput'; isOneOf: false; inputFields: [{ name: 'folderId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; - 'MutationUpdateUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateUserInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatar'; type: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'isEmailAddressVerified'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'role'; type: { kind: 'ENUM'; name: 'UserRole'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; + 'MutationUpdateUserInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateUserInput'; isOneOf: false; inputFields: [{ name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'avatar'; type: { kind: 'SCALAR'; name: 'Upload'; ofType: null; }; defaultValue: null }, { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; }; defaultValue: null }, { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; }; defaultValue: null }, { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; }; defaultValue: null }, { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; }; defaultValue: null }, { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'isEmailAddressVerified'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }, { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; }; defaultValue: null }, { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; }; defaultValue: null }, { name: 'password'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'role'; type: { kind: 'ENUM'; name: 'UserRole'; ofType: null; }; defaultValue: null }, { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; }; defaultValue: null }]; }; 'MutationUpdateVenueInput': { kind: 'INPUT_OBJECT'; name: 'MutationUpdateVenueInput'; isOneOf: false; inputFields: [{ name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; }; defaultValue: null }, { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }]; }; 'Organization': { kind: 'OBJECT'; name: 'Organization'; fields: { 'addressLine1': { name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'addressLine2': { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'advertisements': { name: 'advertisements'; type: { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnection'; ofType: null; } }; 'avatarMimeType': { name: 'avatarMimeType'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'avatarURL': { name: 'avatarURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'chats': { name: 'chats'; type: { kind: 'OBJECT'; name: 'OrganizationChatsConnection'; ofType: null; } }; 'city': { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'countryCode': { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'events': { name: 'events'; type: { kind: 'OBJECT'; name: 'OrganizationEventsConnection'; ofType: null; } }; 'funds': { name: 'funds'; type: { kind: 'OBJECT'; name: 'OrganizationFundsConnection'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'members': { name: 'members'; type: { kind: 'OBJECT'; name: 'OrganizationMembersConnection'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'pinnedPosts': { name: 'pinnedPosts'; type: { kind: 'OBJECT'; name: 'OrganizationPinnedPostsConnection'; ofType: null; } }; 'pinnedPostsCount': { name: 'pinnedPostsCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'postalCode': { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'posts': { name: 'posts'; type: { kind: 'OBJECT'; name: 'OrganizationPostsConnection'; ofType: null; } }; 'postsCount': { name: 'postsCount'; type: { kind: 'SCALAR'; name: 'Int'; ofType: null; } }; 'state': { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'tagFolders': { name: 'tagFolders'; type: { kind: 'OBJECT'; name: 'OrganizationTagFoldersConnection'; ofType: null; } }; 'tags': { name: 'tags'; type: { kind: 'OBJECT'; name: 'OrganizationTagsConnection'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'venues': { name: 'venues'; type: { kind: 'OBJECT'; name: 'OrganizationVenuesConnection'; ofType: null; } }; }; }; 'OrganizationAdvertisementsConnection': { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'OrganizationAdvertisementsConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; @@ -146,7 +147,7 @@ export type introspection_types = { 'PostUpVotersConnection': { kind: 'OBJECT'; name: 'PostUpVotersConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'PostUpVotersConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'PostUpVotersConnectionEdge': { kind: 'OBJECT'; name: 'PostUpVotersConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; }; }; 'PostVoteType': { name: 'PostVoteType'; enumValues: 'down_vote' | 'up_vote'; }; - 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'advertisement': { name: 'advertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'agendaFolder': { name: 'agendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'agendaItem': { name: 'agendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'chat': { name: 'chat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'chatMessage': { name: 'chatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'comment': { name: 'comment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'currentUser': { name: 'currentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'event': { name: 'event'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'fund': { name: 'fund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'fundCampaign': { name: 'fundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'fundCampaignPledge': { name: 'fundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'organization': { name: 'organization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'post': { name: 'post'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'renewAuthenticationToken': { name: 'renewAuthenticationToken'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'signIn': { name: 'signIn'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'tag': { name: 'tag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'tagFolder': { name: 'tagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'user': { name: 'user'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'venue': { name: 'venue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; }; }; + 'Query': { kind: 'OBJECT'; name: 'Query'; fields: { 'advertisement': { name: 'advertisement'; type: { kind: 'OBJECT'; name: 'Advertisement'; ofType: null; } }; 'agendaFolder': { name: 'agendaFolder'; type: { kind: 'OBJECT'; name: 'AgendaFolder'; ofType: null; } }; 'agendaItem': { name: 'agendaItem'; type: { kind: 'OBJECT'; name: 'AgendaItem'; ofType: null; } }; 'chat': { name: 'chat'; type: { kind: 'OBJECT'; name: 'Chat'; ofType: null; } }; 'chatMessage': { name: 'chatMessage'; type: { kind: 'OBJECT'; name: 'ChatMessage'; ofType: null; } }; 'comment': { name: 'comment'; type: { kind: 'OBJECT'; name: 'Comment'; ofType: null; } }; 'community': { name: 'community'; type: { kind: 'OBJECT'; name: 'Community'; ofType: null; } }; 'currentUser': { name: 'currentUser'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'event': { name: 'event'; type: { kind: 'OBJECT'; name: 'Event'; ofType: null; } }; 'fund': { name: 'fund'; type: { kind: 'OBJECT'; name: 'Fund'; ofType: null; } }; 'fundCampaign': { name: 'fundCampaign'; type: { kind: 'OBJECT'; name: 'FundCampaign'; ofType: null; } }; 'fundCampaignPledge': { name: 'fundCampaignPledge'; type: { kind: 'OBJECT'; name: 'FundCampaignPledge'; ofType: null; } }; 'organization': { name: 'organization'; type: { kind: 'OBJECT'; name: 'Organization'; ofType: null; } }; 'post': { name: 'post'; type: { kind: 'OBJECT'; name: 'Post'; ofType: null; } }; 'renewAuthenticationToken': { name: 'renewAuthenticationToken'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'signIn': { name: 'signIn'; type: { kind: 'OBJECT'; name: 'AuthenticationPayload'; ofType: null; } }; 'tag': { name: 'tag'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; 'tagFolder': { name: 'tagFolder'; type: { kind: 'OBJECT'; name: 'TagFolder'; ofType: null; } }; 'user': { name: 'user'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'venue': { name: 'venue'; type: { kind: 'OBJECT'; name: 'Venue'; ofType: null; } }; }; }; 'QueryAdvertisementInput': { kind: 'INPUT_OBJECT'; name: 'QueryAdvertisementInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryAgendaFolderInput': { kind: 'INPUT_OBJECT'; name: 'QueryAgendaFolderInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryAgendaItemInput': { kind: 'INPUT_OBJECT'; name: 'QueryAgendaItemInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; @@ -159,7 +160,7 @@ export type introspection_types = { 'QueryFundInput': { kind: 'INPUT_OBJECT'; name: 'QueryFundInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryOrganizationInput': { kind: 'INPUT_OBJECT'; name: 'QueryOrganizationInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryPostInput': { kind: 'INPUT_OBJECT'; name: 'QueryPostInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; - 'QuerySignInInput': { kind: 'INPUT_OBJECT'; name: 'QuerySignInInput'; isOneOf: false; inputFields: [{ name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; }; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; + 'QuerySignInInput': { kind: 'INPUT_OBJECT'; name: 'QuerySignInInput'; isOneOf: false; inputFields: [{ name: 'emailAddress'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'password'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryTagFolderInput': { kind: 'INPUT_OBJECT'; name: 'QueryTagFolderInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryTagInput': { kind: 'INPUT_OBJECT'; name: 'QueryTagInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'QueryUserInput': { kind: 'INPUT_OBJECT'; name: 'QueryUserInput'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; @@ -176,7 +177,7 @@ export type introspection_types = { 'TagFolderTagsConnection': { kind: 'OBJECT'; name: 'TagFolderTagsConnection'; fields: { 'edges': { name: 'edges'; type: { kind: 'LIST'; name: never; ofType: { kind: 'OBJECT'; name: 'TagFolderTagsConnectionEdge'; ofType: null; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PageInfo'; ofType: null; }; } }; }; }; 'TagFolderTagsConnectionEdge': { kind: 'OBJECT'; name: 'TagFolderTagsConnectionEdge'; fields: { 'cursor': { name: 'cursor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'node': { name: 'node'; type: { kind: 'OBJECT'; name: 'Tag'; ofType: null; } }; }; }; 'Upload': unknown; - 'User': { kind: 'OBJECT'; name: 'User'; fields: { 'addressLine1': { name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'addressLine2': { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'avatarMimeType': { name: 'avatarMimeType'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'avatarURL': { name: 'avatarURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'birthDate': { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; } }; 'city': { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'countryCode': { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'educationGrade': { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; } }; 'emailAddress': { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'EmailAddress'; ofType: null; } }; 'employmentStatus': { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; } }; 'homePhoneNumber': { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'isEmailAddressVerified': { name: 'isEmailAddressVerified'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'maritalStatus': { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; } }; 'mobilePhoneNumber': { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'natalSex': { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; } }; 'organizationsWhereMember': { name: 'organizationsWhereMember'; type: { kind: 'OBJECT'; name: 'UserOrganizationsWhereMemberConnection'; ofType: null; } }; 'postalCode': { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'role': { name: 'role'; type: { kind: 'ENUM'; name: 'UserRole'; ofType: null; } }; 'state': { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'workPhoneNumber': { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; } }; }; }; + 'User': { kind: 'OBJECT'; name: 'User'; fields: { 'addressLine1': { name: 'addressLine1'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'addressLine2': { name: 'addressLine2'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'avatarMimeType': { name: 'avatarMimeType'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'avatarURL': { name: 'avatarURL'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'birthDate': { name: 'birthDate'; type: { kind: 'SCALAR'; name: 'Date'; ofType: null; } }; 'city': { name: 'city'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'countryCode': { name: 'countryCode'; type: { kind: 'ENUM'; name: 'Iso3166Alpha2CountryCode'; ofType: null; } }; 'createdAt': { name: 'createdAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'creator': { name: 'creator'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'description': { name: 'description'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'educationGrade': { name: 'educationGrade'; type: { kind: 'ENUM'; name: 'UserEducationGrade'; ofType: null; } }; 'emailAddress': { name: 'emailAddress'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'employmentStatus': { name: 'employmentStatus'; type: { kind: 'ENUM'; name: 'UserEmploymentStatus'; ofType: null; } }; 'homePhoneNumber': { name: 'homePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'isEmailAddressVerified': { name: 'isEmailAddressVerified'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; } }; 'maritalStatus': { name: 'maritalStatus'; type: { kind: 'ENUM'; name: 'UserMaritalStatus'; ofType: null; } }; 'mobilePhoneNumber': { name: 'mobilePhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; } }; 'name': { name: 'name'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'natalSex': { name: 'natalSex'; type: { kind: 'ENUM'; name: 'UserNatalSex'; ofType: null; } }; 'organizationsWhereMember': { name: 'organizationsWhereMember'; type: { kind: 'OBJECT'; name: 'UserOrganizationsWhereMemberConnection'; ofType: null; } }; 'postalCode': { name: 'postalCode'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'role': { name: 'role'; type: { kind: 'ENUM'; name: 'UserRole'; ofType: null; } }; 'state': { name: 'state'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'updater': { name: 'updater'; type: { kind: 'OBJECT'; name: 'User'; ofType: null; } }; 'workPhoneNumber': { name: 'workPhoneNumber'; type: { kind: 'SCALAR'; name: 'PhoneNumber'; ofType: null; } }; }; }; 'UserEducationGrade': { name: 'UserEducationGrade'; enumValues: 'grade_1' | 'grade_2' | 'grade_3' | 'grade_4' | 'grade_5' | 'grade_6' | 'grade_7' | 'grade_8' | 'grade_9' | 'grade_10' | 'grade_11' | 'grade_12' | 'graduate' | 'kg' | 'no_grade' | 'pre_kg'; }; 'UserEmploymentStatus': { name: 'UserEmploymentStatus'; enumValues: 'full_time' | 'part_time' | 'unemployed'; }; 'UserMaritalStatus': { name: 'UserMaritalStatus'; enumValues: 'divorced' | 'engaged' | 'married' | 'seperated' | 'single' | 'widowed'; }; diff --git a/test/server.ts b/test/server.ts index 3256b9817c3..f50d143be43 100644 --- a/test/server.ts +++ b/test/server.ts @@ -11,6 +11,10 @@ const testEnvConfig = envSchema({ export const server = await createServer({ envConfig: { + /** + * This makes the server test instance listen on a random port that is free at the time of initialization. This way the tests don't make use of ports that are already acquired by other tests or unrelated processes external to the tests. More information at this link: {@link https://fastify.dev/docs/latest/Reference/Server/#listentextresolver}. + */ + API_PORT: undefined, /** * This makes the server test instance connect to the minio test server. */