@makolabs/ripple 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -856,10 +856,13 @@ export const approveUser = command('unchecked', async (input) => {
856
856
  throw new Error('At least one permission scope is required to approve a user');
857
857
  }
858
858
  try {
859
- const clerkRole = input.role.startsWith('org:') ? input.role : `org:${input.role}`;
859
+ // Org membership uses Clerk's built-in `org:member` role app-specific
860
+ // roles are an authorization concept enforced via API key scopes, not via
861
+ // Clerk's organization roles (which would require pre-configuring each
862
+ // custom role in the Clerk dashboard). Mirrors createUser's pattern.
860
863
  await makeClerkRequest(`/organizations/${ORGANIZATION_ID}/memberships`, {
861
864
  method: 'POST',
862
- body: JSON.stringify({ user_id: input.userId, role: clerkRole })
865
+ body: JSON.stringify({ user_id: input.userId, role: 'org:member' })
863
866
  });
864
867
  const user = await makeClerkRequest(`/users/${input.userId}`);
865
868
  const email = user.email_addresses?.[0]?.email_address;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makolabs/ripple",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "Simple Svelte 5 powered component library ✨",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {