From 0bb06243f4ba546907302fb0c88c3258b5185468 Mon Sep 17 00:00:00 2001 From: Ellie Re'em Date: Tue, 16 Jul 2024 11:01:49 +0100 Subject: [PATCH 01/13] fix: update CRISP and Mailchimp emails when user email is updated --- src/api/simplybook/simplybook-api.ts | 23 ++++++++++++++ src/user/user.service.ts | 14 +++++---- src/utils/serviceUserProfiles.spec.ts | 43 +++++++++++++++++++++++++++ src/utils/serviceUserProfiles.ts | 32 ++++++++++++++++++-- 4 files changed, 105 insertions(+), 7 deletions(-) diff --git a/src/api/simplybook/simplybook-api.ts b/src/api/simplybook/simplybook-api.ts index c9e8840b..a9ceffaf 100644 --- a/src/api/simplybook/simplybook-api.ts +++ b/src/api/simplybook/simplybook-api.ts @@ -98,6 +98,29 @@ export const deleteClient: (clientId: string) => Promise = async (client } }; +export const updateSimplybookClient = async (clientId: string, clientData: { email?: string }) => { + const token = await getAuthToken(); + try { + const bookingsResponse = await axios.patch(`${SIMPLYBOOK_API_BASE_URL}/client/${clientId}`, { + headers: { + 'Content-Type': 'application/json', + 'X-Company-Login': simplybookCompanyName, + 'X-Token': `${token}`, + }, + body: clientData, + }); + LOGGER.log({ event: 'UPDATE_SIMPLYBOOK_CLIENT', fields: [Object.keys(clientData)] }); + return bookingsResponse.data.data; + } catch (error) { + LOGGER.error({ + error: 'SIMPLYBOOK_CLIENT_UPDATE_ERROR', + status: error.status, + errorMessage: error.message, + }); + handleError(`Failed to edit client ${clientId} from Simplybook.`, error); + } +}; + const handleError = (error, message: string) => { LOGGER.error(message, error); throw new Error(`${message}: ${error})`); diff --git a/src/user/user.service.ts b/src/user/user.service.ts index 2ea7fa40..cffd05f2 100644 --- a/src/user/user.service.ts +++ b/src/user/user.service.ts @@ -13,6 +13,7 @@ import { FIREBASE_ERRORS } from 'src/utils/errors'; import { FIREBASE_EVENTS, USER_SERVICE_EVENTS } from 'src/utils/logs'; import { createServiceUserProfiles, + updateServiceUserEmailAndProfiles, updateServiceUserProfilesUser, } from 'src/utils/serviceUserProfiles'; import { And, ILike, IsNull, Not, Raw, Repository } from 'typeorm'; @@ -199,7 +200,7 @@ export class UserService { throw new HttpException('USER NOT FOUND', HttpStatus.NOT_FOUND); } - if (updateUserDto.email) { + if (updateUserDto.email && user.email !== updateUserDto.email) { // check whether email has been updated already in firebase const firebaseUser = await this.authService.getFirebaseUser(user.email); if (firebaseUser.email !== updateUserDto.email) { @@ -224,10 +225,13 @@ export class UserService { fields: Object.keys(updateUserDto), }); - const isCrispBaseUpdateRequired = - user.signUpLanguage !== updateUserDto.signUpLanguage && user.name !== updateUserDto.name; - - updateServiceUserProfilesUser(newUserData, isCrispBaseUpdateRequired, user.email); + if (updateUserDto.email && user.email !== updateUserDto.email) { + updateServiceUserEmailAndProfiles(newUserData, user.email); + } else { + const isCrispBaseUpdateRequired = + user.signUpLanguage !== updateUserDto.signUpLanguage && user.name !== updateUserDto.name; + updateServiceUserProfilesUser(newUserData, isCrispBaseUpdateRequired, user.email); + } return updatedUser; } diff --git a/src/utils/serviceUserProfiles.spec.ts b/src/utils/serviceUserProfiles.spec.ts index 503d4499..b2a0e5ac 100644 --- a/src/utils/serviceUserProfiles.spec.ts +++ b/src/utils/serviceUserProfiles.spec.ts @@ -25,6 +25,8 @@ import { createMailchimpCourseMergeField, createServiceUserProfiles, serializePartnersString, + serializeUserData, + updateServiceUserEmailAndProfiles, updateServiceUserProfilesCourse, updateServiceUserProfilesPartnerAccess, updateServiceUserProfilesTherapy, @@ -564,4 +566,45 @@ describe('Service user profiles', () => { ); }); }); + describe('updateServiceUserEmailAndProfiles', () => { + it("should update the user's email in crisp and mailchimp", async () => { + const oldEmail = mockUserEntity.email; + const newEmail = 'newemail@test.com'; + await updateServiceUserEmailAndProfiles({ ...mockUserEntity, email: newEmail }, oldEmail); + const serialisedMockUserData = serializeUserData(mockUserEntity); + expect(updateCrispProfileBase).toHaveBeenCalledWith( + { email: newEmail, person: { locales: ['en'], nickname: 'name' } }, + oldEmail, + ); + expect(updateCrispProfile).toHaveBeenCalledWith( + { ...serialisedMockUserData.crispSchema }, + newEmail, + ); + expect(updateMailchimpProfile).toHaveBeenCalledWith( + { ...serialisedMockUserData.mailchimpSchema, email_address: newEmail }, + oldEmail, + ); + }); + it('should not throw if request to Mailchimp API call fails', async () => { + const mocked = jest.mocked(updateMailchimpProfile); + mocked.mockRejectedValue(new Error('Mailchimp API call failed')); + const oldEmail = mockUserEntity.email; + const newEmail = 'newemail@test.com'; + + await expect( + updateServiceUserEmailAndProfiles({ ...mockUserEntity, email: newEmail }, oldEmail), + ).resolves.not.toThrow(); + mocked.mockReset(); + }); + it('should not throw if request to Crisp API call fails', async () => { + const mocked = jest.mocked(updateCrispProfileBase); + mocked.mockRejectedValue(new Error('Crisp API call failed')); + const oldEmail = mockUserEntity.email; + const newEmail = 'newemail@test.com'; + await expect( + updateServiceUserEmailAndProfiles({ ...mockUserEntity, email: newEmail }, oldEmail), + ).resolves.not.toThrow(); + mocked.mockReset(); + }); + }); }); diff --git a/src/utils/serviceUserProfiles.ts b/src/utils/serviceUserProfiles.ts index 86fcb0d2..47b00eec 100644 --- a/src/utils/serviceUserProfiles.ts +++ b/src/utils/serviceUserProfiles.ts @@ -90,7 +90,12 @@ export const updateServiceUserProfilesUser = async ( if (isCrispBaseUpdateRequired) { // Extra call required to update crisp "base" profile when name or sign up language is changed await updateCrispProfileBase( - { person: { nickname: user.name, locales: [user.signUpLanguage || 'en'] } }, + { + person: { + nickname: user.name, + locales: [user.signUpLanguage || 'en'], + }, + }, email, ); } @@ -102,6 +107,29 @@ export const updateServiceUserProfilesUser = async ( } }; +export const updateServiceUserEmailAndProfiles = async (user: UserEntity, email: string) => { + try { + await updateCrispProfileBase( + { + email: user.email, + person: { + nickname: user.name, + locales: [user.signUpLanguage || 'en'], + }, + }, + email, + ); + logger.log({ event: 'UPDATE_CRISP_PROFILE_BASE', userId: user.id }); + const userData = serializeUserData(user); + await updateCrispProfile(userData.crispSchema, user.email); + logger.log({ event: 'UPDATE_CRISP_PROFILE', userId: user.id }); + await updateMailchimpProfile({ ...userData.mailchimpSchema, email_address: user.email }, email); + logger.log({ event: 'UPDATE_MAILCHIMP_PROFILE', userId: user.id }); + } catch (error) { + logger.error(`Update service user profiles user error - ${error}`); + } +}; + export const updateServiceUserProfilesPartnerAccess = async ( partnerAccesses: PartnerAccessEntity[], email: string, @@ -215,7 +243,7 @@ const serializeCrispPartnerSegments = (partners: PartnerEntity[]) => { return partners.map((p) => p.name.toLowerCase()); }; -const serializeUserData = (user: UserEntity) => { +export const serializeUserData = (user: UserEntity) => { const { name, signUpLanguage, From 9020bf024cd3c73494b9533b14bd962cd6ff81b5 Mon Sep 17 00:00:00 2001 From: Conor Kirby <67641390+ckirby19@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:26:32 +0100 Subject: [PATCH 02/13] =?UTF-8?q?Added=20session=20feedback=20controller?= =?UTF-8?q?=20and=20service=20with=20tests=20for=20error=20an=E2=80=A6=20(?= =?UTF-8?q?#520)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added session feedback controller and service with tests for error and success cases * Removed interface from PR as not needed --- src/app.module.ts | 2 + .../dtos/session-feedback.dto.ts | 29 +++++ .../session-feedback.controller.ts | 25 ++++ .../session-feedback.module.ts | 48 ++++++++ .../session-feedback.service.spec.ts | 112 ++++++++++++++++++ .../session-feedback.service.ts | 51 ++++++++ 6 files changed, 267 insertions(+) create mode 100644 src/session-feedback/dtos/session-feedback.dto.ts create mode 100644 src/session-feedback/session-feedback.controller.ts create mode 100644 src/session-feedback/session-feedback.module.ts create mode 100644 src/session-feedback/session-feedback.service.spec.ts create mode 100644 src/session-feedback/session-feedback.service.ts diff --git a/src/app.module.ts b/src/app.module.ts index 9929f054..ca87f501 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -14,6 +14,7 @@ import { PartnerAccessModule } from './partner-access/partner-access.module'; import { PartnerAdminModule } from './partner-admin/partner-admin.module'; import { PartnerFeatureModule } from './partner-feature/partner-feature.module'; import { PartnerModule } from './partner/partner.module'; +import { SessionFeedbackModule } from './session-feedback/session-feedback.module'; import { SessionUserModule } from './session-user/session-user.module'; import { SessionModule } from './session/session.module'; import { SubscriptionUserModule } from './subscription-user/subscription-user.module'; @@ -35,6 +36,7 @@ import { WebhooksModule } from './webhooks/webhooks.module'; CourseModule, CourseUserModule, SessionUserModule, + SessionFeedbackModule, CoursePartnerModule, SubscriptionUserModule, FeatureModule, diff --git a/src/session-feedback/dtos/session-feedback.dto.ts b/src/session-feedback/dtos/session-feedback.dto.ts new file mode 100644 index 00000000..2e5fedec --- /dev/null +++ b/src/session-feedback/dtos/session-feedback.dto.ts @@ -0,0 +1,29 @@ +import { ApiProperty } from '@nestjs/swagger'; +import { IsEnum, IsNotEmpty, IsString } from 'class-validator'; +import { FEEDBACK_TAGS_ENUM } from 'src/utils/constants'; + +export class SessionFeedbackDto { + @IsNotEmpty() + @IsString() + @ApiProperty({ type: String }) + sessionFeedbackId: string; + + @IsNotEmpty() + @IsString() + @ApiProperty({ type: String }) + sessionId: string; + + @IsNotEmpty() + @IsEnum(FEEDBACK_TAGS_ENUM) + @ApiProperty({ + enum: FEEDBACK_TAGS_ENUM, + type: String, + example: Object.values(FEEDBACK_TAGS_ENUM), + }) + feedbackTags: FEEDBACK_TAGS_ENUM; + + @IsNotEmpty() + @IsString() + @ApiProperty({ type: String }) + feedbackDescription: string; +} diff --git a/src/session-feedback/session-feedback.controller.ts b/src/session-feedback/session-feedback.controller.ts new file mode 100644 index 00000000..3793e3fd --- /dev/null +++ b/src/session-feedback/session-feedback.controller.ts @@ -0,0 +1,25 @@ +import { Body, Controller, Post, UseGuards } from '@nestjs/common'; +import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; +import { ControllerDecorator } from 'src/utils/controller.decorator'; +import { FirebaseAuthGuard } from '../firebase/firebase-auth.guard'; +import { SessionFeedbackDto } from './dtos/session-feedback.dto'; +import { SessionFeedbackService } from './session-feedback.service'; + +@ApiTags('Session Feedback') +@ControllerDecorator() +@Controller('/v1/session-feedback') +export class SessionFeedbackController { + constructor(private readonly sessionFeedbackService: SessionFeedbackService) {} + + @Post() + @ApiBearerAuth('access-token') + @ApiOperation({ + description: 'Stores feedback from a user', + }) + @UseGuards(FirebaseAuthGuard) + async storeUserFeedback( + @Body() sessionFeedbackDto: SessionFeedbackDto, + ): Promise { + return await this.sessionFeedbackService.createSessionFeedback(sessionFeedbackDto); + } +} diff --git a/src/session-feedback/session-feedback.module.ts b/src/session-feedback/session-feedback.module.ts new file mode 100644 index 00000000..c69d6b65 --- /dev/null +++ b/src/session-feedback/session-feedback.module.ts @@ -0,0 +1,48 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { SlackMessageClient } from 'src/api/slack/slack-api'; +import { ZapierWebhookClient } from 'src/api/zapier/zapier-webhook-client'; +import { PartnerAccessEntity } from 'src/entities/partner-access.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; +import { SessionFeedbackEntity } from 'src/entities/session-feedback.entity'; +import { SessionEntity } from 'src/entities/session.entity'; +import { SubscriptionUserEntity } from 'src/entities/subscription-user.entity'; +import { SubscriptionEntity } from 'src/entities/subscription.entity'; +import { TherapySessionEntity } from 'src/entities/therapy-session.entity'; +import { UserEntity } from 'src/entities/user.entity'; +import { PartnerAccessService } from 'src/partner-access/partner-access.service'; +import { SessionService } from 'src/session/session.service'; +import { SubscriptionUserService } from 'src/subscription-user/subscription-user.service'; +import { SubscriptionService } from 'src/subscription/subscription.service'; +import { TherapySessionService } from 'src/therapy-session/therapy-session.service'; +import { UserService } from 'src/user/user.service'; +import { SessionFeedbackController } from './session-feedback.controller'; +import { SessionFeedbackService } from './session-feedback.service'; + +@Module({ + imports: [ + TypeOrmModule.forFeature([ + SessionFeedbackEntity, + SessionEntity, + UserEntity, + PartnerAccessEntity, + PartnerEntity, + SubscriptionUserEntity, + SubscriptionEntity, + TherapySessionEntity, + ]), + ], + controllers: [SessionFeedbackController], + providers: [ + SessionFeedbackService, + SessionService, + UserService, + SubscriptionUserService, + SubscriptionService, + PartnerAccessService, + TherapySessionService, + ZapierWebhookClient, + SlackMessageClient, + ], +}) +export class SessionFeedbackModule {} diff --git a/src/session-feedback/session-feedback.service.spec.ts b/src/session-feedback/session-feedback.service.spec.ts new file mode 100644 index 00000000..91962645 --- /dev/null +++ b/src/session-feedback/session-feedback.service.spec.ts @@ -0,0 +1,112 @@ +import { createMock, DeepMocked } from '@golevelup/ts-jest'; +import { HttpException, HttpStatus } from '@nestjs/common'; +import { Test, TestingModule } from '@nestjs/testing'; +import { getRepositoryToken } from '@nestjs/typeorm'; +import { PartnerAccessEntity } from 'src/entities/partner-access.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; +import { SessionFeedbackEntity } from 'src/entities/session-feedback.entity'; +import { SessionEntity } from 'src/entities/session.entity'; +import { SubscriptionUserEntity } from 'src/entities/subscription-user.entity'; +import { SubscriptionEntity } from 'src/entities/subscription.entity'; +import { TherapySessionEntity } from 'src/entities/therapy-session.entity'; +import { UserEntity } from 'src/entities/user.entity'; +import { SessionFeedbackService } from 'src/session-feedback/session-feedback.service'; +import { SessionService } from 'src/session/session.service'; +import { FEEDBACK_TAGS_ENUM } from 'src/utils/constants'; +import { mockSessionEntity } from 'test/utils/mockData'; +import { Repository } from 'typeorm'; + +const sessionFeedbackDto = { + sessionFeedbackId: 'session-feedback-id', + sessionId: mockSessionEntity.id, + feedbackTags: FEEDBACK_TAGS_ENUM.INSPIRING, + feedbackDescription: 'feedback-description', +}; + +describe('SessionFeedbackService', () => { + let service: SessionFeedbackService; + let mockPartnerAccessRepository: DeepMocked>; + let mockPartnerRepository: DeepMocked>; + let mockUserRepository: DeepMocked>; + let mockSessionRepository: DeepMocked>; + let mockSubscriptionUserRepository: DeepMocked>; + let mockSubscriptionRepository: DeepMocked>; + let mockTherapySessionRepository: DeepMocked>; + let mockSessionFeedbackRepository: DeepMocked>; + let mockSessionService: DeepMocked; + + beforeEach(async () => { + mockPartnerAccessRepository = createMock>(); + mockPartnerRepository = createMock>(); + mockUserRepository = createMock>(); + mockSessionRepository = createMock>(); + mockSubscriptionUserRepository = createMock>(); + mockSubscriptionRepository = createMock>(); + mockTherapySessionRepository = createMock>(); + mockSessionFeedbackRepository = createMock>(); + mockSessionService = createMock(); + + const module: TestingModule = await Test.createTestingModule({ + providers: [ + SessionFeedbackService, + { + provide: getRepositoryToken(PartnerAccessEntity), + useValue: mockPartnerAccessRepository, + }, + { + provide: getRepositoryToken(PartnerEntity), + useValue: mockPartnerRepository, + }, + { + provide: getRepositoryToken(UserEntity), + useValue: mockUserRepository, + }, + { + provide: getRepositoryToken(SessionEntity), + useValue: mockSessionRepository, + }, + { + provide: getRepositoryToken(SubscriptionUserEntity), + useValue: mockSubscriptionUserRepository, + }, + { + provide: getRepositoryToken(SubscriptionEntity), + useValue: mockSubscriptionRepository, + }, + { + provide: getRepositoryToken(TherapySessionEntity), + useValue: mockTherapySessionRepository, + }, + { + provide: getRepositoryToken(SessionFeedbackEntity), + useValue: mockSessionFeedbackRepository, + }, + { + provide: SessionService, + useValue: mockSessionService, + }, + ], + }).compile(); + + service = module.get(SessionFeedbackService); + }); + + it('should be defined', () => { + expect(service).toBeDefined(); + }); + describe('createSessionFeedback', () => { + it('when session id exists should return dto', async () => { + jest.spyOn(mockSessionService, 'getSession').mockResolvedValueOnce(mockSessionEntity); + const response = await service.createSessionFeedback(sessionFeedbackDto); + + expect(response).toMatchObject(sessionFeedbackDto); + }); + it('when session id does not exist should throw exception', async () => { + jest.spyOn(mockSessionService, 'getSession').mockResolvedValueOnce(null); + + await expect(service.createSessionFeedback(sessionFeedbackDto)).rejects.toThrow( + new HttpException('SESSION NOT FOUND', HttpStatus.NOT_FOUND), + ); + }); + }); +}); diff --git a/src/session-feedback/session-feedback.service.ts b/src/session-feedback/session-feedback.service.ts new file mode 100644 index 00000000..b8946819 --- /dev/null +++ b/src/session-feedback/session-feedback.service.ts @@ -0,0 +1,51 @@ +import { HttpException, HttpStatus, Injectable } from '@nestjs/common'; +import { InjectRepository } from '@nestjs/typeorm'; +import { PartnerAccessEntity } from 'src/entities/partner-access.entity'; +import { PartnerEntity } from 'src/entities/partner.entity'; +import { SessionFeedbackEntity } from 'src/entities/session-feedback.entity'; +import { SessionEntity } from 'src/entities/session.entity'; +import { SubscriptionUserEntity } from 'src/entities/subscription-user.entity'; +import { SubscriptionEntity } from 'src/entities/subscription.entity'; +import { TherapySessionEntity } from 'src/entities/therapy-session.entity'; +import { UserEntity } from 'src/entities/user.entity'; +import { Repository } from 'typeorm'; +import { SessionService } from '../session/session.service'; +import { SessionFeedbackDto } from './dtos/session-feedback.dto'; + +@Injectable() +export class SessionFeedbackService { + constructor( + @InjectRepository(PartnerAccessEntity) + private partnerAccessRepository: Repository, + @InjectRepository(PartnerEntity) + private partnerRepository: Repository, + @InjectRepository(UserEntity) + private userRepository: Repository, + @InjectRepository(SessionEntity) + private sessionRepository: Repository, + @InjectRepository(SubscriptionUserEntity) + private subscriptionUserRepository: Repository, + @InjectRepository(SubscriptionEntity) + private subscriptionRepository: Repository, + @InjectRepository(TherapySessionEntity) + private therapySessionRepository: Repository, + @InjectRepository(SessionFeedbackEntity) + private sessionFeedbackRepository: Repository, + private readonly sessionService: SessionService, + ) {} + + public async createSessionFeedback( + sessionFeedbackDto: SessionFeedbackDto, + ): Promise { + const session = await this.sessionService.getSession(sessionFeedbackDto.sessionId); + + if (!session) { + throw new HttpException('SESSION NOT FOUND', HttpStatus.NOT_FOUND); + } + + const sessionFeedbackObject = this.sessionFeedbackRepository.create(sessionFeedbackDto); + await this.sessionFeedbackRepository.save(sessionFeedbackObject); + + return sessionFeedbackDto; + } +} From fd540fa79a30c59c178164766270c26fb32bd221 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:17:58 +0000 Subject: [PATCH 03/13] chore(deps): bump actions/checkout from 2 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/.ci.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/.ci.yml b/.github/workflows/.ci.yml index 17451124..76125f35 100644 --- a/.github/workflows/.ci.yml +++ b/.github/workflows/.ci.yml @@ -13,7 +13,7 @@ jobs: SIMPLYBOOK_CREDENTIALS: '{"login": "login"}' STORYBLOK_WEBHOOK_SECRET: ${{ secrets.STORYBLOK_WEBHOOK_SECRET }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ac4e4308..9c04742a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL From 45d6909c50c3a613b564a2a7ec4cc8f89c203146 Mon Sep 17 00:00:00 2001 From: sangilyun Date: Sun, 14 Jul 2024 13:37:55 +0900 Subject: [PATCH 04/13] create a PATCH partner endpoint --- src/partner/dtos/update-partner.dto.ts | 8 ++++++++ src/partner/partner.controller.ts | 14 +++++++++----- src/partner/partner.service.spec.ts | 26 ++++++++++++++++++++++++++ src/partner/partner.service.ts | 16 ++++++++++++++++ 4 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 src/partner/dtos/update-partner.dto.ts diff --git a/src/partner/dtos/update-partner.dto.ts b/src/partner/dtos/update-partner.dto.ts new file mode 100644 index 00000000..3f5634f3 --- /dev/null +++ b/src/partner/dtos/update-partner.dto.ts @@ -0,0 +1,8 @@ +import { IsBoolean } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; + +export class UpdatePartnerDto { + @IsBoolean() + @ApiProperty({ type: Boolean }) + active: boolean; +} \ No newline at end of file diff --git a/src/partner/partner.controller.ts b/src/partner/partner.controller.ts index 6999b9b9..66381e68 100644 --- a/src/partner/partner.controller.ts +++ b/src/partner/partner.controller.ts @@ -1,4 +1,4 @@ -import { Body, Controller, Get, Param, Post, UseGuards } from '@nestjs/common'; +import { Body, Controller, Get, Param, Patch, Post, UseGuards } from '@nestjs/common'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiParam, ApiTags } from '@nestjs/swagger'; import { formatPartnerObject } from 'src/utils/serialize'; import { PartnerEntity } from '../entities/partner.entity'; @@ -8,6 +8,7 @@ import { CreatePartnerDto } from './dtos/create-partner.dto'; import { DeletePartnerDto } from './dtos/delete-partner.dto'; import { IPartner } from './partner.interface'; import { PartnerService } from './partner.service'; +import { UpdatePartnerDto } from './dtos/update-partner.dto'; @ApiTags('Partner') @ControllerDecorator() @@ -46,10 +47,13 @@ export class PartnerController { @ApiBearerAuth('access-token') @UseGuards(SuperAdminAuthGuard) - @Post('delete') - @ApiOperation({ description: 'Deletes a partner profile and makes partnerAccess inactive' }) + @Patch(':id') + @ApiOperation({ description: 'Update a partner profile and makes partnerAccess inactive' }) @ApiBody({ type: DeletePartnerDto }) - async deletePartner(@Body() deletePartnerDto: DeletePartnerDto) { - return this.partnerService.deletePartner(deletePartnerDto); + async deletePartner( + @Param() { id }, + @Body() deletePartnerDto: UpdatePartnerDto, + ) { + return this.partnerService.updatePartner(id, deletePartnerDto); } } diff --git a/src/partner/partner.service.spec.ts b/src/partner/partner.service.spec.ts index b84ab1f8..e76f454d 100644 --- a/src/partner/partner.service.spec.ts +++ b/src/partner/partner.service.spec.ts @@ -9,6 +9,7 @@ import { PartnerAdminEntity } from '../entities/partner-admin.entity'; import { UserEntity } from '../entities/user.entity'; import { mockPartnerRepositoryMethods } from '../../test/utils/mockedServices'; import { mockPartnerEntity } from '../../test/utils/mockData'; +import { createQueryBuilderMock } from '../../test/utils/mockUtils'; const createPartnerDto = { name: mockPartnerEntity.name, @@ -59,4 +60,29 @@ describe('PartnerService', () => { await expect(service.createPartner(createPartnerDto)).rejects.toThrow(); }) }); + + describe('updatePartner', () => { + it('when supplied with correct data should return new partner', async () => { + jest.spyOn(mockPartnerRepository, 'createQueryBuilder').mockImplementationOnce( + createQueryBuilderMock({ + execute: jest + .fn() + .mockResolvedValue({raw: [{ ...mockPartnerEntity, active: false }]}) + }) as never, // TODO resolve this typescript issue + ); + + const response = await service.updatePartner(mockPartnerEntity.id, { active: false }); + expect(response).toMatchObject({ ...mockPartnerEntity, active: false }); + }) + + it('when supplied with incorrect partnerName should throw', async () => { + jest.spyOn(mockPartnerRepository, 'createQueryBuilder').mockImplementationOnce(() => { + throw new Error('Error unable to update'); + }) + + await expect( + service.updatePartner(mockPartnerEntity.id, { active: false }) + ).rejects.toThrow('Error unable to update'); + }) + }) }); \ No newline at end of file diff --git a/src/partner/partner.service.ts b/src/partner/partner.service.ts index 15542d26..5555cc9b 100644 --- a/src/partner/partner.service.ts +++ b/src/partner/partner.service.ts @@ -7,6 +7,7 @@ import { In, Repository } from 'typeorm'; import { PartnerEntity } from '../entities/partner.entity'; import { CreatePartnerDto } from './dtos/create-partner.dto'; import { DeletePartnerDto } from './dtos/delete-partner.dto'; +import { UpdatePartnerDto } from './dtos/update-partner.dto'; @Injectable() export class PartnerService { @@ -90,4 +91,19 @@ export class PartnerService { return 'Successful'; } + + async updatePartner(partnerId: string, { active }: UpdatePartnerDto){ + const updatedPartnerResponse = await this.partnerRepository + .createQueryBuilder() + .update(PartnerEntity) + .set({ isActive: active }) + .where('id = :id', { id: partnerId }) + .returning('*') + .execute(); + if (updatedPartnerResponse.raw.length > 0) { + return updatedPartnerResponse.raw[0]; + } else { + throw new Error('Failed to update partner'); + } + } } From 81aeaada4d83a46dd1d2920dcdbca3fec65971ce Mon Sep 17 00:00:00 2001 From: sangilyun Date: Sun, 14 Jul 2024 13:40:34 +0900 Subject: [PATCH 05/13] update function name and param --- src/partner/partner.controller.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/partner/partner.controller.ts b/src/partner/partner.controller.ts index 66381e68..b863cb29 100644 --- a/src/partner/partner.controller.ts +++ b/src/partner/partner.controller.ts @@ -48,12 +48,12 @@ export class PartnerController { @ApiBearerAuth('access-token') @UseGuards(SuperAdminAuthGuard) @Patch(':id') - @ApiOperation({ description: 'Update a partner profile and makes partnerAccess inactive' }) + @ApiOperation({ description: 'Update a partner profile and makes partner active or inactive' }) @ApiBody({ type: DeletePartnerDto }) - async deletePartner( + async updatePartner( @Param() { id }, - @Body() deletePartnerDto: UpdatePartnerDto, + @Body() updatePartnerDto: UpdatePartnerDto, ) { - return this.partnerService.updatePartner(id, deletePartnerDto); + return this.partnerService.updatePartner(id, updatePartnerDto); } } From 561989857e74c6d5ee406c0d3f796a4f4c1bb588 Mon Sep 17 00:00:00 2001 From: sangilyun Date: Sun, 14 Jul 2024 13:40:52 +0900 Subject: [PATCH 06/13] update function name and param --- src/partner/partner.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partner/partner.controller.ts b/src/partner/partner.controller.ts index b863cb29..72ea9c1e 100644 --- a/src/partner/partner.controller.ts +++ b/src/partner/partner.controller.ts @@ -49,7 +49,7 @@ export class PartnerController { @UseGuards(SuperAdminAuthGuard) @Patch(':id') @ApiOperation({ description: 'Update a partner profile and makes partner active or inactive' }) - @ApiBody({ type: DeletePartnerDto }) + @ApiBody({ type: UpdatePartnerDto }) async updatePartner( @Param() { id }, @Body() updatePartnerDto: UpdatePartnerDto, From 95e59cb568925dc35f470e599bb584fb1b8dff6d Mon Sep 17 00:00:00 2001 From: sangilyun Date: Sun, 14 Jul 2024 13:41:02 +0900 Subject: [PATCH 07/13] update function name and param --- src/partner/partner.controller.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/partner/partner.controller.ts b/src/partner/partner.controller.ts index 72ea9c1e..d3bafd3e 100644 --- a/src/partner/partner.controller.ts +++ b/src/partner/partner.controller.ts @@ -5,7 +5,6 @@ import { PartnerEntity } from '../entities/partner.entity'; import { SuperAdminAuthGuard } from '../partner-admin/super-admin-auth.guard'; import { ControllerDecorator } from '../utils/controller.decorator'; import { CreatePartnerDto } from './dtos/create-partner.dto'; -import { DeletePartnerDto } from './dtos/delete-partner.dto'; import { IPartner } from './partner.interface'; import { PartnerService } from './partner.service'; import { UpdatePartnerDto } from './dtos/update-partner.dto'; From 7bb7141eba5e3503c05f1d2f73df077599e3a466 Mon Sep 17 00:00:00 2001 From: Conor Kirby Date: Mon, 22 Jul 2024 21:21:55 +0100 Subject: [PATCH 08/13] ticket-858 removed sessionFeedbackId from Dto --- src/session-feedback/dtos/session-feedback.dto.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/session-feedback/dtos/session-feedback.dto.ts b/src/session-feedback/dtos/session-feedback.dto.ts index 2e5fedec..4dea3b32 100644 --- a/src/session-feedback/dtos/session-feedback.dto.ts +++ b/src/session-feedback/dtos/session-feedback.dto.ts @@ -3,11 +3,6 @@ import { IsEnum, IsNotEmpty, IsString } from 'class-validator'; import { FEEDBACK_TAGS_ENUM } from 'src/utils/constants'; export class SessionFeedbackDto { - @IsNotEmpty() - @IsString() - @ApiProperty({ type: String }) - sessionFeedbackId: string; - @IsNotEmpty() @IsString() @ApiProperty({ type: String }) From 7c393da270baf8ddc7a37ab8148f15d444950896 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:36:38 +0000 Subject: [PATCH 09/13] chore(deps): bump rimraf from 5.0.7 to 6.0.1 Bumps [rimraf](https://github.com/isaacs/rimraf) from 5.0.7 to 6.0.1. - [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md) - [Commits](https://github.com/isaacs/rimraf/compare/v5.0.7...v6.0.1) --- updated-dependencies: - dependency-name: rimraf dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 71 +++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 66 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 6d7e1033..c316132a 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "pg": "^8.11.5", "pg-connection-string": "^2.6.4", "reflect-metadata": "^0.2.1", - "rimraf": "^5.0.5", + "rimraf": "^6.0.1", "rollbar": "^2.26.4", "rxjs": "^7.8.1", "storyblok-js-client": "^6.7.1", diff --git a/yarn.lock b/yarn.lock index 14e084db..bbd3517d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3539,6 +3539,13 @@ file-entry-cache@^8.0.0: dependencies: flat-cache "^4.0.0" +filelist@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" + integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== + dependencies: + minimatch "^5.0.1" + fill-range@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" @@ -3877,7 +3884,7 @@ glob@10.3.10: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@^10.2.2, glob@^10.3.10, glob@^10.3.7: +glob@^10.2.2, glob@^10.3.10: version "10.3.15" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.15.tgz#e72bc61bc3038c90605f5dd48543dc67aaf3b50d" integrity sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw== @@ -3888,6 +3895,18 @@ glob@^10.2.2, glob@^10.3.10, glob@^10.3.7: minipass "^7.0.4" path-scurry "^1.11.0" +glob@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-11.0.0.tgz#6031df0d7b65eaa1ccb9b29b5ced16cea658e77e" + integrity sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g== + dependencies: + foreground-child "^3.1.0" + jackspeak "^4.0.1" + minimatch "^10.0.0" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + glob@^7.0.0, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -4441,6 +4460,15 @@ jackspeak@^2.3.5, jackspeak@^2.3.6: optionalDependencies: "@pkgjs/parseargs" "^0.11.0" +jackspeak@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.0.1.tgz#9fca4ce961af6083e259c376e9e3541431f5287b" + integrity sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jake@^10.8.5: version "10.9.1" resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.1.tgz#8dc96b7fcc41cb19aa502af506da4e1d56f5e62b" @@ -5155,6 +5183,11 @@ lru-cache@^10.0.1, lru-cache@^10.2.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.2.tgz#48206bc114c1252940c41b25b41af5b545aca878" integrity sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ== +lru-cache@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.0.0.tgz#15d93a196f189034d7166caf9fe55e7384c98a21" + integrity sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -5301,6 +5334,13 @@ minimalistic-assert@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== +minimatch@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.0.1.tgz#ce0521856b453c86e25f2c4c0d03e6ff7ddc440b" + integrity sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -5395,6 +5435,11 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.1.tgz#f7f85aff59aa22f110b20e27692465cf3bf89481" integrity sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA== +minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -5727,6 +5772,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" + integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -5799,6 +5849,14 @@ path-scurry@^1.10.1, path-scurry@^1.11.0, path-scurry@^1.6.1: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-scurry@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.0.tgz#9f052289f23ad8bf9397a2a0425e7b8615c58580" + integrity sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -6289,12 +6347,13 @@ rimraf@4.4.1: dependencies: glob "^9.2.0" -rimraf@^5.0.5: - version "5.0.7" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.7.tgz#27bddf202e7d89cb2e0381656380d1734a854a74" - integrity sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg== +rimraf@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-6.0.1.tgz#ffb8ad8844dd60332ab15f52bc104bc3ed71ea4e" + integrity sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A== dependencies: - glob "^10.3.7" + glob "^11.0.0" + package-json-from-dist "^1.0.0" ringbufferjs@^2.0.0: version "2.0.0" From 7cd40d959033fefa05b4325efa340326e5660228 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:36:46 +0000 Subject: [PATCH 10/13] chore(deps-dev): bump ts-jest from 29.2.2 to 29.2.3 Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.2 to 29.2.3. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.2...v29.2.3) --- updated-dependencies: - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c316132a..7602d7a3 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "jest": "^29.7.0", "prettier": "^3.2.5", "supertest": "^7.0.0", - "ts-jest": "^29.2.2", + "ts-jest": "^29.2.3", "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", diff --git a/yarn.lock b/yarn.lock index bbd3517d..813833dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3079,7 +3079,7 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -ejs@^3.0.0: +ejs@^3.1.10: version "3.1.10" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== @@ -7070,13 +7070,13 @@ ts-api-utils@^1.3.0: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== -ts-jest@^29.2.2: - version "29.2.2" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.2.tgz#0d2387bb04d39174b20a05172a968f258aedff4d" - integrity sha512-sSW7OooaKT34AAngP6k1VS669a0HdLxkQZnlC7T76sckGCokXFnvJ3yRlQZGRTAoV5K19HfSgCiSwWOSIfcYlg== +ts-jest@^29.2.3: + version "29.2.3" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.3.tgz#3d226ac36b8b820151a38f164414f9f6b412131f" + integrity sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ== dependencies: bs-logger "0.x" - ejs "^3.0.0" + ejs "^3.1.10" fast-json-stable-stringify "2.x" jest-util "^29.0.0" json5 "^2.2.3" From 8ce582c893b780e3b79f35e9bf88584911df08f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:37:00 +0000 Subject: [PATCH 11/13] chore(deps-dev): bump typescript-eslint from 7.9.0 to 7.16.1 Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 7.9.0 to 7.16.1. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.1/packages/typescript-eslint) --- updated-dependencies: - dependency-name: typescript-eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 114 +++++++++++++++++++++++++-------------------------- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/package.json b/package.json index 7602d7a3..f0d9eec8 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", "typescript": "^5.4.5", - "typescript-eslint": "^7.6.0" + "typescript-eslint": "^7.16.1" }, "engines": { "node": "20.x", diff --git a/yarn.lock b/yarn.lock index 813833dc..aa5f44ec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1812,62 +1812,62 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.9.0.tgz#093b96fc4e342226e65d5f18f9c87081e0b04a31" - integrity sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA== +"@typescript-eslint/eslint-plugin@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.1.tgz#f5f5da52db674b1f2cdb9d5f3644e5b2ec750465" + integrity sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/type-utils" "7.9.0" - "@typescript-eslint/utils" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/scope-manager" "7.16.1" + "@typescript-eslint/type-utils" "7.16.1" + "@typescript-eslint/utils" "7.16.1" + "@typescript-eslint/visitor-keys" "7.16.1" graphemer "^1.4.0" ignore "^5.3.1" natural-compare "^1.4.0" ts-api-utils "^1.3.0" -"@typescript-eslint/parser@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.9.0.tgz#fb3ba01b75e0e65cb78037a360961b00301f6c70" - integrity sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ== +"@typescript-eslint/parser@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.16.1.tgz#84c581cf86c8b2becd48d33ddc41a6303d57b274" + integrity sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA== dependencies: - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/typescript-estree" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/scope-manager" "7.16.1" + "@typescript-eslint/types" "7.16.1" + "@typescript-eslint/typescript-estree" "7.16.1" + "@typescript-eslint/visitor-keys" "7.16.1" debug "^4.3.4" -"@typescript-eslint/scope-manager@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz#1dd3e63a4411db356a9d040e75864851b5f2619b" - integrity sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ== +"@typescript-eslint/scope-manager@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.16.1.tgz#2b43041caabf8ddd74512b8b550b9fc53ca3afa1" + integrity sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw== dependencies: - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/types" "7.16.1" + "@typescript-eslint/visitor-keys" "7.16.1" -"@typescript-eslint/type-utils@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.9.0.tgz#f523262e1b66ca65540b7a65a1222db52e0a90c9" - integrity sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA== +"@typescript-eslint/type-utils@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz#4d7ae4f3d9e3c8cbdabae91609b1a431de6aa6ca" + integrity sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA== dependencies: - "@typescript-eslint/typescript-estree" "7.9.0" - "@typescript-eslint/utils" "7.9.0" + "@typescript-eslint/typescript-estree" "7.16.1" + "@typescript-eslint/utils" "7.16.1" debug "^4.3.4" ts-api-utils "^1.3.0" -"@typescript-eslint/types@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.9.0.tgz#b58e485e4bfba055659c7e683ad4f5f0821ae2ec" - integrity sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w== +"@typescript-eslint/types@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.16.1.tgz#bbab066276d18e398bc64067b23f1ce84dfc6d8c" + integrity sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ== -"@typescript-eslint/typescript-estree@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz#3395e27656060dc313a6b406c3a298b729685e07" - integrity sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg== +"@typescript-eslint/typescript-estree@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.1.tgz#9b145ba4fd1dde1986697e1ce57dc501a1736dd3" + integrity sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ== dependencies: - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/visitor-keys" "7.9.0" + "@typescript-eslint/types" "7.16.1" + "@typescript-eslint/visitor-keys" "7.16.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -1875,22 +1875,22 @@ semver "^7.6.0" ts-api-utils "^1.3.0" -"@typescript-eslint/utils@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.9.0.tgz#1b96a34eefdca1c820cb1bbc2751d848b4540899" - integrity sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA== +"@typescript-eslint/utils@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.16.1.tgz#df42dc8ca5a4603016fd102db0346cdab415cdb7" + integrity sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.9.0" - "@typescript-eslint/types" "7.9.0" - "@typescript-eslint/typescript-estree" "7.9.0" + "@typescript-eslint/scope-manager" "7.16.1" + "@typescript-eslint/types" "7.16.1" + "@typescript-eslint/typescript-estree" "7.16.1" -"@typescript-eslint/visitor-keys@7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz#82162656e339c3def02895f5c8546f6888d9b9ea" - integrity sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ== +"@typescript-eslint/visitor-keys@7.16.1": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.1.tgz#4287bcf44c34df811ff3bb4d269be6cfc7d8c74b" + integrity sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg== dependencies: - "@typescript-eslint/types" "7.9.0" + "@typescript-eslint/types" "7.16.1" eslint-visitor-keys "^3.4.3" "@tyriar/fibonacci-heap@^2.0.7": @@ -7206,14 +7206,14 @@ typeorm@^0.3.20: uuid "^9.0.0" yargs "^17.6.2" -typescript-eslint@^7.6.0: - version "7.9.0" - resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.9.0.tgz#353312f356ef4ba20105a4e2e736aa8c68f096a2" - integrity sha512-7iTn9c10teHHCys5Ud/yaJntXZrjt3h2mrx3feJGBOLgQkF3TB1X89Xs3aVQ/GgdXRAXpk2bPTdpRwHP4YkUow== +typescript-eslint@^7.16.1: + version "7.16.1" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-7.16.1.tgz#4855e11985b3dbd13a94b4e7e6523b2ec5d1c759" + integrity sha512-889oE5qELj65q/tGeOSvlreNKhimitFwZqQ0o7PcWC7/lgRkAMknznsCsV8J8mZGTP/Z+cIbX8accf2DE33hrA== dependencies: - "@typescript-eslint/eslint-plugin" "7.9.0" - "@typescript-eslint/parser" "7.9.0" - "@typescript-eslint/utils" "7.9.0" + "@typescript-eslint/eslint-plugin" "7.16.1" + "@typescript-eslint/parser" "7.16.1" + "@typescript-eslint/utils" "7.16.1" typescript@5.3.3: version "5.3.3" From 1fd5c9d1b6912a360bb213908dd93e51125e7d1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:37:08 +0000 Subject: [PATCH 12/13] chore(deps): bump @nestjs/swagger from 7.3.1 to 7.4.0 Bumps [@nestjs/swagger](https://github.com/nestjs/swagger) from 7.3.1 to 7.4.0. - [Release notes](https://github.com/nestjs/swagger/releases) - [Changelog](https://github.com/nestjs/swagger/blob/master/.release-it.json) - [Commits](https://github.com/nestjs/swagger/compare/7.3.1...7.4.0) --- updated-dependencies: - dependency-name: "@nestjs/swagger" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index f0d9eec8..94f61426 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@nestjs/config": "^3.2.2", "@nestjs/core": "^10.3.6", "@nestjs/platform-express": "^10.3.7", - "@nestjs/swagger": "^7.3.1", + "@nestjs/swagger": "^7.4.0", "@nestjs/terminus": "^10.2.3", "@nestjs/typeorm": "^10.0.2", "axios": "^1.7.2", diff --git a/yarn.lock b/yarn.lock index aa5f44ec..2e086a55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1176,10 +1176,10 @@ dotenv "^8.2.0" superagent "3.8.1" -"@microsoft/tsdoc@^0.14.2": - version "0.14.2" - resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.14.2.tgz#c3ec604a0b54b9a9b87e9735dfc59e1a5da6a5fb" - integrity sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug== +"@microsoft/tsdoc@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@microsoft/tsdoc/-/tsdoc-0.15.0.tgz#f29a55df17cb6e87cfbabce33ff6a14a9f85076d" + integrity sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA== "@nestjs/axios@^3.0.2": version "3.0.2" @@ -1272,17 +1272,17 @@ jsonc-parser "3.2.1" pluralize "8.0.0" -"@nestjs/swagger@^7.3.1": - version "7.3.1" - resolved "https://registry.yarnpkg.com/@nestjs/swagger/-/swagger-7.3.1.tgz#353fdd5bd6f23564505117b1c82d7decc145e8fe" - integrity sha512-LUC4mr+5oAleEC/a2j8pNRh1S5xhKXJ1Gal5ZdRjt9XebQgbngXCdW7JTA9WOEcwGtFZN9EnKYdquzH971LZfw== +"@nestjs/swagger@^7.4.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@nestjs/swagger/-/swagger-7.4.0.tgz#e61dbefdfc1d4011327a256896953c74e511c850" + integrity sha512-dCiwKkRxcR7dZs5jtrGspBAe/nqJd1AYzOBTzw9iCdbq3BGrLpwokelk6lFZPe4twpTsPQqzNKBwKzVbI6AR/g== dependencies: - "@microsoft/tsdoc" "^0.14.2" + "@microsoft/tsdoc" "^0.15.0" "@nestjs/mapped-types" "2.0.5" js-yaml "4.1.0" lodash "4.17.21" path-to-regexp "3.2.0" - swagger-ui-dist "5.11.2" + swagger-ui-dist "5.17.14" "@nestjs/terminus@^10.2.3": version "10.2.3" @@ -6862,10 +6862,10 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -swagger-ui-dist@5.11.2: - version "5.11.2" - resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.11.2.tgz#b423e820928df703586ff58f80b09ffcf2434e08" - integrity sha512-jQG0cRgJNMZ7aCoiFofnoojeSaa/+KgWaDlfgs8QN+BXoGMpxeMVY5OEnjq4OlNvF3yjftO8c9GRAgcHlO+u7A== +swagger-ui-dist@5.17.14: + version "5.17.14" + resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-5.17.14.tgz#e2c222e5bf9e15ccf80ec4bc08b4aaac09792fd6" + integrity sha512-CVbSfaLpstV65OnSjbXfVd6Sta3q3F7Cj/yYuvHMp1P90LztOLs6PfUnKEVAeiIVQt9u2SaPwv0LiH/OyMjHRw== symbol-observable@4.0.0: version "4.0.0" From 2842fe395f776c31a758a10ea08156e423ebb952 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:37:15 +0000 Subject: [PATCH 13/13] chore(deps): bump firebase-admin from 12.1.0 to 12.2.0 Bumps [firebase-admin](https://github.com/firebase/firebase-admin-node) from 12.1.0 to 12.2.0. - [Release notes](https://github.com/firebase/firebase-admin-node/releases) - [Commits](https://github.com/firebase/firebase-admin-node/compare/v12.1.0...v12.2.0) --- updated-dependencies: - dependency-name: firebase-admin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 147 +++++++++------------------------------------------ 2 files changed, 25 insertions(+), 124 deletions(-) diff --git a/package.json b/package.json index 94f61426..8448b82e 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "date-fns": "^3.6.0", "dotenv": "^16.4.5", "firebase": "^10.10.0", - "firebase-admin": "^12.0.0", + "firebase-admin": "^12.2.0", "lodash": "^4.17.21", "newrelic": "^11.17.0", "pg": "^8.11.5", diff --git a/yarn.lock b/yarn.lock index 2e086a55..daf960c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -784,10 +784,10 @@ resolved "https://registry.yarnpkg.com/@golevelup/ts-jest/-/ts-jest-0.5.0.tgz#051b8ad2727598f1da0f26ff47e00f48cdc8d1b3" integrity sha512-UniUNOBraDD8vf6QNUPkpWMzhUXBtw40nCHekgBlaHy2p99MDV0aYLp4ZXifiyPOsFmg4BZQGs60lF6EpV7JpA== -"@google-cloud/firestore@^7.1.0": - version "7.7.0" - resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-7.7.0.tgz#f4407ccda10a76e1646a73087db612ce024eff19" - integrity sha512-41/vBFXOeSYjFI/2mJuJrDwg2umGk+FDrI/SCGzBRUe+UZWDN4GoahIbGZ19YQsY0ANNl6DRiAy4wD6JezK02g== +"@google-cloud/firestore@^7.7.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-7.9.0.tgz#fcacef51c07e39c083bad3a4801814a7a60a878a" + integrity sha512-c4ALHT3G08rV7Zwv8Z2KG63gZh66iKdhCBeDfCpIkLrjX6EAjTD/szMdj14M+FnQuClZLFfW5bAgoOjfNmLtJg== dependencies: fast-deep-equal "^3.1.1" functional-red-black-tree "^1.0.1" @@ -2944,23 +2944,11 @@ decache@^3.0.5: dependencies: find "^0.2.4" -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - dedent@^1.0.0: version "1.5.3" resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.3.tgz#99aee19eb9bae55a67327717b6e848d0bf777e5a" integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -3002,11 +2990,6 @@ destroy@1.2.0: resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== -detect-libc@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" - integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -3361,11 +3344,6 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== -expand-template@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" - integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - expect@^29.0.0, expect@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" @@ -3440,13 +3418,10 @@ external-editor@^3.0.3, external-editor@^3.1.0: iconv-lite "^0.4.24" tmp "^0.0.33" -farmhash@^3.3.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/farmhash/-/farmhash-3.3.1.tgz#f497dab369d4deb87ae6df2ab062c3bc160e1df4" - integrity sha512-XUizHanzlr/v7suBr/o85HSakOoWh6HKXZjFYl5C2+Gj0f0rkw+XTUZzrd9odDsgI9G5tRUcF4wSbKaX04T0DQ== - dependencies: - node-addon-api "^5.1.0" - prebuild-install "^7.1.2" +farmhash-modern@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/farmhash-modern/-/farmhash-modern-1.1.0.tgz#c36b34ad196290d57b0b482dc89e637d0b59835f" + integrity sha512-6ypT4XfgqJk/F3Yuv4SX26I3doUjt0GTG4a+JgWxXQpxXzTBq8fPUeGHfcYMMDPHJHm3yPOSjaeBwBGAHWXCdA== fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" @@ -3594,23 +3569,23 @@ find@^0.2.4: dependencies: traverse-chain "~0.1.0" -firebase-admin@^12.0.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/firebase-admin/-/firebase-admin-12.1.0.tgz#dcd2c22c8d37e682c95178b9c1c1f2d79bbe71c8" - integrity sha512-bU7uPKMmIXAihWxntpY/Ma9zucn5y3ec+HQPqFQ/zcEfP9Avk9E/6D8u+yT/VwKHNZyg7yDVWOoJi73TIdR4Ww== +firebase-admin@^12.2.0: + version "12.2.0" + resolved "https://registry.yarnpkg.com/firebase-admin/-/firebase-admin-12.2.0.tgz#915e9f4b745f132b541008616f9b90a00fdb255d" + integrity sha512-R9xxENvPA/19XJ3mv0Kxfbz9kPXd9/HrM4083LZWOO0qAQGheRzcCQamYRe+JSrV2cdKXP3ZsfFGTYMrFM0pJg== dependencies: "@fastify/busboy" "^2.1.0" "@firebase/database-compat" "^1.0.2" "@firebase/database-types" "^1.0.0" "@types/node" "^20.10.3" - farmhash "^3.3.0" + farmhash-modern "^1.1.0" jsonwebtoken "^9.0.0" - jwks-rsa "^3.0.1" + jwks-rsa "^3.1.0" long "^5.2.3" node-forge "^1.3.1" - uuid "^9.0.0" + uuid "^10.0.0" optionalDependencies: - "@google-cloud/firestore" "^7.1.0" + "@google-cloud/firestore" "^7.7.0" "@google-cloud/storage" "^7.7.0" firebase@^10.10.0: @@ -3849,11 +3824,6 @@ get-stream@^6.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" - integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== - glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -4227,11 +4197,6 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - inquirer@8.2.6: version "8.2.6" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" @@ -4988,7 +4953,7 @@ jwa@^2.0.0: ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jwks-rsa@^3.0.1: +jwks-rsa@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/jwks-rsa/-/jwks-rsa-3.1.0.tgz#50406f23e38c9b2682cd437f824d7d61aa983171" integrity sha512-v7nqlfezb9YfHHzYII3ef2a2j1XnGeSE/bK3WfumaYCqONAIstJbrEGapz4kadScZzEt7zYCN7bucj8C0Mv/Rg== @@ -5324,11 +5289,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -5369,7 +5329,7 @@ minimatch@^9.0.1, minimatch@^9.0.4: dependencies: brace-expansion "^2.0.1" -minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: +minimist@^1.2.5, minimist@^1.2.6: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -5527,11 +5487,6 @@ nan@^2.17.0, nan@^2.18.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.19.0.tgz#bb58122ad55a6c5bc973303908d5b16cfdd5a8c0" integrity sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw== -napi-build-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" - integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -5583,11 +5538,6 @@ node-abort-controller@^3.0.1: resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548" integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ== -node-addon-api@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762" - integrity sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA== - node-emoji@1.11.0: version "1.11.0" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c" @@ -5982,24 +5932,6 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" -prebuild-install@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.2.tgz#a5fd9986f5a6251fbc47e1e5c65de71e68c0a056" - integrity sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ== - dependencies: - detect-libc "^2.0.0" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp-classic "^0.5.3" - napi-build-utils "^1.0.1" - node-abi "^3.3.0" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^4.0.0" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - prebuildify@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/prebuildify/-/prebuildify-6.0.1.tgz#655746f91fc95b68610615898678536dd303cd03" @@ -6196,16 +6128,6 @@ raw-body@2.5.2: iconv-lite "0.4.24" unpipe "1.0.0" -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - react-is@^18.0.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" @@ -6540,20 +6462,6 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" - integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== - dependencies: - decompress-response "^6.0.0" - once "^1.3.1" - simple-concat "^1.0.0" - sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -6782,11 +6690,6 @@ strip-json-comments@^3.1.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== - strnum@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" @@ -6901,7 +6804,7 @@ tapable@^2.1.1, tapable@^2.2.0, tapable@^2.2.1: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -tar-fs@^2.0.0, tar-fs@^2.1.0: +tar-fs@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== @@ -7143,13 +7046,6 @@ tslib@2.6.3, tslib@^2.1.0, tslib@^2.5.0, tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" @@ -7317,6 +7213,11 @@ uuid@9.0.1, uuid@^9.0.0, uuid@^9.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== +uuid@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" + integrity sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ== + uuid@^8.0.0: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"