Skip to content

Commit

Permalink
Fixes pull profile
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfarrell76 committed Jan 14, 2025
1 parent d84ffa2 commit 2107b34
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Transcend Inc.",
"name": "@transcend-io/cli",
"description": "Small package containing useful typescript utilities.",
"version": "6.13.0",
"version": "6.13.1",
"homepage": "https://github.com/transcend-io/cli",
"repository": {
"type": "git",
Expand Down
30 changes: 20 additions & 10 deletions src/cli-cron-pull-profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,26 @@ async function main(): Promise<void> {
const results = await map(
uniq(requestIds),
async (requestId) => {
const results = await fetchRequestFilesForRequest(client, { requestId });
return results.map(({ fileName, remoteId }) => ({
RecordId: remoteId,
Object: fileName
.replace('.json', '')
.split('/')
.pop()
?.replace(' Information', ''),
Comment: 'Customer data deletion request submitted via transcend.io',
}));
const results = await fetchRequestFilesForRequest(client, {
requestId,
dataSiloId: targetDataSiloId,
});
return results.map(({ fileName, remoteId }) => {
if (!remoteId) {
throw new Error(
`Failed to find remoteId for ${fileName} request: ${requestId}`,
);
}
return {
RecordId: remoteId,
Object: fileName
.replace('.json', '')
.split('/')
.pop()
?.replace(' Information', ''),
Comment: 'Customer data deletion request submitted via transcend.io',
};
});
},
{
concurrency: 10,
Expand Down
2 changes: 2 additions & 0 deletions src/graphql/fetchRequestFilesForRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export async function fetchRequestFilesForRequest(
filterBy: {
/** Filter by request ID */
requestId: string;
/** Filter by data silo ID */
dataSiloId?: string;
},
): Promise<RequestFile[]> {
const requestFiles: RequestFile[] = [];
Expand Down

0 comments on commit 2107b34

Please sign in to comment.