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

remove List steps, ignore List steps (for now) from function generation #366

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/schema/slack/functions/_scripts/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,26 @@ export const greenText = (text: string) => green + text + reset;
export const yellowText = (text: string) => yellow + text + reset;
export const redText = (text: string) => red + text + reset;

// TODO: once List steps work in code, bring this back
const FUNCTIONS_TO_IGNORE = [
"update_list_record",
"share_list_users",
"lists_activity_feed",
"list_add_record",
"delete_list_record",
"copy_list",
];

export async function getSlackFunctions(
functionsPayloadPath: string = FUNCTIONS_JSON_PATH,
): Promise<FunctionRecord[]> {
const functionsPayload: FunctionsPayload = await Deno.readTextFile(
functionsPayloadPath,
).then(JSON.parse);

return functionsPayload.functions.filter((fn) => fn.type == "builtin");
return functionsPayload.functions.filter((fn) =>
fn.type == "builtin" && !FUNCTIONS_TO_IGNORE.includes(fn.callback_id)
);
}

export function isObjectFunctionProperty(
Expand Down
65 changes: 0 additions & 65 deletions src/schema/slack/functions/copy_list.ts

This file was deleted.

117 changes: 0 additions & 117 deletions src/schema/slack/functions/copy_list_test.ts

This file was deleted.

26 changes: 0 additions & 26 deletions src/schema/slack/functions/delete_list_record.ts

This file was deleted.

50 changes: 0 additions & 50 deletions src/schema/slack/functions/delete_list_record_test.ts

This file was deleted.

41 changes: 0 additions & 41 deletions src/schema/slack/functions/list_add_record.ts

This file was deleted.

Loading