new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Better Auth · Plugins · all subjects

polar/portal

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Portal plugin benefits list method

The portal plugin provides authClient.customer.benefits.list({ query: { page: 1, limit: 10 } }) to list granted benefits for the authenticated user/customer.

Portal plugin customer portal method

The portal plugin adds authClient.customer.portal() method which redirects the user to the Polar Customer Portal where they can manage orders, purchases, subscriptions, and benefits.

Portal plugin customer state method

The portal plugin provides authClient.customer.state() method which returns the customer state object containing all customer data, active subscriptions, granted benefits, and active meters with current balances. This object has all required information to check if a user should have service access.

Portal plugin orders list method

The portal plugin provides authClient.customer.orders.list({ query: { page: 1, limit: 10, productBillingType: "one_time" } }) to list orders (purchases and subscription renewals) for the authenticated user/customer. productBillingType can be "one_time" or "recurring".

Portal plugin subscriptions list method

The portal plugin provides authClient.customer.subscriptions.list({ query: { page: 1, limit: 10, active: true } }) to list subscriptions associated with the authenticated user/customer.

Portal subscriptions with organization reference

To check subscriptions for an organization instead of the user, pass referenceId in the query: await authClient.customer.subscriptions.list({ query: { page: 1, limit: 10, active: true, referenceId: organizationId } }); This returns all subscriptions associated with that organization ID.

Give your agent this brain