Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes from v1.23.0-next.4 into main #14

Merged
merged 432 commits into from
Feb 20, 2024
Merged

Merge changes from v1.23.0-next.4 into main #14

merged 432 commits into from
Feb 20, 2024

Conversation

trevor-anderson
Copy link
Contributor

Merge changes from v1.23.0-next.4 into main.

Details regarding the included changes are provided in the release notes and the CHANGELOG.

trevor-anderson and others added 21 commits February 19, 2024 14:27
# [1.23.0-next.4](v1.23.0-next.3...v1.23.0-next.4) (2024-02-20)

### Bug Fixes

* change utils import to logger file not index ([e82fe74](e82fe74))
* commit imports of necessary utils ([afdd1a1](afdd1a1))
* correct logger.warn label to 'WARN' ([8e45e0d](8e45e0d))
* correct typing to reflect User props ([cd39ae6](cd39ae6))
* ensure 'streetLine2' is added in parse method ([d90b79a](d90b79a))
* ensure NonNullable type excludes all undefined ([bf5ae6c](bf5ae6c))
* impl 'update' api in mw ([457be80](457be80))
* impl model type names ([b2e5f4e](b2e5f4e))
* update gql resolvers to use new Model types/methods ([2962ee0](2962ee0))
* update isRecordObject logic ([3cce447](3cce447))
* update mw to reflect model changes ([6c97cf8](6c97cf8))
* update table import to 'ddbTable' ([6294296](6294296))

### Features

