Skip to content

Commit

Permalink
Filters privacy requests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfarrell76 committed Dec 18, 2024
1 parent 285a829 commit 643f825
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/graphql/fetchAllRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export async function fetchAllRequests(
actions = [],
statuses = [],
origins = [],
text,
createdAtBefore,
createdAtAfter,
isTest,
Expand All @@ -96,6 +97,8 @@ export async function fetchAllRequests(
createdAtBefore?: Date;
/** Filter for requests created after this date */
createdAtAfter?: Date;
/** Filter for requests with a specific identifier */
text?: string;
/** Return test requests */
isTest?: boolean;
/** Return silent mode requests */
Expand Down Expand Up @@ -133,6 +136,7 @@ export async function fetchAllRequests(
first: PAGE_SIZE,
offset,
filterBy: {
text,
type: actions.length > 0 ? actions : undefined,
status: statuses.length > 0 ? statuses : undefined,
origin: origins.length > 0 ? origins : undefined,
Expand Down
4 changes: 4 additions & 0 deletions src/requests/pullPrivacyRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export async function pullPrivacyRequests({
sombraAuth,
actions = [],
statuses = [],
identifierSearch,
pageLimit = 100,
transcendUrl = DEFAULT_TRANSCEND_API,
createdAtBefore,
Expand All @@ -37,6 +38,8 @@ export async function pullPrivacyRequests({
}: {
/** Transcend API key authentication */
auth: string;
/** Search for a specific identifier */
identifierSearch?: string;
/** Sombra API key authentication */
sombraAuth?: string;
/** API URL for Transcend backend */
Expand Down Expand Up @@ -90,6 +93,7 @@ export async function pullPrivacyRequests({
// fetch the requests
const requests = await fetchAllRequests(client, {
actions,
text: identifierSearch,
statuses,
createdAtBefore,
createdAtAfter,
Expand Down

0 comments on commit 643f825

Please sign in to comment.