From 0eab92d73fae862b27ef873124d52b92b7504d2d Mon Sep 17 00:00:00 2001 From: Navaneethakrishnan Date: Thu, 29 Aug 2024 17:02:23 +0530 Subject: [PATCH] feat: introduced bio field in member --- .forestadmin-schema.json | 3124 +++++++++-------- apps/web-api/prisma/fixtures/members.ts | 1 + .../migration.sql | 48 + apps/web-api/prisma/schema.prisma | 23 +- apps/web-api/src/app.module.ts | 2 + apps/web-api/src/home/home.controller.ts | 78 +- apps/web-api/src/home/home.module.ts | 4 +- apps/web-api/src/home/home.service.ts | 185 +- apps/web-api/src/husky/husky.module.ts | 14 + apps/web-api/src/husky/husky.service.ts | 155 + libs/contracts/src/lib/contract-home.ts | 53 +- ...estion-answer.ts => discovery-question.ts} | 25 +- libs/contracts/src/schema/index.ts | 2 +- libs/contracts/src/schema/member.ts | 1 + 14 files changed, 1901 insertions(+), 1814 deletions(-) create mode 100644 apps/web-api/prisma/migrations/20240902052447_discover_question/migration.sql create mode 100644 apps/web-api/src/husky/husky.module.ts create mode 100644 apps/web-api/src/husky/husky.service.ts rename libs/contracts/src/schema/{question-answer.ts => discovery-question.ts} (61%) diff --git a/.forestadmin-schema.json b/.forestadmin-schema.json index c2a1d900b..be5d6b157 100644 --- a/.forestadmin-schema.json +++ b/.forestadmin-schema.json @@ -5,32 +5,36 @@ { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "Member_through_createdBy", "integration": null, - "inverseOf": null, + "inverseOf": "DiscoveryQuestions_through_Member_createdBy", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Date", - "validations": [] + "reference": "Member.uid", + "relationship": "BelongsTo", + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "email", + "field": "Member_through_modifiedBy", "integration": null, - "inverseOf": null, + "inverseOf": "DiscoveryQuestions_through_Member_modifiedBy", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "Member.uid", + "relationship": "BelongsTo", "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -39,95 +43,90 @@ { "defaultValue": null, "enums": null, - "field": "id", + "field": "PLEvent", "integration": null, - "inverseOf": null, + "inverseOf": "DiscoveryQuestions", "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Number", + "reference": "PLEvent.uid", + "relationship": "BelongsTo", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "question", + "field": "Project", "integration": null, - "inverseOf": null, + "inverseOf": "DiscoveryQuestions", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "Project.uid", + "relationship": "BelongsTo", "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "requestIp", + "field": "Team", "integration": null, - "inverseOf": null, + "inverseOf": "DiscoveryQuestions", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "Team.uid", + "relationship": "BelongsTo", "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "type", + "field": "answer", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "uid", + "field": "answerSourceFrom", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "answerSources", "integration": null, "inverseOf": null, "isFilterable": true, @@ -137,180 +136,163 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": ["Json"], "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "Faq", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { "defaultValue": null, "enums": null, - "field": "FocusAreaHierarchies_through_FocusArea_focusAreaUid", + "field": "content", "integration": null, - "inverseOf": "FocusArea_through_focusAreaUid", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "FocusAreaHierarchy.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "FocusAreaHierarchies_through_FocusArea_subFocusAreaUid", + "field": "createdAt", "integration": null, - "inverseOf": "FocusArea_through_subFocusAreaUid", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "FocusAreaHierarchy.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "FocusArea_through_parentUid", + "field": "id", "integration": null, - "inverseOf": "FocusAreas", + "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "FocusArea.uid", - "relationship": "BelongsTo", - "type": "String", + "reference": null, + "type": "Number", "validations": [] }, { - "defaultValue": null, + "defaultValue": true, "enums": null, - "field": "FocusAreas", + "field": "isActive", "integration": null, - "inverseOf": "FocusArea_through_parentUid", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "FocusArea.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Boolean", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "ProjectFocusAreas_through_FocusArea_ancestorAreaUid", + "field": "relatedQuestions", "integration": null, - "inverseOf": "FocusArea_through_ancestorAreaUid", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "ProjectFocusArea.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": ["Json"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "ProjectFocusAreas_through_FocusArea_focusAreaUid", + "field": "shareCount", "integration": null, - "inverseOf": "FocusArea_through_focusAreaUid", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "ProjectFocusArea.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Number", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "TeamFocusAreaVersionHistories", + "field": "slug", "integration": null, - "inverseOf": "FocusArea", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "TeamFocusAreaVersionHistory.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "TeamFocusAreas_through_FocusArea_ancestorAreaUid", + "field": "title", "integration": null, - "inverseOf": "FocusArea_through_ancestorAreaUid", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "TeamFocusArea.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "TeamFocusAreas_through_FocusArea_focusAreaUid", + "field": "uid", "integration": null, - "inverseOf": "FocusArea_through_focusAreaUid", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "TeamFocusArea.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -326,7 +308,7 @@ { "defaultValue": null, "enums": null, - "field": "description", + "field": "viewCount", "integration": null, "inverseOf": null, "isFilterable": true, @@ -336,29 +318,43 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Number", "validations": [] - }, + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "DiscoveryQuestion", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ { "defaultValue": null, "enums": null, - "field": "id", + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "title", + "field": "email", "integration": null, "inverseOf": null, "isFilterable": true, @@ -376,65 +372,50 @@ { "defaultValue": null, "enums": null, - "field": "uid", + "field": "id", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": true, + "isPrimaryKey": true, + "isReadOnly": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "type": "Number", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "question", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "FocusArea", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] + }, { "defaultValue": null, "enums": null, - "field": "FocusArea_through_focusAreaUid", + "field": "requestIp", "integration": null, - "inverseOf": "FocusAreaHierarchies_through_FocusArea_focusAreaUid", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "FocusArea.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -443,17 +424,16 @@ { "defaultValue": null, "enums": null, - "field": "FocusArea_through_subFocusAreaUid", + "field": "type", "integration": null, - "inverseOf": "FocusAreaHierarchies_through_FocusArea_subFocusAreaUid", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "FocusArea.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -462,36 +442,36 @@ { "defaultValue": null, "enums": null, - "field": "id", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, - "isRequired": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", - "validations": [] + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "isDirect", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Boolean", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "type": "Date", + "validations": [] } ], "icon": null, @@ -499,7 +479,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "FocusAreaHierarchy", + "name": "Faq", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -510,16 +490,16 @@ { "defaultValue": null, "enums": null, - "field": "Teams", + "field": "FocusAreaHierarchies_through_FocusArea_focusAreaUid", "integration": null, - "inverseOf": "FundingStage", + "inverseOf": "FocusArea_through_focusAreaUid", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "Team.uid", + "reference": "FocusAreaHierarchy.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -527,131 +507,67 @@ { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "FocusAreaHierarchies_through_FocusArea_subFocusAreaUid", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "FocusArea_through_subFocusAreaUid", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Date", - "validations": [] - }, - { - "defaultValue": null, - "enums": null, - "field": "id", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, - "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Number", + "reference": "FocusAreaHierarchy.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "title", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": true, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, - { - "defaultValue": null, - "enums": null, - "field": "uid", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": true, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, - { - "defaultValue": null, - "enums": null, - "field": "updatedAt", + "field": "FocusArea_through_parentUid", "integration": null, - "inverseOf": null, + "inverseOf": "FocusAreas", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Date", + "reference": "FocusArea.uid", + "relationship": "BelongsTo", + "type": "String", "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "FundingStage", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { "defaultValue": null, "enums": null, - "field": "Image_through_thumbnailToUid", + "field": "FocusAreas", "integration": null, - "inverseOf": "Images", - "isFilterable": true, + "inverseOf": "FocusArea_through_parentUid", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": "Image.uid", - "relationship": "BelongsTo", - "type": "String", + "reference": "FocusArea.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "Images", + "field": "ProjectFocusAreas_through_FocusArea_ancestorAreaUid", "integration": null, - "inverseOf": "Image_through_thumbnailToUid", + "inverseOf": "FocusArea_through_ancestorAreaUid", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "Image.uid", + "reference": "ProjectFocusArea.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -659,16 +575,16 @@ { "defaultValue": null, "enums": null, - "field": "Members", + "field": "ProjectFocusAreas_through_FocusArea_focusAreaUid", "integration": null, - "inverseOf": "Image", + "inverseOf": "FocusArea_through_focusAreaUid", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "Member.uid", + "reference": "ProjectFocusArea.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -676,16 +592,16 @@ { "defaultValue": null, "enums": null, - "field": "PLEvents_through_Image_bannerUid", + "field": "TeamFocusAreaVersionHistories", "integration": null, - "inverseOf": "Image_through_bannerUid", + "inverseOf": "FocusArea", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "PLEvent.uid", + "reference": "TeamFocusAreaVersionHistory.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -693,16 +609,16 @@ { "defaultValue": null, "enums": null, - "field": "PLEvents_through_Image_logoUid", + "field": "TeamFocusAreas_through_FocusArea_ancestorAreaUid", "integration": null, - "inverseOf": "Image_through_logoUid", + "inverseOf": "FocusArea_through_ancestorAreaUid", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "PLEvent.uid", + "reference": "TeamFocusArea.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -710,16 +626,16 @@ { "defaultValue": null, "enums": null, - "field": "Projects", + "field": "TeamFocusAreas_through_FocusArea_focusAreaUid", "integration": null, - "inverseOf": "Image", + "inverseOf": "FocusArea_through_focusAreaUid", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "Project.uid", + "reference": "TeamFocusArea.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -727,58 +643,55 @@ { "defaultValue": null, "enums": null, - "field": "Teams", + "field": "createdAt", "integration": null, - "inverseOf": "Image", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "Team.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "cid", + "field": "description", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "id", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "Number", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "filename", + "field": "title", "integration": null, "inverseOf": null, "isFilterable": true, @@ -796,7 +709,7 @@ { "defaultValue": null, "enums": null, - "field": "height", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, @@ -806,7 +719,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -814,50 +727,47 @@ { "defaultValue": null, "enums": null, - "field": "id", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, - "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Number", - "validations": [] - }, - { - "defaultValue": null, - "enums": null, - "field": "size", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, + "type": "Date", + "validations": [] + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "FocusArea", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ { "defaultValue": null, "enums": null, - "field": "type", + "field": "FocusArea_through_focusAreaUid", "integration": null, - "inverseOf": null, + "inverseOf": "FocusAreaHierarchies_through_FocusArea_focusAreaUid", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "FocusArea.uid", + "relationship": "BelongsTo", "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -866,16 +776,17 @@ { "defaultValue": null, "enums": null, - "field": "uid", + "field": "FocusArea_through_subFocusAreaUid", "integration": null, - "inverseOf": null, + "inverseOf": "FocusAreaHierarchies_through_FocusArea_subFocusAreaUid", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "FocusArea.uid", + "relationship": "BelongsTo", "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -884,59 +795,23 @@ { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "id", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "Number", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "url", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": true, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, - { - "defaultValue": null, - "enums": ["ORIGINAL", "LARGE", "MEDIUM", "SMALL", "TINY"], - "field": "version", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": true, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Enum", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, - { - "defaultValue": null, - "enums": null, - "field": "width", + "field": "isDirect", "integration": null, "inverseOf": null, "isFilterable": true, @@ -946,7 +821,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "Boolean", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -957,7 +832,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "Image", + "name": "FocusAreaHierarchy", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -968,16 +843,16 @@ { "defaultValue": null, "enums": null, - "field": "IndustryTags", + "field": "Teams", "integration": null, - "inverseOf": "IndustryCategory", + "inverseOf": "FundingStage", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "IndustryTag.uid", + "reference": "Team.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -1072,7 +947,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "IndustryCategory", + "name": "FundingStage", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -1083,16 +958,16 @@ { "defaultValue": null, "enums": null, - "field": "IndustryCategory", + "field": "Image_through_thumbnailToUid", "integration": null, - "inverseOf": "IndustryTags", + "inverseOf": "Images", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "IndustryCategory.uid", + "reference": "Image.uid", "relationship": "BelongsTo", "type": "String", "validations": [] @@ -1100,106 +975,109 @@ { "defaultValue": null, "enums": null, - "field": "_IndustryTagToTeams", + "field": "Images", "integration": null, - "inverseOf": "IndustryTag", + "inverseOf": "Image_through_thumbnailToUid", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "_IndustryTagToTeam.id", + "reference": "Image.uid", "relationship": "HasMany", - "type": ["Number"], + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "airtableRecId", + "field": "Members", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Image", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", + "reference": "Member.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "PLEvents_through_Image_bannerUid", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Image_through_bannerUid", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Date", + "reference": "PLEvent.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "definition", + "field": "PLEvents_through_Image_logoUid", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Image_through_logoUid", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", + "reference": "PLEvent.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "id", + "field": "Projects", "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "inverseOf": "Image", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Number", + "reference": "Project.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "title", + "field": "Teams", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Image", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, - "isSortable": true, + "isRequired": false, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": "Team.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "uid", + "field": "cid", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1217,7 +1095,7 @@ { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1229,41 +1107,29 @@ "reference": null, "type": "Date", "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "IndustryTag", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "filename", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "email", + "field": "height", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1273,7 +1139,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Number", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -1297,7 +1163,7 @@ { "defaultValue": null, "enums": null, - "field": "introduction", + "field": "size", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1307,7 +1173,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Number", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -1315,7 +1181,7 @@ { "defaultValue": null, "enums": null, - "field": "uid", + "field": "type", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1333,70 +1199,59 @@ { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "JoinRequest", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] + }, { "defaultValue": null, "enums": null, - "field": "Members", + "field": "updatedAt", "integration": null, - "inverseOf": "Location", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "Member.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "city", + "field": "url", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, - "enums": null, - "field": "continent", + "enums": ["ORIGINAL", "LARGE", "MEDIUM", "SMALL", "TINY"], + "field": "version", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1406,7 +1261,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Enum", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -1414,7 +1269,7 @@ { "defaultValue": null, "enums": null, - "field": "country", + "field": "width", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1424,41 +1279,56 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Number", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] - }, + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "Image", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "IndustryTags", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "IndustryCategory", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Date", + "reference": "IndustryTag.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "formattedLocation", + "field": "createdAt", "integration": null, "inverseOf": null, - "isFilterable": false, + "isFilterable": true, "isPrimaryKey": false, - "isReadOnly": true, + "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Date", "validations": [] }, { @@ -1480,7 +1350,7 @@ { "defaultValue": null, "enums": null, - "field": "latitude", + "field": "title", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1490,7 +1360,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -1498,7 +1368,7 @@ { "defaultValue": null, "enums": null, - "field": "longitude", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1508,7 +1378,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -1516,7 +1386,7 @@ { "defaultValue": null, "enums": null, - "field": "metroArea", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1526,31 +1396,77 @@ "isSortable": true, "isVirtual": false, "reference": null, + "type": "Date", + "validations": [] + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "IndustryCategory", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ + { + "defaultValue": null, + "enums": null, + "field": "IndustryCategory", + "integration": null, + "inverseOf": "IndustryTags", + "isFilterable": true, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "IndustryCategory.uid", + "relationship": "BelongsTo", "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "placeId", + "field": "_IndustryTagToTeams", + "integration": null, + "inverseOf": "IndustryTag", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": false, + "isVirtual": false, + "reference": "_IndustryTagToTeam.id", + "relationship": "HasMany", + "type": ["Number"], + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "airtableRecId", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "region", + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1560,13 +1476,13 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "regionAbbreviation", + "field": "definition", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1579,6 +1495,40 @@ "type": "String", "validations": [] }, + { + "defaultValue": null, + "enums": null, + "field": "id", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Number", + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "title", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": true, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] + }, { "defaultValue": null, "enums": null, @@ -1619,193 +1569,143 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "Location", + "name": "IndustryTag", "onlyForRelationships": false, "paginationType": "page", "segments": [] }, { - "actions": [ - { - "id": "Member-0-upload-image", - "name": "Upload image", - "type": "single", - "baseUrl": null, - "endpoint": "/forest/_actions/Member/0/upload-image", - "httpMethod": "POST", - "redirect": null, - "download": false, - "fields": [{"field": "Image", "type": "File", "defaultValue": null}], - "hooks": {"load": false, "change": ["changeHook"]} - } - ], + "actions": [], "fields": [ { "defaultValue": null, "enums": null, - "field": "Image", + "field": "createdAt", "integration": null, - "inverseOf": "Members", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Image.uid", - "relationship": "BelongsTo", - "type": "String", + "reference": null, + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "Location", + "field": "email", "integration": null, - "inverseOf": "Members", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "Location.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "MemberFeedbacks", + "field": "id", "integration": null, - "inverseOf": "Member", - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "MemberFeedback.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Number", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "MemberFollowUps", + "field": "introduction", "integration": null, - "inverseOf": "Member", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, - "isVirtual": false, - "reference": "MemberFollowUp.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] - }, - { - "defaultValue": null, - "enums": null, - "field": "MemberInteractions_through_Member_sourceMemberUid", - "integration": null, - "inverseOf": "Member_through_sourceMemberUid", - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": false, - "isVirtual": false, - "reference": "MemberInteraction.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] - }, - { - "defaultValue": null, - "enums": null, - "field": "MemberInteractions_through_Member_targetMemberUid", - "integration": null, - "inverseOf": "Member_through_targetMemberUid", - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": false, - "isVirtual": false, - "reference": "MemberInteraction.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] - }, - { - "defaultValue": null, - "enums": null, - "field": "PLEventGuests", - "integration": null, - "inverseOf": "Member", - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "PLEventGuest.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "ProjectContributions", + "field": "uid", "integration": null, - "inverseOf": "Member", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "ProjectContribution.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "Projects", + "field": "updatedAt", "integration": null, - "inverseOf": "Member", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "Project.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Date", "validations": [] - }, + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "JoinRequest", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ { "defaultValue": null, "enums": null, - "field": "QuestionAndAnswers_through_Member_createdBy", + "field": "Members", "integration": null, - "inverseOf": "Member_through_createdBy", + "inverseOf": "Location", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "QuestionAndAnswer.uid", + "reference": "Member.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -1813,141 +1713,143 @@ { "defaultValue": null, "enums": null, - "field": "QuestionAndAnswers_through_Member_modifiedBy", + "field": "city", "integration": null, - "inverseOf": "Member_through_modifiedBy", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "QuestionAndAnswer.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "TeamFocusAreaVersionHistories", + "field": "continent", "integration": null, - "inverseOf": "Member", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "TeamFocusAreaVersionHistory.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "TeamMemberRoles", + "field": "country", "integration": null, - "inverseOf": "Member", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "TeamMemberRole.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": null, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "Teams", + "field": "createdAt", "integration": null, - "inverseOf": "Member", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "Team.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "_MemberToMemberRoles", + "field": "formattedLocation", "integration": null, - "inverseOf": "Member", + "inverseOf": null, "isFilterable": false, "isPrimaryKey": false, - "isReadOnly": false, + "isReadOnly": true, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "_MemberToMemberRole.id", - "relationship": "HasMany", - "type": ["Number"], + "reference": null, + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "_MemberToSkills", + "field": "id", "integration": null, - "inverseOf": "Member", - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "_MemberToSkill.id", - "relationship": "HasMany", - "type": ["Number"], + "reference": null, + "type": "Number", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "airtableRecId", + "field": "latitude", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", - "validations": [] + "type": "Number", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "approvedAt", + "field": "longitude", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] + "type": "Number", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "metroArea", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1957,29 +1859,31 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "discordHandler", + "field": "placeId", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "email", + "field": "region", "integration": null, "inverseOf": null, "isFilterable": true, @@ -1995,7 +1899,7 @@ { "defaultValue": null, "enums": null, - "field": "externalId", + "field": "regionAbbreviation", "integration": null, "inverseOf": null, "isFilterable": true, @@ -2011,305 +1915,340 @@ { "defaultValue": null, "enums": null, - "field": "githubHandler", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "id", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "Date", + "validations": [] + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "Location", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [ + { + "id": "Member-0-upload-image", + "name": "Upload image", + "type": "single", + "baseUrl": null, + "endpoint": "/forest/_actions/Member/0/upload-image", + "httpMethod": "POST", + "redirect": null, + "download": false, + "fields": [{"field": "Image", "type": "File", "defaultValue": null}], + "hooks": {"load": false, "change": ["changeHook"]} + } + ], + "fields": [ + { + "defaultValue": null, + "enums": null, + "field": "DiscoveryQuestions_through_Member_createdBy", + "integration": null, + "inverseOf": "Member_through_createdBy", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": false, + "isVirtual": false, + "reference": "DiscoveryQuestion.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { - "defaultValue": false, + "defaultValue": null, "enums": null, - "field": "isFeatured", + "field": "DiscoveryQuestions_through_Member_modifiedBy", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member_through_modifiedBy", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Boolean", + "reference": "DiscoveryQuestion.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "linkedinHandler", + "field": "Image", "integration": null, - "inverseOf": null, + "inverseOf": "Members", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "Image.uid", + "relationship": "BelongsTo", "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "moreDetails", + "field": "Location", "integration": null, - "inverseOf": null, + "inverseOf": "Members", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "Location.uid", + "relationship": "BelongsTo", "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "name", + "field": "MemberFeedbacks", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, - "isSortable": true, + "isRequired": false, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": "MemberFeedback.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "officeHours", + "field": "MemberFollowUps", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", + "reference": "MemberFollowUp.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { - "defaultValue": false, + "defaultValue": null, "enums": null, - "field": "openToWork", + "field": "MemberInteractions_through_Member_sourceMemberUid", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member_through_sourceMemberUid", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Boolean", + "reference": "MemberInteraction.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { - "defaultValue": false, + "defaultValue": null, "enums": null, - "field": "plnFriend", + "field": "MemberInteractions_through_Member_targetMemberUid", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member_through_targetMemberUid", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, - "isSortable": true, + "isRequired": false, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Boolean", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": "MemberInteraction.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "plnStartDate", + "field": "PLEventGuests", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Date", + "reference": "PLEventGuest.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "preferences", + "field": "ProjectContributions", "integration": null, - "inverseOf": null, + "inverseOf": "Member", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Json", + "reference": "ProjectContribution.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "telegramHandler", + "field": "Projects", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", + "reference": "Project.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "twitterHandler", + "field": "TeamFocusAreaVersionHistories", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", + "reference": "TeamFocusAreaVersionHistory.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "uid", + "field": "TeamMemberRoles", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, - "isSortable": true, + "isRequired": false, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": "TeamMemberRole.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "Teams", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Date", + "reference": "Team.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "Member", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { "defaultValue": null, "enums": null, - "field": "Member", + "field": "_MemberToMemberRoles", "integration": null, - "inverseOf": "MemberFeedbacks", - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, - "isSortable": true, + "isRequired": false, + "isSortable": false, "isVirtual": false, - "reference": "Member.uid", - "relationship": "BelongsTo", - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": "_MemberToMemberRole.id", + "relationship": "HasMany", + "type": ["Number"], + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "MemberFollowUp", + "field": "_MemberToSkills", "integration": null, - "inverseOf": "MemberFeedback", - "isFilterable": true, + "inverseOf": "Member", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, - "isSortable": true, + "isRequired": false, + "isSortable": false, "isVirtual": false, - "reference": "MemberFollowUp.uid", - "relationship": "BelongsTo", - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": "_MemberToSkill.id", + "relationship": "HasMany", + "type": ["Number"], + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "comments", + "field": "airtableRecId", "integration": null, "inverseOf": null, "isFilterable": true, @@ -2319,13 +2258,13 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": ["String"], + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "approvedAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -2341,39 +2280,39 @@ { "defaultValue": null, "enums": null, - "field": "data", + "field": "bio", "integration": null, "inverseOf": null, - "isFilterable": false, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Json", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "id", + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "rating", + "field": "discordHandler", "integration": null, "inverseOf": null, "isFilterable": true, @@ -2383,198 +2322,175 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "String", "validations": [] }, { "defaultValue": null, - "enums": ["POSITIVE", "NEGATIVE", "NEUTRAL"], - "field": "response", + "enums": null, + "field": "email", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Enum", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "type": "String", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "type", + "field": "externalId", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "uid", + "field": "githubHandler", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "id", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "Number", "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "MemberFeedback", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { - "defaultValue": null, + "defaultValue": false, "enums": null, - "field": "Member", + "field": "isFeatured", "integration": null, - "inverseOf": "MemberFollowUps", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Member.uid", - "relationship": "BelongsTo", - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": null, + "type": "Boolean", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "MemberFeedback", + "field": "linkedinHandler", "integration": null, - "inverseOf": "MemberFollowUp", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "MemberFeedback.uid", - "relationship": "HasOne", + "reference": null, "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "MemberInteraction", + "field": "moreDetails", "integration": null, - "inverseOf": "MemberFollowUps", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "MemberInteraction.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "name", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "data", + "field": "officeHours", "integration": null, "inverseOf": null, - "isFilterable": false, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Json", + "type": "String", "validations": [] }, { - "defaultValue": null, + "defaultValue": false, "enums": null, - "field": "id", + "field": "openToWork", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "Boolean", "validations": [] }, { "defaultValue": false, "enums": null, - "field": "isDelayed", + "field": "plnFriend", "integration": null, "inverseOf": null, "isFilterable": true, @@ -2591,39 +2507,67 @@ }, { "defaultValue": null, - "enums": ["PENDING", "COMPLETED", "CLOSED"], - "field": "status", + "enums": null, + "field": "plnStartDate", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Enum", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "type": "Date", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "type", + "field": "preferences", + "integration": null, + "inverseOf": null, + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Json", + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "telegramHandler", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "twitterHandler", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "String", + "validations": [] }, { "defaultValue": null, @@ -2665,7 +2609,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "MemberFollowUp", + "name": "Member", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -2676,33 +2620,35 @@ { "defaultValue": null, "enums": null, - "field": "MemberFollowUps", + "field": "Member", "integration": null, - "inverseOf": "MemberInteraction", - "isFilterable": false, + "inverseOf": "MemberFeedbacks", + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "MemberFollowUp.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": "Member.uid", + "relationship": "BelongsTo", + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "Member_through_sourceMemberUid", + "field": "MemberFollowUp", "integration": null, - "inverseOf": "MemberInteractions_through_Member_sourceMemberUid", + "inverseOf": "MemberFeedback", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "Member.uid", + "reference": "MemberFollowUp.uid", "relationship": "BelongsTo", "type": "String", "validations": [ @@ -2712,18 +2658,17 @@ { "defaultValue": null, "enums": null, - "field": "Member_through_targetMemberUid", + "field": "comments", "integration": null, - "inverseOf": "MemberInteractions_through_Member_targetMemberUid", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Member.uid", - "relationship": "BelongsTo", - "type": "String", + "reference": null, + "type": ["String"], "validations": [] }, { @@ -2759,9 +2704,41 @@ "validations": [] }, { - "defaultValue": false, + "defaultValue": null, "enums": null, - "field": "hasFollowUp", + "field": "id", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Number", + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "rating", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Number", + "validations": [] + }, + { + "defaultValue": null, + "enums": ["POSITIVE", "NEGATIVE", "NEUTRAL"], + "field": "response", "integration": null, "inverseOf": null, "isFilterable": true, @@ -2771,27 +2748,11 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Boolean", + "type": "Enum", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] }, - { - "defaultValue": null, - "enums": null, - "field": "id", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, - "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Number", - "validations": [] - }, { "defaultValue": null, "enums": null, @@ -2850,7 +2811,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "MemberInteraction", + "name": "MemberFeedback", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -2861,171 +2822,144 @@ { "defaultValue": null, "enums": null, - "field": "_MemberToMemberRoles", + "field": "Member", "integration": null, - "inverseOf": "MemberRole", - "isFilterable": false, + "inverseOf": "MemberFollowUps", + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "_MemberToMemberRole.id", - "relationship": "HasMany", - "type": ["Number"], - "validations": [] + "reference": "Member.uid", + "relationship": "BelongsTo", + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "MemberFeedback", "integration": null, - "inverseOf": null, + "inverseOf": "MemberFollowUp", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Date", + "reference": "MemberFeedback.uid", + "relationship": "HasOne", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "id", + "field": "MemberInteraction", "integration": null, - "inverseOf": null, + "inverseOf": "MemberFollowUps", "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Number", + "reference": "MemberInteraction.uid", + "relationship": "BelongsTo", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "name", + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "type": "Date", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "uid", + "field": "data", "integration": null, "inverseOf": null, - "isFilterable": true, + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "type": "Json", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "id", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "MemberRole", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ - { - "defaultValue": null, - "enums": null, - "field": "_MembershipSourceToTeams", - "integration": null, - "inverseOf": "MembershipSource", - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": false, - "isVirtual": false, - "reference": "_MembershipSourceToTeam.id", - "relationship": "HasMany", - "type": ["Number"], + "type": "Number", "validations": [] }, { - "defaultValue": null, + "defaultValue": false, "enums": null, - "field": "createdAt", + "field": "isDelayed", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] + "type": "Boolean", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, - "enums": null, - "field": "id", + "enums": ["PENDING", "COMPLETED", "CLOSED"], + "field": "status", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, - "isRequired": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", - "validations": [] + "type": "Enum", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "title", + "field": "type", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3080,7 +3014,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "MembershipSource", + "name": "MemberFollowUp", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -3091,50 +3025,16 @@ { "defaultValue": null, "enums": null, - "field": "Image_through_bannerUid", - "integration": null, - "inverseOf": "PLEvents_through_Image_bannerUid", - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": "Image.uid", - "relationship": "BelongsTo", - "type": "String", - "validations": [] - }, - { - "defaultValue": null, - "enums": null, - "field": "Image_through_logoUid", - "integration": null, - "inverseOf": "PLEvents_through_Image_logoUid", - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": "Image.uid", - "relationship": "BelongsTo", - "type": "String", - "validations": [] - }, - { - "defaultValue": null, - "enums": null, - "field": "PLEventGuests", + "field": "MemberFollowUps", "integration": null, - "inverseOf": "PLEvent", + "inverseOf": "MemberInteraction", "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": false, "isVirtual": false, - "reference": "PLEventGuest.uid", + "reference": "MemberFollowUp.uid", "relationship": "HasMany", "type": ["String"], "validations": [] @@ -3142,34 +3042,37 @@ { "defaultValue": null, "enums": null, - "field": "QuestionAndAnswers", + "field": "Member_through_sourceMemberUid", "integration": null, - "inverseOf": "PLEvent", - "isFilterable": false, + "inverseOf": "MemberInteractions_through_Member_sourceMemberUid", + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "QuestionAndAnswer.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": "Member.uid", + "relationship": "BelongsTo", + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "additionalInfo", + "field": "Member_through_targetMemberUid", "integration": null, - "inverseOf": null, - "isFilterable": false, + "inverseOf": "MemberInteractions_through_Member_targetMemberUid", + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Json", + "reference": "Member.uid", + "relationship": "BelongsTo", + "type": "String", "validations": [] }, { @@ -3191,23 +3094,23 @@ { "defaultValue": null, "enums": null, - "field": "description", + "field": "data", "integration": null, "inverseOf": null, - "isFilterable": true, + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Json", "validations": [] }, { - "defaultValue": null, + "defaultValue": false, "enums": null, - "field": "endDate", + "field": "hasFollowUp", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3217,26 +3120,10 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "Boolean", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, - { - "defaultValue": null, - "enums": null, - "field": "eventsCount", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Number", - "validations": [] + ] }, { "defaultValue": null, @@ -3255,25 +3142,27 @@ "validations": [] }, { - "defaultValue": false, + "defaultValue": null, "enums": null, - "field": "isFeatured", + "field": "type", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Boolean", - "validations": [] + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "location", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3291,41 +3180,54 @@ { "defaultValue": null, "enums": null, - "field": "name", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, + "type": "Date", + "validations": [] + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "MemberInteraction", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ { "defaultValue": null, "enums": null, - "field": "priority", + "field": "_MemberToMemberRoles", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "MemberRole", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Number", + "reference": "_MemberToMemberRole.id", + "relationship": "HasMany", + "type": ["Number"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "resources", + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3335,29 +3237,29 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": ["Json"], + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "shortDescription", + "field": "id", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Number", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "slugURL", + "field": "name", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3375,7 +3277,7 @@ { "defaultValue": null, "enums": null, - "field": "startDate", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3385,7 +3287,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -3393,7 +3295,7 @@ { "defaultValue": null, "enums": null, - "field": "telegramId", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3403,13 +3305,44 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Date", + "validations": [] + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "MemberRole", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ + { + "defaultValue": null, + "enums": null, + "field": "_MembershipSourceToTeams", + "integration": null, + "inverseOf": "MembershipSource", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": false, + "isVirtual": false, + "reference": "_MembershipSourceToTeam.id", + "relationship": "HasMany", + "type": ["Number"], "validations": [] }, { "defaultValue": null, - "enums": ["INVITE_ONLY"], - "field": "type", + "enums": null, + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3419,13 +3352,29 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Enum", + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "uid", + "field": "id", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Number", + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "title", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3443,23 +3392,25 @@ { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", - "validations": [] + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "websiteURL", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3469,7 +3420,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Date", "validations": [] } ], @@ -3478,7 +3429,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "PLEvent", + "name": "MembershipSource", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -3489,59 +3440,70 @@ { "defaultValue": null, "enums": null, - "field": "Member", + "field": "DiscoveryQuestions", "integration": null, - "inverseOf": "PLEventGuests", - "isFilterable": true, + "inverseOf": "PLEvent", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, - "isSortable": true, + "isRequired": false, + "isSortable": false, "isVirtual": false, - "reference": "Member.uid", - "relationship": "BelongsTo", - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": "DiscoveryQuestion.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "PLEvent", + "field": "Image_through_bannerUid", "integration": null, - "inverseOf": "PLEventGuests", + "inverseOf": "PLEvents_through_Image_bannerUid", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "PLEvent.uid", + "reference": "Image.uid", "relationship": "BelongsTo", "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "Team", + "field": "Image_through_logoUid", "integration": null, - "inverseOf": "PLEventGuests", + "inverseOf": "PLEvents_through_Image_logoUid", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Team.uid", + "reference": "Image.uid", "relationship": "BelongsTo", "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "PLEventGuests", + "integration": null, + "inverseOf": "PLEvent", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": false, + "isVirtual": false, + "reference": "PLEventGuest.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] }, { "defaultValue": null, @@ -3578,39 +3540,41 @@ { "defaultValue": null, "enums": null, - "field": "id", + "field": "description", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "officeHours", + "field": "endDate", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", - "validations": [] + "type": "Date", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "reason", + "field": "eventsCount", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3620,13 +3584,29 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Number", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "telegramId", + "field": "id", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Number", + "validations": [] + }, + { + "defaultValue": false, + "enums": null, + "field": "isFeatured", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3636,29 +3616,31 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Boolean", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "topics", + "field": "location", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": ["String"], - "validations": [] + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "uid", + "field": "name", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3676,7 +3658,7 @@ { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "priority", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3686,27 +3668,13 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "Number", "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "PLEventGuest", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "resources", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3716,39 +3684,39 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": ["Json"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "id", + "field": "shortDescription", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "newData", + "field": "slugURL", "integration": null, "inverseOf": null, - "isFilterable": false, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Json", + "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -3756,23 +3724,7 @@ { "defaultValue": null, "enums": null, - "field": "oldData", - "integration": null, - "inverseOf": null, - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Json", - "validations": [] - }, - { - "defaultValue": null, - "enums": ["MEMBER", "TEAM"], - "field": "participantType", + "field": "startDate", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3782,7 +3734,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Enum", + "type": "Date", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -3790,7 +3742,7 @@ { "defaultValue": null, "enums": null, - "field": "referenceUid", + "field": "telegramId", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3805,26 +3757,8 @@ }, { "defaultValue": null, - "enums": null, - "field": "requesterEmailId", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": true, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, - { - "defaultValue": "PENDING", - "enums": ["PENDING", "APPROVED", "REJECTED", "AUTOAPPROVED"], - "field": "status", + "enums": ["INVITE_ONLY"], + "field": "type", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3858,25 +3792,23 @@ { "defaultValue": null, "enums": null, - "field": "uniqueIdentifier", + "field": "updatedAt", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "type": "Date", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "websiteURL", "integration": null, "inverseOf": null, "isFilterable": true, @@ -3886,7 +3818,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": "String", "validations": [] } ], @@ -3895,7 +3827,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "ParticipantsRequest", + "name": "PLEvent", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -3906,33 +3838,35 @@ { "defaultValue": null, "enums": null, - "field": "Image", + "field": "Member", "integration": null, - "inverseOf": "Projects", + "inverseOf": "PLEventGuests", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "Image.uid", + "reference": "Member.uid", "relationship": "BelongsTo", "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "Member", + "field": "PLEvent", "integration": null, - "inverseOf": "Projects", + "inverseOf": "PLEventGuests", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "Member.uid", + "reference": "PLEvent.uid", "relationship": "BelongsTo", "type": "String", "validations": [ @@ -3942,94 +3876,106 @@ { "defaultValue": null, "enums": null, - "field": "ProjectContributions", + "field": "Team", "integration": null, - "inverseOf": "Project", - "isFilterable": false, + "inverseOf": "PLEventGuests", + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, - "isSortable": false, + "isRequired": true, + "isSortable": true, "isVirtual": false, - "reference": "ProjectContribution.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] + "reference": "Team.uid", + "relationship": "BelongsTo", + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "ProjectFocusAreas", + "field": "additionalInfo", "integration": null, - "inverseOf": "Project", + "inverseOf": null, "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "ProjectFocusArea.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Json", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "QuestionAndAnswers", + "field": "createdAt", "integration": null, - "inverseOf": "Project", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "QuestionAndAnswer.uid", - "relationship": "HasMany", - "type": ["String"], + "reference": null, + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "Team", + "field": "id", "integration": null, - "inverseOf": "Projects", + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Number", + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "officeHours", + "integration": null, + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Team.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "_contributingTeams", + "field": "reason", "integration": null, - "inverseOf": "Project", - "isFilterable": false, + "inverseOf": null, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": false, + "isSortable": true, "isVirtual": false, - "reference": "_contributingTeams.id", - "relationship": "HasMany", - "type": ["Number"], + "reference": null, + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "contactEmail", + "field": "telegramId", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4045,7 +3991,7 @@ { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "topics", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4055,13 +4001,13 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Date", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "description", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4076,6 +4022,52 @@ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] }, + { + "defaultValue": null, + "enums": null, + "field": "updatedAt", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Date", + "validations": [] + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "PLEventGuest", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ + { + "defaultValue": null, + "enums": null, + "field": "createdAt", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Date", + "validations": [] + }, { "defaultValue": null, "enums": null, @@ -4093,43 +4085,27 @@ "validations": [] }, { - "defaultValue": false, + "defaultValue": null, "enums": null, - "field": "isDeleted", + "field": "newData", "integration": null, "inverseOf": null, - "isFilterable": true, + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Boolean", + "type": "Json", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] }, - { - "defaultValue": false, - "enums": null, - "field": "isFeatured", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Boolean", - "validations": [] - }, { "defaultValue": null, "enums": null, - "field": "kpis", + "field": "oldData", "integration": null, "inverseOf": null, "isFilterable": false, @@ -4142,28 +4118,10 @@ "type": "Json", "validations": [] }, - { - "defaultValue": false, - "enums": null, - "field": "lookingForFunding", - "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": true, - "isSortable": true, - "isVirtual": false, - "reference": null, - "type": "Boolean", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] - }, { "defaultValue": null, - "enums": null, - "field": "name", + "enums": ["MEMBER", "TEAM"], + "field": "participantType", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4173,7 +4131,7 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "String", + "type": "Enum", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -4181,39 +4139,41 @@ { "defaultValue": null, "enums": null, - "field": "projectLinks", + "field": "referenceUid", "integration": null, "inverseOf": null, - "isFilterable": false, + "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Json", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "readMe", + "field": "requesterEmailId", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { - "defaultValue": null, - "enums": null, - "field": "score", + "defaultValue": "PENDING", + "enums": ["PENDING", "APPROVED", "REJECTED", "AUTOAPPROVED"], + "field": "status", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4223,13 +4183,13 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "Enum", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "tagline", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4247,7 +4207,7 @@ { "defaultValue": null, "enums": null, - "field": "uid", + "field": "uniqueIdentifier", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4284,7 +4244,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "Project", + "name": "ParticipantsRequest", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -4295,35 +4255,50 @@ { "defaultValue": null, "enums": null, - "field": "Member", + "field": "DiscoveryQuestions", "integration": null, - "inverseOf": "ProjectContributions", + "inverseOf": "Project", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": false, + "isVirtual": false, + "reference": "DiscoveryQuestion.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] + }, + { + "defaultValue": null, + "enums": null, + "field": "Image", + "integration": null, + "inverseOf": "Projects", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Member.uid", + "reference": "Image.uid", "relationship": "BelongsTo", "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "Project", + "field": "Member", "integration": null, - "inverseOf": "ProjectContributions", + "inverseOf": "Projects", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "Project.uid", + "reference": "Member.uid", "relationship": "BelongsTo", "type": "String", "validations": [ @@ -4331,73 +4306,79 @@ ] }, { - "defaultValue": false, + "defaultValue": null, "enums": null, - "field": "currentProject", + "field": "ProjectContributions", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Project", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Boolean", + "reference": "ProjectContribution.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "description", + "field": "ProjectFocusAreas", "integration": null, - "inverseOf": null, - "isFilterable": true, + "inverseOf": "Project", + "isFilterable": false, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "String", + "reference": "ProjectFocusArea.uid", + "relationship": "HasMany", + "type": ["String"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "endDate", + "field": "Team", "integration": null, - "inverseOf": null, + "inverseOf": "Projects", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Date", - "validations": [] + "reference": "Team.uid", + "relationship": "BelongsTo", + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "id", + "field": "_contributingTeams", "integration": null, - "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "inverseOf": "Project", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, - "isSortable": true, + "isSortable": false, "isVirtual": false, - "reference": null, - "type": "Number", + "reference": "_contributingTeams.id", + "relationship": "HasMany", + "type": ["Number"], "validations": [] }, { "defaultValue": null, "enums": null, - "field": "role", + "field": "contactEmail", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4413,7 +4394,7 @@ { "defaultValue": null, "enums": null, - "field": "startDate", + "field": "createdAt", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4429,7 +4410,7 @@ { "defaultValue": null, "enums": null, - "field": "uid", + "field": "description", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4443,55 +4424,87 @@ "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "ProjectContribution", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { "defaultValue": null, "enums": null, - "field": "FocusArea_through_ancestorAreaUid", + "field": "id", "integration": null, - "inverseOf": "ProjectFocusAreas_through_FocusArea_ancestorAreaUid", + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": true, + "isReadOnly": true, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Number", + "validations": [] + }, + { + "defaultValue": false, + "enums": null, + "field": "isDeleted", + "integration": null, + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "FocusArea.uid", - "relationship": "BelongsTo", - "type": "String", + "reference": null, + "type": "Boolean", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] }, + { + "defaultValue": false, + "enums": null, + "field": "isFeatured", + "integration": null, + "inverseOf": null, + "isFilterable": true, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Boolean", + "validations": [] + }, { "defaultValue": null, "enums": null, - "field": "FocusArea_through_focusAreaUid", + "field": "kpis", "integration": null, - "inverseOf": "ProjectFocusAreas_through_FocusArea_focusAreaUid", + "inverseOf": null, + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "type": "Json", + "validations": [] + }, + { + "defaultValue": false, + "enums": null, + "field": "lookingForFunding", + "integration": null, + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "FocusArea.uid", - "relationship": "BelongsTo", - "type": "String", + "reference": null, + "type": "Boolean", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} ] @@ -4499,17 +4512,16 @@ { "defaultValue": null, "enums": null, - "field": "Project", + "field": "name", "integration": null, - "inverseOf": "ProjectFocusAreas", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "Project.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -4518,158 +4530,159 @@ { "defaultValue": null, "enums": null, - "field": "id", + "field": "projectLinks", "integration": null, "inverseOf": null, - "isFilterable": true, - "isPrimaryKey": true, - "isReadOnly": true, + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", + "type": "Json", "validations": [] - } - ], - "icon": null, - "integration": null, - "isReadOnly": false, - "isSearchable": true, - "isVirtual": false, - "name": "ProjectFocusArea", - "onlyForRelationships": false, - "paginationType": "page", - "segments": [] - }, - { - "actions": [], - "fields": [ + }, { "defaultValue": null, "enums": null, - "field": "Member_through_createdBy", + "field": "readMe", "integration": null, - "inverseOf": "QuestionAndAnswers_through_Member_createdBy", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Member.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "Member_through_modifiedBy", + "field": "score", "integration": null, - "inverseOf": "QuestionAndAnswers_through_Member_modifiedBy", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Member.uid", - "relationship": "BelongsTo", - "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "reference": null, + "type": "Number", + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "PLEvent", + "field": "tagline", "integration": null, - "inverseOf": "QuestionAndAnswers", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "PLEvent.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "Project", + "field": "uid", "integration": null, - "inverseOf": "QuestionAndAnswers", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": "Project.uid", - "relationship": "BelongsTo", + "reference": null, "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "Team", + "field": "updatedAt", "integration": null, - "inverseOf": "QuestionAndAnswers", + "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": false, "isSortable": true, "isVirtual": false, - "reference": "Team.uid", - "relationship": "BelongsTo", - "type": "String", + "reference": null, + "type": "Date", "validations": [] - }, + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "Project", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ { "defaultValue": null, "enums": null, - "field": "answer", + "field": "Member", "integration": null, - "inverseOf": null, + "inverseOf": "ProjectContributions", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "Member.uid", + "relationship": "BelongsTo", "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "answerSourceFrom", + "field": "Project", "integration": null, - "inverseOf": null, + "inverseOf": "ProjectContributions", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "Project.uid", + "relationship": "BelongsTo", "type": "String", - "validations": [] + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { - "defaultValue": null, + "defaultValue": false, "enums": null, - "field": "answerSources", + "field": "currentProject", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4679,31 +4692,29 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": ["Json"], + "type": "Boolean", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "content", + "field": "description", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": true, + "isRequired": false, "isSortable": true, "isVirtual": false, "reference": null, "type": "String", - "validations": [ - {"type": "is present", "message": "Failed validation rule: 'Present'"} - ] + "validations": [] }, { "defaultValue": null, "enums": null, - "field": "createdAt", + "field": "endDate", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4733,9 +4744,9 @@ "validations": [] }, { - "defaultValue": true, + "defaultValue": null, "enums": null, - "field": "isActive", + "field": "role", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4745,13 +4756,13 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": "Boolean", + "type": "String", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "relatedQuestions", + "field": "startDate", "integration": null, "inverseOf": null, "isFilterable": true, @@ -4761,38 +4772,55 @@ "isSortable": true, "isVirtual": false, "reference": null, - "type": ["Json"], + "type": "Date", "validations": [] }, { "defaultValue": null, "enums": null, - "field": "shareCount", + "field": "uid", "integration": null, "inverseOf": null, "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, "reference": null, - "type": "Number", - "validations": [] - }, + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] + } + ], + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "name": "ProjectContribution", + "onlyForRelationships": false, + "paginationType": "page", + "segments": [] + }, + { + "actions": [], + "fields": [ { "defaultValue": null, "enums": null, - "field": "slug", + "field": "FocusArea_through_ancestorAreaUid", "integration": null, - "inverseOf": null, + "inverseOf": "ProjectFocusAreas_through_FocusArea_ancestorAreaUid", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "FocusArea.uid", + "relationship": "BelongsTo", "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -4801,16 +4829,17 @@ { "defaultValue": null, "enums": null, - "field": "uid", + "field": "FocusArea_through_focusAreaUid", "integration": null, - "inverseOf": null, + "inverseOf": "ProjectFocusAreas_through_FocusArea_focusAreaUid", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, + "reference": "FocusArea.uid", + "relationship": "BelongsTo", "type": "String", "validations": [ {"type": "is present", "message": "Failed validation rule: 'Present'"} @@ -4819,28 +4848,31 @@ { "defaultValue": null, "enums": null, - "field": "updatedAt", + "field": "Project", "integration": null, - "inverseOf": null, + "inverseOf": "ProjectFocusAreas", "isFilterable": true, "isPrimaryKey": false, "isReadOnly": false, - "isRequired": false, + "isRequired": true, "isSortable": true, "isVirtual": false, - "reference": null, - "type": "Date", - "validations": [] + "reference": "Project.uid", + "relationship": "BelongsTo", + "type": "String", + "validations": [ + {"type": "is present", "message": "Failed validation rule: 'Present'"} + ] }, { "defaultValue": null, "enums": null, - "field": "viewCount", + "field": "id", "integration": null, "inverseOf": null, "isFilterable": true, - "isPrimaryKey": false, - "isReadOnly": false, + "isPrimaryKey": true, + "isReadOnly": true, "isRequired": false, "isSortable": true, "isVirtual": false, @@ -4854,7 +4886,7 @@ "isReadOnly": false, "isSearchable": true, "isVirtual": false, - "name": "QuestionAndAnswer", + "name": "ProjectFocusArea", "onlyForRelationships": false, "paginationType": "page", "segments": [] @@ -5006,6 +5038,23 @@ } ], "fields": [ + { + "defaultValue": null, + "enums": null, + "field": "DiscoveryQuestions", + "integration": null, + "inverseOf": "Team", + "isFilterable": false, + "isPrimaryKey": false, + "isReadOnly": false, + "isRequired": false, + "isSortable": false, + "isVirtual": false, + "reference": "DiscoveryQuestion.uid", + "relationship": "HasMany", + "type": ["String"], + "validations": [] + }, { "defaultValue": null, "enums": null, @@ -5091,23 +5140,6 @@ "type": ["String"], "validations": [] }, - { - "defaultValue": null, - "enums": null, - "field": "QuestionAndAnswers", - "integration": null, - "inverseOf": "Team", - "isFilterable": false, - "isPrimaryKey": false, - "isReadOnly": false, - "isRequired": false, - "isSortable": false, - "isVirtual": false, - "reference": "QuestionAndAnswer.uid", - "relationship": "HasMany", - "type": ["String"], - "validations": [] - }, { "defaultValue": null, "enums": null, diff --git a/apps/web-api/prisma/fixtures/members.ts b/apps/web-api/prisma/fixtures/members.ts index f8a997dca..519fe7003 100644 --- a/apps/web-api/prisma/fixtures/members.ts +++ b/apps/web-api/prisma/fixtures/members.ts @@ -46,6 +46,7 @@ const membersFactory = Factory.define>( plnFriend: faker.datatype.boolean(), airtableRecId: `airtable-rec-id-${sequence}`, externalId: null, + bio: faker.datatype.string(), isFeatured: faker.datatype.boolean(), createdAt: faker.date.past(), approvedAt: faker.date.past(), diff --git a/apps/web-api/prisma/migrations/20240902052447_discover_question/migration.sql b/apps/web-api/prisma/migrations/20240902052447_discover_question/migration.sql new file mode 100644 index 000000000..454abc64e --- /dev/null +++ b/apps/web-api/prisma/migrations/20240902052447_discover_question/migration.sql @@ -0,0 +1,48 @@ +-- AlterTable +ALTER TABLE "Member" ADD COLUMN "bio" TEXT; + +-- CreateTable +CREATE TABLE "DiscoveryQuestion" ( + "id" SERIAL NOT NULL, + "uid" TEXT NOT NULL, + "title" TEXT, + "content" TEXT NOT NULL, + "viewCount" INTEGER, + "shareCount" INTEGER, + "slug" TEXT NOT NULL, + "isActive" BOOLEAN NOT NULL DEFAULT true, + "teamUid" TEXT, + "projectUid" TEXT, + "eventUid" TEXT, + "createdBy" TEXT NOT NULL, + "modifiedBy" TEXT NOT NULL, + "answer" TEXT, + "answerSources" JSONB[], + "answerSourceFrom" TEXT, + "relatedQuestions" JSONB[], + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "DiscoveryQuestion_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "DiscoveryQuestion_uid_key" ON "DiscoveryQuestion"("uid"); + +-- CreateIndex +CREATE UNIQUE INDEX "DiscoveryQuestion_slug_key" ON "DiscoveryQuestion"("slug"); + +-- AddForeignKey +ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_teamUid_fkey" FOREIGN KEY ("teamUid") REFERENCES "Team"("uid") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_projectUid_fkey" FOREIGN KEY ("projectUid") REFERENCES "Project"("uid") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_eventUid_fkey" FOREIGN KEY ("eventUid") REFERENCES "PLEvent"("uid") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_createdBy_fkey" FOREIGN KEY ("createdBy") REFERENCES "Member"("uid") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "DiscoveryQuestion" ADD CONSTRAINT "DiscoveryQuestion_modifiedBy_fkey" FOREIGN KEY ("modifiedBy") REFERENCES "Member"("uid") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/apps/web-api/prisma/schema.prisma b/apps/web-api/prisma/schema.prisma index 4aefeccaa..c152df08e 100644 --- a/apps/web-api/prisma/schema.prisma +++ b/apps/web-api/prisma/schema.prisma @@ -48,7 +48,7 @@ model Team { eventGuests PLEventGuest[] teamFocusAreas TeamFocusArea[] teamFocusAreasVersionHistory TeamFocusAreaVersionHistory[] - relatedQuestions QuestionAndAnswer[] @relation("TeamRelatedQuestionAndAnswers") + relatedQuestions DiscoveryQuestion[] @relation("TeamRelatedDiscoveryQuestions") } model Member { @@ -65,6 +65,7 @@ model Member { telegramHandler String? officeHours String? moreDetails String? + bio String? plnFriend Boolean @default(false) plnStartDate DateTime? airtableRecId String? @unique @@ -89,8 +90,8 @@ model Member { targetInteractions MemberInteraction[] @relation("TargetMemberInteractions") followUps MemberFollowUp[] feedbacks MemberFeedback[] - createdQuestions QuestionAndAnswer[] @relation("MemberCreatedQuestionAndAnswers") - modifiedQuestions QuestionAndAnswer[] @relation("MemberModifiedQuestionAndAnswers") + createdQuestions DiscoveryQuestion[] @relation("MemberCreatedDiscoveryQuestions") + modifiedQuestions DiscoveryQuestion[] @relation("MemberModifiedDiscoveryQuestions") } model MemberRole { @@ -338,7 +339,7 @@ model Project { isFeatured Boolean? @default(false) projectFocusAreas ProjectFocusArea[] contributions ProjectContribution[] - relatedQuestions QuestionAndAnswer[] @relation("ProjectRelatedQuestionAndAnswers") + relatedQuestions DiscoveryQuestion[] @relation("ProjectRelatedDiscoveryQuestions") } model PLEvent { @@ -366,7 +367,7 @@ model PLEvent { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt eventGuests PLEventGuest[] - relatedQuestions QuestionAndAnswer[] @relation("PLEventRelatedQuestionAndAnswers") + relatedQuestions DiscoveryQuestion[] @relation("PLEventRelatedDiscoveryQuestions") } model PLEventGuest { @@ -505,7 +506,7 @@ model MemberFeedback { updatedAt DateTime @updatedAt } -model QuestionAndAnswer { +model DiscoveryQuestion { id Int @id @default(autoincrement()) uid String @unique @default(cuid()) title String? @@ -515,15 +516,15 @@ model QuestionAndAnswer { slug String @unique isActive Boolean @default(true) teamUid String? - team Team? @relation("TeamRelatedQuestionAndAnswers", fields: [teamUid], references: [uid]) + team Team? @relation("TeamRelatedDiscoveryQuestions", fields: [teamUid], references: [uid]) projectUid String? - project Project? @relation("ProjectRelatedQuestionAndAnswers", fields: [projectUid], references: [uid]) + project Project? @relation("ProjectRelatedDiscoveryQuestions", fields: [projectUid], references: [uid]) eventUid String? - plevent PLEvent? @relation("PLEventRelatedQuestionAndAnswers", fields: [eventUid], references: [uid]) + plevent PLEvent? @relation("PLEventRelatedDiscoveryQuestions", fields: [eventUid], references: [uid]) createdBy String - creator Member? @relation("MemberCreatedQuestionAndAnswers", fields: [createdBy], references: [uid]) + creator Member? @relation("MemberCreatedDiscoveryQuestions", fields: [createdBy], references: [uid]) modifiedBy String - modifier Member? @relation("MemberModifiedQuestionAndAnswers", fields: [modifiedBy], references: [uid]) + modifier Member? @relation("MemberModifiedDiscoveryQuestions", fields: [modifiedBy], references: [uid]) answer String? answerSources Json[] answerSourceFrom String? diff --git a/apps/web-api/src/app.module.ts b/apps/web-api/src/app.module.ts index 26c638c21..460c570ad 100644 --- a/apps/web-api/src/app.module.ts +++ b/apps/web-api/src/app.module.ts @@ -38,6 +38,7 @@ import { EmptyStringToNullInterceptor } from './interceptors/empty-string-to-nul import { OfficeHoursModule } from './office-hours/office-hours.module'; import { MemberFollowUpsModule } from './member-follow-ups/member-follow-ups.module'; import { MemberFeedbacksModule } from './member-feedbacks/member-feedbacks.module'; +import { HuskyModule } from './husky/husky.module'; import { HomeModule } from './home/home.module'; @Module({ @@ -92,6 +93,7 @@ import { HomeModule } from './home/home.module'; OfficeHoursModule, MemberFollowUpsModule, MemberFeedbacksModule, + HuskyModule, HomeModule ], providers: [ diff --git a/apps/web-api/src/home/home.controller.ts b/apps/web-api/src/home/home.controller.ts index 0482a2b61..30c352def 100644 --- a/apps/web-api/src/home/home.controller.ts +++ b/apps/web-api/src/home/home.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Req, Body, Param, UsePipes, UseGuards, ForbiddenException, ConflictException } from '@nestjs/common'; +import { Controller, Req, Body, Param, UsePipes, UseGuards, ForbiddenException, BadRequestException } from '@nestjs/common'; import { Api, initNestServer } from '@ts-rest/nest'; import { ZodValidationPipe } from 'nestjs-zod'; import { Request } from 'express'; @@ -7,17 +7,18 @@ import { ApiOkResponseFromZod } from '../decorators/api-response-from-zod'; import { apiHome } from 'libs/contracts/src/lib/contract-home'; import { HomeService } from './home.service'; import { - QuestionAndAnswerQueryParams, - ResponseQuestionAndAnswerSchemaWithRelations, - ResponseQuestionAndAnswerSchema, - CreateQuestionAndAnswerSchemaDto, - UpdateQuestionAndAnswerSchemaDto + DiscoveryQuestionQueryParams, + ResponseDiscoveryQuestionSchemaWithRelations, + ResponseDiscoveryQuestionSchema, + CreateDiscoveryQuestionSchemaDto, + UpdateDiscoveryQuestionSchemaDto } from 'libs/contracts/src/schema'; import { UserTokenValidation } from '../guards/user-token-validation.guard'; import { MembersService } from '../members/members.service'; import { NoCache } from '../decorators/no-cache.decorator'; import { PrismaQueryBuilder } from '../utils/prisma-query-builder'; import { prismaQueryableFieldsFromZod } from '../utils/prisma-queryable-fields-from-zod'; +import { HuskyService } from '../husky/husky.service'; const server = initNestServer(apiHome); type RouteShape = typeof server.routeShapes; @@ -26,7 +27,8 @@ type RouteShape = typeof server.routeShapes; export class HomeController { constructor( private homeService: HomeService, - private memberService: MembersService + private memberService: MembersService, + private huskyService: HuskyService ) {} @Api(server.route.getAllFeaturedData) @@ -34,34 +36,34 @@ export class HomeController { return await this.homeService.fetchAllFeaturedData(); } - @Api(server.route.getAllQuestionAndAnswers) - @ApiQueryFromZod(QuestionAndAnswerQueryParams) - @ApiOkResponseFromZod(ResponseQuestionAndAnswerSchemaWithRelations.array()) + @Api(server.route.getAllDiscoveryQuestions) + @ApiQueryFromZod(DiscoveryQuestionQueryParams) + @ApiOkResponseFromZod(ResponseDiscoveryQuestionSchemaWithRelations.array()) @NoCache() - async getQuestionAndAnswers(@Req() request: Request) { + async getDiscoveryQuestions(@Req() request: Request) { const queryableFields = prismaQueryableFieldsFromZod( - ResponseQuestionAndAnswerSchema + ResponseDiscoveryQuestionSchema ); const builder = new PrismaQueryBuilder(queryableFields); const builtQuery = builder.build(request.query); - return await this.homeService.fetchQuestionAndAnswers(builtQuery); + return await this.huskyService.fetchDiscoverQuestions(builtQuery); } - @Api(server.route.getQuestionAndAnswer) - @ApiQueryFromZod(QuestionAndAnswerQueryParams) - @ApiOkResponseFromZod(ResponseQuestionAndAnswerSchemaWithRelations) + @Api(server.route.getDiscoveryQuestion) + @ApiQueryFromZod(DiscoveryQuestionQueryParams) + @ApiOkResponseFromZod(ResponseDiscoveryQuestionSchemaWithRelations) @NoCache() - async getQuestionAndAnswer(@Param('slug') slug: string) + async getDiscoveryQuestion(@Param('slug') slug: string) { - return await this.homeService.fetchQuestionAndAnswerBySlug(slug); + return await this.huskyService.fetchDiscoverQuestionBySlug(slug); } - @Api(server.route.createQuestionAndAnswer) + @Api(server.route.createDiscoveryQuestion) @UsePipes(ZodValidationPipe) @UseGuards(UserTokenValidation) - async addQuestionAndAnswer( - @Body() questionAndAnswer: CreateQuestionAndAnswerSchemaDto, + async addDiscoveryQuestion( + @Body() discoveryQuestion: CreateDiscoveryQuestionSchemaDto, @Req() request ) { const userEmail = request["userEmail"]; @@ -70,15 +72,15 @@ export class HomeController { if (!result) { throw new ForbiddenException(`Member with email ${userEmail} isn't admin`); } - return await this.homeService.createQuestionAndAnswer(questionAndAnswer as any, member); + return await this.huskyService.createDiscoverQuestion(discoveryQuestion as any, member); } - @Api(server.route.updateQuestionAndAnswer) + @Api(server.route.updateDiscoveryQuestion) @UsePipes(ZodValidationPipe) @UseGuards(UserTokenValidation) - async modifyQuestionAndAnswer( + async modifyDiscoveryQuestion( @Param('slug') slug: string, - @Body() questionAndAnswer: UpdateQuestionAndAnswerSchemaDto, + @Body() discoveryQuestion: UpdateDiscoveryQuestionSchemaDto, @Req() request ) { const userEmail = request["userEmail"]; @@ -87,20 +89,22 @@ export class HomeController { if (!result) { throw new ForbiddenException(`Member with email ${userEmail} isn't admin`); } - return await this.homeService.updateQuestionAndAnswerBySlug(slug, questionAndAnswer as any, member); + return await this.huskyService.updateDiscoveryQuestionBySlug(slug, discoveryQuestion as any, member); } - @Api(server.route.updateQuestionAndAnswerViewCount) - async modifyQuestionAndAnswerViewCount( - @Param('slug') slug: string - ) { - return await this.homeService.updateQuestionAndAnswerViewCount(slug); - } - - @Api(server.route.updateQuestionAndAnswerShareCount) - async modifyQuestionAndAnswerShareCount( - @Param('slug') slug: string + @Api(server.route.updateDiscoveryQuestionShareCountOrViewCount) + async modifyDiscoveryQuestionShareCountOrViewCount( + @Param('slug') slug: string, + @Body() body ) { - return await this.homeService.updateQuestionAndAnswerShareCount(slug); + const attribute = body.attribute; + switch (attribute) { + case "shareCount": + return this.huskyService.updateDiscoveryQuestionShareCount(slug); + case "viewCount": + return this.huskyService.updateDiscoveryQuestionViewCount(slug); + default: + throw new BadRequestException(`Invalid attribute: ${attribute}`); + } } } diff --git a/apps/web-api/src/home/home.module.ts b/apps/web-api/src/home/home.module.ts index 59146ee28..4858498ac 100644 --- a/apps/web-api/src/home/home.module.ts +++ b/apps/web-api/src/home/home.module.ts @@ -5,6 +5,7 @@ import { MembersModule } from '../members/members.module'; import { TeamsModule } from '../teams/teams.module'; import { ProjectsModule} from '../projects/projects.module'; import { PLEventsModule } from '../pl-events/pl-events.module'; +import { HuskyModule } from '../husky/husky.module'; @Module({ controllers: [HomeController], @@ -15,7 +16,8 @@ import { PLEventsModule } from '../pl-events/pl-events.module'; MembersModule, TeamsModule, ProjectsModule, - PLEventsModule + PLEventsModule, + HuskyModule ], exports: [ HomeService diff --git a/apps/web-api/src/home/home.service.ts b/apps/web-api/src/home/home.service.ts index a4f9c906d..8954b2ba8 100644 --- a/apps/web-api/src/home/home.service.ts +++ b/apps/web-api/src/home/home.service.ts @@ -1,27 +1,19 @@ import { - Injectable, - InternalServerErrorException, - ConflictException, - BadRequestException, - NotFoundException + Injectable, + InternalServerErrorException } from '@nestjs/common'; -import { Prisma } from '@prisma/client'; -import { LogService } from '../shared/log.service'; import { MembersService } from '../members/members.service'; import { TeamsService } from '../teams/teams.service'; import { PLEventsService } from '../pl-events/pl-events.service'; import { ProjectsService } from '../projects/projects.service'; -import { PrismaService } from '../shared/prisma.service'; @Injectable() export class HomeService { constructor( - private logger: LogService, private memberService: MembersService, private teamsService: TeamsService, private plEventsService: PLEventsService, - private projectsService: ProjectsService, - private prisma: PrismaService + private projectsService: ProjectsService ) {} async fetchAllFeaturedData() { @@ -36,176 +28,21 @@ export class HomeService { teamMemberRoles: { include: { team: { - include: { - logo: true, - }, + include: { logo: true }, }, }, }, - } + }, }), - teams: await this.teamsService.findAll( { + teams: await this.teamsService.findAll({ where: { isFeatured: true }, - include: { - logo: true, - } + include: { logo: true } }), - events: await this.plEventsService.getPLEvents({ where : { isFeatured: true }}), - projects: await this.projectsService.getProjects({ where : { isFeatured: true }}) - }; - } - catch (error) { - this.logger.error(error); - throw new InternalServerErrorException('Failed to fetch featured data'); - } - } - - async fetchQuestionAndAnswers( - query: Prisma.QuestionAndAnswerFindManyArgs - ) { - try { - query.include = { - ...query.include, - team: { - select: { - uid: true, - logo: true, - name: true - } - }, - project: { - select: { - uid: true, - logo: true, - name: true - } - }, - plevent: { - select: { - uid: true, - name: true, - logo: true - } - } - } - return await this.prisma.questionAndAnswer.findMany(query); - } - catch (error) { - this.handleErrors(error); - } - } - - async fetchQuestionAndAnswerBySlug( - slug: string - ) { - try { - return await this.prisma.questionAndAnswer.findUnique({ - where: { slug } - }); - } - catch (error) { - this.handleErrors(error); - } - } - - async createQuestionAndAnswer( - questionAndAnswer: Prisma.QuestionAndAnswerUncheckedCreateInput, - loggedInMember - ) { - try { - await this.prisma.questionAndAnswer.create({ - data: { - ... { - createdBy: loggedInMember.uid, - modifiedBy: loggedInMember.uid, - slug: Math.random().toString(36).substring(2, 8) - }, - ...questionAndAnswer - } - }); - return { - msg: "success" - } - } - catch (error) { - this.handleErrors(error); - } - } - - async updateQuestionAndAnswerBySlug( - slug: string, - questionAndAnswer: Prisma.QuestionAndAnswerUncheckedUpdateInput, - loggedInMember - ) { - try { - await this.prisma.questionAndAnswer.update({ - where: { slug }, - data: { - ... { - modifiedBy: loggedInMember.uid, - }, - ...questionAndAnswer - } - }); - return { - msg: `success` - }; - } - catch (error) { - this.handleErrors(error); - } - } - - async updateQuestionAndAnswerViewCount(slug: string) { - try { - await this.prisma.questionAndAnswer.update({ - where: { slug }, - data: { - viewCount: { increment: 1 } - } - }); - return { - msg: `success` + events: await this.plEventsService.getPLEvents({ where: { isFeatured: true } }), + projects: await this.projectsService.getProjects({ where: { isFeatured: true } }), }; - } - catch (error) { - this.handleErrors(error); + } catch (error) { + throw new InternalServerErrorException(`Error occured while retrieving featured data: ${error.message}`); } } - - async updateQuestionAndAnswerShareCount(slug: string) { - try { - await this.prisma.questionAndAnswer.update({ - where: { slug }, - data: { - shareCount: { increment: 1 } - } - }); - return { - msg: `success` - }; - } - catch (error) { - this.handleErrors(error); - } - } - - private handleErrors(error, message?) { - this.logger.error(error); - if (error instanceof Prisma.PrismaClientKnownRequestError) { - switch (error?.code) { - case 'P2002': - throw new ConflictException('Unique key constraint error on Question & Answer:', error.message); - case 'P2003': - throw new BadRequestException('Foreign key constraint error on Question & Answer', error.message); - case 'P2025': - throw new NotFoundException('Question and Answer is not found with slug:' + message); - default: - throw error; - } - } else if (error instanceof Prisma.PrismaClientValidationError) { - throw new BadRequestException('Database field validation error on Question & Answer', error.message); - } - throw error; - }; } diff --git a/apps/web-api/src/husky/husky.module.ts b/apps/web-api/src/husky/husky.module.ts new file mode 100644 index 000000000..d7185c7d7 --- /dev/null +++ b/apps/web-api/src/husky/husky.module.ts @@ -0,0 +1,14 @@ +import { Module } from '@nestjs/common'; +import { HuskyService } from './husky.service'; + +@Module({ + controllers: [], + providers: [ + HuskyService + ], + imports:[], + exports: [ + HuskyService + ] +}) +export class HuskyModule {} \ No newline at end of file diff --git a/apps/web-api/src/husky/husky.service.ts b/apps/web-api/src/husky/husky.service.ts new file mode 100644 index 000000000..2ea444121 --- /dev/null +++ b/apps/web-api/src/husky/husky.service.ts @@ -0,0 +1,155 @@ +import { + Injectable, + ConflictException, + BadRequestException, + NotFoundException +} from '@nestjs/common'; +import { Prisma } from '@prisma/client'; +import { LogService } from '../shared/log.service'; +import { PrismaService } from '../shared/prisma.service'; + +@Injectable() +export class HuskyService { + constructor( + private logger: LogService, + private prisma: PrismaService + ) {} + + async fetchDiscoverQuestions( + query: Prisma.DiscoveryQuestionFindManyArgs + ) { + try { + query.include = { + ...query.include, + team: { + select: { + uid: true, + logo: true, + name: true + } + }, + project: { + select: { + uid: true, + logo: true, + name: true + } + }, + plevent: { + select: { + uid: true, + name: true, + logo: true + } + } + } + return await this.prisma.discoveryQuestion.findMany(query); + } + catch (error) { + this.handleErrors(error); + } + } + + async fetchDiscoverQuestionBySlug( + slug: string + ) { + try { + return await this.prisma.discoveryQuestion.findUnique({ + where: { slug } + }); + } + catch (error) { + this.handleErrors(error); + } + } + + async createDiscoverQuestion( + discoveryQuestion: Prisma.DiscoveryQuestionUncheckedCreateInput, + loggedInMember + ) { + try { + return await this.prisma.discoveryQuestion.create({ + data: { + ... { + createdBy: loggedInMember.uid, + modifiedBy: loggedInMember.uid, + slug: Math.random().toString(36).substring(2, 8) + }, + ...discoveryQuestion + } + }); + } + catch (error) { + this.handleErrors(error); + } + } + + async updateDiscoveryQuestionBySlug( + slug: string, + discoveryQuestion: Prisma.DiscoveryQuestionUncheckedCreateInput, + loggedInMember + ) { + try { + return this.prisma.discoveryQuestion.update({ + where: { slug }, + data: { + ... { + modifiedBy: loggedInMember.uid, + }, + ...discoveryQuestion + } + }); + } + catch (error) { + this.handleErrors(error); + } + } + + async updateDiscoveryQuestionShareCount(slug: string) { + try { + return await this.prisma.discoveryQuestion.update({ + where: { slug }, + data: { + shareCount: { increment: 1 } + } + }); + } + catch (error) { + this.handleErrors(error); + } + } + + async updateDiscoveryQuestionViewCount(slug: string) { + try { + return await this.prisma.discoveryQuestion.update({ + where: { slug }, + data: { + viewCount: { increment: 1 } + } + }); + } + catch (error) { + this.handleErrors(error); + } + } + + private handleErrors(error, message?) { + this.logger.error(error); + if (error instanceof Prisma.PrismaClientKnownRequestError) { + switch (error?.code) { + case 'P2002': + throw new ConflictException('Unique key constraint error on discovery question:', error.message); + case 'P2003': + throw new BadRequestException('Foreign key constraint error on discovery question', error.message); + case 'P2025': + throw new NotFoundException('Discovery question is not found with slug:' + message); + default: + throw error; + } + } else if (error instanceof Prisma.PrismaClientValidationError) { + throw new BadRequestException('Database field validation error on discovery question', error.message); + } + throw error; + }; + +} \ No newline at end of file diff --git a/libs/contracts/src/lib/contract-home.ts b/libs/contracts/src/lib/contract-home.ts index 724e8547e..8b3b25f4e 100644 --- a/libs/contracts/src/lib/contract-home.ts +++ b/libs/contracts/src/lib/contract-home.ts @@ -1,73 +1,64 @@ import { initContract } from '@ts-rest/core'; import { getAPIVersionAsPath } from '../utils/versioned-path'; import { - QuestionAndAnswerQueryParams, - ResponseQuestionAndAnswerSchemaWithRelations + DiscoveryQuestionQueryParams, + ResponseDiscoveryQuestionSchemaWithRelations } from '../schema'; const contract = initContract(); export const apiHome = contract.router({ getAllFeaturedData: { method: 'GET', - path: `${getAPIVersionAsPath('1')}/home/featured/all`, + path: `${getAPIVersionAsPath('1')}/home/featured`, query: contract.query, responses: { 200: contract.response() }, summary: 'Get all featured members, projects, teams and events' }, - getAllQuestionAndAnswers: { + getAllDiscoveryQuestions: { method: 'GET', - path: `${getAPIVersionAsPath('1')}/home/question-answers`, - query: QuestionAndAnswerQueryParams, + path: `${getAPIVersionAsPath('1')}/home/discovery/questions`, + query: DiscoveryQuestionQueryParams, responses: { - 200: ResponseQuestionAndAnswerSchemaWithRelations.array() + 200: ResponseDiscoveryQuestionSchemaWithRelations.array() }, - summary: 'Get all the question & answers', + summary: 'Get all the discovery question', }, - getQuestionAndAnswer: { + getDiscoveryQuestion: { method: 'GET', - path: `${getAPIVersionAsPath('1')}/home/question-answers/:slug`, - query: QuestionAndAnswerQueryParams, + path: `${getAPIVersionAsPath('1')}/home/discovery/questions/:slug`, + query: DiscoveryQuestionQueryParams, responses: { - 200: ResponseQuestionAndAnswerSchemaWithRelations.array() + 200: ResponseDiscoveryQuestionSchemaWithRelations.array() }, - summary: 'Get question & answers', + summary: 'Get discovery question', }, - createQuestionAndAnswer: { + createDiscoveryQuestion: { method: 'POST', - path: `${getAPIVersionAsPath('1')}/home/question-answers`, + path: `${getAPIVersionAsPath('1')}/home/discovery/questions`, body: contract.body(), responses: { 200: contract.response() }, - summary: 'Create a new question & answer', + summary: 'Create a new discovery question', }, - updateQuestionAndAnswer: { + updateDiscoveryQuestion: { method: 'PUT', - path: `${getAPIVersionAsPath('1')}/home/question-answers/:slug`, + path: `${getAPIVersionAsPath('1')}/home/discovery/questions/:slug`, body: contract.body(), responses: { 200: contract.response() }, - summary: 'Update a question & answer by slug' + summary: 'Update a discovery question by slug' }, - updateQuestionAndAnswerViewCount: { + updateDiscoveryQuestionShareCountOrViewCount: { method: 'PATCH', - path: `${getAPIVersionAsPath('1')}/home/question-answers/:slug/view-count`, + path: `${getAPIVersionAsPath('1')}/home/discovery/questions/:slug`, body: contract.body(), responses: { 200: contract.response() }, - summary: 'Update view count of a question & answer by slug' - }, - updateQuestionAndAnswerShareCount: { - method: 'PATCH', - path: `${getAPIVersionAsPath('1')}/home/question-answers/:slug/share-count`, - body: contract.body(), - responses: { - 200: contract.response() - }, - summary: 'Update share count of a question & answer by slug' + summary: 'Update view/share count of a discovery question by slug' } }); diff --git a/libs/contracts/src/schema/question-answer.ts b/libs/contracts/src/schema/discovery-question.ts similarity index 61% rename from libs/contracts/src/schema/question-answer.ts rename to libs/contracts/src/schema/discovery-question.ts index b2689e5fd..22da0bd60 100644 --- a/libs/contracts/src/schema/question-answer.ts +++ b/libs/contracts/src/schema/discovery-question.ts @@ -5,8 +5,7 @@ import { ResponseMemberWithRelationsSchema } from './member'; import { ResponseTeamWithRelationsSchema } from './team'; import { ResponsePLEventSchemaWithRelationsSchema } from './pl-event'; - -export const QuestionAndAnswerSchema = z.object({ +export const DiscoveryQuestionSchema = z.object({ id: z.number().int(), uid: z.string(), title: z.string().optional(), @@ -25,7 +24,7 @@ export const QuestionAndAnswerSchema = z.object({ updatedAt: z.string() }); -export const CreateQuestionAndAnswerSchema = QuestionAndAnswerSchema.pick({ +export const CreateDiscoveryQuestionSchema = DiscoveryQuestionSchema.pick({ title: true, content: true, viewCount: true, @@ -40,31 +39,31 @@ export const CreateQuestionAndAnswerSchema = QuestionAndAnswerSchema.pick({ answerSourceFrom:true }); -export const ResponseQuestionAndAnswerSchema = QuestionAndAnswerSchema.omit({ id: true }).strict(); +export const ResponseDiscoveryQuestionSchema = DiscoveryQuestionSchema.omit({ id: true }).strict(); -export const ResponseQuestionAndAnswerSchemaWithRelations = ResponseQuestionAndAnswerSchema.extend({ +export const ResponseDiscoveryQuestionSchemaWithRelations = ResponseDiscoveryQuestionSchema.extend({ team: ResponseTeamWithRelationsSchema.optional(), plevent: ResponsePLEventSchemaWithRelationsSchema.optional(), creator: ResponseMemberWithRelationsSchema.optional(), modifier: ResponseMemberWithRelationsSchema.optional() }); -export const QuestionAndAnswerRelationalFields = ResponseQuestionAndAnswerSchemaWithRelations.pick({ +export const DiscoveryQuestionRelationalFields = ResponseDiscoveryQuestionSchemaWithRelations.pick({ team: true, creator: true, modifier: true }).strip(); -export const QuestionAndAnswerQueryableFields = ResponseQuestionAndAnswerSchema.keyof(); +export const DiscoveryQuestionQueryableFields = ResponseDiscoveryQuestionSchema.keyof(); -export const QuestionAndAnswerQueryParams = QueryParams({ - queryableFields: QuestionAndAnswerQueryableFields, - relationalFields: QuestionAndAnswerRelationalFields +export const DiscoveryQuestionQueryParams = QueryParams({ + queryableFields: DiscoveryQuestionQueryableFields, + relationalFields: DiscoveryQuestionRelationalFields }); -export const QuestionAndAnswerDetailQueryParams = QuestionAndAnswerQueryParams.unwrap() +export const DiscoveryQuestionDetailQueryParams = DiscoveryQuestionQueryParams.unwrap() .pick(RETRIEVAL_QUERY_FILTERS) .optional(); -export class CreateQuestionAndAnswerSchemaDto extends createZodDto(CreateQuestionAndAnswerSchema) {} -export class UpdateQuestionAndAnswerSchemaDto extends createZodDto(CreateQuestionAndAnswerSchema) {} \ No newline at end of file +export class CreateDiscoveryQuestionSchemaDto extends createZodDto(CreateDiscoveryQuestionSchema) {} +export class UpdateDiscoveryQuestionSchemaDto extends createZodDto(CreateDiscoveryQuestionSchema) {} \ No newline at end of file diff --git a/libs/contracts/src/schema/index.ts b/libs/contracts/src/schema/index.ts index 61dde3b9e..22e482eaf 100644 --- a/libs/contracts/src/schema/index.ts +++ b/libs/contracts/src/schema/index.ts @@ -22,4 +22,4 @@ export * from './project-focus-areas'; export * from './member-interaction'; export * from './member-follow-up'; export * from './member-feedback'; -export * from './question-answer'; \ No newline at end of file +export * from './discovery-question'; \ No newline at end of file diff --git a/libs/contracts/src/schema/member.ts b/libs/contracts/src/schema/member.ts index 6ef09d794..3519ac27b 100644 --- a/libs/contracts/src/schema/member.ts +++ b/libs/contracts/src/schema/member.ts @@ -39,6 +39,7 @@ export const MemberSchema = z.object({ officeHours: z.string().nullish(), airtableRecId: z.string().nullish(), plnFriend: z.boolean(), + bio: z.string().nullish(), isFeatured: z.boolean().nullish(), createdAt: z.string(), updatedAt: z.string(),