* add 'toBeValidDate' asymmetric matcher ([3a3de9d](3a3de9d))
* add condition to Sentry init ([b80a118](b80a118))
* add createIfNotExists configs ([8cbf3f8](8cbf3f8))
* add export of Stripe-related 'types' ([f351021](f351021))
* add FixitUserCodegenInterface for codegen-config ([844186e](844186e))
* add methods to make Cache more flexible ([6638922](6638922))
* add new caches and utils ([e0b54eb](e0b54eb))
* add new location for codegen'd files ([880bed2](880bed2))
* add NonNullableLocation ([9d8ca08](9d8ca08))
* add open-api processed types ([d8b3e2d](d8b3e2d))
* add res.locals typings ([cb50fdf](cb50fdf))
* add sendRESTJsonResponse mw ([1e32530](1e32530))
* add Stripe-related types ([fb6a1b0](fb6a1b0))
* change 'UpdateChecklistItemInput' 'id' to be nullable ([38606b2](38606b2))
* replace Stripe env-vars w caches for StripeAPI objects ([7af7c6e](7af7c6e))
* rm old env-vars, add JSON.parse overloads for correct behavior ([51e8365](51e8365))
* rm optionality of 'stripeConnectAccount' obj ([d90ba88](d90ba88))
* update 'Location.country' to be non-nullable ([d034e0a](d034e0a))
* update base img to node v20.11.0 ([ef89f12](ef89f12))
* update mw to use new res.locals, impl open-api req types ([d2277b4](d2277b4))
* update routers w new mw and open-api types ([5d064ef](5d064ef))
* update+add mock Stripe obj fns ([7d3ca6d](7d3ca6d))
@trevor-anderson trevor-anderson added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file released on @next labels Feb 20, 2024
@trevor-anderson trevor-anderson self-assigned this Feb 20, 2024
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 83.16% 6389 / 7682
🔵 Statements 83.16% 6389 / 7682
🔵 Functions 65.97% 159 / 241
🔵 Branches 78.58% 367 / 467
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/expressApp.ts 100% 100% 100% 100%
src/events/eventEmitter.ts 97.61% 100% 100% 97.61% 60-61
src/events/onInvoiceCreated/notifyAssigneeNewInvoice.ts 100% 100% 100% 100%
src/events/onInvoiceDeleted/notifyAssigneeDeletedInvoice.ts 100% 100% 100% 100%
src/events/onInvoicePaid/notifyAssignorPaidInvoice.ts 100% 100% 100% 100%
src/events/onInvoiceUpdated/notifyAssigneeUpdatedInvoice.ts 100% 100% 100% 100%
src/events/onNewUser/index.ts 100% 100% 100% 100%
src/events/onNewUser/sendWelcomeEmail.ts 100% 100% 100% 100%
src/events/onWorkOrderCancelled/notifyAssigneeCancelledWO.ts 100% 87.5% 100% 100%
src/events/onWorkOrderCompleted/notifyAssignorCompletedWO.ts 100% 100% 100% 100%
src/events/onWorkOrderCreated/notifyAssigneeNewWO.ts 100% 87.5% 100% 100%
src/events/onWorkOrderUpdated/notifyAssigneeUpdatedWO.ts 100% 100% 100% 100%
src/events/pushNotifications/InvoicePushNotification.ts 100% 100% 100% 100%
src/events/pushNotifications/PushNotification.ts 100% 100% 100% 100%
src/events/pushNotifications/WorkOrderPushNotification.ts 100% 100% 100% 100%
src/events/pushNotifications/index.ts 100% 100% 100% 100%
src/graphql/resolvers.ts 83.33% 100% 0% 83.33% 53-57, 59-65
src/graphql/schema.ts 100% 100% 100% 100%
src/graphql/Checklist/typeDefs.ts 100% 100% 100% 100%
src/graphql/Contact/resolvers.ts 24.44% 100% 0% 24.44% 11-18, 20-26, 30-45, 47-53, 57-66, 68-77, 79-88
src/graphql/Contact/typeDefs.ts 100% 100% 100% 100%
src/graphql/FixitUser/resolvers.ts 53.84% 100% 0% 53.84% 6-11
src/graphql/Invoice/resolvers.ts 17.51% 100% 0% 17.51% 16-24, 26-59, 63-76, 78-102, 104-154, 156-182, 186-187, 190-191, 194-202, 212-217
src/graphql/Invoice/typeDefs.ts 100% 100% 100% 100%
src/graphql/Location/typeDefs.ts 100% 100% 100% 100%
src/graphql/Profile/resolvers.ts 37.5% 100% 0% 37.5% 8-11, 15-28, 32-38
src/graphql/User/resolvers.ts 23.21% 100% 0% 23.21% 10-15, 17-26, 28-54
src/graphql/UserSubscription/resolvers.ts 26.31% 100% 0% 26.31% 8-39, 46-50, 53-57
src/graphql/WorkOrder/resolvers.ts 16.81% 100% 0% 16.81% 17-25, 27-62, 66-79, 81-131, 133-168, 170-198, 202-203, 205-208, 212-217, 227-232
src/graphql/WorkOrder/typeDefs.ts 100% 100% 100% 100%
src/graphql/_common/DeleteMutationResponse/DeleteMutationResponse.ts 27.27% 100% 0% 27.27% 4-11
src/graphql/_common/GenericSuccessResponse/GenericSuccessResponse.ts 33.33% 100% 0% 33.33% 4-9
src/graphql/_customScalars/helpers.ts 57.14% 100% 0% 57.14% 8-13
src/graphql/_customScalars/DateTime/resolvers.ts 51.06% 100% 0% 51.06% 9-12, 21-27, 31-37, 41-45
src/graphql/_customScalars/DateTime/typeDefs.ts 100% 100% 100% 100%
src/graphql/_customScalars/Email/resolvers.ts 56.75% 100% 0% 56.75% 14-20, 24-30, 34-35
src/graphql/_customScalars/Email/typeDefs.ts 100% 100% 100% 100%
src/graphql/_helpers/formatAsGqlFixitUser.ts 17.33% 100% 0% 17.33% 14-75
src/graphql/_helpers/index.ts 100% 100% 100% 100%
src/graphql/_helpers/verifyUserIsAuthorizedToPerformThisUpdate.ts 57.4% 100% 0% 57.4% 14-36
src/lib/cache/Cache.ts 85.44% 94.73% 71.42% 85.44% 62-73, 125-128, 137, 147-150, 156-157
src/lib/cache/pricesCache.ts 89.36% 75% 100% 89.36% 25-29
src/lib/cache/productsCache.ts 86.84% 50% 100% 86.84% 25-29
src/lib/cache/promoCodesCache.ts 80.43% 33.33% 100% 80.43% 20-23, 33-37
src/lib/cache/usersCache.ts 43.75% 0% 100% 43.75% 15-41
src/lib/lambdaClient/index.ts 100% 100% 100% 100%
src/lib/stripe/isValidStripeID.ts 100% 100% 100% 100%
src/middleware/helpers.ts 94.92% 56.52% 100% 94.92% 40-41, 108-109, 131-132, 141-142, 151-152, 158-160
src/middleware/auth/findUserByEmail.ts 100% 100% 100% 100%
src/middleware/auth/generateAuthToken.ts 90.9% 33.33% 100% 90.9% 14-15
src/middleware/auth/getUserFromAuthHeaderToken.ts 90% 100% 100% 90% 15-16
src/middleware/auth/queryUserItems.ts 99.47% 66.66% 100% 99.47% 82
src/middleware/auth/registerNewUser.ts 100% 33.33% 100% 100%
src/middleware/auth/shouldUserLoginExist.ts 86.66% 40% 100% 86.66% 12-13, 26-27
src/middleware/auth/validateGqlReqContext.ts 46.06% 0% 0% 46.06% 22-46, 59-76, 84, 86-89
src/middleware/auth/validatePassword.ts 94.73% 25% 100% 94.73% 32-33
src/middleware/errorHandlers/errorHandler.ts 42.42% 100% 0% 42.42% 13-31
src/middleware/errorHandlers/handle404.ts 72.72% 100% 100% 72.72% 9-11
src/middleware/pushNotifications/updateExpoPushToken.ts 92% 33.33% 100% 92% 21-22
src/middleware/security/cors.ts 80.64% 0% 100% 80.64% 21-26
src/middleware/security/setSecureHttpHeaders.ts 100% 100% 100% 100%
src/middleware/stripeConnect/checkOnboardingStatus.ts 67.34% 25% 100% 67.34% 31-46
src/middleware/stripeConnect/createAccountLink.ts 100% 33.33% 100% 100%
src/middleware/stripeConnect/createDashboardLink.ts 100% 33.33% 100% 100%
src/middleware/stripeSubscriptions/checkPromoCode.ts 45.83% 100% 100% 45.83% 12-24
src/middleware/stripeSubscriptions/checkSubscriptionStatus.ts 62.29% 33.33% 100% 62.29% 35-57
src/middleware/stripeSubscriptions/createCustomerPortalLink.ts 100% 50% 100% 100%
src/middleware/stripeSubscriptions/findOrCreateStripeSubscription.ts 83.03% 11.11% 100% 83.03% 68-71, 80-82, 94-108, 131-132, 159-162
src/middleware/stripeSubscriptions/index.ts 100% 100% 100% 100%
src/middleware/stripeWebhooks/_handleStripeWebhookEvent.ts 66.43% 100% 0% 66.43% 30-77
src/middleware/stripeWebhooks/connectAccountUpdated.ts 17.74% 100% 0% 17.74% 12-62
src/middleware/stripeWebhooks/customerSubscriptionDeleted.ts 21.15% 100% 0% 21.15% 12-52
src/middleware/stripeWebhooks/customerSubscriptionUpdated.ts 21.62% 100% 0% 21.62% 17-74
src/middleware/util-mw/index.ts 100% 100% 100% 100%
src/middleware/util-mw/logReqReceived.ts 84.61% 66.66% 100% 84.61% 13-16
src/middleware/util-mw/sendRESTJsonResponse.ts 100% 60% 100% 100%
src/models/Contact/Contact.ts 100% 100% 100% 100%
src/models/Contact/helpers.ts 100% 100% 100% 100%
src/models/Contact/index.ts 100% 100% 100% 100%
src/models/Contact/regex.ts 100% 100% 100% 100%
src/models/Invoice/Invoice.ts 100% 100% 100% 100%
src/models/Invoice/enumConstants.ts 100% 100% 100% 100%
src/models/Invoice/helpers.ts 100% 100% 100% 100%
src/models/Invoice/index.ts 100% 100% 100% 100%
src/models/Invoice/regex.ts 100% 100% 100% 100%
src/models/Location/Location.ts 100% 82.14% 87.5% 100%
src/models/Location/index.ts 100% 100% 100% 100%
src/models/Location/regex.ts 100% 100% 100% 100%
src/models/Profile/Profile.ts 99.02% 94.44% 100% 99.02% 59
src/models/User/User.ts 99.21% 85.71% 100% 99.21% 77
src/models/User/createOne.ts 75.38% 75% 100% 75.38% 83-114
src/models/User/helpers.ts 100% 100% 100% 100%
src/models/User/index.ts 100% 100% 100% 100%
src/models/User/regex.ts 100% 100% 100% 100%
src/models/UserLogin/UserLogin.ts 100% 100% 100% 100%
src/models/UserStripeConnectAccount/UserStripeConnectAccount.ts 100% 83.33% 100% 100%
src/models/UserStripeConnectAccount/createOne.ts 100% 100% 100% 100%
src/models/UserStripeConnectAccount/helpers.ts 100% 100% 100% 100%
src/models/UserStripeConnectAccount/index.ts 100% 100% 100% 100%
src/models/UserStripeConnectAccount/regex.ts 100% 100% 100% 100%
src/models/UserSubscription/UserSubscription.ts 98.41% 77.77% 87.5% 98.41% 40, 74
src/models/UserSubscription/enumConstants.ts 100% 100% 100% 100%
src/models/UserSubscription/helpers.ts 100% 100% 100% 100%
src/models/UserSubscription/index.ts 100% 100% 100% 100%
src/models/UserSubscription/normalizeStripeFields.ts 96% 25% 100% 96% 30-31
src/models/UserSubscription/regex.ts 100% 100% 100% 100%
src/models/UserSubscription/upsertOne.ts 100% 42.85% 100% 100%
src/models/UserSubscription/validators.ts 91.45% 66.66% 66.66% 91.45% 31, 109-117
src/models/WorkOrder/WorkOrder.ts 100% 94.44% 91.66% 100%
src/models/WorkOrder/enumConstants.ts 100% 100% 100% 100%
src/models/WorkOrder/helpers.ts 100% 80% 100% 100%
src/models/WorkOrder/index.ts 100% 100% 100% 100%
src/models/WorkOrder/regex.ts 100% 100% 100% 100%
src/models/_common/index.ts 100% 100% 100% 100%
src/models/_common/modelAttributes.ts 100% 100% 71.42% 100%
src/models/_common/modelHelpers.ts 100% 100% 100% 100%
src/models/_common/skTypeGuards.ts 100% 100% 100% 100%
src/routers/adminRouter.ts 100% 66.66% 100% 100%
src/routers/authRouter.ts 98.47% 33.33% 100% 98.47% 78-79
src/routers/connectRouter.ts 100% 100% 100% 100%
src/routers/index.ts 100% 100% 100% 100%
src/routers/subscriptionsRouter.ts 100% 100% 100% 100%
src/routers/webhooksRouter.ts 100% 100% 100% 100%
src/server/env/EnvObject.ts 97.12% 40% 100% 97.12% 95-96, 100-101
src/utils/AuthToken.ts 100% 90.9% 100% 100%
src/utils/httpErrors.ts 75.38% 100% 33.33% 75.38% 67-89, 91-99
src/utils/jwt.ts 98.33% 88.88% 100% 98.33% 36
src/utils/logger.ts 91.93% 60% 42.85% 91.93% 79-91, 94-95
src/utils/normalize.ts 100% 100% 100% 100%
src/utils/passwordHasher.ts 87.5% 100% 50% 87.5% 14-15
src/utils/regex.ts 90% 100% 0% 90% 6-8
src/utils/uuid.ts 100% 100% 100% 100%
src/utils/formatters/currency.ts 100% 100% 100% 100%
src/utils/formatters/dateTime.ts 76.47% 100% 20% 76.47% 15-16, 20-21, 25-26, 30-31
src/utils/formatters/i18n.ts 100% 100% 100% 100%
src/utils/formatters/index.ts 100% 100% 100% 100%
src/utils/formatters/strings.ts 77.55% 50% 33.33% 77.55% 13-14, 26-27, 43-49
Generated in workflow #25

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: 599 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (main@7a74f37). Click here to learn what that means.

