repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/pubsub.ts | backend/src/pubsub.ts | import { addDays } from "date-fns";
import Redlock from "redlock";
import { db } from "@aca/db";
import { logger } from "@aca/shared/logger";
import { redisClient } from "./redis";
const redlock = new Redlock([redisClient], {
retryCount: 500,
});
export async function acquireLock(type: string, messageId: string) ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/linear/router.ts | backend/src/linear/router.ts | import { LinearClient } from "@linear/sdk";
import { Prisma } from "@prisma/client";
import axios from "axios";
import { addSeconds } from "date-fns";
import { Request, Response, Router } from "express";
import { keyBy } from "lodash";
import qs from "qs";
import { db } from "@aca/db";
import { trackBackendUserEvent }... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/linear/utils.ts | backend/src/linear/utils.ts | import { LinearClient } from "@linear/sdk";
import { get, map } from "lodash";
import { IssueData } from "@aca/backend/src/linear/types";
import { LinearOauthToken, db } from "@aca/db";
export function getRandomLinearClient(usersForOrg: LinearOauthToken[]): LinearClient {
// pick a random token to access linear api... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/linear/hasuraActions.ts | backend/src/linear/hasuraActions.ts | import { LinearClient } from "@linear/sdk";
import { ActionHandler } from "@aca/backend/src/actions/actionHandlers";
import { db } from "@aca/db";
import { ServiceUser } from "@aca/gql";
import { assert } from "@aca/shared/assert";
export const linearUsers: ActionHandler<void, ServiceUser[]> = {
actionName: "linear... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/linear/types.ts | backend/src/linear/types.ts | export type CommonWebhook = {
action: "create" | "update" | "remove";
createdAt: Date;
url: string;
organizationId: string;
};
export type IssueState = {
id: string;
name: string;
color: string;
type: string;
};
export type IssueTeam = {
id: string;
name: string;
key: string;
};
export type Iss... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/linear/initialSyncNotificationImport.ts | backend/src/linear/initialSyncNotificationImport.ts | import { Notification } from "@linear/sdk";
import { LinearOauthToken, db } from "@aca/db";
import { assert } from "@aca/shared/assert";
/*
All Linear Notification Types.
We're only handling a few, as some wouldn't be relevant for initial import
{
'issueNewComment',
'issueStatusChanged',
... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/linear/events.ts | backend/src/linear/events.ts | import { LinearClient } from "@linear/sdk";
import { detailedDiff } from "deep-object-diff";
import { isEmpty } from "lodash";
import { HasuraEvent } from "@aca/backend/src/hasura";
import { LinearIssue, LinearOauthToken, db } from "@aca/db";
import {
isSupportedInitialLinearNotificationType,
linearNotificationTy... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/asana/router.ts | backend/src/asana/router.ts | import { createHmac } from "crypto";
import Asana from "asana";
import { addSeconds } from "date-fns";
import { Request, Response, Router } from "express";
import * as uuid from "uuid";
import { BadRequestError, NotFoundError } from "@aca/backend/src/errors/errorTypes";
import { HttpStatus } from "@aca/backend/src/ht... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/asana/utils.ts | backend/src/asana/utils.ts | import Asana from "asana";
export function createClient() {
return Asana.Client.create({
clientId: process.env.ASANA_CLIENT_ID,
clientSecret: process.env.ASANA_CLIENT_SECRET,
redirectUri: `${process.env.FRONTEND_URL}/api/backend/v1/asana/callback`,
defaultHeaders: {
// this header is required t... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/asana/webhooks.ts | backend/src/asana/webhooks.ts | import Asana from "asana";
import { get } from "lodash";
import { Webhook } from "@aca/backend/src/asana/types";
import { AsanaAccount, AsanaWebhook, User, db } from "@aca/db";
import { assertDefined } from "@aca/shared/assert";
import { createClient } from "./utils";
type DbWebhook = AsanaWebhook & { asana_account:... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/asana/types.ts | backend/src/asana/types.ts | export interface Webhook {
user: Resource;
created_at: string;
action: string;
resource: Resource;
parent: Resource | null;
change?: Change;
}
export interface Resource {
gid: string;
resource_type: string;
resource_subtype?: string;
}
export interface Change {
field: string;
action: string;
n... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/sync.ts | backend/src/slack/sync.ts | import { slackClient } from "@aca/backend/src/slack/app";
import { UserSlackInstallation, db } from "@aca/db";
import { assert } from "@aca/shared/assert";
import { logger } from "@aca/shared/logger";
import { getSlackInstallationData } from "./utils";
export async function syncUserSlackInstallationTeam(installation:... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/errors.ts | backend/src/slack/errors.ts | import { WebAPICallError } from "@slack/web-api";
export const isWebAPIErrorType = (error: unknown, errorType: string) => {
const webError = error as unknown as WebAPICallError;
return "data" in webError && webError.data.error == errorType;
};
export const isChannelNotFoundError = (error: unknown) => isWebAPIErro... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/install.ts | backend/src/slack/install.ts | import { getDevPublicTunnelURL } from "@aca/backend/src/localtunnel";
import { assertDefined } from "@aca/shared/assert";
import { IS_DEV } from "@aca/shared/dev";
import { USER_SCOPES } from "@aca/shared/slack";
import { Maybe } from "@aca/shared/types";
import { slackReceiver } from "./app";
const getRedirectURI = ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/utils.ts | backend/src/slack/utils.ts | import { SlackInstallation } from "@aca/backend/src/slack/app";
import { UserSlackInstallation } from "@aca/db";
export const getSlackInstallationData = (userSlackInstallation: UserSlackInstallation) =>
userSlackInstallation.data as unknown as SlackInstallation;
export function getPermalink({
url,
team,
chann... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/send.ts | backend/src/slack/send.ts | import { Team } from "@slack/web-api/dist/response/TeamInfoResponse";
import { getPermalink, getSlackInstallationData } from "@aca/backend/src/slack/utils";
import { db } from "@aca/db";
import { SendMessageInput } from "@aca/gql";
import { assert } from "@aca/shared/assert";
import { slackClient } from "./app";
exp... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/setup.ts | backend/src/slack/setup.ts | import { createHmac } from "crypto";
import { timingSafeEqual } from "crypto";
import { AnyMiddlewareArgs } from "@slack/bolt";
import { Express } from "express";
import { getIndividualSlackInstallURL } from "@aca/backend/src/slack/install";
import { getPublicBackendURL } from "@aca/backend/src/utils";
import { liste... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/installMetadata.ts | backend/src/slack/installMetadata.ts | export type InstallMetadata = { teamId?: string; userId?: string; redirectURL?: string };
/**
* When getting a Slack OAuth installation URL, one can supply metadata which Slack will
* send back after installation. We use that for two purposes:
* - persisting the installation based on a given team/user
* - redirect... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/channelFilterMigration.ts | backend/src/slack/channelFilterMigration.ts | // TODO: Temporary Migration! This event should be removed once all users upgraded their App to use the new
// "are_all_channels_included" column in "user_slack_channels_by_team". Migration should probably be done by July 2022.
// Remember to remove it from Hasura as well!
import { HasuraEvent } from "@aca/backend/src... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/app.ts | backend/src/slack/app.ts | import { ServerResponse } from "http";
import * as SlackBolt from "@slack/bolt";
import { noop } from "lodash";
import { db } from "@aca/db";
import { assert, assertDefined } from "@aca/shared/assert";
import { trackBackendUserEvent } from "@aca/shared/backendAnalytics";
import { IS_DEV } from "@aca/shared/dev";
impo... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/hasuraActions.ts | backend/src/slack/hasuraActions.ts | import { Channel } from "@slack/web-api/dist/response/ChannelsListResponse";
import { orderBy } from "lodash";
import { getIndividualSlackInstallURL } from "@aca/backend/src/slack/install";
import { db } from "@aca/db";
import {
ConversationInfo,
GetSlackInstallationUrlInput,
GetSlackInstallationUrlOutput,
Han... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/capture.ts | backend/src/slack/capture.ts | import { Prisma } from "@prisma/client";
import { AllMiddlewareArgs, GenericMessageEvent, App as SlackApp, SlackEventMiddlewareArgs } from "@slack/bolt";
import { WebClient } from "@slack/web-api";
import { Team } from "@slack/web-api/dist/response/TeamInfoResponse";
import nr from "newrelic";
import { SingleASTNode } ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/events.ts | backend/src/slack/events.ts | import { addSeconds, subHours, subSeconds } from "date-fns";
import { HasuraEvent } from "@aca/backend/src/hasura";
import { SlackInstallation, slackClient } from "@aca/backend/src/slack/app";
import { captureGeneralChannel, captureInitialMessages } from "@aca/backend/src/slack/capture";
import { syncUserSlackInstalla... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/md/parser.test.ts | backend/src/slack/md/parser.test.ts | import { cleanupAst, parseAndTransformToTipTapJSON, parseSlackMarkdown, transformToTipTapJSON } from "./parser";
const advancedMessage = `hello <https://www.google.com/> :rolling_on_the_floor_laughing: test <#C02D6BU8J6P|general>
> I have a dream
nice some \`code\`
*bold* and _italic_
~llalalalalalal~`;
describe("sl... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/slack/md/parser.ts | backend/src/slack/md/parser.ts | import { compact, isArray, isString } from "lodash";
import markdown from "simple-markdown";
import emojis from "@aca/shared/emoji/slugs.json";
import { swapPlainObjectKeysWithValues } from "@aca/shared/object";
interface EditorMentionData {
userId: string;
type: string;
}
const emojiNameToEmoji: Record<string, s... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/gmail/utils.ts | backend/src/gmail/utils.ts | import { Maybe } from "@aca/shared/types";
export const findHeader = (headers: { name?: Maybe<string>; value?: Maybe<string> }[], name: string) =>
headers.find((h) => h.name === name)?.value;
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/gmail/driveCapture.ts | backend/src/gmail/driveCapture.ts | import { gmail_v1 } from "googleapis/build/src/apis/gmail/v1";
import { filter, find, map, some } from "lodash";
import { unescape } from "lodash";
import { parse } from "node-html-parser";
import HTMLElement from "node-html-parser/dist/nodes/html";
import { Account, db } from "@aca/db";
import { assert } from "@aca/s... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/gmail/driveCapture.test.ts | backend/src/gmail/driveCapture.test.ts | import fs from "fs";
import path from "path";
import { extractNotificationPayloadData } from "./driveCapture";
describe("Google drive capture", () => {
it("extracts an invitation", () => {
const scriptInvitation = fs.readFileSync(path.resolve(__dirname + "/testFixtures/scriptInvitation"), "utf8");
const re... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/gmail/capture.ts | backend/src/gmail/capture.ts | import { writeFileSync } from "fs";
import { tmpdir } from "os";
import { join } from "path";
import { PubSub } from "@google-cloud/pubsub";
import * as Sentry from "@sentry/node";
import { subMinutes } from "date-fns";
import { gmail_v1, google } from "googleapis";
import { uniqWith } from "lodash";
import { Account ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/gmail/revertRead.ts | backend/src/gmail/revertRead.ts | import { db } from "@aca/db";
import { assert } from "@aca/shared/assert";
import { logger } from "@aca/shared/logger";
import { createGmailClientForAccount } from "./capture";
export async function revertGmailMessageToUnread(innerNotificationId: string, userId?: string) {
const gmailNotification = await db.notific... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/tracking/index.ts | backend/src/tracking/index.ts | import { Request, Response, Router } from "express";
import { BadRequestError } from "@aca/backend/src/errors/errorTypes";
import { getUserIdFromRequest } from "@aca/backend/src/utils";
import { User } from "@aca/db";
import { trackBackendUserEvent, trackFirstBackendUserEvent } from "@aca/shared/backendAnalytics";
imp... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/dev/fakeData.ts | backend/src/dev/fakeData.ts | import { subSeconds } from "date-fns";
import { Application } from "express";
import { db } from "@aca/db";
export function setupFakeDataRoute(app: Application) {
app.get("/api/fake-data/:userId", async (req, res) => {
const { userId } = req.params;
const existing = await db.notification_slack_message.findF... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/clickup/router.ts | backend/src/clickup/router.ts | import { createHmac } from "crypto";
import axios from "axios";
import { Request, Response, Router } from "express";
import { map, pick } from "lodash";
import qs from "qs";
import * as uuid from "uuid";
import { BadRequestError, NotFoundError } from "@aca/backend/src/errors/errorTypes";
import { HttpStatus } from "@... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/clickup/utils.ts | backend/src/clickup/utils.ts | export const API_ENDPOINT = "https://app.clickup.com/api/v2";
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/clickup/webhooks.ts | backend/src/clickup/webhooks.ts | import axios from "axios";
import { ClickUpAccount, ClickUpAccountToTeam, ClickUpTeam, db } from "@aca/db";
import { User, Webhook } from "./types";
import { API_ENDPOINT } from "./utils";
type DbTeam = ClickUpTeam & {
clickup_account_to_team: (ClickUpAccountToTeam & { clickup_account: ClickUpAccount })[];
};
asy... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/clickup/types.ts | backend/src/clickup/types.ts | /* eslint-disable @typescript-eslint/no-explicit-any */
export const EventTypes = [
"taskCreated",
"taskPriorityUpdated",
"taskStatusUpdated",
"taskAssigneeUpdated",
"taskDueDateUpdated",
"taskCommentPosted",
] as const;
export type EventType = typeof EventTypes[number];
export interface Webhook {
event... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/user/handleSignup.ts | backend/src/user/handleSignup.ts | import { subSeconds } from "date-fns";
import { HasuraEvent } from "@aca/backend/src/hasura";
import { User, db } from "@aca/db";
const OnboardingNotifications = [
{
title: "🚀 0. Welcome! Start Here",
url: "https://acapela.notion.site/0-Start-Here-a6ecfbc7926a423bbb3036fed7fea09a",
},
{
title: "🔕 ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/userCleanup/index.ts | backend/src/userCleanup/index.ts | import { db } from "@aca/db";
import { logger } from "@aca/shared/logger";
type OutdatedUser = {
user_id: string;
email: string;
latest_resolved_at: string;
};
type OutdatedLinearIssue = {
organization_id: string;
};
export async function userCleanup() {
const outdatedUsers =
(await db.$queryRaw`SELECT... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/errors/middleware.ts | backend/src/errors/middleware.ts | import { Request, Response } from "express";
import { HttpStatus } from "@aca/backend/src/http";
import { logger } from "@aca/shared/logger";
import { HttpError, NotFoundError, isHttpError } from "./errorTypes";
export function notFoundRouteMiddleware(): void {
throw new NotFoundError();
}
interface ErrorResponse... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/errors/errorTypes.ts | backend/src/errors/errorTypes.ts | import { HttpStatus } from "@aca/backend/src/http";
export class HttpError extends Error {
public readonly status: HttpStatus;
public readonly isPublicError: boolean = false;
public readonly isHttpError = true;
constructor(status: HttpStatus, message: string) {
super(message);
this.status = status;
... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/notification/index.ts | backend/src/notification/index.ts | import {
archiveGmailMessageForNotification,
markDriveMessageAsReadForNotification,
} from "@aca/backend/src/gmail/capture";
import { HasuraEvent, UpdateHasuraEvent } from "@aca/backend/src/hasura";
import { Notification, db } from "@aca/db";
import { logger } from "@aca/shared/logger";
// Add newly resolved Slack... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/endpoints/createEndpointHandler.ts | backend/src/endpoints/createEndpointHandler.ts | import { Request, Response } from "express";
import { UserTokenPayload } from "@aca/shared/jwt";
import { logger } from "@aca/shared/logger";
import { JsonValue } from "@aca/shared/types";
import { extractAndAssertBearerToken } from "../authentication";
import { HttpStatus } from "../http";
import { verifyAndParseUse... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/github/router.ts | backend/src/github/router.ts | import { createNodeMiddleware } from "@octokit/webhooks";
import { Request, Response, Router } from "express";
import { Octokit } from "octokit";
import { BadRequestError } from "@aca/backend/src/errors/errorTypes";
import { HttpStatus } from "@aca/backend/src/http";
import { getUserIdFromRequest } from "@aca/backend/... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/github/webhooks.ts | backend/src/github/webhooks.ts | import { EmitterWebhookEvent, Webhooks } from "@octokit/webhooks";
import { Team, User } from "@octokit/webhooks-types";
import * as Sentry from "@sentry/node";
import { githubApp } from "@aca/backend/src/github/app";
import { db } from "@aca/db";
import { logger } from "@aca/shared/logger";
export function addWebhoo... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/github/onboarding.ts | backend/src/github/onboarding.ts | import { Octokit } from "octokit";
import { HasuraEvent } from "@aca/backend/src/hasura";
import { GithubAccountToInstallation, db } from "@aca/db";
async function createOnboardingNotifications(userId: string) {
const account = (await db.github_account.findUnique({ where: { user_id: userId } }))!;
const authToken... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/github/app.ts | backend/src/github/app.ts | import { App, OAuthApp } from "octokit";
export const githubOnboardingApp = new OAuthApp({
clientId: process.env.GITHUB_ONBOARDING_OAUTH_CLIENT_ID!,
clientSecret: process.env.GITHUB_ONBOARDING_OAUTH_CLIENT_SECRET!,
defaultScopes: ["repo", "user"],
});
export const githubApp = new App({
appId: process.env.GITH... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/cron/cron.ts | backend/src/cron/cron.ts | import { Request, Response, Router } from "express";
import { middlewareAuthenticateHasura } from "@aca/backend/src/actions/actions";
import { UnprocessableEntityError, isHttpError } from "@aca/backend/src/errors/errorTypes";
import { logger } from "@aca/shared/logger";
import { refreshExpiringAtlassianProperties } f... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/actions/actions.ts | backend/src/actions/actions.ts | import { Request, Response, Router } from "express";
import { logger } from "@aca/shared/logger";
import { extractAndAssertBearerToken } from "../authentication";
import { AuthenticationError, UnprocessableEntityError, isHttpError } from "../errors/errorTypes";
import { HasuraSessionVariables } from "../hasura/sessio... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/actions/actionHandlers.ts | backend/src/actions/actionHandlers.ts | import { linearUsers } from "@aca/backend/src/linear/hasuraActions";
import { sendMessage } from "@aca/backend/src/sendMessage/hasuraActions";
import {
getIndividualSlackInstallationURLHandler,
handleRevertUrlView,
slackConversations,
slackUsers,
updateSlackMessagesReadStatus,
} from "@aca/backend/src/slack/h... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/actions/actions.test.ts | backend/src/actions/actions.test.ts | import { Server } from "http";
import request from "supertest";
import { v4 as uuid } from "uuid";
import { setupServer } from "../app";
import { HttpStatus } from "../http";
import { handlers as fakeHandlers } from "./actionHandlers";
import { HasuraAction } from "./actions";
jest.mock("./actionHandlers", () => ({
... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/sendMessage/hasuraActions.ts | backend/src/sendMessage/hasuraActions.ts | import { ActionHandler } from "@aca/backend/src/actions/actionHandlers";
import { sendSlackMessage } from "@aca/backend/src/slack/send";
import { SendMessageInput, SendMessageOutput } from "@aca/gql";
import { assert } from "@aca/shared/assert";
type IntegrationHandler = (userId: string, data: SendMessageInput) => Pro... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/subscription/index.ts | backend/src/subscription/index.ts | import express, { Router } from "express";
import Stripe from "stripe";
import { ActionHandler } from "@aca/backend/src/actions/actionHandlers";
import { db } from "@aca/db";
import { SubscriptionPlan, SwitchSubscriptionPlanOutput } from "@aca/gql";
import { assert } from "@aca/shared/assert";
import { trackBackendUse... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/jwt/verifyAndParseJWT.ts | backend/src/jwt/verifyAndParseJWT.ts | import { UserTokenPayload, verifyJWT } from "@aca/shared/jwt";
import { AuthenticationError } from "../errors/errorTypes";
export function verifyAndParseJWT<AssumedData>(token: string) {
try {
const parsedData = verifyJWT(token);
return parsedData as AssumedData;
} catch (error) {
throw new Authentic... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/waitlist/waitlist.ts | backend/src/waitlist/waitlist.ts | import cors from "cors";
import { Request, Response, Router } from "express";
import { logger } from "@aca/shared/logger";
import { HttpStatus } from "../http";
import { addUserToCustomerio } from "./customerio";
export const router = Router();
interface SignupPayload {
email?: string;
firstName?: string;
}
/*... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/waitlist/customerio.ts | backend/src/waitlist/customerio.ts | import { RegionEU, TrackClient } from "customerio-node";
import { getUnixTime } from "date-fns";
const customerioClientApiKey = process.env.CUSTOMERIO_CLIENT_API_KEY;
const customerioClientSiteId = process.env.CUSTOMERIO_CLIENT_SITE_ID;
export async function addUserToCustomerio(email: string): Promise<void> {
const... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/acapelaUpdate/handleAcapelaUpdate.ts | backend/src/acapelaUpdate/handleAcapelaUpdate.ts | import { AcapelaUpdate, Prisma, db } from "@aca/db";
import { getUUID } from "@aca/shared/uuid";
import { HasuraEvent } from "../hasura";
export async function handleAcapelaUpdate(event: HasuraEvent<AcapelaUpdate>) {
if (event.type !== "create") return;
const userIds = await db.user.findMany({
select: {
... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/events/events.ts | backend/src/events/events.ts | import { Request, Response, Router } from "express";
import { extractAndAssertBearerToken } from "@aca/backend/src/authentication";
import { AuthenticationError } from "@aca/backend/src/errors/errorTypes";
import { handleGithubAccountToInstallationChanges } from "@aca/backend/src/github/onboarding";
import { handleGma... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/hasura/session.ts | backend/src/hasura/session.ts | export interface HasuraSessionVariables {
"x-hasura-user-id"?: string;
"x-hasura-role"?: string;
"x-hasura-allowed-roles"?: string[];
}
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/hasura/eventHandlers.ts | backend/src/hasura/eventHandlers.ts | import { Request, Response } from "express";
import { convertMaybeArrayToArray } from "@aca/shared/array";
import { IS_DEV } from "@aca/shared/dev";
import { logger } from "@aca/shared/logger";
import { mapGetOrCreate } from "@aca/shared/map";
import { HasuraEvent, RawHasuraEvent, normalizeHasuraEvent } from "./event... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/hasura/index.ts | backend/src/hasura/index.ts | export { createHasuraEventsHandler } from "./eventHandlers";
export type { HasuraEvent, CreateHasuraEvent, DeleteHasuraEvent, UpdateHasuraEvent } from "./eventUtils";
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/hasura/eventUtils.ts | backend/src/hasura/eventUtils.ts | import { HasuraSessionVariables } from "./session";
type OperationType = "INSERT" | "UPDATE" | "DELETE" | "MANUAL";
type CommonHasuraEventData = {
date: Date;
userId: string | null;
tableName: string;
};
export type CreateHasuraEvent<T> = {
type: "create";
item: T;
itemBefore: null;
} & CommonHasuraEvent... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/testSupport/setupTests.ts | backend/src/testSupport/setupTests.ts | import "@aca/config/dotenv";
import { db } from "@aca/db";
import { cleanupDatabase } from "./testDatabaseUtils";
beforeEach(async () => {
await cleanupDatabase();
});
afterAll(async () => {
await cleanupDatabase();
await db.$disconnect();
});
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/testSupport/testDatabaseUtils.ts | backend/src/testSupport/testDatabaseUtils.ts | import { db } from "@aca/db";
export async function cleanupDatabase(): Promise<void> {
/* CASCADE follows foreign keys, therefore, truncating all the tables starting from `user` */
await db.$executeRaw`TRUNCATE TABLE "user" CASCADE`;
}
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/debug/postAttachment.ts | backend/src/debug/postAttachment.ts | import * as Sentry from "@sentry/node";
import { postSentryLogAttachment } from "@aca/shared/debug/addSentryAttachment";
import { LogAttachment } from "@aca/shared/debug/logAttachment.types";
export async function addBackendLogAttachment(eventId: string, attachments: LogAttachment[]) {
if (!attachments || attachmen... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/atlassian/utils.ts | backend/src/atlassian/utils.ts | import * as Sentry from "@sentry/node";
import axios from "axios";
import { addDays } from "date-fns";
import { db } from "@aca/db";
import { logger } from "@aca/shared/logger";
import { fetchAndSaveNewAccessToken as fetchAndRefreshAccessToken, jiraRequest, refreshWebhooks } from "./rest";
import { handleAccountUpdat... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/atlassian/types.ts | backend/src/atlassian/types.ts | import { Account, AtlassianSite, JiraAccount } from "@aca/db";
type IssueEventTypeName = "issue_assigned";
export type JiraAccountWithAllDetails = JiraAccount & {
account: Account;
atlassian_site: AtlassianSite;
};
export interface JiraWebhookCreationResult {
webhookRegistrationResult: Array<{
createdWebho... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/atlassian/index.ts | backend/src/atlassian/index.ts | import * as Sentry from "@sentry/node";
import axios from "axios";
import { addDays } from "date-fns";
import { Router } from "express";
import { HasuraEvent } from "@aca/backend/src/hasura";
import { HttpStatus } from "@aca/backend/src/http";
import { listenForWebhooks } from "@aca/backend/src/webhooks";
import { Acc... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/atlassian/rest.ts | backend/src/atlassian/rest.ts | import axios, { AxiosError, AxiosRequestHeaders, AxiosResponse } from "axios";
import { addSeconds } from "date-fns";
import { Account, db } from "@aca/db";
import { logger } from "@aca/shared/logger";
import { getPublicBackendURL } from "../utils";
import { WEBHOOK_PATH } from "./index";
import { GetWatchersResponse... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/atlassian/capturing/utils.ts | backend/src/atlassian/capturing/utils.ts | import { db } from "@aca/db";
import { assert } from "@aca/shared/assert";
import { logger } from "@aca/shared/logger";
import { getIssueWatchers, jiraRequest } from "../rest";
import { GetWatchersResponse, JiraAccountWithAllDetails } from "../types";
export const EXTRACT_MENTIONED_ACCOUNT_REGEX = /\[~accountid:([a-z... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/atlassian/capturing/capturing.ts | backend/src/atlassian/capturing/capturing.ts | import { uniq } from "lodash";
import { db } from "@aca/db";
import { assert } from "@aca/shared/assert";
import { LogAttachment } from "@aca/shared/debug/logAttachment.types";
import { logger } from "@aca/shared/logger";
import { isNotNullish } from "@aca/shared/nullish";
import { JiraWebhookPayload } from "../types... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/backend/src/atlassian/capturing/captureIssueUpdates.ts | backend/src/atlassian/capturing/captureIssueUpdates.ts | import { uniq } from "lodash";
import { db } from "@aca/db";
import { SUPPORTED_FIELDS } from "@aca/shared/attlassian";
import { isNotNullish } from "@aca/shared/nullish";
import { JiraWebhookPayload } from "../types";
import { EXTRACT_MENTIONED_ACCOUNT_REGEX, extractMentionedAccountIds, getWatchersIfPermitted } from... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/types/global.d.ts | types/global.d.ts | declare module "*.png" {
const img: string;
export default img;
}
declare module "*.svg" {
const img: string;
export default img;
}
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/types/styled-components.d.ts | types/styled-components.d.ts | /**
* This is our custom styled-components types definition.
*
* This is considerably trimmed down original version with a lot of features we don't really need removed in order to
* considerably increase TSServer performance.
*
* Brief comparing shows that eg. auto imports and type checks are at least a few times... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/App.tsx | frontend/src/App.tsx | import React from "react";
import { createGlobalStyle } from "styled-components";
import Error404 from "@aca/frontend/src/pages/404";
import AppDownload from "@aca/frontend/src/pages/app/download";
import AppLogin from "@aca/frontend/src/pages/app/login";
import AuthError from "@aca/frontend/src/pages/auth/error";
imp... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/router.ts | frontend/src/router.ts | import { createRouter } from "@swan-io/chicane";
import { typedKeys } from "@aca/shared/object";
import { routes as sharedRoutes } from "@aca/shared/routes";
const routes = {
root: "/",
login: "/login?:redirect",
logout: "/logout",
appDownload: "/app/download",
appLogin: "/app/login",
errorTestPage: "/obs... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/index.tsx | frontend/src/index.tsx | import React from "react";
import ReactDOM from "react-dom";
import { App } from "./App";
const app = document.getElementById("root");
ReactDOM.render(<App />, app);
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/errors/sentryFallbackErrorRenderer.tsx | frontend/src/errors/sentryFallbackErrorRenderer.tsx | // This type is not nicely exported. As we use import type - it has no runtime artifacts so seems to be safe
import type { FallbackRender } from "@sentry/react/dist/errorboundary";
import { SmartErrorView } from "./SmartErrorView";
export const sentryFallbackErrorRenderer: FallbackRender = (errorData) => {
const { ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/errors/SmartErrorView.tsx | frontend/src/errors/SmartErrorView.tsx | import { getLocation } from "@swan-io/chicane";
import { ErrorView } from "@aca/frontend/src/views/ErrorView";
import { useDependencyChangeEffect } from "@aca/shared/hooks/useChangeEffect";
import { isKnownError } from "./knownErrors";
interface Props {
error: unknown;
resetError: () => void;
}
export function ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/errors/knownErrors.tsx | frontend/src/errors/knownErrors.tsx | import { signOut } from "next-auth/react";
import { ReactNode } from "react";
import { Button } from "@aca/ui/buttons/Button";
interface CommonErrorAdditionalInfo {
description?: string;
renderActions?: () => ReactNode;
}
class KnownError extends Error {
constructor(message: string, public info?: CommonErrorAd... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/authentication/GoogleLoginButton.tsx | frontend/src/authentication/GoogleLoginButton.tsx | import { signIn } from "next-auth/react";
import React, { ReactNode } from "react";
import { Maybe } from "@aca/shared/types";
import { Button } from "@aca/ui/buttons/Button";
import { GoogleGLogoIcon } from "@aca/ui/icons/logos/GoogleGLogo";
export const GoogleLoginButton = ({
className,
children,
signupEmail,... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/authentication/useCurrentUser.tsx | frontend/src/authentication/useCurrentUser.tsx | import { useSession } from "next-auth/react";
import { UserTokenPayload } from "@aca/shared/jwt";
export function useCurrentUserTokenData(): UserTokenPayload | null {
const { data } = useSession();
return data as ReturnType<typeof useCurrentUserTokenData>;
}
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/authentication/SlackLoginButton.tsx | frontend/src/authentication/SlackLoginButton.tsx | import { signIn } from "next-auth/react";
import React, { ReactNode } from "react";
import { Button } from "@aca/ui/buttons/Button";
import { SlackLogo } from "@aca/ui/icons/logos/SlackLogo";
export const SlackLoginButton = ({
className,
children,
callbackUrl,
}: {
className?: string;
children?: ReactNode;
... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/404.tsx | frontend/src/pages/404.tsx | import React from "react";
import { Router } from "@aca/frontend/src/router";
import { ErrorView } from "@aca/frontend/src/views/ErrorView";
import { Button } from "@aca/ui/buttons/Button";
export default function ErrorPage() {
return (
<ErrorView
title="Page not found"
description={
<>
... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/index.tsx | frontend/src/pages/index.tsx | import React, { useEffect } from "react";
import { Router } from "@aca/frontend/src/router";
export default function Home() {
useEffect(() => {
Router.push("appDownload");
});
return <></>;
}
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/logout.tsx | frontend/src/pages/logout.tsx | import { signOut } from "next-auth/react";
import React, { useEffect } from "react";
import { FocusedActionLayout } from "@aca/frontend/src/layouts/FocusedActionLayout/FocusedActionLayout";
export default function LogoutPage() {
useEffect(() => {
signOut({ callbackUrl: "/" });
}, []);
return <FocusedAction... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/StripeCheckedOut.tsx | frontend/src/pages/StripeCheckedOut.tsx | import { getLocation } from "@swan-io/chicane";
import React, { useEffect } from "react";
import { FocusedActionLayout } from "../layouts/FocusedActionLayout/FocusedActionLayout";
export function StripeCheckedOut() {
const { search } = getLocation();
useEffect(() => {
location.href = "acapela://settings/subsc... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/obscure-error-test-page.tsx | frontend/src/pages/obscure-error-test-page.tsx | import React from "react";
import { wait } from "@aca/shared/time";
export default function ObscureErrorTestPage() {
const triggerMayhem = async () => {
// For testing this we want to give playwright some time to listen to network requests
await wait(100);
throw new Error(
"This page errors by des... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/login.tsx | frontend/src/pages/login.tsx | import React from "react";
import { FocusedActionLayout } from "@aca/frontend/src/layouts/FocusedActionLayout/FocusedActionLayout";
import { LoginOptionsView } from "@aca/frontend/src/views/LoginOptionsView";
export default function LoginPage(): JSX.Element {
return (
<>
<FocusedActionLayout title="Log in... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/auth/sign-in.tsx | frontend/src/pages/auth/sign-in.tsx | import { signIn } from "next-auth/react";
import React, { useEffect } from "react";
export default function () {
useEffect(() => {
const searchParams = new URLSearchParams(location.search);
const provider = searchParams.get("provider");
const scope = searchParams.get("scope");
if (provider) {
s... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/auth/error.tsx | frontend/src/pages/auth/error.tsx | import { getLocation } from "@swan-io/chicane";
import { noop } from "lodash";
import React, { useState } from "react";
import styled from "styled-components";
import { ErrorView } from "@aca/frontend/src/views/ErrorView";
import { Button } from "@aca/ui/buttons/Button";
import { TextInput } from "@aca/ui/forms/TextIn... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/auth/success.tsx | frontend/src/pages/auth/success.tsx | import React from "react";
import { FocusedActionLayout } from "@aca/frontend/src/layouts/FocusedActionLayout/FocusedActionLayout";
export default function () {
return (
<>
<FocusedActionLayout
title={`Authentication Complete Acapela`}
description="We have successfully linked the app with ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/app/download.tsx | frontend/src/pages/app/download.tsx | import { getLocation } from "@swan-io/chicane";
import axios from "axios";
import React, { useEffect, useState } from "react";
import styled, { css } from "styled-components";
import { Router } from "@aca/frontend/src/router";
import { openInNewTab } from "@aca/frontend/src/utils/openInNewTab";
import { PopPresenceAni... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/app/login.tsx | frontend/src/pages/app/login.tsx | import { getLocation } from "@swan-io/chicane";
import { Session } from "next-auth/core/types";
import { getSession, signIn } from "next-auth/react";
import React, { useEffect, useState } from "react";
import { FocusedActionLayout } from "@aca/frontend/src/layouts/FocusedActionLayout/FocusedActionLayout";
import { Log... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/pages/recorder/index.tsx | frontend/src/pages/recorder/index.tsx | /* eslint-disable @typescript-eslint/ban-ts-comment */
import React from "react";
import styled, { keyframes } from "styled-components";
// @ts-ignore
import logoBg from "./logo-bg.svg";
// @ts-ignore
import logoWave from "./logo-wave.svg";
export default function AssetsRecorder() {
return (
<UIHolder>
<U... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/utils/openInNewTab.ts | frontend/src/utils/openInNewTab.ts | export function openInNewTab(href: string) {
Object.assign(document.createElement("a"), {
target: "_blank",
href: href,
}).click();
}
| typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/views/LoginOptionsView/index.tsx | frontend/src/views/LoginOptionsView/index.tsx | import { getLocation } from "@swan-io/chicane";
import React from "react";
import styled from "styled-components";
import { GoogleLoginButton } from "@aca/frontend/src/authentication/GoogleLoginButton";
import { SlackLoginButton } from "@aca/frontend/src/authentication/SlackLoginButton";
import { Maybe } from "@aca/sh... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/views/ErrorView/index.tsx | frontend/src/views/ErrorView/index.tsx | import React, { ReactNode } from "react";
import styled from "styled-components";
import { FocusedActionLayout } from "@aca/frontend/src/layouts/FocusedActionLayout/FocusedActionLayout";
interface Props {
title?: ReactNode;
description: ReactNode;
extraContent?: ReactNode;
children?: ReactNode;
}
export func... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/layouts/FocusedActionLayout/FocusedActionLayout.tsx | frontend/src/layouts/FocusedActionLayout/FocusedActionLayout.tsx | import React, { ReactNode } from "react";
import styled, { css } from "styled-components";
import { PopPresenceAnimator } from "@aca/ui/animations";
import { Logo } from "@aca/ui/icons/logos/AcapelaLogo";
import { phone } from "@aca/ui/responsive";
import { theme } from "@aca/ui/theme";
interface Props {
children: ... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/theme/browserDarkMode.tsx | frontend/src/theme/browserDarkMode.tsx | export function watchIsBrowserDarkModeEnabled(onChange: (isDark: boolean) => void) {
const darkModeMatcher = window.matchMedia("(prefers-color-scheme: dark)");
onChange(darkModeMatcher.matches);
function handleMatcherChange(event: MediaQueryListEvent) {
onChange(event.matches);
}
darkModeMatcher.addEve... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
acapela/monorepo | https://github.com/acapela/monorepo/blob/27047fac40321891abe42d04d40a14ca329f87ee/frontend/src/theme/BrowserThemeProvider.tsx | frontend/src/theme/BrowserThemeProvider.tsx | import React, { PropsWithChildren, useEffect, useState } from "react";
import { ThemeProvider } from "styled-components";
import { darkTheme, defaultTheme } from "@aca/ui/theme";
import { getIsBrowserDarkModeEnabled, watchIsBrowserDarkModeEnabled } from "./browserDarkMode";
export function BrowserThemeProvider({ chi... | typescript | MIT | 27047fac40321891abe42d04d40a14ca329f87ee | 2026-01-05T05:01:22.776906Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.