Skip to content

Commit

Permalink
chore: Move Hasura to lib folder
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Nov 6, 2023
1 parent 59c1faf commit 4cea97e
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions api.planx.uk/inviteToPay/createPaymentSendEvents.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import supertest from "supertest";
import app from "../server";
import { createScheduledEvent } from "../hasura/metadata";
import { createScheduledEvent } from "../lib/hasura/metadata";
import { queryMock } from "../tests/graphqlQueryMock";
import { flowWithInviteToPay } from "../tests/mocks/inviteToPayData";

jest.mock("../hasura/metadata");
jest.mock("../lib/hasura/metadata");
const mockedCreateScheduledEvent = createScheduledEvent as jest.MockedFunction<
typeof createScheduledEvent
>;
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/inviteToPay/createPaymentSendEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { $api, $public } from "../client";
import {
ScheduledEventResponse,
createScheduledEvent,
} from "../hasura/metadata";
} from "../lib/hasura/metadata";
import { getMostRecentPublishedFlow } from "../helpers";
import { Flow, Node, Team } from "../types";

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import supertest from "supertest";
import app from "../../../../server";
import { createScheduledEvent } from "../../../../hasura/metadata";
import { createScheduledEvent } from "../../../../lib/hasura/metadata";

const { post } = supertest(app);

jest.mock("../../../../hasura/metadata");
jest.mock("../../../../lib/hasura/metadata");
const mockedCreateScheduledEvent = createScheduledEvent as jest.MockedFunction<
typeof createScheduledEvent
>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { addDays } from "date-fns";

import { createScheduledEvent } from "../../../../hasura/metadata";
import { createScheduledEvent } from "../../../../lib/hasura/metadata";
import {
DAYS_UNTIL_EXPIRY,
REMINDER_DAYS_FROM_EXPIRY,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";
import { ValidatedRequestHandler } from "../../../../shared/middleware/validate";
import { ScheduledEventResponse } from "../../../../hasura/metadata";
import { ScheduledEventResponse } from "../../../../lib/hasura/metadata";

export const createSessionEventSchema = z.object({
body: z.object({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import supertest from "supertest";
import app from "../../../../server";
import { createScheduledEvent } from "../../../../hasura/metadata";
import { createScheduledEvent } from "../../../../lib/hasura/metadata";
import { CreatePaymentEvent } from "./schema";

const { post } = supertest(app);

jest.mock("../../../../hasura/metadata");
jest.mock("../../../../lib/hasura/metadata");
const mockedCreateScheduledEvent = createScheduledEvent as jest.MockedFunction<
typeof createScheduledEvent
>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { addDays } from "date-fns";

import { createScheduledEvent } from "../../../../hasura/metadata";
import { createScheduledEvent } from "../../../../lib/hasura/metadata";
import {
DAYS_UNTIL_EXPIRY,
REMINDER_DAYS_FROM_EXPIRY,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";
import { ValidatedRequestHandler } from "../../../../shared/middleware/validate";
import { ScheduledEventResponse } from "../../../../hasura/metadata";
import { ScheduledEventResponse } from "../../../../lib/hasura/metadata";

export const createPaymentEventSchema = z.object({
body: z.object({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runSQL } from "../../../../hasura/schema";
import { runSQL } from "../../../../lib/hasura/schema";
import { queryMock } from "../../../../tests/graphqlQueryMock";
import {
mockIds,
Expand All @@ -25,7 +25,7 @@ import {
deleteHasuraScheduledEventsForSubmittedSessions,
} from "./operations";

jest.mock("../../../../hasura/schema");
jest.mock("../../../../lib/hasura/schema");
const mockRunSQL = runSQL as jest.MockedFunction<typeof runSQL>;

const mockFindSession = jest.fn();
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/send/createSendEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextFunction, Request, Response } from "express";
import {
ScheduledEventResponse,
createScheduledEvent,
} from "../hasura/metadata";
} from "../lib/hasura/metadata";

interface CombinedResponse {
bops?: ScheduledEventResponse;
Expand Down

0 comments on commit 4cea97e

Please sign in to comment.