Files Patch % Lines
src/graphql/WorkOrder/resolvers.ts 19.25% 109 Missing ⚠️
src/graphql/Invoice/resolvers.ts 22.31% 94 Missing ⚠️
src/graphql/_helpers/formatAsGqlFixitUser.ts 17.33% 62 Missing ⚠️
src/graphql/Contact/resolvers.ts 25.00% 45 Missing ⚠️
src/graphql/User/resolvers.ts 22.85% 27 Missing ⚠️
src/lib/cache/usersCache.ts 38.63% 27 Missing ⚠️
...ipeSubscriptions/findOrCreateStripeSubscription.ts 80.48% 24 Missing ⚠️
...lpers/verifyUserIsAuthorizedToPerformThisUpdate.ts 57.40% 23 Missing ⚠️
src/lib/cache/Cache.ts 80.37% 21 Missing ⚠️
src/models/User/createOne.ts 58.00% 21 Missing ⚠️
... and 29 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #14   +/-   ##
=======================================
  Coverage        ?   83.19%           
=======================================
  Files           ?      169           
  Lines           ?     7682           
  Branches        ?      399           
=======================================
  Hits            ?     6391           
  Misses          ?     1291           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trevor-anderson trevor-anderson merged commit 61eb793 into main Feb 20, 2024
4 checks passed
@trevor-anderson trevor-anderson deleted the next branch February 20, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants