@meistrari/auth-core 3.3.0 → 3.5.0

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.
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ function isTokenExpired(token, expiresInMs) {
21
21
  return nowInSeconds > expirationTime;
22
22
  }
23
23
 
24
- const version = "3.3.0";
24
+ const version = "3.5.0";
25
25
 
26
26
  function parsedEnumValues(schema) {
27
27
  return Object.fromEntries(
@@ -1984,17 +1984,22 @@ class OrganizationService {
1984
1984
  * @param options.userEmail - Email address of the user to invite
1985
1985
  * @param options.role - Role to assign to the invited user
1986
1986
  * @param options.applicationRole - Application role granted on acceptance; required with an application-scoped session
1987
- * @param options.teamId - Team ID to add the user to
1987
+ * @param options.teamId - Deprecated: team ID to add the user to, sent as `teamIds: [teamId]`
1988
+ * @param options.teamIds - Team IDs to add the user to
1988
1989
  * @param options.resend - Whether to resend if invitation already exists
1989
1990
  * @returns The created invitation
1990
1991
  */
1991
- async inviteUserToOrganization({ userEmail, role, applicationRole, teamId, resend }) {
1992
+ async inviteUserToOrganization({ userEmail, role, applicationRole, teamId, teamIds, resend }) {
1993
+ if (teamId !== void 0 && teamIds !== void 0) {
1994
+ throw new Error("Pass either teamId or teamIds, not both");
1995
+ }
1996
+ const requestedTeamIds = teamIds ?? (teamId !== void 0 ? [teamId] : void 0);
1992
1997
  return await this.client.organization.inviteMember({
1993
1998
  email: userEmail,
1994
1999
  role,
1995
- teamId,
1996
2000
  resend: resend ?? false,
1997
- ...applicationRole ? { applicationRole } : {}
2001
+ ...applicationRole ? { applicationRole } : {},
2002
+ ...requestedTeamIds !== void 0 ? { teamIds: requestedTeamIds } : {}
1998
2003
  });
1999
2004
  }
2000
2005
  /**
@@ -2573,12 +2578,14 @@ class UserService {
2573
2578
  });
2574
2579
  }
2575
2580
  /**
2576
- * Unlinks a provider from the current user. Requires an AAL2 session (gated
2581
+ * Unlinks an account from the current user. Requires an AAL2 session (gated
2577
2582
  * server-side). The server refuses to remove the user's last account.
2583
+ *
2584
+ * @param params.accountId - The account's `id` from {@link listAccounts}, not
2585
+ * the provider's account identifier
2578
2586
  */
2579
2587
  async unlinkAccount(params) {
2580
2588
  return await this.client.unlinkAccount({
2581
- providerId: params.providerId,
2582
2589
  accountId: params.accountId
2583
2590
  });
2584
2591
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-core",
3
- "version": "3.3.0",
3
+ "version": "3.5.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -18,11 +18,11 @@
18
18
  "docs": "typedoc"
19
19
  },
20
20
  "dependencies": {
21
- "@better-auth/api-key": "1.6.26",
22
- "@better-auth/sso": "1.6.26",
23
- "better-auth": "1.6.26",
24
- "jose": "6.1.3",
25
- "zod": "4.3.6"
21
+ "@better-auth/api-key": "1.7.14",
22
+ "@better-auth/sso": "1.7.14",
23
+ "better-auth": "1.7.14",
24
+ "jose": "6.2.14",
25
+ "zod": "4.6.7"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "latest",