diff --git a/.env.sample b/.env.sample index d5c9ae9c56..f42420647a 100644 --- a/.env.sample +++ b/.env.sample @@ -78,4 +78,8 @@ LOG_LEVEL = info REDIS_HOST= REDIS_PORT= -REDIS_PASSWORD= \ No newline at end of file +REDIS_PASSWORD= + +# this environment variable is for setting the environment variable for Image Upload size + +IMAGE_SIZE_LIMIT_KB=3000 \ No newline at end of file diff --git a/.github/workflows/authorized-changes-detection.yml b/.github/workflows/authorized-changes-detection.yml index 1a5d9bfbae..4d7398643a 100644 --- a/.github/workflows/authorized-changes-detection.yml +++ b/.github/workflows/authorized-changes-detection.yml @@ -15,7 +15,7 @@ on: paths: - '.github/**' - '.husky/**' - - '.scripts/**' + - 'scripts/**' - '.env.sample' - 'tsconfig.json' - '.gitignore' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 953eee0d8a..0000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,24 +0,0 @@ -# You can find the deployment instructions in the scripts/cloud-api-demo/README.md file -name: Deploy to Cloud VPS - -on: - push: - branches: - - develop - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Execute remote ssh commands - uses: appleboy/ssh-action@v1.0.0 - with: - host: ${{ secrets.API_DEMO_HOST }} - username: ${{ secrets.API_DEMO_USERNAME }} - key: ${{ secrets.API_DEMO_SSH_KEY }} - port: ${{ secrets.API_DEMO_PORT }} - command_timeout: 30m - script: | - /usr/local/bin/deploy.sh - diff --git a/.github/workflows/md_mdx_format_adjuster.py b/.github/workflows/md_mdx_format_adjuster.py new file mode 100644 index 0000000000..c33ad1fa66 --- /dev/null +++ b/.github/workflows/md_mdx_format_adjuster.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +# -*- coding: UTF-8 -*- +""" +Script to make Markdown files MDX compatible. + +This script scans Markdown files and escapes special characters (<, >, {, }) +to make them compatible with the MDX standard used in Docusaurus v3. + +This script complies with: + 1) Pylint + 2) Pydocstyle + 3) Pycodestyle + 4) Flake8 +""" + +import os +import argparse +import re + +def escape_mdx_characters(text): + """ + Escape special characters in a text string for MDX compatibility. + Avoids escaping already escaped characters. + + Args: + text: A string containing the text to be processed. + + Returns: + A string with special characters (<, >, {, }) escaped, avoiding + double escaping. + """ + # Regular expressions to find unescaped special characters + patterns = { + "<": r"(?": r"(?", + "{": r"(?> $GITHUB_ENV + echo "::add-mask::$secret" + + - name: Generate Refresh Token Secret + run: | + secret=$(openssl rand -hex 32) + echo "INPUT_REFRESH_TOKEN_SECRET=$secret" >> $GITHUB_ENV + echo "::add-mask::$secret" + + - name: Execute remote ssh commands + uses: appleboy/ssh-action@v1.0.3 + env: + INPUT_RECAPTCHA_SECRET_KEY: ${{ secrets.API_DEMO_RECAPTCHA_SECRET_KEY }} + INPUT_MAIL_USERNAME: ${{ secrets.API_DEMO_MAIL_USERNAME }} + INPUT_MAIL_PASSWORD: ${{ secrets.API_DEMO_MAIL_PASSWORD }} + INPUT_LAST_RESORT_SUPERADMIN_EMAIL: ${{ secrets.API_DEMO_LAST_RESORT_SUPERADMIN_EMAIL }} + with: + host: ${{ secrets.API_DEMO_HOST }} + username: ${{ secrets.API_DEMO_USERNAME }} + key: ${{ secrets.API_DEMO_SSH_KEY }} + port: ${{ secrets.API_DEMO_SSH_PORT}} + allenvs: true + command_timeout: 30m + script: | + python3 /usr/local/bin/scripts/create_env.py --access_token_secret $INPUT_ACCESS_TOKEN_SECRET --refresh_token_secret $INPUT_REFRESH_TOKEN_SECRET --recaptcha_secret_key $INPUT_RECAPTCHA_SECRET_KEY --mail_username $INPUT_MAIL_USERNAME --mail_password $INPUT_MAIL_PASSWORD --last_resort_superadmin_email $INPUT_LAST_RESORT_SUPERADMIN_EMAIL + python3 /usr/local/bin/scripts/deploy.py --path ~/develop --branch develop \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index b87387cb11..f81f559cec 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -9,7 +9,7 @@ # Checks code for typescript type errors and throws errors if found. npm run typecheck -# Formats code using prettier +# Formats staged code using prettier # Checks and fixes all lint issues in code which don't require manual intervention. # Throws errors if lint issues requiring manual intervention are found in code. npm run lint-staged diff --git a/README.md b/README.md index a09259ae41..bdacd57db5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Talawa API + 💬 Join the community on Slack. The link can be found in the `Talawa` [README.md](https://github.com/PalisadoesFoundation/talawa) file. [![N|Solid](public/markdown/images/talawa-logo-lite-200x200.png)](https://github.com/PalisadoesFoundation/talawa-api) diff --git a/codegen.ts b/codegen.ts index f2f5827b2e..47f6985cad 100644 --- a/codegen.ts +++ b/codegen.ts @@ -25,6 +25,11 @@ const config: CodegenConfig = { // functionality is useful because what we retrieve from the database and what we choose to return from a graphql server // could be completely different fields. Address to models here is relative to the location of generated types. mappers: { + ActionItem: "../models/ActionItem#InterfaceActionItem", + + ActionItemCategory: + "../models/ActionItemCategory#InterfaceActionItemCategory", + CheckIn: "../models/CheckIn#InterfaceCheckIn", MessageChat: "../models/MessageChat#InterfaceMessageChat", @@ -73,8 +78,6 @@ const config: CodegenConfig = { UserTag: "../models/OrganizationTagUser#InterfaceOrganizationTagUser", User: "../models/User#InterfaceUser", - - UserToReturn: "../models/User#InterfaceUserToReturn", }, useTypeImports: true, diff --git a/docs/Schema.md b/docs/Schema.md index 0676a40531..04a1dab77e 100644 --- a/docs/Schema.md +++ b/docs/Schema.md @@ -6,10 +6,10 @@ * [Query](#query) * [Mutation](#mutation) * [Objects](#objects) - * [Address](#address) * [Advertisement](#advertisement) * [AggregatePost](#aggregatepost) * [AggregateUser](#aggregateuser) + * [AndroidFirebaseOptions](#androidfirebaseoptions) * [AuthData](#authdata) * [CheckIn](#checkin) * [CheckInStatus](#checkinstatus) @@ -20,11 +20,13 @@ * [DirectChatMessage](#directchatmessage) * [Donation](#donation) * [Event](#event) + * [EventProject](#eventproject) * [ExtendSession](#extendsession) * [Feedback](#feedback) * [Group](#group) * [GroupChat](#groupchat) * [GroupChatMessage](#groupchatmessage) + * [IOSFirebaseOptions](#iosfirebaseoptions) * [InvalidCursor](#invalidcursor) * [Language](#language) * [LanguageModel](#languagemodel) @@ -45,24 +47,21 @@ * [Post](#post) * [PostConnection](#postconnection) * [Subscription](#subscription) + * [Task](#task) * [Translation](#translation) * [UnauthenticatedError](#unauthenticatederror) * [UnauthorizedError](#unauthorizederror) - * [UpdateAdvertisementPayload](#updateadvertisementpayload) * [User](#user) * [UserConnection](#userconnection) * [UserCustomData](#usercustomdata) * [UserEdge](#useredge) - * [UserPhone](#userphone) * [UserTag](#usertag) * [UserTagEdge](#usertagedge) * [UserTagsConnection](#usertagsconnection) * [UserTagsConnectionResult](#usertagsconnectionresult) - * [UserToReturn](#usertoreturn) * [UsersConnection](#usersconnection) * [UsersConnectionResult](#usersconnectionresult) * [Inputs](#inputs) - * [AddressInput](#addressinput) * [CheckInInput](#checkininput) * [CommentInput](#commentinput) * [CreateUserTagInput](#createusertaginput) @@ -70,6 +69,7 @@ * [DonationWhereInput](#donationwhereinput) * [EventAttendeeInput](#eventattendeeinput) * [EventInput](#eventinput) + * [EventProjectInput](#eventprojectinput) * [EventWhereInput](#eventwhereinput) * [FeedbackInput](#feedbackinput) * [ForgotPasswordData](#forgotpassworddata) @@ -85,41 +85,37 @@ * [PostUpdateInput](#postupdateinput) * [PostWhereInput](#postwhereinput) * [RecaptchaVerification](#recaptchaverification) + * [TaskInput](#taskinput) * [ToggleUserTagAssignInput](#toggleusertagassigninput) - * [UpdateAdvertisementInput](#updateadvertisementinput) * [UpdateEventInput](#updateeventinput) + * [UpdateEventProjectInput](#updateeventprojectinput) * [UpdateOrganizationInput](#updateorganizationinput) + * [UpdateTaskInput](#updatetaskinput) * [UpdateUserInput](#updateuserinput) * [UpdateUserPasswordInput](#updateuserpasswordinput) * [UpdateUserTagInput](#updateusertaginput) * [UpdateUserTypeInput](#updateusertypeinput) * [UserAndOrganizationInput](#userandorganizationinput) * [UserInput](#userinput) - * [UserPhoneInput](#userphoneinput) * [UserTagsConnectionInput](#usertagsconnectioninput) * [UserWhereInput](#userwhereinput) * [UsersConnectionInput](#usersconnectioninput) * [createChatInput](#createchatinput) * [createGroupChatInput](#creategroupchatinput) * [Enums](#enums) - * [AdvertisementType](#advertisementtype) - * [EducationGrade](#educationgrade) - * [EmploymentStatus](#employmentstatus) * [EventOrderByInput](#eventorderbyinput) - * [Gender](#gender) - * [MaritalStatus](#maritalstatus) * [OrganizationOrderByInput](#organizationorderbyinput) * [PaginationDirection](#paginationdirection) * [PostOrderByInput](#postorderbyinput) * [Recurrance](#recurrance) * [Status](#status) + * [TaskOrderByInput](#taskorderbyinput) * [Type](#type) * [UserOrderByInput](#userorderbyinput) * [UserType](#usertype) * [Scalars](#scalars) * [Any](#any) * [Boolean](#boolean) - * [CountryCode](#countrycode) * [Date](#date) * [DateTime](#datetime) * [EmailAddress](#emailaddress) @@ -924,6 +920,16 @@ +createEventProject +EventProject! + + + +data +EventProjectInput! + + + createGroupChat GroupChat! @@ -1049,6 +1055,21 @@ +createTask +Task! + + + +data +TaskInput! + + + +eventProjectId +ID! + + + deleteAdvertisementById DeletePayload! @@ -1264,6 +1285,16 @@ +removeEventProject +EventProject! + + + +id +ID! + + + removeGroupChat GroupChat! @@ -1349,6 +1380,16 @@ +removeTask +Task + + + +id +ID! + + + removeUserFromGroupChat GroupChat! @@ -1424,6 +1465,21 @@ +setTaskVolunteers +Task + + + +id +ID! + + + +volunteers +[ID]! + + + signUp AuthData! @@ -1504,18 +1560,23 @@ -updateAdvertisement -UpdateAdvertisementPayload +updateEvent +Event! -input -UpdateAdvertisementInput! +id +ID! -updateEvent -Event! +data +UpdateEventInput + + + +updateEventProject +EventProject! @@ -1525,7 +1586,7 @@ data -UpdateEventInput +UpdateEventProjectInput! @@ -1599,6 +1660,21 @@ +updateTask +Task + + + +id +ID! + + + +data +UpdateTaskInput! + + + updateUserProfile User! @@ -1658,61 +1734,6 @@ ## Objects -### Address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldArgumentTypeDescription
cityString
countryCodeCountryCode
dependentLocalityString
line1String
line2String
postalCodeString
sortingCodeString
stateString
- ### Advertisement @@ -1727,7 +1748,7 @@ - + @@ -1737,7 +1758,7 @@ - + @@ -1747,7 +1768,7 @@ - + @@ -1760,25 +1781,30 @@ + +
_idID!ID
orgIdID!ID
typeAdvertisementType!String!
Date!
+ +### AggregatePost + + + - - - - - - - - + + + + + + - - + +
createdAtDateTime!
creatorUserFieldArgumentTypeDescription
updatedAtDateTime!countInt!
-### AggregatePost +### AggregateUser @@ -1798,7 +1824,7 @@
-### AggregateUser +### AndroidFirebaseOptions @@ -1811,8 +1837,28 @@ - - + + + + + + + + + + + + + + + + + + + + + + @@ -1832,7 +1878,7 @@ - + @@ -1845,6 +1891,16 @@ + + + + + + + + + +
countInt!apiKeyString
appIdString
messagingSenderIdString
projectIdString
storageBucketString
userUserToReturn!User!
String!
androidFirebaseOptionsAndroidFirebaseOptions!
iosFirebaseOptionsIOSFirebaseOptions!
@@ -1895,16 +1951,6 @@ Boolean! - -createdAt -DateTime! - - - -updatedAt -DateTime! - - @@ -1952,7 +1998,7 @@ _id -ID! +ID @@ -1961,33 +2007,28 @@ -post -Post! - - - -likedBy -[User] +createdAt +DateTime -likeCount -Int +creator +User! -creator -User +post +Post! -createdAt -DateTime! +likedBy +[User] -updatedAt -DateTime! +likeCount +Int @@ -2077,17 +2118,7 @@ creator -User - - - -createdAt -DateTime! - - - -updatedAt -DateTime! +User! @@ -2136,11 +2167,6 @@ -updatedAt -DateTime! - - - messageContent String! @@ -2195,16 +2221,6 @@ Float! - -createdAt -DateTime! - - - -updatedAt -DateTime! - - @@ -2302,22 +2318,12 @@ creator -User - - - -createdAt -DateTime! - - - -updatedAt -DateTime! +User! attendees -[User] +[User!]! @@ -2327,7 +2333,7 @@ admins -[User!] +[User] @@ -2341,6 +2347,11 @@ +projects +[EventProject] + + + feedback [Feedback!]! @@ -2353,7 +2364,7 @@ -### ExtendSession +### EventProject @@ -2366,16 +2377,56 @@ - - + + - + - + + + + + + + + + + + + + + + + +
accessTokenString!_idID!
refreshTokentitle String!
descriptionString!
eventEvent!
tasks[Task]
+ +### ExtendSession + + + + + + + + + + + + + + + + + + + + + +
FieldArgumentTypeDescription
accessTokenString!
refreshTokenString!
### Feedback @@ -2410,16 +2461,6 @@ String - -createdAt -DateTime! - - - -updatedAt -DateTime! - - @@ -2437,12 +2478,12 @@ _id -ID! +ID title -String! +String @@ -2452,12 +2493,7 @@ createdAt -DateTime! - - - -updatedAt -DateTime! +DateTime @@ -2467,7 +2503,7 @@ admins -[User!]! +[User] @@ -2502,17 +2538,7 @@ creator -User - - - -createdAt -DateTime! - - - -updatedAt -DateTime! +User! @@ -2556,13 +2582,58 @@ -updatedAt -DateTime! +messageContent +String! + + + +### IOSFirebaseOptions + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2772,17 +2843,12 @@ - + - - - - - - + @@ -2845,11 +2911,6 @@ - - - - -
messageContentString!FieldArgumentTypeDescription
apiKeyString
appIdString
messagingSenderIdString
projectIdString
storageBucketString
iosClientIdString
iosBundleIdString
textString!String
createdAtDateTime!
updatedAtDateTime!DateTime
DateTime!
updatedAtDateTime!
@@ -2946,18 +3007,13 @@ -creator -User - - - -createdAt -DateTime! +isPublic +Boolean! -updatedAt -DateTime! +creator +User! @@ -2967,7 +3023,7 @@ admins -[User!] +[User] @@ -2981,8 +3037,8 @@ -userRegistrationRequired -Boolean! +blockedUsers +[User] @@ -2991,13 +3047,13 @@ -blockedUsers -[User] +apiUrl +URL! -apiUrl -URL! +createdAt +DateTime @@ -3106,23 +3162,23 @@ -creator -User +isPublic +Boolean! -apiUrl -URL! +creator +User! -userRegistrationRequired +visibleInSearch Boolean! -visibleInSearch -Boolean! +apiUrl +URL! @@ -3237,7 +3293,7 @@ When paginating backwards, are there more items? uninstalledOrgs -[ID!] +[ID!]! @@ -3272,7 +3328,7 @@ When paginating backwards, are there more items? createdAt -DateTime! +DateTime @@ -3307,17 +3363,7 @@ When paginating backwards, are there more items? createdAt -DateTime! - - - -creator -User - - - -updatedAt -DateTime! +DateTime @@ -3331,6 +3377,11 @@ When paginating backwards, are there more items? +creator +User! + + + organization Organization! @@ -3438,7 +3489,7 @@ A list of edges. -### Translation +### Task @@ -3451,29 +3502,54 @@ A list of edges. - - + + - - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + +
lang_codeString_idID!
en_valueStringtitleString!
translationdescription String
verifiedeventEvent!
creatorUser!
createdAtDateTime!
completed Boolean
deadlineDateTime
volunteers[User]
-### UnauthenticatedError +### Translation @@ -3486,14 +3562,29 @@ A list of edges. - - + + + + + + + + + + + + + + + + +
messageString!lang_codeString
en_valueString
translationString
verifiedBoolean
-### UnauthorizedError +### UnauthenticatedError @@ -3513,7 +3604,7 @@ A list of edges.
-### UpdateAdvertisementPayload +### UnauthorizedError @@ -3526,8 +3617,8 @@ A list of edges. - - + + @@ -3546,43 +3637,38 @@ A list of edges. + + + + + - - + + - - + + - - + + - - - - - - - - - - - - + + - - + + @@ -3591,18 +3677,18 @@ A list of edges. - - + + - - + + - - + + @@ -3611,58 +3697,48 @@ A list of edges. - - - - - - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - - - - - - + + @@ -3695,21 +3771,6 @@ A list of edges. - - - - - - - - - - - - - - -
advertisementAdvertisementmessageString!
tokenVersionInt!
_id ID!
addressAddressfirstNameString!
adminApprovedBooleanlastNameString!
adminFor[Organization]emailEmailAddress!
appLanguageCodeString!
birthDateDate
createdAtDateTime!userTypeString
createdEvents[Event]appLanguageCodeString!
educationGradeEducationGradejoinedOrganizations[Organization]
emailEmailAddress!createdEvents[Event]
employmentStatusEmploymentStatusregisteredEvents[Event]
firstNameString!
genderGenderadminFor[Organization]
imageStringmembershipRequests[MembershipRequest]
joinedOrganizationsorganizationsBlockedBy [Organization]
lastNameString!imageString
maritalStatusMaritalStatusorganizationUserBelongsToOrganization
membershipRequests[MembershipRequest]pluginCreationAllowedBoolean
organizationsBlockedBy[Organization]adminApprovedBoolean
phoneUserPhoneassignedTasks[Task]
pluginCreationAllowedBoolean!
registeredEvents[Event]createdAtDateTime
ID
tokenVersionInt!
updatedAtDateTime!
userTypeUserType!
@@ -3803,36 +3864,6 @@ A list of edges. -### UserPhone - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldArgumentTypeDescription
homePhoneNumber
mobilePhoneNumber
workPhoneNumber
- ### UserTag @@ -3963,186 +3994,6 @@ A list of edges.
-### UserToReturn - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldArgumentTypeDescription
_idID!
addressAddress
adminApprovedBoolean
adminFor[Organization]
appLanguageCodeString!
birthDateDate
createdAtDateTime!
createdEvents[Event]
createdOrganizations[Organization]
educationGradeEducationGrade
emailEmailAddress!
employmentStatusEmploymentStatus
eventAdmin[Event]
firstNameString!
genderGender
imageString
joinedOrganizations[Organization]
lastNameString!
maritalStatusMaritalStatus
membershipRequests[MembershipRequest]
organizationsBlockedBy[Organization]
phoneUserPhone
pluginCreationAllowedBoolean!
registeredEvents[Event]
tagsAssignedWithUserTagsConnection
afterString
beforeString
firstPositiveInt
lastPositiveInt
organizationIdID
tokenVersionInt!
updatedAtDateTime!
userTypeUserType!
- ### UsersConnection @@ -4195,60 +4046,6 @@ A list of edges. ## Inputs -### AddressInput - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
cityString
countryCodeCountryCode
dependentLocalityString
line1String
line2String
postalCodeString
sortingCodeString
stateString
- ### CheckInInput @@ -4547,6 +4344,35 @@ A list of edges.
+### EventProjectInput + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
titleString!
descriptionString!
eventIdID!
+ ### EventWhereInput @@ -4872,23 +4698,23 @@ A list of edges. - - + + - - + + - - + + - - + + @@ -5026,12 +4852,12 @@ A list of edges. - + - + @@ -5307,7 +5133,7 @@ A list of edges.
apiUrlURLisPublicBoolean!
imageStringvisibleInSearchBoolean!
userRegistrationRequiredBooleanapiUrlURL
visibleInSearchBooleanimageString
userRegistrationRequiredvisibleInSearch Boolean
visibleInSearchisPublic Boolean
-### ToggleUserTagAssignInput +### TaskInput @@ -5319,19 +5145,24 @@ A list of edges. - - + + - - + + + + + + +
userIdID!titleString!
tagIdID!descriptionString!
deadlineDateTime!
-### UpdateAdvertisementInput +### ToggleUserTagAssignInput @@ -5343,33 +5174,13 @@ A list of edges. - + - - - - - - - - - - - - - - - - - - - - - - + + @@ -5459,7 +5270,7 @@ A list of edges.
_iduserId ID!
nameString
linkString
typeAdvertisementType
startDateDate
endDateDatetagIdID!
-### UpdateOrganizationInput +### UpdateEventProjectInput @@ -5471,7 +5282,7 @@ A list of edges. - + @@ -5480,13 +5291,32 @@ A list of edges. + +
nametitle String
String
+ +### UpdateOrganizationInput + + + + + + + + + + + + + + + - + - + @@ -5495,10 +5325,15 @@ A list of edges. + + + + +
FieldTypeDescription
nameString
locationdescription String
userRegistrationRequiredisPublic Boolean
Boolean
locationString
-### UpdateUserInput +### UpdateTaskInput @@ -5510,53 +5345,52 @@ A list of edges. - - + + - - + + - - + + - - + + + +
addressAddressInputtitleString
birthDateDatedescriptionString
educationGradeEducationGradedeadlineDateTime
emailEmailAddresscompletedBoolean
+ +### UpdateUserInput + + + - - - + + + + + - - - - - - - - - - - - + + @@ -5700,37 +5534,8 @@ A list of edges. - - - - - -
employmentStatusEmploymentStatusFieldTypeDescription
firstName String
genderGender
lastName String
maritalStatusMaritalStatus
phoneUserPhoneInputemailEmailAddress
selectedOrgainzationID!
- -### UserPhoneInput - - - - - - - - - - - - - - - - - - - - - - - + + @@ -6023,127 +5828,6 @@ A list of edges. ## Enums -### AdvertisementType - -
FieldTypeDescription
homePhoneNumber
mobilePhoneNumber
workPhoneNumberorganizationUserBelongsToIdID
- - - - - - - - - - - - - - - - - - -
ValueDescription
BANNER
POPUP
MENU
- -### EducationGrade - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
NO_GRADE
PRE_KG
KG
GRADE_1
GRADE_2
GRADE_3
GRADE_4
GRADE_5
GRADE_6
GRADE_7
GRADE_8
GRADE_9
GRADE_10
GRADE_11
GRADE_12
GRADUATE
- -### EmploymentStatus - - - - - - - - - - - - - - - - - - - - -
ValueDescription
FULL_TIME
PART_TIME
UNEMPLOYED
- ### EventOrderByInput @@ -6235,64 +5919,6 @@ A list of edges.
-### Gender - - - - - - - - - - - - - - - - - - - - -
ValueDescription
MALE
FEMALE
OTHER
- -### MaritalStatus - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ValueDescription
SINGLE
ENGAGED
MARRIED
DIVORCED
WIDOWED
SEPERATED
- ### OrganizationOrderByInput @@ -6326,14 +5952,6 @@ A list of edges. - - - - - - - - @@ -6492,6 +6110,57 @@ A list of edges.
createdAt_ASC
createdAt_DESC
apiUrl_ASC
+### TaskOrderByInput + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ValueDescription
id_ASC
id_DESC
title_ASC
title_DESC
description_ASC
description_DESC
createdAt_ASC
createdAt_DESC
deadline_ASC
deadline_DESC
+ ### Type @@ -6582,10 +6251,6 @@ A list of edges. - - - -
SUPERADMIN
NON_USER
@@ -6597,8 +6262,6 @@ A list of edges. The `Boolean` scalar type represents `true` or `false`. -### CountryCode - ### Date A date string, such as 2007-12-03, compliant with the `full-date` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. diff --git a/locales/en.json b/locales/en.json index c9f09c338e..69060fe459 100644 --- a/locales/en.json +++ b/locales/en.json @@ -4,6 +4,9 @@ "user.notFound": "User not found", "user.alreadyMember": "User is already a member", "user.profileImage.notFound": "User profile image not found", + "actionItemCategory.notFound": "Action Item Category not found", + "actionItemCategory.alreadyExists": "Action Item Category already exists", + "actionItem.notFound": "Action Item not found", "advertisement.notFound": "Advertisement not found", "event.notFound": "Event not found", "organization.notFound": "Organization not found", diff --git a/locales/fr.json b/locales/fr.json index 8da45242d9..d3fafdc5cb 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -4,6 +4,9 @@ "user.notFound": "Utilisateur introuvable", "user.alreadyMember": "L'utilisateur est déjà membre", "user.profileImage.notFound": "Image du profil utilisateur introuvable", + "actionItemCategory.notFound": "Catégorie d’élément d’action introuvable", + "actionItemCategory.alreadyExists": "La catégorie d’élément d’action existe déjà", + "actionItem.notFound": "Élément d\\’action non trouvé", "event.notFound": "Événement non trouvé", "organization.notFound": "Organisation introuvable", "organization.profileImage.notFound": "Image du profil de l'organisation introuvable", diff --git a/locales/hi.json b/locales/hi.json index ec8731c162..959f97b093 100644 --- a/locales/hi.json +++ b/locales/hi.json @@ -4,6 +4,9 @@ "user.notFound": "उपयोगकर्ता नहीं मिला", "user.alreadyMember": "उपयोगकर्ता पहले से ही एक सदस्य है", "user.profileImage.notFound": "उपयोगकर्ता प्रोफ़ाइल छवि नहीं मिली", + "actionItemCategory.notFound": "श्रेणी नहीं मिली", + "actionItemCategory.alreadyExists": "यह श्रेणी पहले से मौजूद है", + "actionItem.notFound": "कार्रवाई का मद नहीं मिला", "advertisement.notFound": "विज्ञापन नहीं मिला", "event.notFound": "घटना नहीं मिली", "organization.notFound": "संगठन नहीं मिला", diff --git a/locales/sp.json b/locales/sp.json index a2301e9fa5..cfee07ce87 100644 --- a/locales/sp.json +++ b/locales/sp.json @@ -4,6 +4,9 @@ "user.notFound": "Usuario no encontrado", "user.alreadyMember": "El usuario ya es miembro", "user.profileImage.notFound": "No se encontró la imagen de perfil de usuario", + "actionItemCategory.notFound": "No se encontró la categoría de elemento de acción", + "actionItemCategory.alreadyExists": "Ya existe una categoría de elemento de acción", + "actionItem.notFound": "Elemento de acción no encontrado", "event.notFound": "Evento no encontrado", "organization.notFound": "Organización no encontrada", "organization.profileImage.notFound": "No se encontró la imagen del perfil de la organización", diff --git a/locales/zh.json b/locales/zh.json index f8cfd535c4..5ef0656cb6 100644 --- a/locales/zh.json +++ b/locales/zh.json @@ -4,6 +4,9 @@ "user.notFound": "找不到用戶", "user.alreadyMember": "用戶已經是會員", "user.profileImage.notFound": "未找到用戶個人資料圖像", + "actionItemCategory.notFound": "未找到措施项类别", + "actionItemCategory.alreadyExists": "措施项类别已存在", + "actionItem.notFound": "找不到操作项", "event.notFound": "未找到事件", "organization.notFound": "未找到組織", "organization.profileImage.notFound": "未找到組織檔案圖像", diff --git a/package-lock.json b/package-lock.json index 92207b183b..9b98cfc6fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@graphql-tools/utils": "^10.0.11", "@types/graphql-upload": "^16.0.5", "@types/yargs": "^17.0.32", - "axios": "^1.6.0", + "axios": "^1.6.7", "bcryptjs": "^2.4.3", "cls-bluebird": "^2.1.0", "cls-hooked": "^4.2.2", @@ -25,7 +25,7 @@ "cors": "^2.8.5", "cross-env": "^7.0.3", "date-fns": "^3.3.0", - "dotenv": "^8.6.0", + "dotenv": "^16.4.1", "express": "^4.18.2", "express-mongo-sanitize": "^2.2.0", "express-rate-limit": "^7.1.5", @@ -63,7 +63,7 @@ "zod-error": "^1.5.0" }, "devDependencies": { - "@graphql-codegen/cli": "^2.6.2", + "@graphql-codegen/cli": "^5.0.0", "@graphql-codegen/typescript": "^4.0.1", "@graphql-codegen/typescript-resolvers": "^4.0.1", "@graphql-eslint/eslint-plugin": "^3.12.0", @@ -80,7 +80,7 @@ "@types/lodash": "^4.14.202", "@types/mongoose-paginate-v2": "^1.6.5", "@types/morgan": "^1.9.9", - "@types/node": "^20.11.8", + "@types/node": "^20.11.16", "@types/nodemailer": "^6.4.14", "@types/shortid": "^0.0.32", "@types/uuid": "^9.0.7", @@ -90,12 +90,12 @@ "@vitest/coverage-c8": "^0.24.3", "concurrently": "^8.2.2", "eslint": "^8.56.0", - "eslint-config-prettier": "^8.5.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-tsdoc": "^0.2.17", "get-graphql-schema": "^2.1.2", "graphql-markdown": "^7.0.0", - "husky": "^8.0.3", + "husky": "^9.0.6", "lint-staged": "^15.2.0", "prettier": "^2.7.1", "rimraf": "^5.0.5", @@ -1494,28 +1494,6 @@ "node": ">=0.1.90" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@cwasm/webp": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/@cwasm/webp/-/webp-0.1.5.tgz", @@ -2165,45 +2143,44 @@ } }, "node_modules/@graphql-codegen/cli": { - "version": "2.16.5", - "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.16.5.tgz", - "integrity": "sha512-XYPIp+q7fB0xAGSAoRykiTe4oY80VU+z+dw5nuv4mLY0+pv7+pa2C6Nwhdw7a65lXOhFviBApWCCZeqd54SMnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-5.0.0.tgz", + "integrity": "sha512-A7J7+be/a6e+/ul2KI5sfJlpoqeqwX8EzktaKCeduyVKgOLA6W5t+NUGf6QumBDXU8PEOqXk3o3F+RAwCWOiqA==", "dev": true, "dependencies": { "@babel/generator": "^7.18.13", "@babel/template": "^7.18.10", "@babel/types": "^7.18.13", - "@graphql-codegen/core": "^2.6.8", - "@graphql-codegen/plugin-helpers": "^3.1.2", - "@graphql-tools/apollo-engine-loader": "^7.3.6", - "@graphql-tools/code-file-loader": "^7.3.13", - "@graphql-tools/git-loader": "^7.2.13", - "@graphql-tools/github-loader": "^7.3.20", - "@graphql-tools/graphql-file-loader": "^7.5.0", - "@graphql-tools/json-file-loader": "^7.4.1", - "@graphql-tools/load": "^7.8.0", - "@graphql-tools/prisma-loader": "^7.2.49", - "@graphql-tools/url-loader": "^7.13.2", - "@graphql-tools/utils": "^9.0.0", - "@whatwg-node/fetch": "^0.6.0", + "@graphql-codegen/core": "^4.0.0", + "@graphql-codegen/plugin-helpers": "^5.0.1", + "@graphql-tools/apollo-engine-loader": "^8.0.0", + "@graphql-tools/code-file-loader": "^8.0.0", + "@graphql-tools/git-loader": "^8.0.0", + "@graphql-tools/github-loader": "^8.0.0", + "@graphql-tools/graphql-file-loader": "^8.0.0", + "@graphql-tools/json-file-loader": "^8.0.0", + "@graphql-tools/load": "^8.0.0", + "@graphql-tools/prisma-loader": "^8.0.0", + "@graphql-tools/url-loader": "^8.0.0", + "@graphql-tools/utils": "^10.0.0", + "@whatwg-node/fetch": "^0.8.0", "chalk": "^4.1.0", - "chokidar": "^3.5.2", - "cosmiconfig": "^7.0.0", - "cosmiconfig-typescript-loader": "^4.3.0", + "cosmiconfig": "^8.1.3", "debounce": "^1.2.0", "detect-indent": "^6.0.0", - "graphql-config": "^4.4.0", + "graphql-config": "^5.0.2", "inquirer": "^8.0.0", "is-glob": "^4.0.1", + "jiti": "^1.17.1", "json-to-pretty-yaml": "^1.2.2", "listr2": "^4.0.5", "log-symbols": "^4.0.0", + "micromatch": "^4.0.5", "shell-quote": "^1.7.3", "string-env-interpolation": "^1.0.1", "ts-log": "^2.2.3", - "ts-node": "^10.9.1", "tslib": "^2.4.0", - "yaml": "^1.10.0", + "yaml": "^2.3.1", "yargs": "^17.0.0" }, "bin": { @@ -2213,258 +2190,456 @@ "graphql-codegen-esm": "esm/bin.js" }, "peerDependencies": { + "@parcel/watcher": "^2.1.0", "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + }, + "peerDependenciesMeta": { + "@parcel/watcher": { + "optional": true + } } }, - "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/batch-execute": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-9.0.2.tgz", + "integrity": "sha512-Y2uwdZI6ZnatopD/SYfZ1eGuQFI7OU2KGZ2/B/7G9ISmgMl5K+ZZWz/PfIEXeiHirIDhyk54s4uka5rj2xwKqQ==", "dev": true, "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/core": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-2.6.8.tgz", - "integrity": "sha512-JKllNIipPrheRgl+/Hm/xuWMw9++xNQ12XJR/OHHgFopOg4zmN3TdlRSyYcv/K90hCFkkIwhlHFUQTfKrm8rxQ==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/code-file-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-8.1.0.tgz", + "integrity": "sha512-HKWW/B2z15ves8N9+xnVbGmFEVGyHEK80a4ghrjeTa6nwNZaKDVfq5CoYFfF0xpfjtH6gOVUExo2XCOEz4B8mQ==", "dev": true, "dependencies": { - "@graphql-codegen/plugin-helpers": "^3.1.1", - "@graphql-tools/schema": "^9.0.0", - "@graphql-tools/utils": "^9.1.1", - "tslib": "~2.4.0" + "@graphql-tools/graphql-tag-pluck": "8.2.0", + "@graphql-tools/utils": "^10.0.13", + "globby": "^11.0.3", + "tslib": "^2.4.0", + "unixify": "^1.0.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/core/node_modules/@graphql-tools/merge": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", - "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/delegate": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-10.0.3.tgz", + "integrity": "sha512-Jor9oazZ07zuWkykD3OOhT/2XD74Zm6Ar0ENZMk75MDD51wB2UWUIMljtHxbJhV5A6UBC2v8x6iY0xdCGiIlyw==", "dev": true, "dependencies": { - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0" + "@graphql-tools/batch-execute": "^9.0.1", + "@graphql-tools/executor": "^1.0.0", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/core/node_modules/@graphql-tools/schema": { - "version": "9.0.19", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", - "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/executor": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.2.0.tgz", + "integrity": "sha512-SKlIcMA71Dha5JnEWlw4XxcaJ+YupuXg0QCZgl2TOLFz4SkGCwU/geAsJvUJFwK2RbVLpQv/UMq67lOaBuwDtg==", "dev": true, "dependencies": { - "@graphql-tools/merge": "^8.4.1", - "@graphql-tools/utils": "^9.2.1", + "@graphql-tools/utils": "^10.0.0", + "@graphql-typed-document-node/core": "3.2.0", + "@repeaterjs/repeater": "^3.0.4", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, + "engines": { + "node": ">=16.0.0" + }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/core/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/executor-graphql-ws": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-1.1.0.tgz", + "integrity": "sha512-yM67SzwE8rYRpm4z4AuGtABlOp9mXXVy6sxXnTJRoYIdZrmDbKVfIY+CpZUJCqS0FX3xf2+GoHlsj7Qswaxgcg==", "dev": true, "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" + "@graphql-tools/utils": "^10.0.2", + "@types/ws": "^8.0.0", + "graphql-ws": "^5.14.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/core/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true - }, - "node_modules/@graphql-codegen/plugin-helpers": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz", - "integrity": "sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/executor-http": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", + "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", "dev": true, "dependencies": { - "@graphql-tools/utils": "^9.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.4.0" + "@graphql-tools/utils": "^10.0.2", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/fetch": "^0.9.0", + "extract-files": "^11.0.0", + "meros": "^1.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/plugin-helpers/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/executor-http/node_modules/@whatwg-node/fetch": { + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", "dev": true, "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + "engines": { + "node": ">=16.0.0" } }, - "node_modules/@graphql-codegen/plugin-helpers/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true - }, - "node_modules/@graphql-codegen/schema-ast": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@graphql-codegen/schema-ast/-/schema-ast-4.0.0.tgz", - "integrity": "sha512-WIzkJFa9Gz28FITAPILbt+7A8+yzOyd1NxgwFh7ie+EmO9a5zQK6UQ3U/BviirguXCYnn+AR4dXsoDrSrtRA1g==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/executor-legacy-ws": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-1.0.5.tgz", + "integrity": "sha512-w54AZ7zkNuvpyV09FH+eGHnnAmaxhBVHg4Yh2ICcsMfRg0brkLt77PlbjBuxZ4HY8XZnKJaYWf+tKazQZtkQtg==", "dev": true, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.0", "@graphql-tools/utils": "^10.0.0", - "tslib": "~2.5.0" + "@types/ws": "^8.0.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.15.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/schema-ast/node_modules/@graphql-codegen/plugin-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", - "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/graphql-file-loader": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-8.0.0.tgz", + "integrity": "sha512-wRXj9Z1IFL3+zJG1HWEY0S4TXal7+s1vVhbZva96MSp0kbb/3JBF7j0cnJ44Eq0ClccMgGCDFqPFXty4JlpaPg==", "dev": true, "dependencies": { + "@graphql-tools/import": "7.0.0", "@graphql-tools/utils": "^10.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.5.0" + "globby": "^11.0.3", + "tslib": "^2.4.0", + "unixify": "^1.0.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/schema-ast/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true - }, - "node_modules/@graphql-codegen/typescript": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-4.0.1.tgz", - "integrity": "sha512-3YziQ21dCVdnHb+Us1uDb3pA6eG5Chjv0uTK+bt9dXeMlwYBU8MbtzvQTo4qvzWVC1AxSOKj0rgfNu1xCXqJyA==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/graphql-tag-pluck": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.2.0.tgz", + "integrity": "sha512-aGIuHxyrJB+LlUfXrH73NVlQTA6LkFbLKQzHojFuwXZJpf7wPkxceN2yp7VjMedARkLJg589IoXgZeMb1EztGQ==", "dev": true, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.0", - "@graphql-codegen/schema-ast": "^4.0.0", - "@graphql-codegen/visitor-plugin-common": "4.0.1", - "auto-bind": "~4.0.0", - "tslib": "~2.5.0" + "@babel/core": "^7.22.9", + "@babel/parser": "^7.16.8", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8", + "@graphql-tools/utils": "^10.0.13", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { - "graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/typescript-resolvers": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-resolvers/-/typescript-resolvers-4.0.1.tgz", - "integrity": "sha512-dydE2VsNud/gZZG9FV0DldPA7voExCn7FQE3V9ZAjhqCDjCcSDHUIWxG5JoaW0G75ooPEDmN7ZFd+uaJ2BEqzQ==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/import": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-7.0.0.tgz", + "integrity": "sha512-NVZiTO8o1GZs6OXzNfjB+5CtQtqsZZpQOq+Uu0w57kdUkT4RlQKlwhT8T81arEsbV55KpzkpFsOZP7J1wdmhBw==", "dev": true, "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.0", - "@graphql-codegen/typescript": "^4.0.1", - "@graphql-codegen/visitor-plugin-common": "4.0.1", "@graphql-tools/utils": "^10.0.0", - "auto-bind": "~4.0.0", - "tslib": "~2.5.0" + "resolve-from": "5.0.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/typescript-resolvers/node_modules/@graphql-codegen/plugin-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", - "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/json-file-loader": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-8.0.0.tgz", + "integrity": "sha512-ki6EF/mobBWJjAAC84xNrFMhNfnUFD6Y0rQMGXekrUgY0NdeYXHU0ZUgHzC9O5+55FslqUmAUHABePDHTyZsLg==", "dev": true, "dependencies": { "@graphql-tools/utils": "^10.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.5.0" + "globby": "^11.0.3", + "tslib": "^2.4.0", + "unixify": "^1.0.0" + }, + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/typescript-resolvers/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "dev": true - }, - "node_modules/@graphql-codegen/typescript/node_modules/@graphql-codegen/plugin-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", - "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/load": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-8.0.1.tgz", + "integrity": "sha512-qSMsKngJhDqRbuWyo3NvakEFqFL6+eSjy8ooJ1o5qYD26N7dqXkKzIMycQsX7rBK19hOuINAUSaRcVWH6hTccw==", "dev": true, "dependencies": { - "@graphql-tools/utils": "^10.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.5.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.11", + "p-limit": "3.1.0", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-codegen/typescript/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/url-loader": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-8.0.1.tgz", + "integrity": "sha512-B2k8KQEkEQmfV1zhurT5GLoXo8jbXP+YQHUayhCSxKYlRV7j/1Fhp1b21PDM8LXIDGlDRXaZ0FbWKOs7eYXDuQ==", + "dev": true, + "dependencies": { + "@ardatan/sync-fetch": "^0.0.1", + "@graphql-tools/delegate": "^10.0.0", + "@graphql-tools/executor-graphql-ws": "^1.0.0", + "@graphql-tools/executor-http": "^1.0.5", + "@graphql-tools/executor-legacy-ws": "^1.0.0", + "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/wrap": "^10.0.0", + "@types/ws": "^8.0.0", + "@whatwg-node/fetch": "^0.9.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.11", + "ws": "^8.12.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/url-loader/node_modules/@whatwg-node/fetch": { + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", + "dev": true, + "dependencies": { + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@graphql-codegen/cli/node_modules/@graphql-tools/wrap": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-10.0.1.tgz", + "integrity": "sha512-Cw6hVrKGM2OKBXeuAGltgy4tzuqQE0Nt7t/uAqnuokSXZhMHXJUb124Bnvxc2gPZn5chfJSDafDe4Cp8ZAVJgg==", + "dev": true, + "dependencies": { + "@graphql-tools/delegate": "^10.0.3", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.0", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-codegen/cli/node_modules/@whatwg-node/events": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "dev": true, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@graphql-codegen/cli/node_modules/@whatwg-node/node-fetch": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", + "dev": true, + "dependencies": { + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", + "busboy": "^1.6.0", + "fast-querystring": "^1.1.1", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@graphql-codegen/cli/node_modules/cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "dependencies": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@graphql-codegen/cli/node_modules/graphql-config": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-5.0.3.tgz", + "integrity": "sha512-BNGZaoxIBkv9yy6Y7omvsaBUHOzfFcII3UN++tpH8MGOKFPFkCPZuwx09ggANMt8FgyWP1Od8SWPmrUEZca4NQ==", + "dev": true, + "dependencies": { + "@graphql-tools/graphql-file-loader": "^8.0.0", + "@graphql-tools/json-file-loader": "^8.0.0", + "@graphql-tools/load": "^8.0.0", + "@graphql-tools/merge": "^9.0.0", + "@graphql-tools/url-loader": "^8.0.0", + "@graphql-tools/utils": "^10.0.0", + "cosmiconfig": "^8.1.0", + "jiti": "^1.18.2", + "minimatch": "^4.2.3", + "string-env-interpolation": "^1.0.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">= 16.0.0" + }, + "peerDependencies": { + "cosmiconfig-toml-loader": "^1.0.0", + "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + }, + "peerDependenciesMeta": { + "cosmiconfig-toml-loader": { + "optional": true + } + } + }, + "node_modules/@graphql-codegen/cli/node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, + "node_modules/@graphql-codegen/cli/node_modules/minimatch": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.3.tgz", + "integrity": "sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@graphql-codegen/cli/node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", "dev": true }, - "node_modules/@graphql-codegen/visitor-plugin-common": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-4.0.1.tgz", - "integrity": "sha512-Bi/1z0nHg4QMsAqAJhds+ForyLtk7A3HQOlkrZNm3xEkY7lcBzPtiOTLBtvziwopBsXUxqeSwVjOOFPLS5Yw1Q==", + "node_modules/@graphql-codegen/cli/node_modules/yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/@graphql-codegen/core": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-4.0.0.tgz", + "integrity": "sha512-JAGRn49lEtSsZVxeIlFVIRxts2lWObR+OQo7V2LHDJ7ohYYw3ilv7nJ8pf8P4GTg/w6ptcYdSdVVdkI8kUHB/Q==", "dev": true, "dependencies": { "@graphql-codegen/plugin-helpers": "^5.0.0", - "@graphql-tools/optimize": "^2.0.0", - "@graphql-tools/relay-operation-optimizer": "^7.0.0", + "@graphql-tools/schema": "^10.0.0", "@graphql-tools/utils": "^10.0.0", - "auto-bind": "~4.0.0", - "change-case-all": "1.0.15", - "dependency-graph": "^0.11.0", - "graphql-tag": "^2.11.0", - "parse-filepath": "^1.0.2", "tslib": "~2.5.0" }, "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/@graphql-codegen/visitor-plugin-common/node_modules/@graphql-codegen/plugin-helpers": { + "node_modules/@graphql-codegen/core/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, + "node_modules/@graphql-codegen/plugin-helpers": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", @@ -2481,6 +2656,98 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, + "node_modules/@graphql-codegen/plugin-helpers/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, + "node_modules/@graphql-codegen/schema-ast": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/schema-ast/-/schema-ast-4.0.0.tgz", + "integrity": "sha512-WIzkJFa9Gz28FITAPILbt+7A8+yzOyd1NxgwFh7ie+EmO9a5zQK6UQ3U/BviirguXCYnn+AR4dXsoDrSrtRA1g==", + "dev": true, + "dependencies": { + "@graphql-codegen/plugin-helpers": "^5.0.0", + "@graphql-tools/utils": "^10.0.0", + "tslib": "~2.5.0" + }, + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, + "node_modules/@graphql-codegen/schema-ast/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, + "node_modules/@graphql-codegen/typescript": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript/-/typescript-4.0.1.tgz", + "integrity": "sha512-3YziQ21dCVdnHb+Us1uDb3pA6eG5Chjv0uTK+bt9dXeMlwYBU8MbtzvQTo4qvzWVC1AxSOKj0rgfNu1xCXqJyA==", + "dev": true, + "dependencies": { + "@graphql-codegen/plugin-helpers": "^5.0.0", + "@graphql-codegen/schema-ast": "^4.0.0", + "@graphql-codegen/visitor-plugin-common": "4.0.1", + "auto-bind": "~4.0.0", + "tslib": "~2.5.0" + }, + "peerDependencies": { + "graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, + "node_modules/@graphql-codegen/typescript-resolvers": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-resolvers/-/typescript-resolvers-4.0.1.tgz", + "integrity": "sha512-dydE2VsNud/gZZG9FV0DldPA7voExCn7FQE3V9ZAjhqCDjCcSDHUIWxG5JoaW0G75ooPEDmN7ZFd+uaJ2BEqzQ==", + "dev": true, + "dependencies": { + "@graphql-codegen/plugin-helpers": "^5.0.0", + "@graphql-codegen/typescript": "^4.0.1", + "@graphql-codegen/visitor-plugin-common": "4.0.1", + "@graphql-tools/utils": "^10.0.0", + "auto-bind": "~4.0.0", + "tslib": "~2.5.0" + }, + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, + "node_modules/@graphql-codegen/typescript-resolvers/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, + "node_modules/@graphql-codegen/typescript/node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", + "dev": true + }, + "node_modules/@graphql-codegen/visitor-plugin-common": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-4.0.1.tgz", + "integrity": "sha512-Bi/1z0nHg4QMsAqAJhds+ForyLtk7A3HQOlkrZNm3xEkY7lcBzPtiOTLBtvziwopBsXUxqeSwVjOOFPLS5Yw1Q==", + "dev": true, + "dependencies": { + "@graphql-codegen/plugin-helpers": "^5.0.0", + "@graphql-tools/optimize": "^2.0.0", + "@graphql-tools/relay-operation-optimizer": "^7.0.0", + "@graphql-tools/utils": "^10.0.0", + "auto-bind": "~4.0.0", + "change-case-all": "1.0.15", + "dependency-graph": "^0.11.0", + "graphql-tag": "^2.11.0", + "parse-filepath": "^1.0.2", + "tslib": "~2.5.0" + }, + "peerDependencies": { + "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, "node_modules/@graphql-codegen/visitor-plugin-common/node_modules/tslib": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", @@ -2830,106 +3097,6 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/@graphql-inspector/github-loader/node_modules/@graphql-tools/executor-http": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", - "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", - "dependencies": { - "@graphql-tools/utils": "^10.0.2", - "@repeaterjs/repeater": "^3.0.4", - "@whatwg-node/fetch": "^0.9.0", - "extract-files": "^11.0.0", - "meros": "^1.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-inspector/github-loader/node_modules/@graphql-tools/github-loader": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/github-loader/-/github-loader-8.0.0.tgz", - "integrity": "sha512-VuroArWKcG4yaOWzV0r19ElVIV6iH6UKDQn1MXemND0xu5TzrFme0kf3U9o0YwNo0kUYEk9CyFM0BYg4he17FA==", - "dependencies": { - "@ardatan/sync-fetch": "^0.0.1", - "@graphql-tools/executor-http": "^1.0.0", - "@graphql-tools/graphql-tag-pluck": "^8.0.0", - "@graphql-tools/utils": "^10.0.0", - "@whatwg-node/fetch": "^0.9.0", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-inspector/github-loader/node_modules/@graphql-tools/graphql-tag-pluck": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.1.0.tgz", - "integrity": "sha512-kt5l6H/7QxQcIaewInTcune6NpATojdFEW98/8xWcgmy7dgXx5vU9e0AicFZIH+ewGyZzTpwFqO2RI03roxj2w==", - "dependencies": { - "@babel/core": "^7.22.9", - "@babel/parser": "^7.16.8", - "@babel/plugin-syntax-import-assertions": "^7.20.0", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8", - "@graphql-tools/utils": "^10.0.0", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-inspector/github-loader/node_modules/@whatwg-node/events": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", - "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@graphql-inspector/github-loader/node_modules/@whatwg-node/fetch": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.15.tgz", - "integrity": "sha512-2wIUcolUthZt0nsPRj+pT7K9h/EO3t/j09IBuq0FtITCsASc2fRCmRw2JHS6hk9fzUQrz2+YYrA1ZDpV7+vLsQ==", - "dependencies": { - "@whatwg-node/node-fetch": "^0.5.0", - "urlpattern-polyfill": "^9.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@graphql-inspector/github-loader/node_modules/@whatwg-node/node-fetch": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.4.tgz", - "integrity": "sha512-5AXi4B44/6SOlQG+X3cO5lsUdRTWSXqaWLkGKnwWfeJoMgRfA53RnYVnvTV+4CoatNBStPrIoDorjgQv+ouiMQ==", - "dependencies": { - "@kamilkisiela/fast-url-parser": "^1.1.4", - "@whatwg-node/events": "^0.1.0", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@graphql-inspector/github-loader/node_modules/urlpattern-polyfill": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", - "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==" - }, "node_modules/@graphql-inspector/graphql-loader": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@graphql-inspector/graphql-loader/-/graphql-loader-4.0.2.tgz", @@ -3411,69 +3578,65 @@ } }, "node_modules/@graphql-tools/apollo-engine-loader": { - "version": "7.3.26", - "resolved": "https://registry.npmjs.org/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-7.3.26.tgz", - "integrity": "sha512-h1vfhdJFjnCYn9b5EY1Z91JTF0KB3hHVJNQIsiUV2mpQXZdeOXQoaWeYEKaiI5R6kwBw5PP9B0fv3jfUIG8LyQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-8.0.0.tgz", + "integrity": "sha512-axQTbN5+Yxs1rJ6cWQBOfw3AEeC+fvIuZSfJLPLLvFJLj4pUm9fhxey/g6oQZAAQJqKPfw+tLDUQvnfvRK8Kmg==", "dev": true, "dependencies": { "@ardatan/sync-fetch": "^0.0.1", - "@graphql-tools/utils": "^9.2.1", - "@whatwg-node/fetch": "^0.8.0", + "@graphql-tools/utils": "^10.0.0", + "@whatwg-node/fetch": "^0.9.0", "tslib": "^2.4.0" }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-tools/apollo-engine-loader/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "node_modules/@graphql-tools/apollo-engine-loader/node_modules/@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "dev": true, + "engines": { + "node": ">=16.0.0" + } }, "node_modules/@graphql-tools/apollo-engine-loader/node_modules/@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", "dev": true, "dependencies": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@graphql-tools/apollo-engine-loader/node_modules/@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", "dev": true, "dependencies": { - "@whatwg-node/events": "^0.0.3", + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@graphql-tools/apollo-engine-loader/node_modules/urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", "dev": true }, "node_modules/@graphql-tools/batch-execute": { @@ -3710,44 +3873,6 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/executor-http/node_modules/@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true - }, - "node_modules/@graphql-tools/executor-http/node_modules/@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", - "dev": true, - "dependencies": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" - } - }, - "node_modules/@graphql-tools/executor-http/node_modules/@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", - "dev": true, - "dependencies": { - "@whatwg-node/events": "^0.0.3", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" - } - }, - "node_modules/@graphql-tools/executor-http/node_modules/urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", - "dev": true - }, "node_modules/@graphql-tools/executor-legacy-ws": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-0.0.11.tgz", @@ -3812,103 +3937,145 @@ } }, "node_modules/@graphql-tools/git-loader": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/git-loader/-/git-loader-7.3.0.tgz", - "integrity": "sha512-gcGAK+u16eHkwsMYqqghZbmDquh8QaO24Scsxq+cVR+vx1ekRlsEiXvu+yXVDbZdcJ6PBIbeLcQbEu+xhDLmvQ==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/git-loader/-/git-loader-8.0.4.tgz", + "integrity": "sha512-fBmKtnOVqzMT2N8L6nggM4skPq3y2t0eBITZJXCOuxeIlIRAeCOdjNLPKgyGb0rezIyGsn55DKMua5101VN0Sg==", "dev": true, "dependencies": { - "@graphql-tools/graphql-tag-pluck": "7.5.2", - "@graphql-tools/utils": "^9.2.1", + "@graphql-tools/graphql-tag-pluck": "8.2.0", + "@graphql-tools/utils": "^10.0.13", "is-glob": "4.0.3", "micromatch": "^4.0.4", "tslib": "^2.4.0", "unixify": "^1.0.0" }, + "engines": { + "node": ">=16.0.0" + }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/git-loader/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "node_modules/@graphql-tools/git-loader/node_modules/@graphql-tools/graphql-tag-pluck": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.2.0.tgz", + "integrity": "sha512-aGIuHxyrJB+LlUfXrH73NVlQTA6LkFbLKQzHojFuwXZJpf7wPkxceN2yp7VjMedARkLJg589IoXgZeMb1EztGQ==", "dev": true, "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", + "@babel/core": "^7.22.9", + "@babel/parser": "^7.16.8", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" }, + "engines": { + "node": ">=16.0.0" + }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "node_modules/@graphql-tools/github-loader": { - "version": "7.3.28", - "resolved": "https://registry.npmjs.org/@graphql-tools/github-loader/-/github-loader-7.3.28.tgz", - "integrity": "sha512-OK92Lf9pmxPQvjUNv05b3tnVhw0JRfPqOf15jZjyQ8BfdEUrJoP32b4dRQQem/wyRL24KY4wOfArJNqzpsbwCA==", - "dev": true, + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/github-loader/-/github-loader-8.0.0.tgz", + "integrity": "sha512-VuroArWKcG4yaOWzV0r19ElVIV6iH6UKDQn1MXemND0xu5TzrFme0kf3U9o0YwNo0kUYEk9CyFM0BYg4he17FA==", "dependencies": { "@ardatan/sync-fetch": "^0.0.1", - "@graphql-tools/executor-http": "^0.1.9", - "@graphql-tools/graphql-tag-pluck": "^7.4.6", - "@graphql-tools/utils": "^9.2.1", - "@whatwg-node/fetch": "^0.8.0", + "@graphql-tools/executor-http": "^1.0.0", + "@graphql-tools/graphql-tag-pluck": "^8.0.0", + "@graphql-tools/utils": "^10.0.0", + "@whatwg-node/fetch": "^0.9.0", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, + "engines": { + "node": ">=16.0.0" + }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/github-loader/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, + "node_modules/@graphql-tools/github-loader/node_modules/@graphql-tools/executor-http": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", + "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", + "@graphql-tools/utils": "^10.0.2", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/fetch": "^0.9.0", + "extract-files": "^11.0.0", + "meros": "^1.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/github-loader/node_modules/@graphql-tools/graphql-tag-pluck": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.2.0.tgz", + "integrity": "sha512-aGIuHxyrJB+LlUfXrH73NVlQTA6LkFbLKQzHojFuwXZJpf7wPkxceN2yp7VjMedARkLJg589IoXgZeMb1EztGQ==", + "dependencies": { + "@babel/core": "^7.22.9", + "@babel/parser": "^7.16.8", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" }, + "engines": { + "node": ">=16.0.0" + }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "node_modules/@graphql-tools/github-loader/node_modules/@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "engines": { + "node": ">=16.0.0" + } }, "node_modules/@graphql-tools/github-loader/node_modules/@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", - "dev": true, + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", "dependencies": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@graphql-tools/github-loader/node_modules/@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", - "dev": true, + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", "dependencies": { - "@whatwg-node/events": "^0.0.3", + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@graphql-tools/github-loader/node_modules/urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", - "dev": true + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==" }, "node_modules/@graphql-tools/graphql-file-loader": { "version": "7.5.17", @@ -4110,96 +4277,243 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/prisma-loader": { - "version": "7.2.72", - "resolved": "https://registry.npmjs.org/@graphql-tools/prisma-loader/-/prisma-loader-7.2.72.tgz", - "integrity": "sha512-0a7uV7Fky6yDqd0tI9+XMuvgIo6GAqiVzzzFV4OSLry4AwiQlI3igYseBV7ZVOGhedOTqj/URxjpiv07hRcwag==", + "node_modules/@graphql-tools/prisma-loader": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/prisma-loader/-/prisma-loader-8.0.2.tgz", + "integrity": "sha512-8d28bIB0bZ9Bj0UOz9sHagVPW+6AHeqvGljjERtwCnWl8OCQw2c2pNboYXISLYUG5ub76r4lDciLLTU+Ks7Q0w==", + "dev": true, + "dependencies": { + "@graphql-tools/url-loader": "^8.0.0", + "@graphql-tools/utils": "^10.0.8", + "@types/js-yaml": "^4.0.0", + "@types/json-stable-stringify": "^1.0.32", + "@whatwg-node/fetch": "^0.9.0", + "chalk": "^4.1.0", + "debug": "^4.3.1", + "dotenv": "^16.0.0", + "graphql-request": "^6.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "jose": "^5.0.0", + "js-yaml": "^4.0.0", + "json-stable-stringify": "^1.0.1", + "lodash": "^4.17.20", + "scuid": "^1.1.0", + "tslib": "^2.4.0", + "yaml-ast-parser": "^0.0.43" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/batch-execute": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-9.0.2.tgz", + "integrity": "sha512-Y2uwdZI6ZnatopD/SYfZ1eGuQFI7OU2KGZ2/B/7G9ISmgMl5K+ZZWz/PfIEXeiHirIDhyk54s4uka5rj2xwKqQ==", + "dev": true, + "dependencies": { + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/delegate": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-10.0.3.tgz", + "integrity": "sha512-Jor9oazZ07zuWkykD3OOhT/2XD74Zm6Ar0ENZMk75MDD51wB2UWUIMljtHxbJhV5A6UBC2v8x6iY0xdCGiIlyw==", + "dev": true, + "dependencies": { + "@graphql-tools/batch-execute": "^9.0.1", + "@graphql-tools/executor": "^1.0.0", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/executor": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.2.0.tgz", + "integrity": "sha512-SKlIcMA71Dha5JnEWlw4XxcaJ+YupuXg0QCZgl2TOLFz4SkGCwU/geAsJvUJFwK2RbVLpQv/UMq67lOaBuwDtg==", + "dev": true, + "dependencies": { + "@graphql-tools/utils": "^10.0.0", + "@graphql-typed-document-node/core": "3.2.0", + "@repeaterjs/repeater": "^3.0.4", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/executor-graphql-ws": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-1.1.0.tgz", + "integrity": "sha512-yM67SzwE8rYRpm4z4AuGtABlOp9mXXVy6sxXnTJRoYIdZrmDbKVfIY+CpZUJCqS0FX3xf2+GoHlsj7Qswaxgcg==", + "dev": true, + "dependencies": { + "@graphql-tools/utils": "^10.0.2", + "@types/ws": "^8.0.0", + "graphql-ws": "^5.14.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.13.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/executor-http": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", + "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", + "dev": true, + "dependencies": { + "@graphql-tools/utils": "^10.0.2", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/fetch": "^0.9.0", + "extract-files": "^11.0.0", + "meros": "^1.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/executor-legacy-ws": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-1.0.5.tgz", + "integrity": "sha512-w54AZ7zkNuvpyV09FH+eGHnnAmaxhBVHg4Yh2ICcsMfRg0brkLt77PlbjBuxZ4HY8XZnKJaYWf+tKazQZtkQtg==", + "dev": true, + "dependencies": { + "@graphql-tools/utils": "^10.0.0", + "@types/ws": "^8.0.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.15.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/url-loader": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-8.0.1.tgz", + "integrity": "sha512-B2k8KQEkEQmfV1zhurT5GLoXo8jbXP+YQHUayhCSxKYlRV7j/1Fhp1b21PDM8LXIDGlDRXaZ0FbWKOs7eYXDuQ==", + "dev": true, + "dependencies": { + "@ardatan/sync-fetch": "^0.0.1", + "@graphql-tools/delegate": "^10.0.0", + "@graphql-tools/executor-graphql-ws": "^1.0.0", + "@graphql-tools/executor-http": "^1.0.5", + "@graphql-tools/executor-legacy-ws": "^1.0.0", + "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/wrap": "^10.0.0", + "@types/ws": "^8.0.0", + "@whatwg-node/fetch": "^0.9.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.11", + "ws": "^8.12.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/wrap": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-10.0.1.tgz", + "integrity": "sha512-Cw6hVrKGM2OKBXeuAGltgy4tzuqQE0Nt7t/uAqnuokSXZhMHXJUb124Bnvxc2gPZn5chfJSDafDe4Cp8ZAVJgg==", "dev": true, "dependencies": { - "@graphql-tools/url-loader": "^7.17.18", - "@graphql-tools/utils": "^9.2.1", - "@types/js-yaml": "^4.0.0", - "@types/json-stable-stringify": "^1.0.32", - "@whatwg-node/fetch": "^0.8.2", - "chalk": "^4.1.0", - "debug": "^4.3.1", - "dotenv": "^16.0.0", - "graphql-request": "^6.0.0", - "http-proxy-agent": "^6.0.0", - "https-proxy-agent": "^6.0.0", - "jose": "^4.11.4", - "js-yaml": "^4.0.0", - "json-stable-stringify": "^1.0.1", - "lodash": "^4.17.20", - "scuid": "^1.1.0", + "@graphql-tools/delegate": "^10.0.3", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.0", "tslib": "^2.4.0", - "yaml-ast-parser": "^0.0.43" + "value-or-promise": "^1.0.12" }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-tools/prisma-loader/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" + "engines": { + "node": ">=16.0.0" }, "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, "node_modules/@graphql-tools/prisma-loader/node_modules/@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "dev": true, + "engines": { + "node": ">=16.0.0" + } }, "node_modules/@graphql-tools/prisma-loader/node_modules/@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", "dev": true, "dependencies": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@graphql-tools/prisma-loader/node_modules/@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", "dev": true, "dependencies": { - "@whatwg-node/events": "^0.0.3", + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" - } - }, - "node_modules/@graphql-tools/prisma-loader/node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", - "dev": true, - "engines": { - "node": ">=12" }, - "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "engines": { + "node": ">=16.0.0" } }, "node_modules/@graphql-tools/prisma-loader/node_modules/urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", "dev": true }, "node_modules/@graphql-tools/relay-operation-optimizer": { @@ -4290,48 +4604,10 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, - "node_modules/@graphql-tools/url-loader/node_modules/@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true - }, - "node_modules/@graphql-tools/url-loader/node_modules/@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", - "dev": true, - "dependencies": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" - } - }, - "node_modules/@graphql-tools/url-loader/node_modules/@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", - "dev": true, - "dependencies": { - "@whatwg-node/events": "^0.0.3", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" - } - }, - "node_modules/@graphql-tools/url-loader/node_modules/urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", - "dev": true - }, "node_modules/@graphql-tools/utils": { - "version": "10.0.12", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.12.tgz", - "integrity": "sha512-+yS1qlFwXlwU3Gv8ek/h2aJ95quog4yF22haC11M0zReMSTddbGJZ5yXKkE3sXoY2BcL1utilSFjylJ9uXpSNQ==", + "version": "10.0.13", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.13.tgz", + "integrity": "sha512-fMILwGr5Dm2zefNItjQ6C2rauigklv69LIwppccICuGTnGaOp3DspLt/6Lxj72cbg5d9z60Sr+Egco3CJKLsNg==", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "cross-inspect": "1.0.0", @@ -5513,30 +5789,6 @@ "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, "node_modules/@types/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", @@ -5842,9 +6094,9 @@ } }, "node_modules/@types/node": { - "version": "20.11.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.8.tgz", - "integrity": "sha512-i7omyekpPTNdv4Jb/Rgqg0RU8YqLcNsI12quKSDkRXNfx7Wxdm6HhK1awT3xTgEkgxPn3bvnSpiEAc7a7Lpyow==", + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -6283,46 +6535,35 @@ } }, "node_modules/@whatwg-node/events": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.2.tgz", - "integrity": "sha512-WKj/lI4QjnLuPrim0cfO7i+HsDSXHxNv1y0CrJhdntuO3hxWZmnXCwNDnwOvry11OjRin6cgWNF+j/9Pn8TN4w==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", + "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", "dev": true }, "node_modules/@whatwg-node/fetch": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.6.9.tgz", - "integrity": "sha512-JfrBCJdMu9n9OARc0e/hPHcD98/8Nz1CKSdGYDg6VbObDkV/Ys30xe5i/wPOatYbxuvatj1kfWeHf7iNX3i17w==", + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", + "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", "dev": true, "dependencies": { "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.0.5", + "@whatwg-node/node-fetch": "^0.3.6", "busboy": "^1.6.0", - "urlpattern-polyfill": "^6.0.2", + "urlpattern-polyfill": "^8.0.0", "web-streams-polyfill": "^3.2.1" } }, - "node_modules/@whatwg-node/fetch/node_modules/@types/node": { - "version": "18.19.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz", - "integrity": "sha512-g1pZtPhsvGVTwmeVoexWZLTQaOvXwoSq//pTL0DHeNzUDrFnir4fgETdhjhIxjVnN+hKOuh98+E1eMLnUXstFg==", - "dev": true, - "peer": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@whatwg-node/fetch/node_modules/@whatwg-node/node-fetch": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.0.5.tgz", - "integrity": "sha512-hbccmaSZaItdsRuBKBEEhLoO+5oXJPxiyd0kG2xXd0Dh3Rt+vZn4pADHxuSiSHLd9CM+S2z4+IxlEGbWUgiz9g==", + "node_modules/@whatwg-node/node-fetch": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", + "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", "dev": true, "dependencies": { - "@whatwg-node/events": "^0.0.2", + "@whatwg-node/events": "^0.0.3", "busboy": "^1.6.0", + "fast-querystring": "^1.1.1", + "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" - }, - "peerDependencies": { - "@types/node": "^18.0.6" } }, "node_modules/@whatwg-node/server": { @@ -6410,15 +6651,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/agent-base": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", @@ -6553,12 +6785,6 @@ "node": ">= 8" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -6854,9 +7080,9 @@ "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, "node_modules/axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -7955,27 +8181,6 @@ "node": ">=10" } }, - "node_modules/cosmiconfig-typescript-loader": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz", - "integrity": "sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw==", - "dev": true, - "engines": { - "node": ">=v14.21.3" - }, - "peerDependencies": { - "@types/node": "*", - "cosmiconfig": ">=7", - "ts-node": ">=10", - "typescript": ">=4" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, "node_modules/croner": { "version": "4.1.97", "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz", @@ -8255,15 +8460,6 @@ "node": ">=0.8.0" } }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -8307,11 +8503,14 @@ } }, "node_modules/dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", + "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, "node_modules/dset": { @@ -8982,9 +9181,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -10821,10 +11020,9 @@ } }, "node_modules/http-proxy-agent": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-6.1.1.tgz", - "integrity": "sha512-JRCz+4Whs6yrrIoIlrH+ZTmhrRwtMnmOHsHn8GFEn9O2sVfSE+DAZ3oyyGIKF8tjJEeSJmP89j7aTjVsSqsU0g==", - "dev": true, + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -10848,10 +11046,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-6.2.1.tgz", - "integrity": "sha512-ONsE3+yfZF2caH5+bJlcddtWqNI3Gvs5A38+ngvljxaBiRXRswym2c7yf8UAeFpRFKjFNHIFEHqR/OLAWJzyiA==", - "dev": true, + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -10870,15 +11067,15 @@ } }, "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.6.tgz", + "integrity": "sha512-EEuw/rfTiMjOfuL7pGO/i9otg1u36TXxqjIA6D9qxVjd/UXoDOsLor/BSFf5hTK50shwzCU3aVVwdXDp/lp7RA==", "dev": true, "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" @@ -11639,9 +11836,9 @@ "dev": true }, "node_modules/jose": { - "version": "4.15.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz", - "integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.2.0.tgz", + "integrity": "sha512-oW3PCnvyrcm1HMvGTzqjxxfnEs9EoFOFWi2HsEGhlFVOXxTE3K9GKWVMFoFw06yPUqwpvEWic1BmtUZBI/tIjw==", "dev": true, "funding": { "url": "https://github.com/sponsors/panva" @@ -11718,9 +11915,9 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz", - "integrity": "sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz", + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", "dev": true, "dependencies": { "call-bind": "^1.0.5", @@ -12643,12 +12840,6 @@ "node": ">=10" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "node_modules/make-plural": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-7.3.0.tgz", @@ -13628,30 +13819,6 @@ "node": ">= 14" } }, - "node_modules/pac-proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/pac-resolver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.0.tgz", @@ -14191,30 +14358,6 @@ "node": ">= 14" } }, - "node_modules/proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -15951,49 +16094,6 @@ "integrity": "sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==", "dev": true }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -16433,18 +16533,15 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/urlpattern-polyfill": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-6.0.2.tgz", - "integrity": "sha512-5vZjFlH9ofROmuWmXM9yj2wljYKgWstGwe8YTyiqM7hVum/g9LyCizPZtb3UqsuppVwety9QJmfc42VggLpTgg==", - "dev": true, - "dependencies": { - "braces": "^3.0.2" + "punycode": "^2.1.0" } }, + "node_modules/urlpattern-polyfill": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", + "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", + "dev": true + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -16470,12 +16567,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -17086,15 +17177,6 @@ "node": ">=12" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -18119,27 +18201,6 @@ "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "optional": true }, - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - } - } - }, "@cwasm/webp": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/@cwasm/webp/-/webp-0.1.5.tgz", @@ -18511,140 +18572,379 @@ "integrity": "sha512-FdgpFxY6V6rLZE9mmIBb9hM0xpfvQOSNOLnzolzKwsE1DH+gC7lEKV1p1IbR0lAYyvYd5a4u3qWJzowUkw1bIw==" }, "@graphql-codegen/cli": { - "version": "2.16.5", - "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-2.16.5.tgz", - "integrity": "sha512-XYPIp+q7fB0xAGSAoRykiTe4oY80VU+z+dw5nuv4mLY0+pv7+pa2C6Nwhdw7a65lXOhFviBApWCCZeqd54SMnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-5.0.0.tgz", + "integrity": "sha512-A7J7+be/a6e+/ul2KI5sfJlpoqeqwX8EzktaKCeduyVKgOLA6W5t+NUGf6QumBDXU8PEOqXk3o3F+RAwCWOiqA==", "dev": true, "requires": { "@babel/generator": "^7.18.13", "@babel/template": "^7.18.10", "@babel/types": "^7.18.13", - "@graphql-codegen/core": "^2.6.8", - "@graphql-codegen/plugin-helpers": "^3.1.2", - "@graphql-tools/apollo-engine-loader": "^7.3.6", - "@graphql-tools/code-file-loader": "^7.3.13", - "@graphql-tools/git-loader": "^7.2.13", - "@graphql-tools/github-loader": "^7.3.20", - "@graphql-tools/graphql-file-loader": "^7.5.0", - "@graphql-tools/json-file-loader": "^7.4.1", - "@graphql-tools/load": "^7.8.0", - "@graphql-tools/prisma-loader": "^7.2.49", - "@graphql-tools/url-loader": "^7.13.2", - "@graphql-tools/utils": "^9.0.0", - "@whatwg-node/fetch": "^0.6.0", + "@graphql-codegen/core": "^4.0.0", + "@graphql-codegen/plugin-helpers": "^5.0.1", + "@graphql-tools/apollo-engine-loader": "^8.0.0", + "@graphql-tools/code-file-loader": "^8.0.0", + "@graphql-tools/git-loader": "^8.0.0", + "@graphql-tools/github-loader": "^8.0.0", + "@graphql-tools/graphql-file-loader": "^8.0.0", + "@graphql-tools/json-file-loader": "^8.0.0", + "@graphql-tools/load": "^8.0.0", + "@graphql-tools/prisma-loader": "^8.0.0", + "@graphql-tools/url-loader": "^8.0.0", + "@graphql-tools/utils": "^10.0.0", + "@whatwg-node/fetch": "^0.8.0", "chalk": "^4.1.0", - "chokidar": "^3.5.2", - "cosmiconfig": "^7.0.0", - "cosmiconfig-typescript-loader": "^4.3.0", + "cosmiconfig": "^8.1.3", "debounce": "^1.2.0", "detect-indent": "^6.0.0", - "graphql-config": "^4.4.0", + "graphql-config": "^5.0.2", "inquirer": "^8.0.0", "is-glob": "^4.0.1", + "jiti": "^1.17.1", "json-to-pretty-yaml": "^1.2.2", "listr2": "^4.0.5", "log-symbols": "^4.0.0", + "micromatch": "^4.0.5", "shell-quote": "^1.7.3", "string-env-interpolation": "^1.0.1", "ts-log": "^2.2.3", - "ts-node": "^10.9.1", "tslib": "^2.4.0", - "yaml": "^1.10.0", + "yaml": "^2.3.1", "yargs": "^17.0.0" }, "dependencies": { - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "@graphql-tools/batch-execute": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-9.0.2.tgz", + "integrity": "sha512-Y2uwdZI6ZnatopD/SYfZ1eGuQFI7OU2KGZ2/B/7G9ISmgMl5K+ZZWz/PfIEXeiHirIDhyk54s4uka5rj2xwKqQ==", "dev": true, "requires": { - "@graphql-typed-document-node/core": "^3.1.1", + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "@graphql-tools/code-file-loader": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/code-file-loader/-/code-file-loader-8.1.0.tgz", + "integrity": "sha512-HKWW/B2z15ves8N9+xnVbGmFEVGyHEK80a4ghrjeTa6nwNZaKDVfq5CoYFfF0xpfjtH6gOVUExo2XCOEz4B8mQ==", + "dev": true, + "requires": { + "@graphql-tools/graphql-tag-pluck": "8.2.0", + "@graphql-tools/utils": "^10.0.13", + "globby": "^11.0.3", + "tslib": "^2.4.0", + "unixify": "^1.0.0" + } + }, + "@graphql-tools/delegate": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-10.0.3.tgz", + "integrity": "sha512-Jor9oazZ07zuWkykD3OOhT/2XD74Zm6Ar0ENZMk75MDD51wB2UWUIMljtHxbJhV5A6UBC2v8x6iY0xdCGiIlyw==", + "dev": true, + "requires": { + "@graphql-tools/batch-execute": "^9.0.1", + "@graphql-tools/executor": "^1.0.0", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.5.0" + } + }, + "@graphql-tools/executor": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.2.0.tgz", + "integrity": "sha512-SKlIcMA71Dha5JnEWlw4XxcaJ+YupuXg0QCZgl2TOLFz4SkGCwU/geAsJvUJFwK2RbVLpQv/UMq67lOaBuwDtg==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.0", + "@graphql-typed-document-node/core": "3.2.0", + "@repeaterjs/repeater": "^3.0.4", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "@graphql-tools/executor-graphql-ws": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-1.1.0.tgz", + "integrity": "sha512-yM67SzwE8rYRpm4z4AuGtABlOp9mXXVy6sxXnTJRoYIdZrmDbKVfIY+CpZUJCqS0FX3xf2+GoHlsj7Qswaxgcg==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.2", + "@types/ws": "^8.0.0", + "graphql-ws": "^5.14.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.13.0" + } + }, + "@graphql-tools/executor-http": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", + "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.2", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/fetch": "^0.9.0", + "extract-files": "^11.0.0", + "meros": "^1.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + }, + "dependencies": { + "@whatwg-node/fetch": { + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", + "dev": true, + "requires": { + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" + } + } + } + }, + "@graphql-tools/executor-legacy-ws": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-1.0.5.tgz", + "integrity": "sha512-w54AZ7zkNuvpyV09FH+eGHnnAmaxhBVHg4Yh2ICcsMfRg0brkLt77PlbjBuxZ4HY8XZnKJaYWf+tKazQZtkQtg==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.0", + "@types/ws": "^8.0.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.15.0" + } + }, + "@graphql-tools/graphql-file-loader": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-file-loader/-/graphql-file-loader-8.0.0.tgz", + "integrity": "sha512-wRXj9Z1IFL3+zJG1HWEY0S4TXal7+s1vVhbZva96MSp0kbb/3JBF7j0cnJ44Eq0ClccMgGCDFqPFXty4JlpaPg==", + "dev": true, + "requires": { + "@graphql-tools/import": "7.0.0", + "@graphql-tools/utils": "^10.0.0", + "globby": "^11.0.3", + "tslib": "^2.4.0", + "unixify": "^1.0.0" + } + }, + "@graphql-tools/graphql-tag-pluck": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.2.0.tgz", + "integrity": "sha512-aGIuHxyrJB+LlUfXrH73NVlQTA6LkFbLKQzHojFuwXZJpf7wPkxceN2yp7VjMedARkLJg589IoXgZeMb1EztGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.22.9", + "@babel/parser": "^7.16.8", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" } - } - } - }, - "@graphql-codegen/core": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-2.6.8.tgz", - "integrity": "sha512-JKllNIipPrheRgl+/Hm/xuWMw9++xNQ12XJR/OHHgFopOg4zmN3TdlRSyYcv/K90hCFkkIwhlHFUQTfKrm8rxQ==", - "dev": true, - "requires": { - "@graphql-codegen/plugin-helpers": "^3.1.1", - "@graphql-tools/schema": "^9.0.0", - "@graphql-tools/utils": "^9.1.1", - "tslib": "~2.4.0" - }, - "dependencies": { - "@graphql-tools/merge": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.4.2.tgz", - "integrity": "sha512-XbrHAaj8yDuINph+sAfuq3QCZ/tKblrTLOpirK0+CAgNlZUCHs0Fa+xtMUURgwCVThLle1AF7svJCxFizygLsw==", + }, + "@graphql-tools/import": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-7.0.0.tgz", + "integrity": "sha512-NVZiTO8o1GZs6OXzNfjB+5CtQtqsZZpQOq+Uu0w57kdUkT4RlQKlwhT8T81arEsbV55KpzkpFsOZP7J1wdmhBw==", "dev": true, "requires": { - "@graphql-tools/utils": "^9.2.1", + "@graphql-tools/utils": "^10.0.0", + "resolve-from": "5.0.0", "tslib": "^2.4.0" } }, - "@graphql-tools/schema": { - "version": "9.0.19", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-9.0.19.tgz", - "integrity": "sha512-oBRPoNBtCkk0zbUsyP4GaIzCt8C0aCI4ycIRUL67KK5pOHljKLBBtGT+Jr6hkzA74C8Gco8bpZPe7aWFjiaK2w==", + "@graphql-tools/json-file-loader": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/json-file-loader/-/json-file-loader-8.0.0.tgz", + "integrity": "sha512-ki6EF/mobBWJjAAC84xNrFMhNfnUFD6Y0rQMGXekrUgY0NdeYXHU0ZUgHzC9O5+55FslqUmAUHABePDHTyZsLg==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.0", + "globby": "^11.0.3", + "tslib": "^2.4.0", + "unixify": "^1.0.0" + } + }, + "@graphql-tools/load": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/load/-/load-8.0.1.tgz", + "integrity": "sha512-qSMsKngJhDqRbuWyo3NvakEFqFL6+eSjy8ooJ1o5qYD26N7dqXkKzIMycQsX7rBK19hOuINAUSaRcVWH6hTccw==", + "dev": true, + "requires": { + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.11", + "p-limit": "3.1.0", + "tslib": "^2.4.0" + } + }, + "@graphql-tools/url-loader": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-8.0.1.tgz", + "integrity": "sha512-B2k8KQEkEQmfV1zhurT5GLoXo8jbXP+YQHUayhCSxKYlRV7j/1Fhp1b21PDM8LXIDGlDRXaZ0FbWKOs7eYXDuQ==", + "dev": true, + "requires": { + "@ardatan/sync-fetch": "^0.0.1", + "@graphql-tools/delegate": "^10.0.0", + "@graphql-tools/executor-graphql-ws": "^1.0.0", + "@graphql-tools/executor-http": "^1.0.5", + "@graphql-tools/executor-legacy-ws": "^1.0.0", + "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/wrap": "^10.0.0", + "@types/ws": "^8.0.0", + "@whatwg-node/fetch": "^0.9.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.11", + "ws": "^8.12.0" + }, + "dependencies": { + "@whatwg-node/fetch": { + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", + "dev": true, + "requires": { + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" + } + } + } + }, + "@graphql-tools/wrap": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-10.0.1.tgz", + "integrity": "sha512-Cw6hVrKGM2OKBXeuAGltgy4tzuqQE0Nt7t/uAqnuokSXZhMHXJUb124Bnvxc2gPZn5chfJSDafDe4Cp8ZAVJgg==", + "dev": true, + "requires": { + "@graphql-tools/delegate": "^10.0.3", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.0", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "@whatwg-node/events": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", + "dev": true + }, + "@whatwg-node/node-fetch": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", + "dev": true, + "requires": { + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", + "busboy": "^1.6.0", + "fast-querystring": "^1.1.1", + "tslib": "^2.3.1" + } + }, + "cosmiconfig": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, + "requires": { + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0", + "path-type": "^4.0.0" + } + }, + "graphql-config": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/graphql-config/-/graphql-config-5.0.3.tgz", + "integrity": "sha512-BNGZaoxIBkv9yy6Y7omvsaBUHOzfFcII3UN++tpH8MGOKFPFkCPZuwx09ggANMt8FgyWP1Od8SWPmrUEZca4NQ==", "dev": true, "requires": { - "@graphql-tools/merge": "^8.4.1", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" + "@graphql-tools/graphql-file-loader": "^8.0.0", + "@graphql-tools/json-file-loader": "^8.0.0", + "@graphql-tools/load": "^8.0.0", + "@graphql-tools/merge": "^9.0.0", + "@graphql-tools/url-loader": "^8.0.0", + "@graphql-tools/utils": "^10.0.0", + "cosmiconfig": "^8.1.0", + "jiti": "^1.18.2", + "minimatch": "^4.2.3", + "string-env-interpolation": "^1.0.1", + "tslib": "^2.4.0" } }, - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true + }, + "minimatch": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.3.tgz", + "integrity": "sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng==", "dev": true, "requires": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" + "brace-expansion": "^1.1.7" } }, + "urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "dev": true + }, + "yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "dev": true + } + } + }, + "@graphql-codegen/core": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/core/-/core-4.0.0.tgz", + "integrity": "sha512-JAGRn49lEtSsZVxeIlFVIRxts2lWObR+OQo7V2LHDJ7ohYYw3ilv7nJ8pf8P4GTg/w6ptcYdSdVVdkI8kUHB/Q==", + "dev": true, + "requires": { + "@graphql-codegen/plugin-helpers": "^5.0.0", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.0", + "tslib": "~2.5.0" + }, + "dependencies": { "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", "dev": true } } }, "@graphql-codegen/plugin-helpers": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz", - "integrity": "sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", + "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", "dev": true, "requires": { - "@graphql-tools/utils": "^9.0.0", + "@graphql-tools/utils": "^10.0.0", "change-case-all": "1.0.15", "common-tags": "1.8.2", "import-from": "4.0.0", "lodash": "~4.17.0", - "tslib": "~2.4.0" + "tslib": "~2.5.0" }, "dependencies": { - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "requires": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - } - }, "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", "dev": true } } @@ -18660,20 +18960,6 @@ "tslib": "~2.5.0" }, "dependencies": { - "@graphql-codegen/plugin-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", - "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^10.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.5.0" - } - }, "tslib": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", @@ -18695,20 +18981,6 @@ "tslib": "~2.5.0" }, "dependencies": { - "@graphql-codegen/plugin-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", - "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^10.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.5.0" - } - }, "tslib": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", @@ -18731,20 +19003,6 @@ "tslib": "~2.5.0" }, "dependencies": { - "@graphql-codegen/plugin-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", - "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^10.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.5.0" - } - }, "tslib": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", @@ -18771,20 +19029,6 @@ "tslib": "~2.5.0" }, "dependencies": { - "@graphql-codegen/plugin-helpers": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.1.tgz", - "integrity": "sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==", - "dev": true, - "requires": { - "@graphql-tools/utils": "^10.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.5.0" - } - }, "tslib": { "version": "2.5.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", @@ -19027,81 +19271,6 @@ "requires": { "@graphql-tools/github-loader": "8.0.0", "tslib": "2.6.2" - }, - "dependencies": { - "@graphql-tools/executor-http": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", - "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", - "requires": { - "@graphql-tools/utils": "^10.0.2", - "@repeaterjs/repeater": "^3.0.4", - "@whatwg-node/fetch": "^0.9.0", - "extract-files": "^11.0.0", - "meros": "^1.2.1", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - }, - "@graphql-tools/github-loader": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/github-loader/-/github-loader-8.0.0.tgz", - "integrity": "sha512-VuroArWKcG4yaOWzV0r19ElVIV6iH6UKDQn1MXemND0xu5TzrFme0kf3U9o0YwNo0kUYEk9CyFM0BYg4he17FA==", - "requires": { - "@ardatan/sync-fetch": "^0.0.1", - "@graphql-tools/executor-http": "^1.0.0", - "@graphql-tools/graphql-tag-pluck": "^8.0.0", - "@graphql-tools/utils": "^10.0.0", - "@whatwg-node/fetch": "^0.9.0", - "tslib": "^2.4.0", - "value-or-promise": "^1.0.12" - } - }, - "@graphql-tools/graphql-tag-pluck": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.1.0.tgz", - "integrity": "sha512-kt5l6H/7QxQcIaewInTcune6NpATojdFEW98/8xWcgmy7dgXx5vU9e0AicFZIH+ewGyZzTpwFqO2RI03roxj2w==", - "requires": { - "@babel/core": "^7.22.9", - "@babel/parser": "^7.16.8", - "@babel/plugin-syntax-import-assertions": "^7.20.0", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8", - "@graphql-tools/utils": "^10.0.0", - "tslib": "^2.4.0" - } - }, - "@whatwg-node/events": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", - "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==" - }, - "@whatwg-node/fetch": { - "version": "0.9.15", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.15.tgz", - "integrity": "sha512-2wIUcolUthZt0nsPRj+pT7K9h/EO3t/j09IBuq0FtITCsASc2fRCmRw2JHS6hk9fzUQrz2+YYrA1ZDpV7+vLsQ==", - "requires": { - "@whatwg-node/node-fetch": "^0.5.0", - "urlpattern-polyfill": "^9.0.0" - } - }, - "@whatwg-node/node-fetch": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.4.tgz", - "integrity": "sha512-5AXi4B44/6SOlQG+X3cO5lsUdRTWSXqaWLkGKnwWfeJoMgRfA53RnYVnvTV+4CoatNBStPrIoDorjgQv+ouiMQ==", - "requires": { - "@kamilkisiela/fast-url-parser": "^1.1.4", - "@whatwg-node/events": "^0.1.0", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "tslib": "^2.3.1" - } - }, - "urlpattern-polyfill": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-9.0.0.tgz", - "integrity": "sha512-WHN8KDQblxd32odxeIgo83rdVDE2bvdkb86it7bMhYZwWKJz0+O0RK/eZiHYnM+zgt/U7hAHOlCQGfjjvSkw2g==" - } } }, "@graphql-inspector/graphql-loader": { @@ -19438,63 +19607,50 @@ } }, "@graphql-tools/apollo-engine-loader": { - "version": "7.3.26", - "resolved": "https://registry.npmjs.org/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-7.3.26.tgz", - "integrity": "sha512-h1vfhdJFjnCYn9b5EY1Z91JTF0KB3hHVJNQIsiUV2mpQXZdeOXQoaWeYEKaiI5R6kwBw5PP9B0fv3jfUIG8LyQ==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/apollo-engine-loader/-/apollo-engine-loader-8.0.0.tgz", + "integrity": "sha512-axQTbN5+Yxs1rJ6cWQBOfw3AEeC+fvIuZSfJLPLLvFJLj4pUm9fhxey/g6oQZAAQJqKPfw+tLDUQvnfvRK8Kmg==", "dev": true, "requires": { "@ardatan/sync-fetch": "^0.0.1", - "@graphql-tools/utils": "^9.2.1", - "@whatwg-node/fetch": "^0.8.0", + "@graphql-tools/utils": "^10.0.0", + "@whatwg-node/fetch": "^0.9.0", "tslib": "^2.4.0" }, "dependencies": { - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "requires": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - } - }, "@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", "dev": true }, "@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", "dev": true, "requires": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" } }, "@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", "dev": true, "requires": { - "@whatwg-node/events": "^0.0.3", + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" } }, "urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", "dev": true } } @@ -19694,44 +19850,6 @@ "@graphql-typed-document-node/core": "^3.1.1", "tslib": "^2.4.0" } - }, - "@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true - }, - "@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", - "dev": true, - "requires": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" - } - }, - "@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", - "dev": true, - "requires": { - "@whatwg-node/events": "^0.0.3", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" - } - }, - "urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", - "dev": true } } }, @@ -19768,93 +19886,108 @@ } }, "@graphql-tools/git-loader": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/git-loader/-/git-loader-7.3.0.tgz", - "integrity": "sha512-gcGAK+u16eHkwsMYqqghZbmDquh8QaO24Scsxq+cVR+vx1ekRlsEiXvu+yXVDbZdcJ6PBIbeLcQbEu+xhDLmvQ==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/@graphql-tools/git-loader/-/git-loader-8.0.4.tgz", + "integrity": "sha512-fBmKtnOVqzMT2N8L6nggM4skPq3y2t0eBITZJXCOuxeIlIRAeCOdjNLPKgyGb0rezIyGsn55DKMua5101VN0Sg==", "dev": true, "requires": { - "@graphql-tools/graphql-tag-pluck": "7.5.2", - "@graphql-tools/utils": "^9.2.1", + "@graphql-tools/graphql-tag-pluck": "8.2.0", + "@graphql-tools/utils": "^10.0.13", "is-glob": "4.0.3", "micromatch": "^4.0.4", "tslib": "^2.4.0", "unixify": "^1.0.0" }, "dependencies": { - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "@graphql-tools/graphql-tag-pluck": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.2.0.tgz", + "integrity": "sha512-aGIuHxyrJB+LlUfXrH73NVlQTA6LkFbLKQzHojFuwXZJpf7wPkxceN2yp7VjMedARkLJg589IoXgZeMb1EztGQ==", "dev": true, "requires": { - "@graphql-typed-document-node/core": "^3.1.1", + "@babel/core": "^7.22.9", + "@babel/parser": "^7.16.8", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" } } } }, "@graphql-tools/github-loader": { - "version": "7.3.28", - "resolved": "https://registry.npmjs.org/@graphql-tools/github-loader/-/github-loader-7.3.28.tgz", - "integrity": "sha512-OK92Lf9pmxPQvjUNv05b3tnVhw0JRfPqOf15jZjyQ8BfdEUrJoP32b4dRQQem/wyRL24KY4wOfArJNqzpsbwCA==", - "dev": true, + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/github-loader/-/github-loader-8.0.0.tgz", + "integrity": "sha512-VuroArWKcG4yaOWzV0r19ElVIV6iH6UKDQn1MXemND0xu5TzrFme0kf3U9o0YwNo0kUYEk9CyFM0BYg4he17FA==", "requires": { "@ardatan/sync-fetch": "^0.0.1", - "@graphql-tools/executor-http": "^0.1.9", - "@graphql-tools/graphql-tag-pluck": "^7.4.6", - "@graphql-tools/utils": "^9.2.1", - "@whatwg-node/fetch": "^0.8.0", + "@graphql-tools/executor-http": "^1.0.0", + "@graphql-tools/graphql-tag-pluck": "^8.0.0", + "@graphql-tools/utils": "^10.0.0", + "@whatwg-node/fetch": "^0.9.0", "tslib": "^2.4.0", "value-or-promise": "^1.0.12" }, "dependencies": { - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, + "@graphql-tools/executor-http": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", + "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", "requires": { - "@graphql-typed-document-node/core": "^3.1.1", + "@graphql-tools/utils": "^10.0.2", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/fetch": "^0.9.0", + "extract-files": "^11.0.0", + "meros": "^1.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "@graphql-tools/graphql-tag-pluck": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/graphql-tag-pluck/-/graphql-tag-pluck-8.2.0.tgz", + "integrity": "sha512-aGIuHxyrJB+LlUfXrH73NVlQTA6LkFbLKQzHojFuwXZJpf7wPkxceN2yp7VjMedARkLJg589IoXgZeMb1EztGQ==", + "requires": { + "@babel/core": "^7.22.9", + "@babel/parser": "^7.16.8", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8", + "@graphql-tools/utils": "^10.0.13", "tslib": "^2.4.0" } }, "@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==" }, "@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", - "dev": true, + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", "requires": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" } }, "@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", - "dev": true, + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", "requires": { - "@whatwg-node/events": "^0.0.3", + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" } }, "urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", - "dev": true + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==" } } }, @@ -20021,23 +20154,23 @@ } }, "@graphql-tools/prisma-loader": { - "version": "7.2.72", - "resolved": "https://registry.npmjs.org/@graphql-tools/prisma-loader/-/prisma-loader-7.2.72.tgz", - "integrity": "sha512-0a7uV7Fky6yDqd0tI9+XMuvgIo6GAqiVzzzFV4OSLry4AwiQlI3igYseBV7ZVOGhedOTqj/URxjpiv07hRcwag==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/prisma-loader/-/prisma-loader-8.0.2.tgz", + "integrity": "sha512-8d28bIB0bZ9Bj0UOz9sHagVPW+6AHeqvGljjERtwCnWl8OCQw2c2pNboYXISLYUG5ub76r4lDciLLTU+Ks7Q0w==", "dev": true, "requires": { - "@graphql-tools/url-loader": "^7.17.18", - "@graphql-tools/utils": "^9.2.1", + "@graphql-tools/url-loader": "^8.0.0", + "@graphql-tools/utils": "^10.0.8", "@types/js-yaml": "^4.0.0", "@types/json-stable-stringify": "^1.0.32", - "@whatwg-node/fetch": "^0.8.2", + "@whatwg-node/fetch": "^0.9.0", "chalk": "^4.1.0", "debug": "^4.3.1", "dotenv": "^16.0.0", "graphql-request": "^6.0.0", - "http-proxy-agent": "^6.0.0", - "https-proxy-agent": "^6.0.0", - "jose": "^4.11.4", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "jose": "^5.0.0", "js-yaml": "^4.0.0", "json-stable-stringify": "^1.0.1", "lodash": "^4.17.20", @@ -20046,58 +20179,154 @@ "yaml-ast-parser": "^0.0.43" }, "dependencies": { - "@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", + "@graphql-tools/batch-execute": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-9.0.2.tgz", + "integrity": "sha512-Y2uwdZI6ZnatopD/SYfZ1eGuQFI7OU2KGZ2/B/7G9ISmgMl5K+ZZWz/PfIEXeiHirIDhyk54s4uka5rj2xwKqQ==", "dev": true, "requires": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "@graphql-tools/delegate": { + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-10.0.3.tgz", + "integrity": "sha512-Jor9oazZ07zuWkykD3OOhT/2XD74Zm6Ar0ENZMk75MDD51wB2UWUIMljtHxbJhV5A6UBC2v8x6iY0xdCGiIlyw==", + "dev": true, + "requires": { + "@graphql-tools/batch-execute": "^9.0.1", + "@graphql-tools/executor": "^1.0.0", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.5", + "dataloader": "^2.2.2", + "tslib": "^2.5.0" + } + }, + "@graphql-tools/executor": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor/-/executor-1.2.0.tgz", + "integrity": "sha512-SKlIcMA71Dha5JnEWlw4XxcaJ+YupuXg0QCZgl2TOLFz4SkGCwU/geAsJvUJFwK2RbVLpQv/UMq67lOaBuwDtg==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.0", + "@graphql-typed-document-node/core": "3.2.0", + "@repeaterjs/repeater": "^3.0.4", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "@graphql-tools/executor-graphql-ws": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-graphql-ws/-/executor-graphql-ws-1.1.0.tgz", + "integrity": "sha512-yM67SzwE8rYRpm4z4AuGtABlOp9mXXVy6sxXnTJRoYIdZrmDbKVfIY+CpZUJCqS0FX3xf2+GoHlsj7Qswaxgcg==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.2", + "@types/ws": "^8.0.0", + "graphql-ws": "^5.14.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.13.0" + } + }, + "@graphql-tools/executor-http": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-http/-/executor-http-1.0.7.tgz", + "integrity": "sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.2", + "@repeaterjs/repeater": "^3.0.4", + "@whatwg-node/fetch": "^0.9.0", + "extract-files": "^11.0.0", + "meros": "^1.2.1", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" + } + }, + "@graphql-tools/executor-legacy-ws": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@graphql-tools/executor-legacy-ws/-/executor-legacy-ws-1.0.5.tgz", + "integrity": "sha512-w54AZ7zkNuvpyV09FH+eGHnnAmaxhBVHg4Yh2ICcsMfRg0brkLt77PlbjBuxZ4HY8XZnKJaYWf+tKazQZtkQtg==", + "dev": true, + "requires": { + "@graphql-tools/utils": "^10.0.0", + "@types/ws": "^8.0.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "ws": "^8.15.0" + } + }, + "@graphql-tools/url-loader": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/url-loader/-/url-loader-8.0.1.tgz", + "integrity": "sha512-B2k8KQEkEQmfV1zhurT5GLoXo8jbXP+YQHUayhCSxKYlRV7j/1Fhp1b21PDM8LXIDGlDRXaZ0FbWKOs7eYXDuQ==", + "dev": true, + "requires": { + "@ardatan/sync-fetch": "^0.0.1", + "@graphql-tools/delegate": "^10.0.0", + "@graphql-tools/executor-graphql-ws": "^1.0.0", + "@graphql-tools/executor-http": "^1.0.5", + "@graphql-tools/executor-legacy-ws": "^1.0.0", + "@graphql-tools/utils": "^10.0.0", + "@graphql-tools/wrap": "^10.0.0", + "@types/ws": "^8.0.0", + "@whatwg-node/fetch": "^0.9.0", + "isomorphic-ws": "^5.0.0", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.11", + "ws": "^8.12.0" + } + }, + "@graphql-tools/wrap": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/wrap/-/wrap-10.0.1.tgz", + "integrity": "sha512-Cw6hVrKGM2OKBXeuAGltgy4tzuqQE0Nt7t/uAqnuokSXZhMHXJUb124Bnvxc2gPZn5chfJSDafDe4Cp8ZAVJgg==", + "dev": true, + "requires": { + "@graphql-tools/delegate": "^10.0.3", + "@graphql-tools/schema": "^10.0.0", + "@graphql-tools/utils": "^10.0.0", + "tslib": "^2.4.0", + "value-or-promise": "^1.0.12" } }, "@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.1.1.tgz", + "integrity": "sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==", "dev": true }, "@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", + "version": "0.9.16", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.9.16.tgz", + "integrity": "sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==", "dev": true, "requires": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" + "@whatwg-node/node-fetch": "^0.5.5", + "urlpattern-polyfill": "^10.0.0" } }, "@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.5.5.tgz", + "integrity": "sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==", "dev": true, "requires": { - "@whatwg-node/events": "^0.0.3", + "@kamilkisiela/fast-url-parser": "^1.1.4", + "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" } }, - "dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", - "dev": true - }, "urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", "dev": true } } @@ -20165,51 +20394,13 @@ "@graphql-typed-document-node/core": "^3.1.1", "tslib": "^2.4.0" } - }, - "@whatwg-node/events": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", - "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", - "dev": true - }, - "@whatwg-node/fetch": { - "version": "0.8.8", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", - "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", - "dev": true, - "requires": { - "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.3.6", - "busboy": "^1.6.0", - "urlpattern-polyfill": "^8.0.0", - "web-streams-polyfill": "^3.2.1" - } - }, - "@whatwg-node/node-fetch": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", - "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", - "dev": true, - "requires": { - "@whatwg-node/events": "^0.0.3", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", - "tslib": "^2.3.1" - } - }, - "urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", - "dev": true } } }, "@graphql-tools/utils": { - "version": "10.0.12", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.12.tgz", - "integrity": "sha512-+yS1qlFwXlwU3Gv8ek/h2aJ95quog4yF22haC11M0zReMSTddbGJZ5yXKkE3sXoY2BcL1utilSFjylJ9uXpSNQ==", + "version": "10.0.13", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-10.0.13.tgz", + "integrity": "sha512-fMILwGr5Dm2zefNItjQ6C2rauigklv69LIwppccICuGTnGaOp3DspLt/6Lxj72cbg5d9z60Sr+Egco3CJKLsNg==", "requires": { "@graphql-typed-document-node/core": "^3.1.1", "cross-inspect": "1.0.0", @@ -21033,30 +21224,6 @@ "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, "@types/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", @@ -21359,9 +21526,9 @@ } }, "@types/node": { - "version": "20.11.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.8.tgz", - "integrity": "sha512-i7omyekpPTNdv4Jb/Rgqg0RU8YqLcNsI12quKSDkRXNfx7Wxdm6HhK1awT3xTgEkgxPn3bvnSpiEAc7a7Lpyow==", + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "requires": { "undici-types": "~5.26.4" } @@ -21686,45 +21853,35 @@ } }, "@whatwg-node/events": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.2.tgz", - "integrity": "sha512-WKj/lI4QjnLuPrim0cfO7i+HsDSXHxNv1y0CrJhdntuO3hxWZmnXCwNDnwOvry11OjRin6cgWNF+j/9Pn8TN4w==", + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@whatwg-node/events/-/events-0.0.3.tgz", + "integrity": "sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==", "dev": true }, "@whatwg-node/fetch": { - "version": "0.6.9", - "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.6.9.tgz", - "integrity": "sha512-JfrBCJdMu9n9OARc0e/hPHcD98/8Nz1CKSdGYDg6VbObDkV/Ys30xe5i/wPOatYbxuvatj1kfWeHf7iNX3i17w==", + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/@whatwg-node/fetch/-/fetch-0.8.8.tgz", + "integrity": "sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==", "dev": true, "requires": { "@peculiar/webcrypto": "^1.4.0", - "@whatwg-node/node-fetch": "^0.0.5", + "@whatwg-node/node-fetch": "^0.3.6", "busboy": "^1.6.0", - "urlpattern-polyfill": "^6.0.2", + "urlpattern-polyfill": "^8.0.0", "web-streams-polyfill": "^3.2.1" - }, - "dependencies": { - "@types/node": { - "version": "18.19.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.8.tgz", - "integrity": "sha512-g1pZtPhsvGVTwmeVoexWZLTQaOvXwoSq//pTL0DHeNzUDrFnir4fgETdhjhIxjVnN+hKOuh98+E1eMLnUXstFg==", - "dev": true, - "peer": true, - "requires": { - "undici-types": "~5.26.4" - } - }, - "@whatwg-node/node-fetch": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.0.5.tgz", - "integrity": "sha512-hbccmaSZaItdsRuBKBEEhLoO+5oXJPxiyd0kG2xXd0Dh3Rt+vZn4pADHxuSiSHLd9CM+S2z4+IxlEGbWUgiz9g==", - "dev": true, - "requires": { - "@whatwg-node/events": "^0.0.2", - "busboy": "^1.6.0", - "tslib": "^2.3.1" - } - } + } + }, + "@whatwg-node/node-fetch": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@whatwg-node/node-fetch/-/node-fetch-0.3.6.tgz", + "integrity": "sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==", + "dev": true, + "requires": { + "@whatwg-node/events": "^0.0.3", + "busboy": "^1.6.0", + "fast-querystring": "^1.1.1", + "fast-url-parser": "^1.1.3", + "tslib": "^2.3.1" } }, "@whatwg-node/server": { @@ -21791,12 +21948,6 @@ "dev": true, "requires": {} }, - "acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", - "dev": true - }, "agent-base": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", @@ -21894,12 +22045,6 @@ "picomatch": "^2.0.4" } }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -22119,9 +22264,9 @@ "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, "axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "requires": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -22959,19 +23104,6 @@ "yaml": "^1.10.0" } }, - "cosmiconfig-typescript-loader": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz", - "integrity": "sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw==", - "dev": true, - "requires": {} - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, "croner": { "version": "4.1.97", "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz", @@ -23172,12 +23304,6 @@ "resolved": "https://registry.npmjs.org/diacritics-map/-/diacritics-map-0.1.0.tgz", "integrity": "sha512-3omnDTYrGigU0i4cJjvaKwD52B8aoqyX/NEIkukFFkogBemsIbhSa1O414fpTp5nuszJG6lvQ5vBvDVNCbSsaQ==" }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -23215,9 +23341,9 @@ } }, "dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==" + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", + "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==" }, "dset": { "version": "3.1.3", @@ -23686,9 +23812,9 @@ } }, "eslint-config-prettier": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", - "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "requires": {} }, @@ -25017,10 +25143,9 @@ } }, "http-proxy-agent": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-6.1.1.tgz", - "integrity": "sha512-JRCz+4Whs6yrrIoIlrH+ZTmhrRwtMnmOHsHn8GFEn9O2sVfSE+DAZ3oyyGIKF8tjJEeSJmP89j7aTjVsSqsU0g==", - "dev": true, + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", "requires": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -25037,10 +25162,9 @@ } }, "https-proxy-agent": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-6.2.1.tgz", - "integrity": "sha512-ONsE3+yfZF2caH5+bJlcddtWqNI3Gvs5A38+ngvljxaBiRXRswym2c7yf8UAeFpRFKjFNHIFEHqR/OLAWJzyiA==", - "dev": true, + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "requires": { "agent-base": "^7.0.2", "debug": "4" @@ -25053,9 +25177,9 @@ "dev": true }, "husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.6.tgz", + "integrity": "sha512-EEuw/rfTiMjOfuL7pGO/i9otg1u36TXxqjIA6D9qxVjd/UXoDOsLor/BSFf5hTK50shwzCU3aVVwdXDp/lp7RA==", "dev": true }, "i18n": { @@ -25589,9 +25713,9 @@ "dev": true }, "jose": { - "version": "4.15.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz", - "integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.2.0.tgz", + "integrity": "sha512-oW3PCnvyrcm1HMvGTzqjxxfnEs9EoFOFWi2HsEGhlFVOXxTE3K9GKWVMFoFw06yPUqwpvEWic1BmtUZBI/tIjw==", "dev": true }, "jpeg-js": { @@ -25656,9 +25780,9 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-stable-stringify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz", - "integrity": "sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz", + "integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==", "dev": true, "requires": { "call-bind": "^1.0.5", @@ -26336,12 +26460,6 @@ } } }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "make-plural": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-7.3.0.tgz", @@ -27043,26 +27161,6 @@ "https-proxy-agent": "^7.0.2", "pac-resolver": "^7.0.0", "socks-proxy-agent": "^8.0.2" - }, - "dependencies": { - "http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "requires": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - } - }, - "https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "requires": { - "agent-base": "^7.0.2", - "debug": "4" - } - } } }, "pac-resolver": { @@ -27467,26 +27565,6 @@ "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.2" - }, - "dependencies": { - "http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "requires": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - } - }, - "https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "requires": { - "agent-base": "^7.0.2", - "debug": "4" - } - } } }, "proxy-from-env": { @@ -28796,27 +28874,6 @@ "integrity": "sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==", "dev": true }, - "ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, "tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -29126,13 +29183,10 @@ } }, "urlpattern-polyfill": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-6.0.2.tgz", - "integrity": "sha512-5vZjFlH9ofROmuWmXM9yj2wljYKgWstGwe8YTyiqM7hVum/g9LyCizPZtb3UqsuppVwety9QJmfc42VggLpTgg==", - "dev": true, - "requires": { - "braces": "^3.0.2" - } + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", + "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==", + "dev": true }, "util-deprecate": { "version": "1.0.2", @@ -29149,12 +29203,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -29581,12 +29629,6 @@ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true - }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 675c330222..29cb12c0af 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,7 @@ "generate:graphql-markdown": "graphql-markdown http://localhost:4000/graphql > docs/Schema.md", "generate:graphql-schema": "get-graphql-schema http://localhost:4000/graphql --json > docs/schema.json", "generate:ssl-private-key": "openssl genrsa -out ./key.pem", - "import:sample-data": "ts-node ./src/utilities/loadSampleData.ts", - "import:sample-data-defaultOrg": "ts-node ./src/utilities/loadDefaultOrganization.ts", + "import:sample-data": "tsx ./src/utilities/loadSampleData.ts", "import:sample-data:prod": "node ./build/utilities/loadSampleData.js", "gen:schema": "graphql-inspector introspect ./src/typeDefs/**/**/*.ts --write ./schema.graphql ", "update:toc": "node scripts/githooks/update-toc.js" @@ -52,7 +51,7 @@ "@graphql-tools/utils": "^10.0.11", "@types/graphql-upload": "^16.0.5", "@types/yargs": "^17.0.32", - "axios": "^1.6.0", + "axios": "^1.6.7", "bcryptjs": "^2.4.3", "cls-bluebird": "^2.1.0", "cls-hooked": "^4.2.2", @@ -60,7 +59,7 @@ "cors": "^2.8.5", "cross-env": "^7.0.3", "date-fns": "^3.3.0", - "dotenv": "^8.6.0", + "dotenv": "^16.4.1", "express": "^4.18.2", "express-mongo-sanitize": "^2.2.0", "express-rate-limit": "^7.1.5", @@ -98,7 +97,7 @@ "zod-error": "^1.5.0" }, "devDependencies": { - "@graphql-codegen/cli": "^2.6.2", + "@graphql-codegen/cli": "^5.0.0", "@graphql-codegen/typescript": "^4.0.1", "@graphql-codegen/typescript-resolvers": "^4.0.1", "@graphql-eslint/eslint-plugin": "^3.12.0", @@ -115,7 +114,7 @@ "@types/lodash": "^4.14.202", "@types/mongoose-paginate-v2": "^1.6.5", "@types/morgan": "^1.9.9", - "@types/node": "^20.11.8", + "@types/node": "^20.11.16", "@types/nodemailer": "^6.4.14", "@types/shortid": "^0.0.32", "@types/uuid": "^9.0.7", @@ -125,12 +124,12 @@ "@vitest/coverage-c8": "^0.24.3", "concurrently": "^8.2.2", "eslint": "^8.56.0", - "eslint-config-prettier": "^8.5.0", + "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-tsdoc": "^0.2.17", "get-graphql-schema": "^2.1.2", "graphql-markdown": "^7.0.0", - "husky": "^8.0.3", + "husky": "^9.0.6", "lint-staged": "^15.2.0", "prettier": "^2.7.1", "rimraf": "^5.0.5", diff --git a/sample_data/defaultOrganization.json b/sample_data/defaultOrganization.json deleted file mode 100644 index 4326c60518..0000000000 --- a/sample_data/defaultOrganization.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "_id": "6437904485008f171cf29924", - "status": "ACTIVE", - "members": ["64378abd85008f171cf2990d"], - "admins": ["64378abd85008f171cf2990d"], - "groupChats": [], - "posts": [], - "pinnedPosts": [], - "membershipRequests": [], - "blockedUsers": [], - "name": "DEFAULT ORGANIZATION", - "description": "The default organization which will be always in DB.", - "location": "Delhi, India", - "userRegistrationRequired": true, - "visibleInSearch": true, - "image": null, - "creatorId": "64378abd85008f171cf2990d", - "createdAt": "2023-04-13T05:16:52.827Z", - "__v": 0 - } -] diff --git a/sample_data/defaultOrganizationAdmin.json b/sample_data/defaultOrganizationAdmin.json deleted file mode 100644 index 1ae8abbd53..0000000000 --- a/sample_data/defaultOrganizationAdmin.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "_id": "64378abd85008f171cf2990d", - "tokenVersion": 0, - "appLanguageCode": "en", - "createdOrganizations": ["6437904485008f171cf29924"], - "createdEvents": [], - "userType": "SUPERADMIN", - "joinedOrganizations": ["6437904485008f171cf29924"], - "registeredEvents": [], - "eventAdmin": [], - "adminFor": ["6437904485008f171cf29924"], - "membershipRequests": [], - "organizationsBlockedBy": [], - "status": "ACTIVE", - "pluginCreationAllowed": true, - "adminApproved": true, - "firstName": "Wilt", - "lastName": "Shepherd", - "email": "testsuperadmin@example.com", - "password": "$2a$12$bSYpay6TRMpTOaAmYPFXku4avwmqfFBtmgg39TabxmtFEiz4plFtW", - "image": null, - "createdAt": "2023-04-13T04:53:17.742Z", - "__v": 0 - } -] diff --git a/sample_data/organizations.json b/sample_data/organizations.json index b46bb36047..f57ceab8bb 100644 --- a/sample_data/organizations.json +++ b/sample_data/organizations.json @@ -1,4 +1,33 @@ [ + { + "_id": "6437904485008f171cf29924", + "status": "ACTIVE", + "members": ["64378abd85008f171cf2990d"], + "admins": ["64378abd85008f171cf2990d"], + "groupChats": [], + "posts": [], + "pinnedPosts": [], + "membershipRequests": [], + "blockedUsers": [], + "name": "The Unity Foundation", + "description": "A foundation aimed at uniting the world and making it a better place for all.", + "address": { + "city": "Delhi", + "countryCode": "IN", + "dependentLocality": "Some Dependent Locality", + "line1": "123 Random Street", + "line2": "Apartment 456", + "postalCode": "110001", + "sortingCode": "ABC-123", + "state": "Delhi" + }, + "userRegistrationRequired": false, + "visibleInSearch": true, + "image": null, + "creatorId": "64378abd85008f171cf2990d", + "createdAt": "2023-04-13T05:16:52.827Z", + "__v": 0 + }, { "_id": "6537904485008f171cf29924", "status": "ACTIVE", diff --git a/sample_data/users.json b/sample_data/users.json index f5f921a55d..d3fa89a564 100644 --- a/sample_data/users.json +++ b/sample_data/users.json @@ -1,4 +1,28 @@ [ + { + "_id": "64378abd85008f171cf2990d", + "tokenVersion": 0, + "appLanguageCode": "en", + "createdOrganizations": ["6437904485008f171cf29924"], + "createdEvents": [], + "userType": "SUPERADMIN", + "joinedOrganizations": ["6437904485008f171cf29924"], + "registeredEvents": [], + "eventAdmin": [], + "adminFor": ["6437904485008f171cf29924"], + "membershipRequests": [], + "organizationsBlockedBy": [], + "status": "ACTIVE", + "pluginCreationAllowed": true, + "adminApproved": true, + "firstName": "Wilt", + "lastName": "Shepherd", + "email": "testsuperadmin@example.com", + "password": "$2a$12$bSYpay6TRMpTOaAmYPFXku4avwmqfFBtmgg39TabxmtFEiz4plFtW", + "image": null, + "createdAt": "2023-04-13T04:53:17.742Z", + "__v": 0 + }, { "_id": "65378abd85008f171cf2990d", "tokenVersion": 0, diff --git a/schema.graphql b/schema.graphql index 0f1ddfabc0..9b4ab8c809 100644 --- a/schema.graphql +++ b/schema.graphql @@ -2,6 +2,33 @@ directive @auth on FIELD_DEFINITION directive @role(requires: UserType) on FIELD_DEFINITION +type ActionItem { + _id: ID! + actionItemCategory: ActionItemCategory + assignee: User + assigner: User + assignmentDate: Date! + completionDate: Date! + createdAt: Date! + creator: User + dueDate: Date! + event: Event + isCompleted: Boolean! + postCompletionNotes: String + preCompletionNotes: String + updatedAt: Date! +} + +type ActionItemCategory { + _id: ID! + createdAt: Date! + creator: User + isDisabled: Boolean! + name: String! + organization: Organization + updatedAt: Date! +} + type Address { city: String countryCode: String @@ -56,7 +83,7 @@ scalar Any type AuthData { accessToken: String! refreshToken: String! - user: UserToReturn! + user: User! } type CheckIn { @@ -110,6 +137,13 @@ type ConnectionPageInfo { scalar CountryCode +input CreateActionItemInput { + assigneeId: ID! + dueDate: Date + eventId: ID + preCompletionNotes: String +} + input CreateUserTagInput { name: String! organizationId: ID! @@ -210,6 +244,7 @@ interface Error { type Event { _id: ID! + actionItems: [ActionItem] admins(adminId: ID): [User!] allDay: Boolean! attendees: [User] @@ -493,6 +528,8 @@ type Mutation { blockUser(organizationId: ID!, userId: ID!): User! cancelMembershipRequest(membershipRequestId: ID!): MembershipRequest! checkIn(data: CheckInInput!): CheckIn! + createActionItem(actionItemCategoryId: ID!, data: CreateActionItemInput!): ActionItem! + createActionItemCategory(name: String!, organizationId: ID!): ActionItemCategory! createAdmin(data: UserAndOrganizationInput!): User! createAdvertisement(endDate: Date!, link: String!, name: String!, orgId: ID!, startDate: Date!, type: String!): Advertisement! createComment(data: CommentInput!, postId: ID!): Comment @@ -522,6 +559,7 @@ type Mutation { registerForEvent(id: ID!): Event! rejectAdmin(id: ID!): Boolean! rejectMembershipRequest(membershipRequestId: ID!): MembershipRequest! + removeActionItem(id: ID!): ActionItem! removeAdmin(data: UserAndOrganizationInput!): User! removeAdvertisement(id: ID!): Advertisement removeComment(id: ID!): Comment @@ -551,6 +589,8 @@ type Mutation { unlikeComment(id: ID!): Comment unlikePost(id: ID!): Post unregisterForEventByUser(id: ID!): Event! + updateActionItem(data: UpdateActionItemInput!, id: ID!): ActionItem + updateActionItemCategory(data: UpdateActionItemCategoryInput!, id: ID!): ActionItemCategory updateAdvertisement(input: UpdateAdvertisementInput!): UpdateAdvertisementPayload updateEvent(data: UpdateEventInput, id: ID!): Event! updateLanguage(languageCode: String!): User! @@ -570,6 +610,7 @@ input OTPInput { type Organization { _id: ID! + actionItemCategories: [ActionItemCategory] address: Address admins(adminId: ID): [User!] apiUrl: URL! @@ -801,6 +842,11 @@ input PostWhereInput { } type Query { + actionItem(id: ID!): ActionItem + actionItemCategoriesByOrganization(organizationId: ID!): [ActionItemCategory] + actionItemCategory(id: ID!): ActionItemCategory + actionItemsByEvent(eventId: ID!): [ActionItem] + actionItemsByOrganization(organizationId: ID!): [ActionItem] adminPlugin(orgId: ID!): [Plugin] checkAuth: User! customDataByOrganization(organizationId: ID!): [UserCustomData!]! @@ -890,6 +936,20 @@ type UnauthorizedError implements Error { message: String! } +input UpdateActionItemCategoryInput { + isDisabled: Boolean + name: String +} + +input UpdateActionItemInput { + assigneeId: ID + completionDate: Date + dueDate: Date + isCompleted: Boolean + postCompletionNotes: String + preCompletionNotes: String +} + input UpdateAdvertisementInput { _id: ID! endDate: Date diff --git a/scripts/cloud-api-demo/README.md b/scripts/cloud-api-demo/README.md index 7105f38553..6345eafde2 100644 --- a/scripts/cloud-api-demo/README.md +++ b/scripts/cloud-api-demo/README.md @@ -22,13 +22,13 @@ This guide provides step-by-step instructions for setting up a cloud instance of - [9. GitHub Action Setup](#9-github-action-setup) - [10. Cron Jobs](#10-cron-jobs) - [10.1 Setting up Scripts](#101-setting-up-scripts) - - [10.1.1 Setting Permissions and Owner for check_permissions.sh](#1011-setting-permissions-and-owner-for-check_permissionssh) + - [10.1.1 Setting Permissions and Owner for correct_permissions.py](#1011-setting-permissions-and-owner-for-check_permissionssh) - [10.1.2 Modify sudoers file to allow talawa-api to run chmod and chown without password prompt](#1012-modify-sudoers-file-to-allow-talawa-api-to-run-chmod-and-chown-without-password-prompt) - - [10.1.3 Run check_permissions.sh once to correct permissions for other scripts](#1013-run-check_permissionssh-once-to-correct-permissions-for-other-scripts) + - [10.1.3 Run correct_permissions.py once to correct permissions for other scripts](#1013-run-check_permissionssh-once-to-correct-permissions-for-other-scripts) - [10.2 Setting up Cronjobs](#102-setting-up-cronjobs) - - [10.2.1 Cron job to run check_permissions.sh](#1021-cron-job-to-run-check_permissionssh) - - [10.2.2 Cron job to run cert_renew.sh](#1022-cron-job-to-run-cert_renewsh) - - [10.2.3 Cron job to run reset_mongo.sh](#1023-cron-job-to-run-reset_mongosh) + - [10.2.1 Cron job to run correct_permissions.py](#1021-cron-job-to-run-check_permissionssh) + - [10.2.2 Cron job to run renew_certificates.py](#1022-cron-job-to-run-cert_renewsh) + - [10.2.3 Cron job to run eset_database.py](#1023-cron-job-to-run-reset_mongosh) - [10.3 Logging for cron jobs](#103-logging-for-cron-jobs) @@ -57,45 +57,64 @@ source ~/.bashrc nvm install --lts ``` -After that, install Docker: +## 2. Repository Setup + +Create a new directory and clone the Talawa API repository: + ```bash -sudo apt-get install docker.io -y +mkdir develop +cd develop +git clone https://github.com/PalisadoesFoundation/talawa-api.git . +npm install ``` -Finally, install Docker Compose: + +## 3. Docker Configuration + +After that, to setup docker first remove all the conflicting packages: ```bash -sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -sudo chmod +x /usr/local/bin/docker-compose +for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done ``` +Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository. -## 2. Repository Setup +### 3.1 Set up docker's repository: -Create a new directory and clone the Talawa API repository: +#### 3.1.1 Add Docker's official GPG key: ```bash -mkdir develop -cd developus -git clone https://github.com/PalisadoesFoundation/talawa-api.git -cd talawa-api -npm install -npm run setup +sudo apt-get update +sudo apt-get install ca-certificates curl +sudo install -m 0755 -d /etc/apt/keyrings +sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +sudo chmod a+r /etc/apt/keyrings/docker.asc ``` -**Important Note:** After running `npm run setup`, you need to edit the `.env` file and change `TALAWA_ADMIN_URL=api-demo.talawa.io` (replace with your hostname) and `NODE_ENV = production`. +#### 3.1.2 Add the repository to apt sources: +```bash +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null -## 3. Docker Configuration +sudo apt-get update +``` +### 3.2 Install the Docker packages: + +```bash +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin +``` -To allow commands to run without sudo, execute the following: +### 3.3 Allow docker to run without sudo ```bash sudo groupadd docker sudo usermod -aG docker $USER -newgrp docker -rm -fr ~/.docker/ ``` +* **Note : Reboot the machine to apply the changes** + ## 4. Running the Containers Start the containers and import sample data: @@ -109,10 +128,10 @@ npm run import:sample-data Enable the firewall and allow SSH, HTTP, and HTTPS: ```bash -sudo ufw enable sudo ufw allow ssh sudo ufw allow http sudo ufw allow https +sudo ufw enable sudo ufw status ``` @@ -195,36 +214,36 @@ To enable continuous integration with GitHub Actions, you need to set up the nec 4. Click on the "New repository secret" button. - - For the first secret: - - - Name: `API_DEMO_HOST` - - Value: `api-demo.talawa.io` (Replace with your hostname) - - For the second secret: - - Name: `API_DEMO_USERNAME` - - Value: `talawa-api` - - For the third secret: - - Name: `API_DEMO_SSH_KEY` - - Value: (Paste the **private** SSH key you copied in previous step ) - - For the fourth secret: - - Name: `API_DEMO_PORT` - - Value: `22` +The application requires the following secrets to be set: + +- `API_DEMO_HOST`: Your hostname (e.g., `api-demo.talawa.io`) +- `API_DEMO_USERNAME`: Your API username (e.g., `talawa-api`) +- `API_DEMO_SSH_KEY`: Your **private** SSH key +- `API_DEMO_SSH_PORT`: Your port number (e.g., `22`) +- `API_DEMO_RECAPTCHA_SECRET_KEY`: Your reCAPTCHA secret key +- `API_DEMO_MAIL_USERNAME`: Your mail username +- `API_DEMO_MAIL_PASSWORD`: Your mail password (Not your main passowrd, App password you created) +- `API_DEMO_LAST_RESORT_SUPERADMIN_EMAIL`: Your last resort superadmin email + +Please replace the example values with your actual values. These secrets are crucial for the GitHub Actions workflow to connect securely to your VPS and deploy the Talawa API. ## 10. Cron Jobs ### 10.1 Setting up Scripts: -Copy the following scripts from **/home/talawa-api/develop/talawa-api/scripts/cloud-api-demo** to **/usr/local/bin**: -`cert_renew.sh` -`check_permissions.sh` -`deploy.sh` -`reset_mongo.sh` +Copy the following scripts from **/home/talawa-api/develop/talawa-api/scripts/cloud-api-demo** to **/usr/local/bin/scripts**: +`renew_certificates.py` +`correct_permissions.py` +`deploy.py` +`reset_database.py` +`create_env.py` -#### 10.1.1 Setting Permissions and Owner for check_permissions.sh: +#### 10.1.1 Setting Permissions and Owner for correct_permissions.py: ```bash -sudo chmod 700 /usr/local/bin/check_permissions.sh -sudo chown talawa-api /usr/local/bin/check_permissions.sh +sudo chmod 700 /usr/local/bin/scripts/correct_permissions.py +sudo chown talawa-api /usr/local/bin/scripts/correct_permissions.py ``` #### 10.1.2 Modify sudoers file to allow talawa-api to run chmod and chown without password prompt: @@ -235,28 +254,28 @@ talawa-api ALL=(ALL) NOPASSWD: /bin/chmod, /bin/chown ``` - Save and exit the editor -#### 10.1.3 Run check_permissions.sh once to correct permissions for other scripts: +#### 10.1.3 Run `correct_permissions.py` once to correct permissions for other scripts: ```bash -/usr/local/bin/check_permissions.sh +python3 correct_permissions.py --user talawa-api --files /usr/local/bin/scripts/deploy.py /usr/local/bin/scripts/reset_database.py /usr/local/bin/scripts/renew_certificates.py /usr/local/bin/scripts/create_env.py ``` -Executing check_permissions.sh once will ensure that the correct permissions are applied to the other scripts in the specified directory. +Executing `correct_permissions.py` once will ensure that the correct permissions are applied to the other scripts in the specified directory. ### 10.2 Setting up Cronjobs: -#### 10.2.1 Cron job to run check_permissions.sh -This cron job will execute check_permissions.sh every midnight, ensuring that the correct permissions are maintained for the scripts : +#### 10.2.1 Cron job to run correct_permissions.py +This cron job will execute correct_permissions.py every midnight, ensuring that the correct permissions are maintained for the scripts : ```bash -echo "0 0 * * * talawa-api /usr/local/bin/check_permissions.sh" | sudo tee /etc/cron.d/check_permissions +echo "0 0 * * * talawa-api python3 correct_permissions.py --user talawa-api --files /usr/local/bin/scripts/deploy.py /usr/local/bin/scripts/reset_database.py /usr/local/bin/scripts/renew_certificates.py /usr/local/bin/scripts/create_env.py" | sudo tee /etc/cron.d/check_permissions ``` -#### 10.2.2 Cron job to run cert_renew.sh -This cron job will execute `cert_renew.sh` every 90 days, ensuring that the certificates are renewed in a timely manner: +#### 10.2.2 Cron job to run renew_certificates.py +This cron job will execute `renew_certificates.py` every 90 days, ensuring that the certificates are renewed in a timely manner: ```bash -echo "0 0 */90 * * talawa-api /usr/local/bin/cert_renew.sh" | sudo tee /etc/cron.d/cert_renew +echo "0 0 * * * talawa-api python3 renew_certificates.py --config-dir ~/.certbot/config --logs-dir ~/.certbot/logs --work-dir ~/.certbot/work" | sudo tee /etc/cron.d/cert_renew ``` -#### 10.2.3 Cron job to run reset_mongo.sh -This cron job will execute `reset_mongo.sh` every 24 hours, ensuring that the MongoDB is reset on a daily basis: +#### 10.2.3 Cron job to run reset_database.py +This cron job will execute `reset_database.py` every 24 hours, ensuring that the MongoDB is reset on a daily basis: ```bash -echo "0 0 * * * talawa-api /usr/local/bin/reset_mongo.sh" | sudo tee /etc/cron.d/reset_mongo +echo "0 * * * * talawa-api python3 reset_database.py --mongo-container develop-mongodb-1 --mongo-db talawa-api --repo-dir /home/talawa-api/develop" | sudo tee /etc/cron.d/reset_mongo ``` #### 10.3 Logging for cron jobs @@ -264,6 +283,8 @@ echo "0 0 * * * talawa-api /usr/local/bin/reset_mongo.sh" | sudo tee /etc/cron.d ```bash sudo nano /etc/logrotate.d/talawa-api-cron +sudo mkdir -p /var/log/talawa-api/ +sudo chown talawa-api /var/log/talawa-api/ ``` 2. **Add the following content to the file:** ```log @@ -274,7 +295,7 @@ sudo nano /etc/logrotate.d/talawa-api-cron notifempty compress delaycompress - create 640 talawa-api talawa-api + create 640 talawa-api sharedscripts postrotate systemctl restart cron @@ -289,7 +310,7 @@ sudo nano /etc/logrotate.d/talawa-api-cron - `notifempty`: Does not rotate the log file if it is empty. - `compress`: Compresses rotated log files. - `delaycompress`: Delays compression until the next rotation cycle. -- `create 640 talawa-api talawa-api`: Creates new log files with the specified permissions and ownership. In this case, both the owner and group are set to talawa-api. +- `create 640 talawa-api`: Creates new log files with the specified permissions and ownership. In this case, the owner is set to talawa-api. - `sharedscripts`: Runs the `postrotate` script only once even if multiple log files are rotated. - `postrotate` ... endscript: Defines the actions to be taken after log rotation, in this case, restarting the cron service. diff --git a/scripts/cloud-api-demo/create_env.py b/scripts/cloud-api-demo/create_env.py new file mode 100644 index 0000000000..9c3c2e23cf --- /dev/null +++ b/scripts/cloud-api-demo/create_env.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +import argparse +import os + + +def main(): + """Main function to parse arguments and create .env file. + + Args: + None + + Raises: + IOError: If there is an issue writing to the .env file. + """ + # Define the command line arguments + parser = argparse.ArgumentParser(description="Create .env file") + parser.add_argument( + "--access_token_secret", required=True, help="Access token secret" + ) + parser.add_argument( + "--refresh_token_secret", required=True, help="Refresh token secret" + ) + parser.add_argument( + "--recaptcha_secret_key", required=True, help="Recaptcha secret key" + ) + parser.add_argument("--mail_username", required=True, help="Mail username") + parser.add_argument("--mail_password", required=True, help="Mail password") + parser.add_argument( + "--last_resort_superadmin_email", + required=True, + help="Last resort superadmin email", + ) + + # Parse the command line arguments + args = parser.parse_args() + + # Define the .env file contents + env_contents = f""" + NODE_ENV= + ACCESS_TOKEN_SECRET={args.access_token_secret} + REFRESH_TOKEN_SECRET={args.refresh_token_secret} + MONGO_DB_URL=mongodb://localhost:27017/talawa-api + RECAPTCHA_SECRET_KEY={args.recaptcha_secret_key} + MAIL_USERNAME={args.mail_username} + MAIL_PASSWORD={args.mail_password} + IS_SMTP= + SMTP_HOST= + SMTP_PASSWORD= + SMTP_USERNAME= + SMTP_PORT= + SMTP_SSL_TLS= + LAST_RESORT_SUPERADMIN_EMAIL={args.last_resort_superadmin_email} + COLORIZE_LOGS=false + LOG_LEVEL=info + REDIS_HOST=localhost + REDIS_PORT=6379 + REDIS_PASSWORD= + TALAWA_ADMIN_URL=api-demo.talawa.io + """ + + # Write the .env file + try: + home = os.path.expanduser("~") + with open(os.path.join(home, "develop", ".env"), "w") as f: + f.write(env_contents) + except IOError as e: + print(f"Error occurred: {e}") + raise SystemExit(1) + + +if __name__ == "__main__": + main() diff --git a/scripts/cloud-api-demo/deploy.py b/scripts/cloud-api-demo/deploy.py index 9efe6ee8ec..8469e8f276 100644 --- a/scripts/cloud-api-demo/deploy.py +++ b/scripts/cloud-api-demo/deploy.py @@ -48,10 +48,10 @@ def main(): execute_command(["git", "pull", "origin", args.branch]) # Stop and remove existing containers - execute_command(["docker-compose", "down"]) + execute_command(["docker","compose", "down"]) # Build and launch containers in the background - execute_command(["docker-compose", "up", "-d", "--build"]) + execute_command(["docker","compose", "up", "-d", "--build"]) # Remove all unused containers, networks, and images (both dangling and all unused) execute_command(["docker", "system", "prune", "-f"]) diff --git a/setup.ts b/setup.ts index 86c6781e5f..035fbbf349 100644 --- a/setup.ts +++ b/setup.ts @@ -1,3 +1,4 @@ +import { MAXIMUM_IMAGE_SIZE_LIMIT_KB } from "./src/constants"; import dotenv from "dotenv"; import fs from "fs"; import path from "path"; @@ -116,6 +117,24 @@ async function accessAndRefreshTokens( } } +//set the image size upload environment variable +/** + * The function `setImageUploadSize` sets the image upload size environment variable and changes the .env file + * @returns The function `checkExistingRedis` returns a void Promise. + */ +async function setImageUploadSize(size: number): Promise { + if (size > MAXIMUM_IMAGE_SIZE_LIMIT_KB) { + size = MAXIMUM_IMAGE_SIZE_LIMIT_KB; + } + const config = dotenv.parse(fs.readFileSync(".env")); + + config.IMAGE_SIZE_LIMIT_KB = size.toString(); + fs.writeFileSync(".env", ""); + for (const key in config) { + fs.appendFileSync(".env", `${key}=${config[key]}\n`); + } +} + function transactionLogPath(logPath: string | null): void { const config = dotenv.parse(fs.readFileSync(".env")); config.LOG = "true"; @@ -142,10 +161,6 @@ function transactionLogPath(logPath: string | null): void { } config.LOG_PATH = logPath; } - fs.writeFileSync(".env", ""); - for (const key in config) { - fs.appendFileSync(".env", `${key}=${config[key]}\n`); - } } async function askForTransactionLogPath(): Promise { @@ -595,6 +610,16 @@ function validateRecaptcha(string: string): boolean { return pattern.test(string); } +/** + * The function validates whether a given image size is less than 20 and greater than 0. + * @param string - The `number` parameter represents the input size of the string + * validated. In this case, it is expected to be a number less than 20 and greater than 0. + * @returns a boolean value. + */ +function validateImageFileSize(size: number): boolean { + return size > 0; +} + /** * The `abort` function logs a message and exits the process. */ @@ -721,54 +746,6 @@ async function importData(): Promise { } } -//Import sample data -/** - * The function `importDefaultOrganization` will import the default organization - * with wiping of existing data. - * @returns The function returns a Promise that resolves to `void`. - */ - -async function importDefaultOrganization(): Promise { - return new Promise(async (resolve, reject) => { - if (!process.env.MONGO_DB_URL) { - console.log("Couldn't find mongodb url"); - return; - } - const client = new mongodb.MongoClient(process.env.MONGO_DB_URL, { - useNewUrlParser: true, - useUnifiedTopology: true, - }); - try { - await client.connect(); - const db = client.db(); - const collections = await db.listCollections().toArray(); - if (collections.length > 0) { - resolve; - } else { - await exec( - "npm run import:sample-data-defaultOrg", - (error: ExecException | null, stdout: string, stderr: string) => { - if (error) { - console.error(`Error: ${error.message}`); - abort(); - } - if (stderr) { - console.error(`Error: ${stderr}`); - abort(); - } - console.log(`Output: ${stdout}`); - resolve; - } - ); - } - client.close(); - } catch (e: any) { - console.log(`Couldn't import the default Organization`); - reject; - } - }); -} - type VerifySmtpConnectionReturnType = { success: boolean; error: unknown; @@ -1133,13 +1110,30 @@ async function main(): Promise { default: false, }, ]); + if (shouldRunDataImport) { await importData(); - } else { - await importDefaultOrganization(); } } + const { imageSizeLimit } = await inquirer.prompt([ + { + type: "input", + name: "imageSizeLimit", + message: `Enter the maximum size limit of Images uploaded (in MB) max: ${ + MAXIMUM_IMAGE_SIZE_LIMIT_KB / 1000 + }`, + default: 3, + validate: (input: number) => + validateImageFileSize(input) || + `Enter a valid number between 0 and ${ + MAXIMUM_IMAGE_SIZE_LIMIT_KB / 1000 + }`, + }, + ]); + + await setImageUploadSize(imageSizeLimit * 1000); + console.log( "\nCongratulations! Talawa API has been successfully setup! 🥂🎉" ); diff --git a/src/constants.ts b/src/constants.ts index 1614b31b7e..e5945d7454 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -7,6 +7,27 @@ if (!issues) { ENV = envSchema.parse(process.env); } +export const ACTION_ITEM_NOT_FOUND_ERROR = { + DESC: "ActionItem not found", + CODE: "actionItem.notFound", + MESSAGE: "actionItem.notFound", + PARAM: "actionItem", +}; + +export const ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR = { + DESC: "ActionItemCategory not found", + CODE: "actionItemCategory.notFound", + MESSAGE: "actionItemCategory.notFound", + PARAM: "actionItemCategory", +}; + +export const ACTION_ITEM_CATEGORY_ALREADY_EXISTS = { + DESC: "Action Item Category already exists", + CODE: "actionItemCategory.alreadyExists", + MESSAGE: "actionItemCategory.alreadyExists", + PARAM: "actionItemCategory", +}; + export const CHAT_NOT_FOUND_ERROR = { DESC: "Chat not found", CODE: "chat.notFound", @@ -100,6 +121,12 @@ export const INVALID_FILE_TYPE = { PARAM: "internalServerError", }; +export const IMAGE_SIZE_LIMIT_KB = { + MESSAGE: "The Image Size Limit has been exceeded", + CODE: "internalServerError", + PARAM: "internalServerError", +}; + export const INVALID_ROLE_TYPE = { DESC: "Invalid Role Type", MESSAGE: "invalid.roleType", @@ -456,6 +483,8 @@ export const CUSTOM_FIELD_TYPE_MISSING = { export const MAXIMUM_FETCH_LIMIT = 100; +export const MAXIMUM_IMAGE_SIZE_LIMIT_KB = 20000; + export const BASE_URL = `http://localhost:${process.env.port || 4000}/`; export const ACCESS_TOKEN_SECRET = ENV.ACCESS_TOKEN_SECRET; @@ -486,6 +515,8 @@ export const REDIS_HOST = process.env.REDIS_HOST || ""; export const REDIS_PORT = Number(process.env.REDIS_PORT); export const REDIS_PASSWORD = process.env.REDIS_PASSWORD; +export const MILLISECONDS_IN_A_WEEK = 7 * 24 * 60 * 60 * 1000; + export const key = ENV.ENCRYPTION_KEY as string; export const iv = crypto.randomBytes(16).toString("hex"); diff --git a/src/libraries/errors/ImageSizeLimitExceeded.ts b/src/libraries/errors/ImageSizeLimitExceeded.ts new file mode 100644 index 0000000000..7daf08b902 --- /dev/null +++ b/src/libraries/errors/ImageSizeLimitExceeded.ts @@ -0,0 +1,22 @@ +import { ApplicationError } from "./applicationError"; +/** + * This class detects invalid file type errors and sends those errors to the superclass ApplicationError. + */ +export class ImageSizeLimitExceeded extends ApplicationError { + constructor( + message = "Image Size Limit Exceeded", + code: string | null = null, + param: string | null = null, + metadata: Record = {} + ) { + const errorJson = [ + { + message, + code, + param, + metadata, + }, + ]; + super(errorJson, 403, message); + } +} diff --git a/src/libraries/errors/index.ts b/src/libraries/errors/index.ts index 3a4e92890a..a4769015a2 100644 --- a/src/libraries/errors/index.ts +++ b/src/libraries/errors/index.ts @@ -16,3 +16,5 @@ export * from "./validationError"; export * from "./inputValidationError"; // Used for File extension check export * from "./invalidFileTypeError"; +// Used for Image Upload size limit +export * from "./ImageSizeLimitExceeded"; diff --git a/src/libraries/logger.ts b/src/libraries/logger.ts index 53e8c5fee3..0bdc28f247 100644 --- a/src/libraries/logger.ts +++ b/src/libraries/logger.ts @@ -16,9 +16,12 @@ const formats = { `${info.level || "-"} ${info.timestamp || "-"} ${ getTracingId() || "-" } ${info.message} ${ - JSON.stringify( - _.omit(info, ["level", "message", "stack", "timestamp"]) - ) || "-" + Object.keys(_.omit(info, ["level", "message", "stack", "timestamp"])) + .length === 0 + ? "" + : JSON.stringify( + _.omit(info, ["level", "message", "stack", "timestamp"]) + ) } ${info.stack || ""}` ) ), @@ -31,9 +34,12 @@ const formats = { `${info.level || "-"} ${info.timestamp || "-"} ${ getTracingId() || "-" } ${info.message} ${ - JSON.stringify( - _.omit(info, ["level", "message", "stack", "timestamp"]) - ) || "-" + Object.keys(_.omit(info, ["level", "message", "stack", "timestamp"])) + .length === 0 + ? "" + : JSON.stringify( + _.omit(info, ["level", "message", "stack", "timestamp"]) + ) } ${info.stack || ""}` ) ), diff --git a/src/models/ActionItem.ts b/src/models/ActionItem.ts new file mode 100644 index 0000000000..d8832d579c --- /dev/null +++ b/src/models/ActionItem.ts @@ -0,0 +1,107 @@ +import type { PopulatedDoc, Types, Document, Model } from "mongoose"; +import { Schema, model, models } from "mongoose"; +import type { InterfaceUser } from "./User"; +import type { InterfaceEvent } from "./Event"; +import type { InterfaceActionItemCategory } from "./ActionItemCategory"; +import { MILLISECONDS_IN_A_WEEK } from "../constants"; + +/** + * This is an interface that represents a database(MongoDB) document for ActionItem. + */ + +export interface InterfaceActionItem { + _id: Types.ObjectId; + assigneeId: PopulatedDoc; + assignerId: PopulatedDoc; + actionItemCategoryId: PopulatedDoc; + preCompletionNotes: string; + postCompletionNotes: string; + assignmentDate: Date; + dueDate: Date; + completionDate: Date; + isCompleted: boolean; + eventId: PopulatedDoc; + creatorId: PopulatedDoc; + createdAt: Date; + updatedAt: Date; +} + +/** + * This describes the schema for a `ActionItem` that corresponds to `InterfaceActionItem` document. + * @param assigneeId - User to whom the ActionItem is assigned, refer to `User` model. + * @param assignerId - User who assigned the ActionItem, refer to the `User` model. + * @param actionItemCategoryId - ActionItemCategory to which the ActionItem is related, refer to the `ActionItemCategory` model. + * @param preCompletionNotes - Notes prior to completion. + * @param postCompletionNotes - Notes on completion. + * @param assignmentDate - Date of assignment. + * @param dueDate - Due date. + * @param completionDate - Completion date. + * @param isCompleted - Whether the ActionItem has been completed. + * @param eventId - Event to which the ActionItem is related, refer to the `Event` model. + * @param creatorId - User who created the ActionItem, refer to the `User` model. + * @param createdAt - Timestamp when the ActionItem was created. + * @param updatedAt - Timestamp when the ActionItem was last updated. + */ + +const actionItemSchema = new Schema( + { + assigneeId: { + type: Schema.Types.ObjectId, + ref: "User", + required: true, + }, + assignerId: { + type: Schema.Types.ObjectId, + ref: "User", + required: true, + }, + actionItemCategoryId: { + type: Schema.Types.ObjectId, + ref: "ActionItemCategory", + required: true, + }, + preCompletionNotes: { + type: String, + }, + postCompletionNotes: { + type: String, + }, + assignmentDate: { + type: Date, + required: true, + default: Date.now(), + }, + dueDate: { + type: Date, + required: true, + default: Date.now() + MILLISECONDS_IN_A_WEEK, + }, + completionDate: { + type: Date, + required: true, + default: Date.now() + MILLISECONDS_IN_A_WEEK, + }, + isCompleted: { + type: Boolean, + required: true, + default: false, + }, + eventId: { + type: Schema.Types.ObjectId, + ref: "Event", + }, + creatorId: { + type: Schema.Types.ObjectId, + ref: "User", + required: true, + }, + }, + { timestamps: true } +); + +const actionItemModel = (): Model => + model("ActionItem", actionItemSchema); + +// This syntax is needed to prevent Mongoose OverwriteModelError while running tests. +export const ActionItem = (models.ActionItem || + actionItemModel()) as ReturnType; diff --git a/src/models/ActionItemCategory.ts b/src/models/ActionItemCategory.ts new file mode 100644 index 0000000000..4110dfa88c --- /dev/null +++ b/src/models/ActionItemCategory.ts @@ -0,0 +1,68 @@ +import type { PopulatedDoc, Types, Document, Model } from "mongoose"; +import { Schema, model, models } from "mongoose"; +import type { InterfaceUser } from "./User"; +import type { InterfaceOrganization } from "./Organization"; + +/** + * This is an interface that represents a database(MongoDB) document for ActionItemCategory. + */ + +export interface InterfaceActionItemCategory { + _id: Types.ObjectId; + name: string; + organizationId: PopulatedDoc; + isDisabled: boolean; + creatorId: PopulatedDoc; + createdAt: Date; + updatedAt: Date; +} + +/** + * This describes the schema for a `actionItemCategory` that corresponds to `InterfaceCategory` document. + * @param name - An actionItemCategory to be selected for ActionItems. + * @param organizationId - Organization the actionItemCategory belongs to, refer to the `Organization` model. + * @param isDisabled - Whether actionItemCategory is disabled or not. + * @param creatorId - Task creator, refer to `User` model. + * @param createdAt - Time stamp of data creation. + * @param updatedAt - Time stamp of data updation. + */ + +const actionItemCategorySchema = new Schema( + { + name: { + type: String, + required: true, + }, + organizationId: { + type: Schema.Types.ObjectId, + ref: "Organization", + required: true, + }, + isDisabled: { + type: Boolean, + required: true, + default: false, + }, + creatorId: { + type: Schema.Types.ObjectId, + ref: "User", + required: true, + }, + }, + { timestamps: true } +); + +actionItemCategorySchema.index( + { organizationId: 1, name: 1 }, + { unique: true } +); + +const actionItemCategoryModel = (): Model => + model( + "ActionItemCategory", + actionItemCategorySchema + ); + +// This syntax is needed to prevent Mongoose OverwriteModelError while running tests. +export const ActionItemCategory = (models.ActionItemCategory || + actionItemCategoryModel()) as ReturnType; diff --git a/src/models/User.ts b/src/models/User.ts index a750e567f6..8f8eb098be 100644 --- a/src/models/User.ts +++ b/src/models/User.ts @@ -283,70 +283,12 @@ const userSchema = new Schema( userSchema.plugin(mongoosePaginate); -/** - * This is an interface of the user that will be returned to the client side. - * The differrence between this interface and the real User Interface is that it doesn't contains password field - * Although this is a poor way, a better way will include implementing this Model with inclusion of password field and then using that model everywhere. - */ -export interface InterfaceUserToReturn { - _id: Types.ObjectId; - address: { - city: string; - countryCode: string; - dependentLocality: string; - line1: string; - line2: string; - postalCode: string; - sortingCode: string; - state: string; - }; - adminApproved: boolean; - adminFor: PopulatedDoc[]; - appLanguageCode: string; - birthDate: Date; - createdAt: Date; - createdEvents: PopulatedDoc[]; - createdOrganizations: PopulatedDoc[]; - educationGrade: string; - email: string; - employmentStatus: string; - eventAdmin: PopulatedDoc[]; - firstName: string; - gender: string; - image: string | undefined | null; - joinedOrganizations: PopulatedDoc[]; - lastName: string; - maritalStatus: string; - membershipRequests: PopulatedDoc[]; - organizationsBlockedBy: PopulatedDoc[]; - phone: { - home: string; - mobile: string; - work: string; - }; - pluginCreationAllowed: boolean; - registeredEvents: PopulatedDoc[]; - status: string; - token: string | undefined; - tokenVersion: number; - updatedAt: Date; - userType: string; -} - const userModel = (): PaginateModel => model>("User", userSchema); -const userToReturnModel = (): PaginateModel => - model>( - "UserToReturn", - userSchema - ); - createLoggingMiddleware(userSchema, "User"); // This syntax is needed to prevent Mongoose OverwriteModelError while running tests. export const User = (models.User || userModel()) as ReturnType< typeof userModel >; -export const UserToReturn = (models.UserToReturn || - userToReturnModel()) as ReturnType; diff --git a/src/models/index.ts b/src/models/index.ts index f819999268..cd287b1ec9 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,4 +1,6 @@ +export * from "./ActionItem"; export * from "./Advertisement"; +export * from "./ActionItemCategory"; export * from "./CheckIn"; export * from "./MessageChat"; export * from "./Comment"; diff --git a/src/resolvers/ActionItem/actionItemCategory.ts b/src/resolvers/ActionItem/actionItemCategory.ts new file mode 100644 index 0000000000..146d836017 --- /dev/null +++ b/src/resolvers/ActionItem/actionItemCategory.ts @@ -0,0 +1,9 @@ +import type { ActionItemResolvers } from "../../types/generatedGraphQLTypes"; +import { ActionItemCategory } from "../../models"; + +export const actionItemCategory: ActionItemResolvers["actionItemCategory"] = + async (parent) => { + return ActionItemCategory.findOne({ + _id: parent.actionItemCategoryId, + }).lean(); + }; diff --git a/src/resolvers/ActionItem/assignee.ts b/src/resolvers/ActionItem/assignee.ts new file mode 100644 index 0000000000..c3f3d13090 --- /dev/null +++ b/src/resolvers/ActionItem/assignee.ts @@ -0,0 +1,8 @@ +import type { ActionItemResolvers } from "../../types/generatedGraphQLTypes"; +import { User } from "../../models"; + +export const assignee: ActionItemResolvers["assignee"] = async (parent) => { + return User.findOne({ + _id: parent.assigneeId, + }).lean(); +}; diff --git a/src/resolvers/ActionItem/assigner.ts b/src/resolvers/ActionItem/assigner.ts new file mode 100644 index 0000000000..1668d3b4a3 --- /dev/null +++ b/src/resolvers/ActionItem/assigner.ts @@ -0,0 +1,8 @@ +import type { ActionItemResolvers } from "../../types/generatedGraphQLTypes"; +import { User } from "../../models"; + +export const assigner: ActionItemResolvers["assigner"] = async (parent) => { + return User.findOne({ + _id: parent.assignerId, + }).lean(); +}; diff --git a/src/resolvers/ActionItem/creator.ts b/src/resolvers/ActionItem/creator.ts new file mode 100644 index 0000000000..70dbf78957 --- /dev/null +++ b/src/resolvers/ActionItem/creator.ts @@ -0,0 +1,8 @@ +import type { ActionItemResolvers } from "../../types/generatedGraphQLTypes"; +import { User } from "../../models"; + +export const creator: ActionItemResolvers["creator"] = async (parent) => { + return User.findOne({ + _id: parent.creatorId, + }).lean(); +}; diff --git a/src/resolvers/ActionItem/event.ts b/src/resolvers/ActionItem/event.ts new file mode 100644 index 0000000000..e79144e5a9 --- /dev/null +++ b/src/resolvers/ActionItem/event.ts @@ -0,0 +1,8 @@ +import type { ActionItemResolvers } from "../../types/generatedGraphQLTypes"; +import { Event } from "../../models"; + +export const event: ActionItemResolvers["event"] = async (parent) => { + return Event.findOne({ + _id: parent.eventId, + }).lean(); +}; diff --git a/src/resolvers/ActionItem/index.ts b/src/resolvers/ActionItem/index.ts new file mode 100644 index 0000000000..dc5979e0d9 --- /dev/null +++ b/src/resolvers/ActionItem/index.ts @@ -0,0 +1,14 @@ +import type { ActionItemResolvers } from "../../types/generatedGraphQLTypes"; +import { assignee } from "./assignee"; +import { assigner } from "./assigner"; +import { actionItemCategory } from "./actionItemCategory"; +import { event } from "./event"; +import { creator } from "./creator"; + +export const ActionItem: ActionItemResolvers = { + assignee, + assigner, + actionItemCategory, + event, + creator, +}; diff --git a/src/resolvers/ActionItemCategory/creator.ts b/src/resolvers/ActionItemCategory/creator.ts new file mode 100644 index 0000000000..b9d355ed0a --- /dev/null +++ b/src/resolvers/ActionItemCategory/creator.ts @@ -0,0 +1,10 @@ +import type { ActionItemCategoryResolvers } from "../../types/generatedGraphQLTypes"; +import { User } from "../../models"; + +export const creator: ActionItemCategoryResolvers["creator"] = async ( + parent +) => { + return User.findOne({ + _id: parent.creatorId, + }).lean(); +}; diff --git a/src/resolvers/ActionItemCategory/index.ts b/src/resolvers/ActionItemCategory/index.ts new file mode 100644 index 0000000000..94bdba820f --- /dev/null +++ b/src/resolvers/ActionItemCategory/index.ts @@ -0,0 +1,8 @@ +import type { ActionItemCategoryResolvers } from "../../types/generatedGraphQLTypes"; +import { organization } from "./organization"; +import { creator } from "./creator"; + +export const ActionItemCategory: ActionItemCategoryResolvers = { + organization, + creator, +}; diff --git a/src/resolvers/ActionItemCategory/organization.ts b/src/resolvers/ActionItemCategory/organization.ts new file mode 100644 index 0000000000..98fcb42897 --- /dev/null +++ b/src/resolvers/ActionItemCategory/organization.ts @@ -0,0 +1,10 @@ +import type { ActionItemCategoryResolvers } from "../../types/generatedGraphQLTypes"; +import { Organization } from "../../models"; + +export const organization: ActionItemCategoryResolvers["organization"] = async ( + parent +) => { + return Organization.findOne({ + _id: parent.organizationId, + }).lean(); +}; diff --git a/src/resolvers/Event/actionItems.ts b/src/resolvers/Event/actionItems.ts new file mode 100644 index 0000000000..0fcc7b29fb --- /dev/null +++ b/src/resolvers/Event/actionItems.ts @@ -0,0 +1,12 @@ +import { ActionItem } from "../../models"; +import type { EventResolvers } from "../../types/generatedGraphQLTypes"; +/** + * This resolver function will fetch and return the action items related to the event from database. + * @param parent - An object that is the return value of the resolver for this field's parent. + * @returns An object that contains the list of all action items related to the event. + */ +export const actionItems: EventResolvers["actionItems"] = async (parent) => { + return await ActionItem.find({ + eventId: parent._id, + }).lean(); +}; diff --git a/src/resolvers/Event/index.ts b/src/resolvers/Event/index.ts index 1317580a5b..b3d1c1ee17 100644 --- a/src/resolvers/Event/index.ts +++ b/src/resolvers/Event/index.ts @@ -4,9 +4,11 @@ import { attendeesCheckInStatus } from "./attendeesCheckInStatus"; import { averageFeedbackScore } from "./averageFeedbackScore"; import { feedback } from "./feedback"; import { organization } from "./organization"; +import { actionItems } from "./actionItems"; import { creator } from "./creator"; export const Event: EventResolvers = { + actionItems, attendees, attendeesCheckInStatus, averageFeedbackScore, diff --git a/src/resolvers/Mutation/acceptMembershipRequest.ts b/src/resolvers/Mutation/acceptMembershipRequest.ts index 3e39f15932..18d650cd14 100644 --- a/src/resolvers/Mutation/acceptMembershipRequest.ts +++ b/src/resolvers/Mutation/acceptMembershipRequest.ts @@ -21,7 +21,6 @@ import { cacheOrganizations } from "../../services/OrganizationCache/cacheOrgani * 3. Whether the user exists * 4. whether currentUser with _id === context.userId is an admin of organization. * 5. Whether user is already a member of organization. - * 6. Whether the user is a new user or not */ export const acceptMembershipRequest: MutationResolvers["acceptMembershipRequest"] = async (_parent, args, context) => { @@ -103,39 +102,22 @@ export const acceptMembershipRequest: MutationResolvers["acceptMembershipRequest if (updatedOrganization !== null) { await cacheOrganizations([updatedOrganization]); - // If adminAprooved is false, it means it is the very first request or a very fresh member has made the request! Hence we need to update this variable also - if (user.adminApproved == false) { - await User.updateOne( - { - _id: user._id, - }, - { - $set: { - adminApproved: true, - }, - $push: { - joinedOrganizations: organization._id, - }, - $pull: { - membershipRequests: membershipRequest._id, - }, - } - ); - } else { - await User.updateOne( - { - _id: user._id, - }, - { - $push: { - joinedOrganizations: organization._id, - }, - $pull: { - membershipRequests: membershipRequest._id, - }, - } - ); - } } + + // Update the user + await User.updateOne( + { + _id: user._id, + }, + { + $push: { + joinedOrganizations: organization._id, + }, + $pull: { + membershipRequests: membershipRequest._id, + }, + } + ); + return membershipRequest; }; diff --git a/src/resolvers/Mutation/createActionItem.ts b/src/resolvers/Mutation/createActionItem.ts new file mode 100644 index 0000000000..c2ec83ff93 --- /dev/null +++ b/src/resolvers/Mutation/createActionItem.ts @@ -0,0 +1,160 @@ +import type { MutationResolvers } from "../../types/generatedGraphQLTypes"; +import type { InterfaceActionItem, InterfaceEvent } from "../../models"; +import { User, Event, ActionItemCategory, ActionItem } from "../../models"; +import { errors, requestContext } from "../../libraries"; +import { + USER_NOT_FOUND_ERROR, + USER_NOT_AUTHORIZED_ERROR, + EVENT_NOT_FOUND_ERROR, + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR, + USER_NOT_MEMBER_FOR_ORGANIZATION, +} from "../../constants"; +import { findEventsInCache } from "../../services/EventCache/findEventInCache"; +import { cacheEvents } from "../../services/EventCache/cacheEvents"; +import { Types } from "mongoose"; + +/** + * This function enables to create an action item. + * @param _parent - parent of current request + * @param args - payload provided with the request + * @param context - context of entire application + * @remarks The following checks are done: + * 1. If the user exists + * 3. If the asignee exists + * 4. If the actionItemCategory exists + * 5. If the asignee is a member of the organization + * 6. If the user is a member of the organization + * 7. If the event exists (if action item related to an event) + * 8. If the user is authorized. + * @returns Created action item + */ + +export const createActionItem: MutationResolvers["createActionItem"] = async ( + _parent, + args, + context +): Promise => { + const currentUser = await User.findOne({ + _id: context.userId, + }); + + // Checks whether currentUser with _id === context.userId exists. + if (currentUser === null) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_FOUND_ERROR.MESSAGE), + USER_NOT_FOUND_ERROR.CODE, + USER_NOT_FOUND_ERROR.PARAM + ); + } + + const assignee = await User.findOne({ + _id: args.data.assigneeId, + }); + + // Checks whether the asignee exists. + if (assignee === null) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_FOUND_ERROR.MESSAGE), + USER_NOT_FOUND_ERROR.CODE, + USER_NOT_FOUND_ERROR.PARAM + ); + } + + const actionItemCategory = await ActionItemCategory.findOne({ + _id: args.actionItemCategoryId, + }).lean(); + + // Checks if the actionItemCategory exists + if (!actionItemCategory) { + throw new errors.NotFoundError( + requestContext.translate(ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.MESSAGE), + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.CODE, + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.PARAM + ); + } + + let asigneeIsOrganizationMember = false; + asigneeIsOrganizationMember = assignee.joinedOrganizations.some( + (organizationId) => + organizationId === actionItemCategory.organizationId || + Types.ObjectId(organizationId).equals(actionItemCategory.organizationId) + ); + + // Checks if the asignee is a member of the organization + if (!asigneeIsOrganizationMember) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_MEMBER_FOR_ORGANIZATION.MESSAGE), + USER_NOT_MEMBER_FOR_ORGANIZATION.CODE, + USER_NOT_MEMBER_FOR_ORGANIZATION.PARAM + ); + } + + let currentUserIsEventAdmin = false; + + if (args.data.eventId) { + let currEvent: InterfaceEvent | null; + + const eventFoundInCache = await findEventsInCache([args.data.eventId]); + + currEvent = eventFoundInCache[0]; + + if (eventFoundInCache[0] === null) { + currEvent = await Event.findOne({ + _id: args.data.eventId, + }).lean(); + + if (currEvent !== null) { + await cacheEvents([currEvent]); + } + } + + // Checks whether currEvent exists. + if (!currEvent) { + throw new errors.NotFoundError( + requestContext.translate(EVENT_NOT_FOUND_ERROR.MESSAGE), + EVENT_NOT_FOUND_ERROR.CODE, + EVENT_NOT_FOUND_ERROR.PARAM + ); + } + + // Checks if the currUser is an admin of the event + currentUserIsEventAdmin = currEvent.admins.some( + (admin) => + admin === context.userID || Types.ObjectId(admin).equals(context.userId) + ); + } + + // Checks if the currUser is an admin of the organization + const currentUserIsOrgAdmin = currentUser.adminFor.some( + (ogranizationId) => + ogranizationId === actionItemCategory.organizationId || + Types.ObjectId(ogranizationId).equals(actionItemCategory.organizationId) + ); + + // Checks whether currentUser with _id === context.userId is authorized for the operation. + if ( + currentUserIsEventAdmin === false && + currentUserIsOrgAdmin === false && + currentUser.userType !== "SUPERADMIN" + ) { + throw new errors.UnauthorizedError( + requestContext.translate(USER_NOT_AUTHORIZED_ERROR.MESSAGE), + USER_NOT_AUTHORIZED_ERROR.CODE, + USER_NOT_AUTHORIZED_ERROR.PARAM + ); + } + + // Creates new action item. + const createActionItem = await ActionItem.create({ + assigneeId: args.data.assigneeId, + assignerId: context.userId, + actionItemCategoryId: args.actionItemCategoryId, + preCompletionNotes: args.data.preCompletionNotes, + dueDate: args.data.dueDate, + eventId: args.data.eventId, + creatorId: context.userId, + }); + + // Returns created action item. + return createActionItem.toObject(); +}; diff --git a/src/resolvers/Mutation/createActionItemCategory.ts b/src/resolvers/Mutation/createActionItemCategory.ts new file mode 100644 index 0000000000..2df722f91a --- /dev/null +++ b/src/resolvers/Mutation/createActionItemCategory.ts @@ -0,0 +1,93 @@ +import type { MutationResolvers } from "../../types/generatedGraphQLTypes"; +import { User, ActionItemCategory, Organization } from "../../models"; +import { errors, requestContext } from "../../libraries"; +import { + USER_NOT_FOUND_ERROR, + ORGANIZATION_NOT_FOUND_ERROR, + ACTION_ITEM_CATEGORY_ALREADY_EXISTS, +} from "../../constants"; + +import { adminCheck } from "../../utilities"; +import { findOrganizationsInCache } from "../../services/OrganizationCache/findOrganizationsInCache"; +import { cacheOrganizations } from "../../services/OrganizationCache/cacheOrganizations"; + +/** + * This function enables to create an ActionItemCategory. + * @param _parent - parent of current request + * @param args - payload provided with the request + * @param context - context of entire application + * @remarks The following checks are done: + * 1. If the User exists + * 2. If the Organization exists + * 3. Is the User is Authorized + * 4. If the action item category already exists + * @returns Created ActionItemCategory + */ + +export const createActionItemCategory: MutationResolvers["createActionItemCategory"] = + async (_parent, args, context) => { + const currentUser = await User.findOne({ + _id: context.userId, + }); + + // Checks whether currentUser with _id == context.userId exists. + if (currentUser === null) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_FOUND_ERROR.MESSAGE), + USER_NOT_FOUND_ERROR.CODE, + USER_NOT_FOUND_ERROR.PARAM + ); + } + + let organization; + + const organizationFoundInCache = await findOrganizationsInCache([ + args.organizationId, + ]); + + organization = organizationFoundInCache[0]; + + if (organizationFoundInCache[0] == null) { + organization = await Organization.findOne({ + _id: args.organizationId, + }).lean(); + + await cacheOrganizations([organization!]); + } + + // Checks whether the organization with _id === args.organizationId exists. + if (!organization) { + throw new errors.NotFoundError( + requestContext.translate(ORGANIZATION_NOT_FOUND_ERROR.MESSAGE), + ORGANIZATION_NOT_FOUND_ERROR.CODE, + ORGANIZATION_NOT_FOUND_ERROR.PARAM + ); + } + + // Checks whether the user is authorized to perform the operation + await adminCheck(context.userId, organization); + + // Checks whether an actionItemCategory with given name already exists for the current organization + const existingActionItemCategory = await ActionItemCategory.findOne({ + organizationId: organization?._id, + name: args.name, + }); + + if (existingActionItemCategory) { + throw new errors.ConflictError( + requestContext.translate(ACTION_ITEM_CATEGORY_ALREADY_EXISTS.MESSAGE), + ACTION_ITEM_CATEGORY_ALREADY_EXISTS.CODE, + ACTION_ITEM_CATEGORY_ALREADY_EXISTS.PARAM + ); + } + + // Creates new actionItemCategory. + const createdActionItemCategory = await ActionItemCategory.create({ + name: args.name, + organizationId: args.organizationId, + creatorId: context.userId, + }); + + // Returns created actionItemCategory. + return createdActionItemCategory.toObject(); + }; diff --git a/src/resolvers/Mutation/createOrganization.ts b/src/resolvers/Mutation/createOrganization.ts index f321982f14..46ab307946 100644 --- a/src/resolvers/Mutation/createOrganization.ts +++ b/src/resolvers/Mutation/createOrganization.ts @@ -3,7 +3,7 @@ import type { MutationResolvers, Address, } from "../../types/generatedGraphQLTypes"; -import { User, Organization } from "../../models"; +import { User, Organization, ActionItemCategory } from "../../models"; import { errors, requestContext } from "../../libraries"; import { LENGTH_VALIDATION_ERROR } from "../../constants"; import { superAdminCheck } from "../../utilities"; @@ -85,6 +85,13 @@ export const createOrganization: MutationResolvers["createOrganization"] = members: [context.userId], }); + // Creating a default actionItemCategory + await ActionItemCategory.create({ + name: "Default", + organizationId: createdOrganization._id, + creatorId: context.userId, + }); + await cacheOrganizations([createdOrganization.toObject()]); /* diff --git a/src/resolvers/Mutation/index.ts b/src/resolvers/Mutation/index.ts index 5d3333da9a..68e6c4c916 100644 --- a/src/resolvers/Mutation/index.ts +++ b/src/resolvers/Mutation/index.ts @@ -18,6 +18,7 @@ import { cancelMembershipRequest } from "./cancelMembershipRequest"; import { updateUserRoleInOrganization } from "./updateUserRoleInOrganization"; import { checkIn } from "./checkIn"; import { createMember } from "./createMember"; +import { createActionItem } from "./createActionItem"; import { createAdmin } from "./createAdmin"; import { createComment } from "./createComment"; import { createDirectChat } from "./createDirectChat"; @@ -30,6 +31,7 @@ import { createPlugin } from "./createPlugin"; import { createAdvertisement } from "./createAdvertisement"; import { createPost } from "./createPost"; import { createSampleOrganization } from "./createSampleOrganization"; +import { createActionItemCategory } from "./createActionItemCategory"; import { createUserTag } from "./createUserTag"; import { deleteDonationById } from "./deleteDonationById"; import { forgotPassword } from "./forgotPassword"; @@ -46,6 +48,7 @@ import { registerForEvent } from "./registerForEvent"; import { rejectAdmin } from "./rejectAdmin"; import { rejectMembershipRequest } from "./rejectMembershipRequest"; import { removeAdmin } from "./removeAdmin"; +import { removeActionItem } from "./removeActionItem"; import { removeComment } from "./removeComment"; import { removeDirectChat } from "./removeDirectChat"; import { removeEvent } from "./removeEvent"; @@ -74,6 +77,8 @@ import { unblockUser } from "./unblockUser"; import { unlikeComment } from "./unlikeComment"; import { unlikePost } from "./unlikePost"; import { unregisterForEventByUser } from "./unregisterForEventByUser"; +import { updateActionItem } from "./updateActionItem"; +import { updateActionItemCategory } from "./updateActionItemCategory"; import { updateEvent } from "./updateEvent"; import { updateLanguage } from "./updateLanguage"; import { updateOrganization } from "./updateOrganization"; @@ -107,6 +112,7 @@ export const Mutation: MutationResolvers = { checkIn, createMember, createAdmin, + createActionItem, createComment, createAdvertisement, createDirectChat, @@ -118,6 +124,7 @@ export const Mutation: MutationResolvers = { createPlugin, createPost, createSampleOrganization, + createActionItemCategory, createUserTag, deleteDonationById, deleteAdvertisementById, @@ -135,6 +142,7 @@ export const Mutation: MutationResolvers = { rejectAdmin, rejectMembershipRequest, removeAdmin, + removeActionItem, removeComment, removeDirectChat, removeEvent, @@ -163,6 +171,8 @@ export const Mutation: MutationResolvers = { unlikeComment, unlikePost, unregisterForEventByUser, + updateActionItem, + updateActionItemCategory, updateEvent, updateLanguage, updateOrganization, diff --git a/src/resolvers/Mutation/removeActionItem.ts b/src/resolvers/Mutation/removeActionItem.ts new file mode 100644 index 0000000000..ae1c023213 --- /dev/null +++ b/src/resolvers/Mutation/removeActionItem.ts @@ -0,0 +1,120 @@ +import { + ACTION_ITEM_NOT_FOUND_ERROR, + EVENT_NOT_FOUND_ERROR, + USER_NOT_AUTHORIZED_ERROR, + USER_NOT_FOUND_ERROR, +} from "../../constants"; +import type { MutationResolvers } from "../../types/generatedGraphQLTypes"; +import { errors, requestContext } from "../../libraries"; +import type { InterfaceEvent } from "../../models"; +import { User, ActionItem, Event } from "../../models"; +import { Types } from "mongoose"; +import { findEventsInCache } from "../../services/EventCache/findEventInCache"; +import { cacheEvents } from "../../services/EventCache/cacheEvents"; +/** + * This function enables to remove an action item. + * @param _parent - parent of current request + * @param args - payload provided with the request + * @param context - context of entire application + * @remarks The following checks are done: + * 1. If the user exists. + * 2. If the action item exists. + * 3. If the user is authorized. + * @returns deleted action item. + */ + +export const removeActionItem: MutationResolvers["removeActionItem"] = async ( + _parent, + args, + context +) => { + const currentUser = await User.findOne({ + _id: context.userId, + }); + + // Checks if the user exists + if (currentUser === null) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_FOUND_ERROR.MESSAGE), + USER_NOT_FOUND_ERROR.CODE, + USER_NOT_FOUND_ERROR.PARAM + ); + } + + const actionItem = await ActionItem.findOne({ + _id: args.id, + }) + .populate("actionItemCategoryId") + .lean(); + + // Checks if the actionItem exists + if (!actionItem) { + throw new errors.NotFoundError( + requestContext.translate(ACTION_ITEM_NOT_FOUND_ERROR.MESSAGE), + ACTION_ITEM_NOT_FOUND_ERROR.CODE, + ACTION_ITEM_NOT_FOUND_ERROR.PARAM + ); + } + + const currentUserIsOrgAdmin = currentUser.adminFor.some( + (ogranizationId) => + ogranizationId === actionItem.actionItemCategoryId.organizationId || + Types.ObjectId(ogranizationId).equals( + actionItem.actionItemCategoryId.organizationId + ) + ); + + let currentUserIsEventAdmin = false; + + if (actionItem.eventId) { + let currEvent: InterfaceEvent | null; + + const eventFoundInCache = await findEventsInCache([actionItem.eventId]); + + currEvent = eventFoundInCache[0]; + + if (eventFoundInCache[0] === null) { + currEvent = await Event.findOne({ + _id: actionItem.eventId, + }).lean(); + + if (currEvent !== null) { + await cacheEvents([currEvent]); + } + } + + // Checks whether currEvent exists. + if (!currEvent) { + throw new errors.NotFoundError( + requestContext.translate(EVENT_NOT_FOUND_ERROR.MESSAGE), + EVENT_NOT_FOUND_ERROR.CODE, + EVENT_NOT_FOUND_ERROR.PARAM + ); + } + + // Checks if the currUser is an admin of the event + currentUserIsEventAdmin = currEvent.admins.some( + (admin) => + admin === context.userID || Types.ObjectId(admin).equals(context.userId) + ); + } + + // Checks if the user is authorized for the operation. + if ( + currentUserIsEventAdmin === false && + currentUserIsOrgAdmin === false && + currentUser.userType !== "SUPERADMIN" + ) { + throw new errors.UnauthorizedError( + requestContext.translate(USER_NOT_AUTHORIZED_ERROR.MESSAGE), + USER_NOT_AUTHORIZED_ERROR.CODE, + USER_NOT_AUTHORIZED_ERROR.PARAM + ); + } + + await ActionItem.deleteOne({ + _id: args.id, + }); + + return actionItem; +}; diff --git a/src/resolvers/Mutation/removeEvent.ts b/src/resolvers/Mutation/removeEvent.ts index d61f630abe..63322f847c 100644 --- a/src/resolvers/Mutation/removeEvent.ts +++ b/src/resolvers/Mutation/removeEvent.ts @@ -1,7 +1,7 @@ import type { MutationResolvers } from "../../types/generatedGraphQLTypes"; import { errors, requestContext } from "../../libraries"; import type { InterfaceEvent } from "../../models"; -import { User, Event } from "../../models"; +import { User, Event, ActionItem } from "../../models"; import { USER_NOT_FOUND_ERROR, EVENT_NOT_FOUND_ERROR, @@ -127,5 +127,7 @@ export const removeEvent: MutationResolvers["removeEvent"] = async ( await cacheEvents([updatedEvent]); } + await ActionItem.deleteMany({ eventId: event?._id }); + return event; }; diff --git a/src/resolvers/Mutation/removeOrganization.ts b/src/resolvers/Mutation/removeOrganization.ts index 145638eba3..5396eaaef8 100644 --- a/src/resolvers/Mutation/removeOrganization.ts +++ b/src/resolvers/Mutation/removeOrganization.ts @@ -6,6 +6,8 @@ import { Post, Comment, MembershipRequest, + ActionItemCategory, + ActionItem, } from "../../models"; import { superAdminCheck } from "../../utilities"; import { @@ -125,6 +127,24 @@ export const removeOrganization: MutationResolvers["removeOrganization"] = { $pull: { organizationsBlockedBy: organization._id } } ); + // Get the ids of all ActionItemCategories associated with the organization + const actionItemCategories = await ActionItemCategory.find({ + organizationId: organization?._id, + }); + const actionItemCategoriesIds = actionItemCategories.map( + (category) => category._id + ); + + // Remove all ActionItemCategory documents whose id is in the actionItemCategories array + await ActionItemCategory.deleteMany({ + _id: { $in: actionItemCategoriesIds }, + }); + + // Remove all ActionItem documents whose actionItemCategory is in the actionItemCategories array + await ActionItem.deleteMany({ + actionItemCategoryId: { $in: actionItemCategoriesIds }, + }); + // Deletes the organzation. await Organization.deleteOne({ _id: organization._id, diff --git a/src/resolvers/Mutation/signUp.ts b/src/resolvers/Mutation/signUp.ts index abc932677c..1ef2131566 100644 --- a/src/resolvers/Mutation/signUp.ts +++ b/src/resolvers/Mutation/signUp.ts @@ -8,8 +8,7 @@ import { } from "../../constants"; import type { MutationResolvers } from "../../types/generatedGraphQLTypes"; import { errors, requestContext } from "../../libraries"; -import type { InterfaceUser } from "../../models"; -import { User, Organization, MembershipRequest } from "../../models"; +import { User, Organization } from "../../models"; import { createAccessToken, createRefreshToken, @@ -18,8 +17,6 @@ import { import { uploadEncodedImage } from "../../utilities/encodedImageStorage/uploadEncodedImage"; import { cacheOrganizations } from "../../services/OrganizationCache/cacheOrganizations"; import { findOrganizationsInCache } from "../../services/OrganizationCache/findOrganizationsInCache"; -import type { Document } from "mongoose"; -import { omit } from "lodash"; //import { isValidString } from "../../libraries/validators/validateString"; //import { validatePassword } from "../../libraries/validators/validatePassword"; /** @@ -41,21 +38,77 @@ export const signUp: MutationResolvers["signUp"] = async (_parent, args) => { ); } + // TODO: this check is to be removed let organization; + if (args.data.organizationUserBelongsToId) { + const organizationFoundInCache = await findOrganizationsInCache([ + args.data.organizationUserBelongsToId, + ]); - const organizationFoundInCache = await findOrganizationsInCache([ - args.data.selectedOrgainzation, - ]); + organization = organizationFoundInCache[0]; - organization = organizationFoundInCache[0]; - if (organizationFoundInCache[0] == null) { - organization = await Organization.findOne({ - _id: args.data.selectedOrgainzation, - }).lean(); + if (organizationFoundInCache[0] == null) { + organization = await Organization.findOne({ + _id: args.data.organizationUserBelongsToId, + }).lean(); + + await cacheOrganizations([organization!]); + } + + if (!organization) { + throw new errors.NotFoundError( + requestContext.translate(ORGANIZATION_NOT_FOUND_ERROR.MESSAGE), + ORGANIZATION_NOT_FOUND_ERROR.CODE, + ORGANIZATION_NOT_FOUND_ERROR.PARAM + ); + } } - const isLastResortSuperAdmin = - args.data.email === LAST_RESORT_SUPERADMIN_EMAIL; + // // Checks if the recieved arguments are valid according to standard input norms + // const validationResult_firstName = isValidString(args.data!.firstName, 50); + // const validationResult_lastName = isValidString(args.data!.lastName, 50); + // const validationResult_Password = validatePassword(args.data!.password!); + // if (!validationResult_firstName.isFollowingPattern) { + // throw new errors.InputValidationError( + // requestContext.translate( + // `${REGEX_VALIDATION_ERROR.message} in first name` + // ), + // REGEX_VALIDATION_ERROR.code + // ); + // } + // if (!validationResult_firstName.isLessThanMaxLength) { + // throw new errors.InputValidationError( + // requestContext.translate( + // `${LENGTH_VALIDATION_ERROR.message} 50 characters in first name` + // ), + // LENGTH_VALIDATION_ERROR.code + // ); + // } + // if (!validationResult_lastName.isFollowingPattern) { + // throw new errors.InputValidationError( + // requestContext.translate( + // `${REGEX_VALIDATION_ERROR.message} in last name` + // ), + // REGEX_VALIDATION_ERROR.code + // ); + // } + // if (!validationResult_lastName.isLessThanMaxLength) { + // throw new errors.InputValidationError( + // requestContext.translate( + // `${LENGTH_VALIDATION_ERROR.message} 50 characters in last name` + // ), + // LENGTH_VALIDATION_ERROR.code + // ); + // } + // if (!validationResult_Password) { + // throw new errors.InputValidationError( + // requestContext.translate( + // `The password must contain a mixture of uppercase, lowercase, numbers, and symbols and must be greater than 8, and less than 50 characters` + // ), + // `Invalid Password` + // ); + // } + const hashedPassword = await bcrypt.hash(args.data.password, 12); // Upload file @@ -63,106 +116,33 @@ export const signUp: MutationResolvers["signUp"] = async (_parent, args) => { if (args.file) { uploadImageFileName = await uploadEncodedImage(args.file, null); } - let createdUser: (InterfaceUser & Document) | null; - - if (organization !== null) { - await cacheOrganizations([organization]); - // If organization requested by user is a public organization, then no need of creating a membership request - - if (organization.userRegistrationRequired == false) { - createdUser = await User.create({ - ...args.data, - email: args.data.email.toLowerCase(), // ensure all emails are stored as lowercase to prevent duplicated due to comparison errors - image: uploadImageFileName ? uploadImageFileName : null, - password: hashedPassword, - userType: isLastResortSuperAdmin ? "SUPERADMIN" : "USER", - adminApproved: true, - joinedOrganizations: [args.data.selectedOrgainzation], - }); - // Update the organization - await Organization.findOneAndUpdate( - { - _id: organization._id, - }, - { - $push: { - members: createdUser._id, - }, - }, - { - new: true, - } - ); - } else { - createdUser = await User.create({ - ...args.data, - email: args.data.email.toLowerCase(), // ensure all emails are stored as lowercase to prevent duplicated due to comparison errors - image: uploadImageFileName ? uploadImageFileName : null, - password: hashedPassword, - userType: isLastResortSuperAdmin ? "SUPERADMIN" : "USER", - adminApproved: isLastResortSuperAdmin, - }); - - // A membership request will be made to the organization - const createdMembershipRequest = await MembershipRequest.create({ - user: createdUser._id, - organization: organization._id, - }); - - const updatedOrganization = await Organization.findOneAndUpdate( - { - _id: organization._id, - }, - { - $push: { - membershipRequests: createdMembershipRequest._id, - }, - }, - { - new: true, - } - ).lean(); - - if (updatedOrganization !== null) { - await cacheOrganizations([updatedOrganization]); - } - - createdUser = await User.findOneAndUpdate( - { - _id: createdUser._id, - }, - { - $push: { - membershipRequests: createdMembershipRequest._id, - }, - }, - { - new: true, - } - ); - } - } else { - throw new errors.NotFoundError( - requestContext.translate(ORGANIZATION_NOT_FOUND_ERROR.MESSAGE), - ORGANIZATION_NOT_FOUND_ERROR.CODE, - ORGANIZATION_NOT_FOUND_ERROR.PARAM - ); - } - const accessToken = await createAccessToken(createdUser!); - const refreshToken = await createRefreshToken(createdUser!); + const isLastResortSuperAdmin = + args.data.email === LAST_RESORT_SUPERADMIN_EMAIL; + + const createdUser = await User.create({ + ...args.data, + email: args.data.email.toLowerCase(), // ensure all emails are stored as lowercase to prevent duplicated due to comparison errors + image: uploadImageFileName ? uploadImageFileName : null, + password: hashedPassword, + userType: isLastResortSuperAdmin ? "SUPERADMIN" : "USER", + adminApproved: isLastResortSuperAdmin, + }); + + const accessToken = await createAccessToken(createdUser); + const refreshToken = await createRefreshToken(createdUser); copyToClipboard(`{ - "Authorization": "Bearer ${accessToken}" -}`); + "Authorization": "Bearer ${accessToken}" + }`); - const filteredCreatedUser = createdUser!.toObject(); + const filteredCreatedUser = createdUser.toObject(); - const userToBeReturned = omit(filteredCreatedUser, "password"); + // @ts-ignore + delete filteredCreatedUser.password; return { - user: userToBeReturned, - selectedOrganization: args.data.selectedOrgainzation, + user: filteredCreatedUser, accessToken, refreshToken, }; diff --git a/src/resolvers/Mutation/updateActionItem.ts b/src/resolvers/Mutation/updateActionItem.ts new file mode 100644 index 0000000000..7a17387f2b --- /dev/null +++ b/src/resolvers/Mutation/updateActionItem.ts @@ -0,0 +1,190 @@ +import { + ACTION_ITEM_NOT_FOUND_ERROR, + EVENT_NOT_FOUND_ERROR, + USER_NOT_AUTHORIZED_ERROR, + USER_NOT_FOUND_ERROR, + USER_NOT_MEMBER_FOR_ORGANIZATION, +} from "../../constants"; +import type { MutationResolvers } from "../../types/generatedGraphQLTypes"; +import { errors, requestContext } from "../../libraries"; +import type { InterfaceEvent } from "../../models"; +import { User, ActionItem, Event } from "../../models"; +import { Types } from "mongoose"; +import { findEventsInCache } from "../../services/EventCache/findEventInCache"; +import { cacheEvents } from "../../services/EventCache/cacheEvents"; +/** + * This function enables to update an action item. + * @param _parent - parent of current request + * @param args - payload provided with the request + * @param context - context of entire application + * @remarks The following checks are done: + * 1. If the user exists. + * 2. If the new asignee exists. + * 2. If the action item exists. + * 4. If the new asignee is a member of the organization. + * 5. If the user is authorized. + * @returns Updated action item. + */ + +type UpdateActionItemInputType = { + assigneeId: string; + preCompletionNotes: string; + postCompletionNotes: string; + dueDate: Date; + completionDate: Date; + isCompleted: boolean; +}; + +export const updateActionItem: MutationResolvers["updateActionItem"] = async ( + _parent, + args, + context +) => { + const currentUser = await User.findOne({ + _id: context.userId, + }); + + // Checks if the user exists + if (currentUser === null) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_FOUND_ERROR.MESSAGE), + USER_NOT_FOUND_ERROR.CODE, + USER_NOT_FOUND_ERROR.PARAM + ); + } + + const actionItem = await ActionItem.findOne({ + _id: args.id, + }) + .populate("actionItemCategoryId") + .lean(); + + // Checks if the actionItem exists + if (!actionItem) { + throw new errors.NotFoundError( + requestContext.translate(ACTION_ITEM_NOT_FOUND_ERROR.MESSAGE), + ACTION_ITEM_NOT_FOUND_ERROR.CODE, + ACTION_ITEM_NOT_FOUND_ERROR.PARAM + ); + } + + let sameAssignedUser = false; + + if (args.data.assigneeId) { + sameAssignedUser = Types.ObjectId(actionItem.assigneeId).equals( + args.data.assigneeId + ); + + if (!sameAssignedUser) { + const newAssignedUser = await User.findOne({ + _id: args.data.assigneeId, + }); + + // Checks if the new asignee exists + if (newAssignedUser === null) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_FOUND_ERROR.MESSAGE), + USER_NOT_FOUND_ERROR.CODE, + USER_NOT_FOUND_ERROR.PARAM + ); + } + + let userIsOrganizationMember = false; + const currorganizationId = actionItem.actionItemCategoryId.organizationId; + userIsOrganizationMember = newAssignedUser.joinedOrganizations.some( + (organizationId) => + organizationId === currorganizationId || + Types.ObjectId(organizationId).equals(currorganizationId) + ); + + // Checks if the new asignee is a member of the organization + if (!userIsOrganizationMember) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_MEMBER_FOR_ORGANIZATION.MESSAGE), + USER_NOT_MEMBER_FOR_ORGANIZATION.CODE, + USER_NOT_MEMBER_FOR_ORGANIZATION.PARAM + ); + } + } + } + + const currentUserIsOrgAdmin = currentUser.adminFor.some( + (ogranizationId) => + ogranizationId === actionItem.actionItemCategoryId.organizationId || + Types.ObjectId(ogranizationId).equals( + actionItem.actionItemCategoryId.organizationId + ) + ); + + let currentUserIsEventAdmin = false; + + if (actionItem.eventId) { + let currEvent: InterfaceEvent | null; + + const eventFoundInCache = await findEventsInCache([actionItem.eventId]); + + currEvent = eventFoundInCache[0]; + + if (eventFoundInCache[0] === null) { + currEvent = await Event.findOne({ + _id: actionItem.eventId, + }).lean(); + + if (currEvent !== null) { + await cacheEvents([currEvent]); + } + } + + // Checks whether currEvent exists. + if (!currEvent) { + throw new errors.NotFoundError( + requestContext.translate(EVENT_NOT_FOUND_ERROR.MESSAGE), + EVENT_NOT_FOUND_ERROR.CODE, + EVENT_NOT_FOUND_ERROR.PARAM + ); + } + + // Checks if the currUser is an admin of the event + currentUserIsEventAdmin = currEvent.admins.some( + (admin) => + admin === context.userID || Types.ObjectId(admin).equals(context.userId) + ); + } + + // Checks if the user is authorized for the operation. + if ( + currentUserIsEventAdmin === false && + currentUserIsOrgAdmin === false && + currentUser.userType !== "SUPERADMIN" + ) { + throw new errors.UnauthorizedError( + requestContext.translate(USER_NOT_AUTHORIZED_ERROR.MESSAGE), + USER_NOT_AUTHORIZED_ERROR.CODE, + USER_NOT_AUTHORIZED_ERROR.PARAM + ); + } + + const updatedAssignmentDate = sameAssignedUser + ? actionItem.assignmentDate + : new Date(); + + const updatedAssigner = sameAssignedUser + ? actionItem.assignerId + : context.userId; + + const updatedActionItem = await ActionItem.findOneAndUpdate( + { + _id: args.id, + }, + { + ...(args.data as UpdateActionItemInputType), + assignmentDate: updatedAssignmentDate, + assignerId: updatedAssigner, + }, + { + new: true, + } + ).lean(); + + return updatedActionItem; +}; diff --git a/src/resolvers/Mutation/updateActionItemCategory.ts b/src/resolvers/Mutation/updateActionItemCategory.ts new file mode 100644 index 0000000000..d2deaf31f8 --- /dev/null +++ b/src/resolvers/Mutation/updateActionItemCategory.ts @@ -0,0 +1,71 @@ +import { + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR, + USER_NOT_FOUND_ERROR, +} from "../../constants"; +import type { MutationResolvers } from "../../types/generatedGraphQLTypes"; +import { errors, requestContext } from "../../libraries"; +import { User, ActionItemCategory } from "../../models"; +import { adminCheck } from "../../utilities"; +/** + * This function enables to update a actionItemCategory. + * @param _parent - parent of current request + * @param args - payload provided with the request + * @param context - context of entire application + * @remarks The following checks are done: + * 1. If the user exists. + * 2. If the actionItemCategory exists. + * 3. If the user is authorized. + * @returns Updated actionItemCategory. + */ + +type UpdateActionItemCategoryInputType = { + name: string; + isDisabled: boolean; +}; + +export const updateActionItemCategory: MutationResolvers["updateActionItemCategory"] = + async (_parent, args, context) => { + const currentUser = await User.findOne({ + _id: context.userId, + }); + + // Checks if the user exists + if (currentUser === null) { + throw new errors.NotFoundError( + requestContext.translate(USER_NOT_FOUND_ERROR.MESSAGE), + USER_NOT_FOUND_ERROR.CODE, + USER_NOT_FOUND_ERROR.PARAM + ); + } + + const actionItemCategory = await ActionItemCategory.findOne({ + _id: args.id, + }) + .populate("organizationId") + .lean(); + + // Checks if the actionItemCategory exists + if (!actionItemCategory) { + throw new errors.NotFoundError( + requestContext.translate(ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.MESSAGE), + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.CODE, + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.PARAM + ); + } + + await adminCheck(context.userId, actionItemCategory.organizationId); + + const updatedCategory = await ActionItemCategory.findOneAndUpdate( + { + _id: args.id, + }, + { + ...(args.data as UpdateActionItemCategoryInputType), + }, + { + new: true, + } + ).lean(); + + return updatedCategory; + }; diff --git a/src/resolvers/Organization/actionItemCategories.ts b/src/resolvers/Organization/actionItemCategories.ts new file mode 100644 index 0000000000..37dbe69f26 --- /dev/null +++ b/src/resolvers/Organization/actionItemCategories.ts @@ -0,0 +1,13 @@ +import { ActionItemCategory } from "../../models"; +import type { OrganizationResolvers } from "../../types/generatedGraphQLTypes"; +/** + * This resolver function will fetch and return the categories of the Organization from database. + * @param parent - An object that is the return value of the resolver for this field's parent. + * @returns An object that contains the list of all categories of the organization. + */ +export const actionItemCategories: OrganizationResolvers["actionItemCategories"] = + async (parent) => { + return await ActionItemCategory.find({ + organizationId: parent._id, + }).lean(); + }; diff --git a/src/resolvers/Organization/index.ts b/src/resolvers/Organization/index.ts index 999c15886a..1851c85ab1 100644 --- a/src/resolvers/Organization/index.ts +++ b/src/resolvers/Organization/index.ts @@ -6,10 +6,12 @@ import { image } from "./image"; import { members } from "./members"; import { pinnedPosts } from "./pinnedPosts"; import { membershipRequests } from "./membershipRequests"; +import { actionItemCategories } from "./actionItemCategories"; // import { userTags } from "./userTags"; export const Organization: OrganizationResolvers = { admins, + actionItemCategories, blockedUsers, creator, image, diff --git a/src/resolvers/Query/actionItem.ts b/src/resolvers/Query/actionItem.ts new file mode 100644 index 0000000000..6d8e2cbfa2 --- /dev/null +++ b/src/resolvers/Query/actionItem.ts @@ -0,0 +1,30 @@ +import type { QueryResolvers } from "../../types/generatedGraphQLTypes"; +import { ActionItem } from "../../models"; +import { errors } from "../../libraries"; +import { ACTION_ITEM_NOT_FOUND_ERROR } from "../../constants"; +/** + * This query will fetch the action item with given id from the database. + * @param _parent- + * @param args - An object that contains `id` of the action item that need to be fetched. + * @returns An `action item` object. If the `action item` object is null then it throws `NotFoundError` error. + * @remarks You can learn about GraphQL `Resolvers` + * {@link https://www.apollographql.com/docs/apollo-server/data/resolvers/ | here}. + */ +export const actionItem: QueryResolvers["actionItem"] = async ( + _parent, + args +) => { + const actionItem = await ActionItem.findOne({ + _id: args.id, + }).lean(); + + if (!actionItem) { + throw new errors.NotFoundError( + ACTION_ITEM_NOT_FOUND_ERROR.DESC, + ACTION_ITEM_NOT_FOUND_ERROR.CODE, + ACTION_ITEM_NOT_FOUND_ERROR.PARAM + ); + } + + return actionItem; +}; diff --git a/src/resolvers/Query/actionItemCategoriesByOrganization.ts b/src/resolvers/Query/actionItemCategoriesByOrganization.ts new file mode 100644 index 0000000000..ffb8c85e48 --- /dev/null +++ b/src/resolvers/Query/actionItemCategoriesByOrganization.ts @@ -0,0 +1,16 @@ +import type { QueryResolvers } from "../../types/generatedGraphQLTypes"; +import { ActionItemCategory } from "../../models"; +/** + * This query will fetch all categories for the organization from database. + * @param _parent- + * @param args - An object that contains `organizationId` which is the _id of the Organization. + * @returns A `categories` object that holds all categories for the Organization. + */ +export const actionItemCategoriesByOrganization: QueryResolvers["actionItemCategoriesByOrganization"] = + async (_parent, args) => { + const categories = await ActionItemCategory.find({ + organizationId: args.organizationId, + }).lean(); + + return categories; + }; diff --git a/src/resolvers/Query/actionItemCategory.ts b/src/resolvers/Query/actionItemCategory.ts new file mode 100644 index 0000000000..e0cfb1232e --- /dev/null +++ b/src/resolvers/Query/actionItemCategory.ts @@ -0,0 +1,30 @@ +import type { QueryResolvers } from "../../types/generatedGraphQLTypes"; +import { ActionItemCategory } from "../../models"; +import { errors } from "../../libraries"; +import { ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR } from "../../constants"; +/** + * This query will fetch the actionItemCategory with given id from the database. + * @param _parent- + * @param args - An object that contains `id` of the actionItemCategory that need to be fetched. + * @returns An `actionItemCategory` object. If the `actionItemCategory` object is null then it throws `NotFoundError` error. + * @remarks You can learn about GraphQL `Resolvers` + * {@link https://www.apollographql.com/docs/apollo-server/data/resolvers/ | here}. + */ +export const actionItemCategory: QueryResolvers["actionItemCategory"] = async ( + _parent, + args +) => { + const actionItemCategory = await ActionItemCategory.findOne({ + _id: args.id, + }).lean(); + + if (!actionItemCategory) { + throw new errors.NotFoundError( + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.DESC, + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.CODE, + ACTION_ITEM_CATEGORY_NOT_FOUND_ERROR.PARAM + ); + } + + return actionItemCategory; +}; diff --git a/src/resolvers/Query/actionItemsByEvent.ts b/src/resolvers/Query/actionItemsByEvent.ts new file mode 100644 index 0000000000..d031dfdb78 --- /dev/null +++ b/src/resolvers/Query/actionItemsByEvent.ts @@ -0,0 +1,18 @@ +import type { QueryResolvers } from "../../types/generatedGraphQLTypes"; +import { ActionItem } from "../../models"; +/** + * This query will fetch all action items for an event from database. + * @param _parent- + * @param args - An object that contains `eventId` which is the _id of the Event. + * @returns An `actionItems` object that holds all action items for the Event. + */ +export const actionItemsByEvent: QueryResolvers["actionItemsByEvent"] = async ( + _parent, + args +) => { + const actionItems = await ActionItem.find({ + eventId: args.eventId, + }).lean(); + + return actionItems; +}; diff --git a/src/resolvers/Query/actionItemsByOrganization.ts b/src/resolvers/Query/actionItemsByOrganization.ts new file mode 100644 index 0000000000..4520f02af6 --- /dev/null +++ b/src/resolvers/Query/actionItemsByOrganization.ts @@ -0,0 +1,24 @@ +import type { QueryResolvers } from "../../types/generatedGraphQLTypes"; +import { ActionItem, ActionItemCategory } from "../../models"; +/** + * This query will fetch all action items for an organization from database. + * @param _parent- + * @param args - An object that contains `organizationId` which is the _id of the Organization. + * @returns An `actionItems` object that holds all action items for the Event. + */ +export const actionItemsByOrganization: QueryResolvers["actionItemsByOrganization"] = + async (_parent, args) => { + // Get the ids of all ActionItemCategories associated with the organization + const actionItemCategories = await ActionItemCategory.find({ + organizationId: args.organizationId, + }); + const actionItemCategoriesIds = actionItemCategories.map( + (category) => category._id + ); + + const actionItems = await ActionItem.find({ + actionItemCategoryId: { $in: actionItemCategoriesIds }, + }).lean(); + + return actionItems; + }; diff --git a/src/resolvers/Query/index.ts b/src/resolvers/Query/index.ts index 6c4bbd2a2c..69e92fe7ce 100644 --- a/src/resolvers/Query/index.ts +++ b/src/resolvers/Query/index.ts @@ -1,4 +1,9 @@ import type { QueryResolvers } from "../../types/generatedGraphQLTypes"; +import { actionItem } from "./actionItem"; +import { actionItemsByEvent } from "./actionItemsByEvent"; +import { actionItemCategory } from "./actionItemCategory"; +import { actionItemsByOrganization } from "./actionItemsByOrganization"; +import { actionItemCategoriesByOrganization } from "./actionItemCategoriesByOrganization"; import { checkAuth } from "./checkAuth"; import { customDataByOrganization } from "./customDataByOrganization"; import { customFieldsByOrganization } from "./customFieldsByOrganization"; @@ -29,6 +34,11 @@ import { getAdvertisements } from "./getAdvertisements"; import { usersConnection } from "./usersConnection"; export const Query: QueryResolvers = { + actionItem, + actionItemsByEvent, + actionItemCategory, + actionItemsByOrganization, + actionItemCategoriesByOrganization, checkAuth, customFieldsByOrganization, customDataByOrganization, diff --git a/src/resolvers/index.ts b/src/resolvers/index.ts index b746c0c75b..7ded81a68f 100644 --- a/src/resolvers/index.ts +++ b/src/resolvers/index.ts @@ -1,4 +1,6 @@ import type { Resolvers } from "../types/generatedGraphQLTypes"; +import { ActionItem } from "./ActionItem"; +import { ActionItemCategory } from "./ActionItemCategory"; import { CheckIn } from "./CheckIn"; import { Comment } from "./Comment"; import { DirectChat } from "./DirectChat"; @@ -31,6 +33,8 @@ import { } from "graphql-scalars"; const resolvers: Resolvers = { + ActionItem, + ActionItemCategory, CheckIn, Comment, DirectChat, diff --git a/src/typeDefs/inputs.ts b/src/typeDefs/inputs.ts index 89750c91f8..e4aa13d73e 100644 --- a/src/typeDefs/inputs.ts +++ b/src/typeDefs/inputs.ts @@ -35,6 +35,13 @@ export const inputs = gql` organizationId: ID! } + input CreateActionItemInput { + assigneeId: ID! + preCompletionNotes: String + dueDate: Date + eventId: ID + } + input CursorPaginationInput { cursor: String direction: PaginationDirection! @@ -237,6 +244,15 @@ export const inputs = gql` tagId: ID! } + input UpdateActionItemInput { + assigneeId: ID + preCompletionNotes: String + postCompletionNotes: String + dueDate: Date + completionDate: Date + isCompleted: Boolean + } + input UpdateEventInput { title: String description: String @@ -290,6 +306,11 @@ export const inputs = gql` name: String! } + input UpdateActionItemCategoryInput { + name: String + isDisabled: Boolean + } + input AddressInput { city: String countryCode: String @@ -342,7 +363,7 @@ export const inputs = gql` email: EmailAddress! password: String! appLanguageCode: String - selectedOrgainzation: ID! + organizationUserBelongsToId: ID } input UserWhereInput { diff --git a/src/typeDefs/mutations.ts b/src/typeDefs/mutations.ts index 5038ba09d2..1843e92141 100644 --- a/src/typeDefs/mutations.ts +++ b/src/typeDefs/mutations.ts @@ -56,6 +56,16 @@ export const mutations = gql` @auth @role(requires: SUPERADMIN) + createActionItem( + data: CreateActionItemInput! + actionItemCategoryId: ID! + ): ActionItem! @auth + + createActionItemCategory( + name: String! + organizationId: ID! + ): ActionItemCategory! @auth + createComment(postId: ID!, data: CommentInput!): Comment @auth createDirectChat(data: createChatInput!): DirectChat! @auth @@ -135,6 +145,8 @@ export const mutations = gql` @auth @role(requires: SUPERADMIN) + removeActionItem(id: ID!): ActionItem! @auth + removeOrganizationCustomField( organizationId: ID! customFieldId: ID! @@ -200,6 +212,13 @@ export const mutations = gql` unregisterForEventByUser(id: ID!): Event! @auth + updateActionItem(id: ID!, data: UpdateActionItemInput!): ActionItem @auth + + updateActionItemCategory( + id: ID! + data: UpdateActionItemCategoryInput! + ): ActionItemCategory @auth + updateAdvertisement( input: UpdateAdvertisementInput! ): UpdateAdvertisementPayload @auth diff --git a/src/typeDefs/queries.ts b/src/typeDefs/queries.ts index f890e73e22..975f839ad9 100644 --- a/src/typeDefs/queries.ts +++ b/src/typeDefs/queries.ts @@ -7,6 +7,18 @@ export const queries = gql` type Query { adminPlugin(orgId: ID!): [Plugin] + actionItem(id: ID!): ActionItem + + actionItemsByEvent(eventId: ID!): [ActionItem] + + actionItemsByOrganization(organizationId: ID!): [ActionItem] + + actionItemCategory(id: ID!): ActionItemCategory + + actionItemCategoriesByOrganization( + organizationId: ID! + ): [ActionItemCategory] + checkAuth: User! @auth customFieldsByOrganization(id: ID!): [OrganizationCustomField] diff --git a/src/typeDefs/types.ts b/src/typeDefs/types.ts index 0622c9cce8..098fed4df6 100644 --- a/src/typeDefs/types.ts +++ b/src/typeDefs/types.ts @@ -11,11 +11,39 @@ export const types = gql` } type AuthData { - user: UserToReturn! + user: User! accessToken: String! refreshToken: String! } + type ActionItemCategory { + _id: ID! + name: String! + organization: Organization + isDisabled: Boolean! + creator: User + createdAt: Date! + updatedAt: Date! + } + + # Action Item for a ActionItemCategory + type ActionItem { + _id: ID! + assignee: User + assigner: User + actionItemCategory: ActionItemCategory + preCompletionNotes: String + postCompletionNotes: String + assignmentDate: Date! + dueDate: Date! + completionDate: Date! + isCompleted: Boolean! + event: Event + creator: User + createdAt: Date! + updatedAt: Date! + } + # Stores the detail of an check in of an user in an event type CheckIn { _id: ID! @@ -135,6 +163,7 @@ export const types = gql` attendees: [User] # For each attendee, gives information about whether he/she has checked in yet or not attendeesCheckInStatus: [CheckInStatus!]! + actionItems: [ActionItem] admins(adminId: ID): [User!] status: Status! feedback: [Feedback!]! @@ -230,6 +259,7 @@ export const types = gql` createdAt: DateTime! updatedAt: DateTime! members: [User] + actionItemCategories: [ActionItemCategory] admins(adminId: ID): [User!] membershipRequests: [MembershipRequest] userRegistrationRequired: Boolean! @@ -427,43 +457,6 @@ export const types = gql` usersAssignedTo(input: UsersConnectionInput!): UsersConnectionResult! } - type UserToReturn { - _id: ID! - address: Address - adminApproved: Boolean - adminFor: [Organization] - appLanguageCode: String! - birthDate: Date - createdAt: DateTime! - createdEvents: [Event] - createdOrganizations: [Organization] - educationGrade: EducationGrade - email: EmailAddress! - employmentStatus: EmploymentStatus - eventAdmin: [Event] - firstName: String! - gender: Gender - image: String - joinedOrganizations: [Organization] - lastName: String! - maritalStatus: MaritalStatus - membershipRequests: [MembershipRequest] - organizationsBlockedBy: [Organization] - phone: UserPhone - pluginCreationAllowed: Boolean! - registeredEvents: [Event] - tagsAssignedWith( - after: String - before: String - first: PositiveInt - last: PositiveInt - organizationId: ID - ): UserTagsConnection - tokenVersion: Int! - updatedAt: DateTime! - userType: UserType! - } - type UsersConnectionResult { data: UsersConnection errors: [ConnectionError!]! diff --git a/src/types/generatedGraphQLTypes.ts b/src/types/generatedGraphQLTypes.ts index 496921f517..db3d797943 100644 --- a/src/types/generatedGraphQLTypes.ts +++ b/src/types/generatedGraphQLTypes.ts @@ -1,4 +1,6 @@ import type { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; +import type { InterfaceActionItem as InterfaceActionItemModel } from '../models/ActionItem'; +import type { InterfaceActionItemCategory as InterfaceActionItemCategoryModel } from '../models/ActionItemCategory'; import type { InterfaceCheckIn as InterfaceCheckInModel } from '../models/CheckIn'; import type { InterfaceMessageChat as InterfaceMessageChatModel } from '../models/MessageChat'; import type { InterfaceComment as InterfaceCommentModel } from '../models/Comment'; @@ -19,7 +21,7 @@ import type { InterfacePlugin as InterfacePluginModel } from '../models/Plugin'; import type { InterfacePluginField as InterfacePluginFieldModel } from '../models/PluginField'; import type { InterfacePost as InterfacePostModel } from '../models/Post'; import type { InterfaceOrganizationTagUser as InterfaceOrganizationTagUserModel } from '../models/OrganizationTagUser'; -import type { InterfaceUser as InterfaceUserModel, InterfaceUserToReturn as InterfaceUserToReturnModel } from '../models/User'; +import type { InterfaceUser as InterfaceUserModel } from '../models/User'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -51,6 +53,35 @@ export type Scalars = { Upload: { input: any; output: any; } }; +export type ActionItem = { + __typename?: 'ActionItem'; + _id: Scalars['ID']['output']; + actionItemCategory?: Maybe; + assignee?: Maybe; + assigner?: Maybe; + assignmentDate: Scalars['Date']['output']; + completionDate: Scalars['Date']['output']; + createdAt: Scalars['Date']['output']; + creator?: Maybe; + dueDate: Scalars['Date']['output']; + event?: Maybe; + isCompleted: Scalars['Boolean']['output']; + postCompletionNotes?: Maybe; + preCompletionNotes?: Maybe; + updatedAt: Scalars['Date']['output']; +}; + +export type ActionItemCategory = { + __typename?: 'ActionItemCategory'; + _id: Scalars['ID']['output']; + createdAt: Scalars['Date']['output']; + creator?: Maybe; + isDisabled: Scalars['Boolean']['output']; + name: Scalars['String']['output']; + organization?: Maybe; + updatedAt: Scalars['Date']['output']; +}; + export type Address = { __typename?: 'Address'; city?: Maybe; @@ -107,7 +138,7 @@ export type AuthData = { __typename?: 'AuthData'; accessToken: Scalars['String']['output']; refreshToken: Scalars['String']['output']; - user: UserToReturn; + user: User; }; export type CheckIn = { @@ -163,6 +194,13 @@ export type ConnectionPageInfo = { startCursor?: Maybe; }; +export type CreateActionItemInput = { + assigneeId: Scalars['ID']['input']; + dueDate?: InputMaybe; + eventId?: InputMaybe; + preCompletionNotes?: InputMaybe; +}; + export type CreateUserTagInput = { name: Scalars['String']['input']; organizationId: Scalars['ID']['input']; @@ -260,6 +298,7 @@ export type Error = { export type Event = { __typename?: 'Event'; _id: Scalars['ID']['output']; + actionItems?: Maybe>>; admins?: Maybe>; allDay: Scalars['Boolean']['output']; attendees?: Maybe>>; @@ -555,6 +594,8 @@ export type Mutation = { blockUser: User; cancelMembershipRequest: MembershipRequest; checkIn: CheckIn; + createActionItem: ActionItem; + createActionItemCategory: ActionItemCategory; createAdmin: User; createAdvertisement: Advertisement; createComment?: Maybe; @@ -584,6 +625,7 @@ export type Mutation = { registerForEvent: Event; rejectAdmin: Scalars['Boolean']['output']; rejectMembershipRequest: MembershipRequest; + removeActionItem: ActionItem; removeAdmin: User; removeAdvertisement?: Maybe; removeComment?: Maybe; @@ -613,6 +655,8 @@ export type Mutation = { unlikeComment?: Maybe; unlikePost?: Maybe; unregisterForEventByUser: Event; + updateActionItem?: Maybe; + updateActionItemCategory?: Maybe; updateAdvertisement?: Maybe; updateEvent: Event; updateLanguage: User; @@ -720,6 +764,18 @@ export type MutationCheckInArgs = { }; +export type MutationCreateActionItemArgs = { + actionItemCategoryId: Scalars['ID']['input']; + data: CreateActionItemInput; +}; + + +export type MutationCreateActionItemCategoryArgs = { + name: Scalars['String']['input']; + organizationId: Scalars['ID']['input']; +}; + + export type MutationCreateAdminArgs = { data: UserAndOrganizationInput; }; @@ -871,6 +927,11 @@ export type MutationRejectMembershipRequestArgs = { }; +export type MutationRemoveActionItemArgs = { + id: Scalars['ID']['input']; +}; + + export type MutationRemoveAdminArgs = { data: UserAndOrganizationInput; }; @@ -1009,6 +1070,18 @@ export type MutationUnregisterForEventByUserArgs = { }; +export type MutationUpdateActionItemArgs = { + data: UpdateActionItemInput; + id: Scalars['ID']['input']; +}; + + +export type MutationUpdateActionItemCategoryArgs = { + data: UpdateActionItemCategoryInput; + id: Scalars['ID']['input']; +}; + + export type MutationUpdateAdvertisementArgs = { input: UpdateAdvertisementInput; }; @@ -1078,6 +1151,7 @@ export type OtpInput = { export type Organization = { __typename?: 'Organization'; _id: Scalars['ID']['output']; + actionItemCategories?: Maybe>>; address?: Maybe
; admins?: Maybe>; apiUrl: Scalars['URL']['output']; @@ -1320,6 +1394,11 @@ export type PostWhereInput = { export type Query = { __typename?: 'Query'; + actionItem?: Maybe; + actionItemCategoriesByOrganization?: Maybe>>; + actionItemCategory?: Maybe; + actionItemsByEvent?: Maybe>>; + actionItemsByOrganization?: Maybe>>; adminPlugin?: Maybe>>; checkAuth: User; customDataByOrganization: Array; @@ -1356,6 +1435,31 @@ export type Query = { }; +export type QueryActionItemArgs = { + id: Scalars['ID']['input']; +}; + + +export type QueryActionItemCategoriesByOrganizationArgs = { + organizationId: Scalars['ID']['input']; +}; + + +export type QueryActionItemCategoryArgs = { + id: Scalars['ID']['input']; +}; + + +export type QueryActionItemsByEventArgs = { + eventId: Scalars['ID']['input']; +}; + + +export type QueryActionItemsByOrganizationArgs = { + organizationId: Scalars['ID']['input']; +}; + + export type QueryAdminPluginArgs = { orgId: Scalars['ID']['input']; }; @@ -1576,6 +1680,20 @@ export type UnauthorizedError = Error & { message: Scalars['String']['output']; }; +export type UpdateActionItemCategoryInput = { + isDisabled?: InputMaybe; + name?: InputMaybe; +}; + +export type UpdateActionItemInput = { + assigneeId?: InputMaybe; + completionDate?: InputMaybe; + dueDate?: InputMaybe; + isCompleted?: InputMaybe; + postCompletionNotes?: InputMaybe; + preCompletionNotes?: InputMaybe; +}; + export type UpdateAdvertisementInput = { _id: Scalars['ID']['input']; endDate?: InputMaybe; @@ -1717,8 +1835,8 @@ export type UserInput = { email: Scalars['EmailAddress']['input']; firstName: Scalars['String']['input']; lastName: Scalars['String']['input']; + organizationUserBelongsToId?: InputMaybe; password: Scalars['String']['input']; - selectedOrgainzation: Scalars['ID']['input']; }; export type UserOrderByInput = @@ -1790,47 +1908,6 @@ export type UserTagsConnectionResult = { errors: Array; }; -export type UserToReturn = { - __typename?: 'UserToReturn'; - _id: Scalars['ID']['output']; - address?: Maybe
; - adminApproved?: Maybe; - adminFor?: Maybe>>; - appLanguageCode: Scalars['String']['output']; - birthDate?: Maybe; - createdAt: Scalars['DateTime']['output']; - createdEvents?: Maybe>>; - createdOrganizations?: Maybe>>; - educationGrade?: Maybe; - email: Scalars['EmailAddress']['output']; - employmentStatus?: Maybe; - eventAdmin?: Maybe>>; - firstName: Scalars['String']['output']; - gender?: Maybe; - image?: Maybe; - joinedOrganizations?: Maybe>>; - lastName: Scalars['String']['output']; - maritalStatus?: Maybe; - membershipRequests?: Maybe>>; - organizationsBlockedBy?: Maybe>>; - phone?: Maybe; - pluginCreationAllowed: Scalars['Boolean']['output']; - registeredEvents?: Maybe>>; - tagsAssignedWith?: Maybe; - tokenVersion: Scalars['Int']['output']; - updatedAt: Scalars['DateTime']['output']; - userType: UserType; -}; - - -export type UserToReturnTagsAssignedWithArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - organizationId?: InputMaybe; -}; - export type UserType = | 'ADMIN' | 'NON_USER' @@ -1977,6 +2054,8 @@ export type ResolversInterfaceTypes> = { /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = { + ActionItem: ResolverTypeWrapper; + ActionItemCategory: ResolverTypeWrapper; Address: ResolverTypeWrapper
; AddressInput: AddressInput; Advertisement: ResolverTypeWrapper & { creator?: Maybe }>; @@ -1984,7 +2063,7 @@ export type ResolversTypes = { AggregatePost: ResolverTypeWrapper; AggregateUser: ResolverTypeWrapper; Any: ResolverTypeWrapper; - AuthData: ResolverTypeWrapper & { user: ResolversTypes['UserToReturn'] }>; + AuthData: ResolverTypeWrapper & { user: ResolversTypes['User'] }>; Boolean: ResolverTypeWrapper; CheckIn: ResolverTypeWrapper; CheckInInput: CheckInInput; @@ -1994,6 +2073,7 @@ export type ResolversTypes = { ConnectionError: ResolverTypeWrapper['ConnectionError']>; ConnectionPageInfo: ResolverTypeWrapper; CountryCode: ResolverTypeWrapper; + CreateActionItemInput: CreateActionItemInput; CreateUserTagInput: CreateUserTagInput; CursorPaginationInput: CursorPaginationInput; Date: ResolverTypeWrapper; @@ -2077,6 +2157,8 @@ export type ResolversTypes = { URL: ResolverTypeWrapper; UnauthenticatedError: ResolverTypeWrapper; UnauthorizedError: ResolverTypeWrapper; + UpdateActionItemCategoryInput: UpdateActionItemCategoryInput; + UpdateActionItemInput: UpdateActionItemInput; UpdateAdvertisementInput: UpdateAdvertisementInput; UpdateAdvertisementPayload: ResolverTypeWrapper & { advertisement?: Maybe }>; UpdateEventInput: UpdateEventInput; @@ -2100,7 +2182,6 @@ export type ResolversTypes = { UserTagsConnection: ResolverTypeWrapper & { edges: Array }>; UserTagsConnectionInput: UserTagsConnectionInput; UserTagsConnectionResult: ResolverTypeWrapper & { data?: Maybe, errors: Array }>; - UserToReturn: ResolverTypeWrapper; UserType: UserType; UserWhereInput: UserWhereInput; UsersConnection: ResolverTypeWrapper & { edges: Array }>; @@ -2112,13 +2193,15 @@ export type ResolversTypes = { /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { + ActionItem: InterfaceActionItemModel; + ActionItemCategory: InterfaceActionItemCategoryModel; Address: Address; AddressInput: AddressInput; Advertisement: Omit & { creator?: Maybe }; AggregatePost: AggregatePost; AggregateUser: AggregateUser; Any: Scalars['Any']['output']; - AuthData: Omit & { user: ResolversParentTypes['UserToReturn'] }; + AuthData: Omit & { user: ResolversParentTypes['User'] }; Boolean: Scalars['Boolean']['output']; CheckIn: InterfaceCheckInModel; CheckInInput: CheckInInput; @@ -2128,6 +2211,7 @@ export type ResolversParentTypes = { ConnectionError: ResolversUnionTypes['ConnectionError']; ConnectionPageInfo: ConnectionPageInfo; CountryCode: Scalars['CountryCode']['output']; + CreateActionItemInput: CreateActionItemInput; CreateUserTagInput: CreateUserTagInput; CursorPaginationInput: CursorPaginationInput; Date: Scalars['Date']['output']; @@ -2200,6 +2284,8 @@ export type ResolversParentTypes = { URL: Scalars['URL']['output']; UnauthenticatedError: UnauthenticatedError; UnauthorizedError: UnauthorizedError; + UpdateActionItemCategoryInput: UpdateActionItemCategoryInput; + UpdateActionItemInput: UpdateActionItemInput; UpdateAdvertisementInput: UpdateAdvertisementInput; UpdateAdvertisementPayload: Omit & { advertisement?: Maybe }; UpdateEventInput: UpdateEventInput; @@ -2222,7 +2308,6 @@ export type ResolversParentTypes = { UserTagsConnection: Omit & { edges: Array }; UserTagsConnectionInput: UserTagsConnectionInput; UserTagsConnectionResult: Omit & { data?: Maybe, errors: Array }; - UserToReturn: InterfaceUserToReturnModel; UserWhereInput: UserWhereInput; UsersConnection: Omit & { edges: Array }; UsersConnectionInput: UsersConnectionInput; @@ -2241,6 +2326,35 @@ export type RoleDirectiveArgs = { export type RoleDirectiveResolver = DirectiveResolverFn; +export type ActionItemResolvers = { + _id?: Resolver; + actionItemCategory?: Resolver, ParentType, ContextType>; + assignee?: Resolver, ParentType, ContextType>; + assigner?: Resolver, ParentType, ContextType>; + assignmentDate?: Resolver; + completionDate?: Resolver; + createdAt?: Resolver; + creator?: Resolver, ParentType, ContextType>; + dueDate?: Resolver; + event?: Resolver, ParentType, ContextType>; + isCompleted?: Resolver; + postCompletionNotes?: Resolver, ParentType, ContextType>; + preCompletionNotes?: Resolver, ParentType, ContextType>; + updatedAt?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type ActionItemCategoryResolvers = { + _id?: Resolver; + createdAt?: Resolver; + creator?: Resolver, ParentType, ContextType>; + isDisabled?: Resolver; + name?: Resolver; + organization?: Resolver, ParentType, ContextType>; + updatedAt?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type AddressResolvers = { city?: Resolver, ParentType, ContextType>; countryCode?: Resolver, ParentType, ContextType>; @@ -2284,7 +2398,7 @@ export interface AnyScalarConfig extends GraphQLScalarTypeConfig = { accessToken?: Resolver; refreshToken?: Resolver; - user?: Resolver; + user?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; @@ -2395,6 +2509,7 @@ export type ErrorResolvers = { _id?: Resolver; + actionItems?: Resolver>>, ParentType, ContextType>; admins?: Resolver>, ParentType, ContextType, Partial>; allDay?: Resolver; attendees?: Resolver>>, ParentType, ContextType>; @@ -2584,6 +2699,8 @@ export type MutationResolvers>; cancelMembershipRequest?: Resolver>; checkIn?: Resolver>; + createActionItem?: Resolver>; + createActionItemCategory?: Resolver>; createAdmin?: Resolver>; createAdvertisement?: Resolver>; createComment?: Resolver, ParentType, ContextType, RequireFields>; @@ -2613,6 +2730,7 @@ export type MutationResolvers>; rejectAdmin?: Resolver>; rejectMembershipRequest?: Resolver>; + removeActionItem?: Resolver>; removeAdmin?: Resolver>; removeAdvertisement?: Resolver, ParentType, ContextType, RequireFields>; removeComment?: Resolver, ParentType, ContextType, RequireFields>; @@ -2642,6 +2760,8 @@ export type MutationResolvers, ParentType, ContextType, RequireFields>; unlikePost?: Resolver, ParentType, ContextType, RequireFields>; unregisterForEventByUser?: Resolver>; + updateActionItem?: Resolver, ParentType, ContextType, RequireFields>; + updateActionItemCategory?: Resolver, ParentType, ContextType, RequireFields>; updateAdvertisement?: Resolver, ParentType, ContextType, RequireFields>; updateEvent?: Resolver>; updateLanguage?: Resolver>; @@ -2657,6 +2777,7 @@ export type MutationResolvers = { _id?: Resolver; + actionItemCategories?: Resolver>>, ParentType, ContextType>; address?: Resolver, ParentType, ContextType>; admins?: Resolver>, ParentType, ContextType, Partial>; apiUrl?: Resolver; @@ -2763,6 +2884,11 @@ export type PostConnectionResolvers = { + actionItem?: Resolver, ParentType, ContextType, RequireFields>; + actionItemCategoriesByOrganization?: Resolver>>, ParentType, ContextType, RequireFields>; + actionItemCategory?: Resolver, ParentType, ContextType, RequireFields>; + actionItemsByEvent?: Resolver>>, ParentType, ContextType, RequireFields>; + actionItemsByOrganization?: Resolver>>, ParentType, ContextType, RequireFields>; adminPlugin?: Resolver>>, ParentType, ContextType, RequireFields>; checkAuth?: Resolver; customDataByOrganization?: Resolver, ParentType, ContextType, RequireFields>; @@ -2929,38 +3055,6 @@ export type UserTagsConnectionResultResolvers; }; -export type UserToReturnResolvers = { - _id?: Resolver; - address?: Resolver, ParentType, ContextType>; - adminApproved?: Resolver, ParentType, ContextType>; - adminFor?: Resolver>>, ParentType, ContextType>; - appLanguageCode?: Resolver; - birthDate?: Resolver, ParentType, ContextType>; - createdAt?: Resolver; - createdEvents?: Resolver>>, ParentType, ContextType>; - createdOrganizations?: Resolver>>, ParentType, ContextType>; - educationGrade?: Resolver, ParentType, ContextType>; - email?: Resolver; - employmentStatus?: Resolver, ParentType, ContextType>; - eventAdmin?: Resolver>>, ParentType, ContextType>; - firstName?: Resolver; - gender?: Resolver, ParentType, ContextType>; - image?: Resolver, ParentType, ContextType>; - joinedOrganizations?: Resolver>>, ParentType, ContextType>; - lastName?: Resolver; - maritalStatus?: Resolver, ParentType, ContextType>; - membershipRequests?: Resolver>>, ParentType, ContextType>; - organizationsBlockedBy?: Resolver>>, ParentType, ContextType>; - phone?: Resolver, ParentType, ContextType>; - pluginCreationAllowed?: Resolver; - registeredEvents?: Resolver>>, ParentType, ContextType>; - tagsAssignedWith?: Resolver, ParentType, ContextType, Partial>; - tokenVersion?: Resolver; - updatedAt?: Resolver; - userType?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - export type UsersConnectionResolvers = { edges?: Resolver, ParentType, ContextType>; pageInfo?: Resolver; @@ -2974,6 +3068,8 @@ export type UsersConnectionResultResolvers = { + ActionItem?: ActionItemResolvers; + ActionItemCategory?: ActionItemCategoryResolvers; Address?: AddressResolvers; Advertisement?: AdvertisementResolvers; AggregatePost?: AggregatePostResolvers; @@ -3044,7 +3140,6 @@ export type Resolvers = { UserTagEdge?: UserTagEdgeResolvers; UserTagsConnection?: UserTagsConnectionResolvers; UserTagsConnectionResult?: UserTagsConnectionResultResolvers; - UserToReturn?: UserToReturnResolvers; UsersConnection?: UsersConnectionResolvers; UsersConnectionResult?: UsersConnectionResultResolvers; }; diff --git a/src/utilities/encodedImageStorage/uploadEncodedImage.ts b/src/utilities/encodedImageStorage/uploadEncodedImage.ts index e3bb2d72b0..d3710f1246 100644 --- a/src/utilities/encodedImageStorage/uploadEncodedImage.ts +++ b/src/utilities/encodedImageStorage/uploadEncodedImage.ts @@ -3,17 +3,46 @@ import * as fs from "fs"; import { writeFile } from "fs/promises"; import { encodedImageExtentionCheck } from "./encodedImageExtensionCheck"; import { errors, requestContext } from "../../libraries"; -import { INVALID_FILE_TYPE } from "../../constants"; +import { IMAGE_SIZE_LIMIT_KB, INVALID_FILE_TYPE } from "../../constants"; import { EncodedImage } from "../../models/EncodedImage"; import path from "path"; import { deletePreviousImage } from "./deletePreviousImage"; +const checkImageSizeLimit = (size: number): boolean => { + return size > 0 && size <= 20000; +}; + +const base64SizeInKb = (base64String: string): number => { + // Count the number of Base64 characters + var numBase64Chars = base64String.length; + // Calculate the size in bytes + var sizeInBytes = (numBase64Chars * 3) / 4; + // Convert to kilobytes + var sizeInKB = sizeInBytes / 1024; + + return sizeInKB; +}; + export const uploadEncodedImage = async ( encodedImageURL: string, previousImagePath?: string | null ): Promise => { const isURLValidImage = encodedImageExtentionCheck(encodedImageURL); + const data = encodedImageURL.replace(/^data:image\/\w+;base64,/, ""); + const sizeInKb = base64SizeInKb(data); + const limit = checkImageSizeLimit(Number(process.env.IMAGE_SIZE_LIMIT_KB)) + ? Number(process.env.IMAGE_SIZE_LIMIT_KB) + : 3000; + + if (sizeInKb > limit) { + throw new errors.ImageSizeLimitExceeded( + IMAGE_SIZE_LIMIT_KB.MESSAGE, + IMAGE_SIZE_LIMIT_KB.CODE, + IMAGE_SIZE_LIMIT_KB.PARAM + ); + } + if (!isURLValidImage) { throw new errors.InvalidFileTypeError( requestContext.translate(INVALID_FILE_TYPE.MESSAGE), @@ -62,8 +91,6 @@ export const uploadEncodedImage = async ( content: encodedImageURL, }); - const data = encodedImageURL.replace(/^data:image\/\w+;base64,/, ""); - const buf = Buffer.from(data, "base64"); if (!fs.existsSync(path.join(__dirname, "../../../images"))) { diff --git a/src/utilities/loadDefaultOrganization.ts b/src/utilities/loadDefaultOrganization.ts deleted file mode 100644 index 652065032d..0000000000 --- a/src/utilities/loadDefaultOrganization.ts +++ /dev/null @@ -1,82 +0,0 @@ -import mongoose from "mongoose"; -import path from "path"; -import { Organization, Post, User, Event } from "../models"; -import fs from "fs"; -import dotenv from "dotenv"; -import yargs from "yargs"; - -interface InterfaceArgs { - items?: string; - format?: boolean; - _: unknown; -} - -export async function formatDatabase(): Promise { - await Promise.all([ - User.deleteMany({}), - Organization.deleteMany({}), - Event.deleteMany({}), - Post.deleteMany({}), - ]); - console.log("Cleared all collections\n"); -} - -dotenv.config(); -/** - * The function which loads the default organization, so that there is always altleast 1 organization in the DB - * @returns a Promise that resolves to void - */ - -export async function loadDefaultOrganization(): Promise { - let session!: mongoose.ClientSession; - const url = process.env.MONGO_DB_URL; - if (url == null) { - console.log("Couldn't find mongodb url"); - return; - } - await mongoose.connect(url, { - useCreateIndex: true, - useUnifiedTopology: true, - useFindAndModify: false, - useNewUrlParser: true, - }); - const { format } = yargs - .options({ - items: { - alias: "i", - describe: - "Comma-separated list of collections to load sample data into", - type: "string", - }, - format: { - alias: "f", - describe: - "Formats all the collections present in the database before the insertion of objects. [WARNING] Use carefully.", - type: "boolean", - }, - }) - .parseSync() as InterfaceArgs; - - // Check if specific collections need to be inserted - if (format) { - await formatDatabase(); - } - session = await mongoose.startSession(); - const userData = await fs.readFileSync( - path.join(__dirname, `../../sample_data/defaultOrganizationAdmin.json`), - "utf8" - ); - const userDocs = JSON.parse(userData) as Record[]; - await User.insertMany(userDocs); - const data = await fs.readFileSync( - path.join(__dirname, `../../sample_data/defaultOrganization.json`), - "utf8" - ); - const docs = JSON.parse(data) as Record[]; - await Organization.insertMany(docs); - console.log("Default Organization loaded"); - session?.endSession(); - await mongoose.connection.close(); -} - -loadDefaultOrganization(); diff --git a/talawa-api-docs/README.md b/talawa-api-docs/README.md index 43e4128f7f..efc9c465fc 100644 --- a/talawa-api-docs/README.md +++ b/talawa-api-docs/README.md @@ -1,6 +1,7 @@ talawa-api / [Exports](modules.md) # Talawa API + 💬 Join the community on Slack. The link can be found in the `Talawa` [README.md](https://github.com/PalisadoesFoundation/talawa) file. [![N|Solid](public/markdown/images/talawa-logo-lite-200x200.png)](https://github.com/PalisadoesFoundation/talawa-api) @@ -24,15 +25,14 @@ Core features include: ## Table of Contents - +\ +\