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

Basic implementation of Email PODs in Z API #2194

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robknight
Copy link
Member

@robknight robknight commented Jan 21, 2025

This adds a special "virtual collection" called Emails, which contains the user's Email PODs. Zapps can request permission to this collection, which will allow them to read the Email PODs directly, and to make proofs about them. Updates to the collection are not allowed.

Copy link

linear bot commented Jan 21, 2025

@robknight robknight requested a review from rrrliu January 23, 2025 17:00
@robknight robknight marked this pull request as ready for review January 23, 2025 17:00
Comment on lines +162 to +163
collectionId === "Devcon SEA" ||
collectionId === "Email"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit -- maybe make this an array const? something like VIRTUAL_COLLECTIONS (or another name) ?

@@ -21,8 +30,16 @@ export function getPODsForCollections(
.flatMap((collectionId) =>
collectionId === "Devcon SEA"
? pcds.getAllPCDsInFolder("Devcon SEA")
: collectionId === "Email"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and then refactor this into a nice function if collection id is in VIRTUAL_COLLECTIONS

}
});
const pods = await z.pod.collection("Email").query(q);
console.log(pods);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm

console.log(pods);
setPODs(pods);
} catch (e) {
console.log(e);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(e);
console.error(e);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants