@xylex-group/athena 3.0.0 → 3.0.2

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.
Files changed (70) hide show
  1. package/README.md +24 -10
  2. package/dist/{athena-auth-url-oLux_57a.d.cts → athena-request-headers-C7Jy-c_D.d.ts} +85 -1
  3. package/dist/{athena-auth-url-oLux_57a.d.ts → athena-request-headers-DujFFyMU.d.cts} +85 -1
  4. package/dist/billing.cjs +133 -21
  5. package/dist/billing.cjs.map +1 -1
  6. package/dist/billing.d.cts +41 -1
  7. package/dist/billing.d.ts +41 -1
  8. package/dist/billing.js +133 -21
  9. package/dist/billing.js.map +1 -1
  10. package/dist/browser.cjs +138 -45
  11. package/dist/browser.cjs.map +1 -1
  12. package/dist/browser.d.cts +9 -9
  13. package/dist/browser.d.ts +9 -9
  14. package/dist/browser.js +138 -45
  15. package/dist/browser.js.map +1 -1
  16. package/dist/cli/index.cjs +130 -45
  17. package/dist/cli/index.cjs.map +1 -1
  18. package/dist/cli/index.d.cts +3 -3
  19. package/dist/cli/index.d.ts +3 -3
  20. package/dist/cli/index.js +130 -45
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/index.cjs +138 -45
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +9 -9
  25. package/dist/index.d.ts +9 -9
  26. package/dist/index.js +138 -45
  27. package/dist/index.js.map +1 -1
  28. package/dist/{model-form-BKetpu6Q.d.ts → model-form-Dh0sisdL.d.ts} +1 -1
  29. package/dist/{model-form-BEfCGB5b.d.cts → model-form-oOAJUVd4.d.cts} +1 -1
  30. package/dist/{module-CrrSmpML.d.cts → module-CB25egcO.d.cts} +17 -5
  31. package/dist/{module-8dSMcy0K.d.cts → module-C_ab-MM1.d.cts} +46 -12
  32. package/dist/{module-8dSMcy0K.d.ts → module-C_ab-MM1.d.ts} +46 -12
  33. package/dist/{module-Bef_MAPO.d.ts → module-CkUM6v58.d.ts} +17 -5
  34. package/dist/next/client.cjs +9817 -3
  35. package/dist/next/client.cjs.map +1 -1
  36. package/dist/next/client.d.cts +26 -1
  37. package/dist/next/client.d.ts +26 -1
  38. package/dist/next/client.js +9788 -4
  39. package/dist/next/client.js.map +1 -1
  40. package/dist/next/server.cjs +10398 -42
  41. package/dist/next/server.cjs.map +1 -1
  42. package/dist/next/server.d.cts +39 -4
  43. package/dist/next/server.d.ts +39 -4
  44. package/dist/next/server.js +10339 -43
  45. package/dist/next/server.js.map +1 -1
  46. package/dist/{pipeline-BXFQbsUW.d.ts → pipeline-B8aN2EHe.d.ts} +1 -1
  47. package/dist/{pipeline-Dfsed4VD.d.cts → pipeline-D4W-Cc-A.d.cts} +1 -1
  48. package/dist/proxy-request-headers-DGxdoyA0.d.cts +59 -0
  49. package/dist/proxy-request-headers-m4D2Tduy.d.ts +59 -0
  50. package/dist/react.cjs +7 -7
  51. package/dist/react.cjs.map +1 -1
  52. package/dist/react.d.cts +4 -4
  53. package/dist/react.d.ts +4 -4
  54. package/dist/react.js +7 -7
  55. package/dist/react.js.map +1 -1
  56. package/dist/social-providers.cjs +15 -11
  57. package/dist/social-providers.cjs.map +1 -1
  58. package/dist/social-providers.d.cts +17 -57
  59. package/dist/social-providers.d.ts +17 -57
  60. package/dist/social-providers.js +15 -11
  61. package/dist/social-providers.js.map +1 -1
  62. package/dist/{types-jClgDy1J.d.ts → types-B75PdABb.d.ts} +1 -1
  63. package/dist/{types-Z3-rsiM3.d.cts → types-BBm-kEBL.d.cts} +1 -1
  64. package/dist/{types-CK7cBQbC.d.ts → types-BaAMXCqK.d.ts} +1 -1
  65. package/dist/{types-kO_Ut5wU.d.cts → types-CgCv5o6R.d.cts} +1 -1
  66. package/dist/utils.d.cts +4 -142
  67. package/dist/utils.d.ts +4 -142
  68. package/dist/{v3-client-G8JMOilK.d.cts → v3-client-CWfZHcKL.d.cts} +37 -21
  69. package/dist/{v3-client-CuCNy-JJ.d.ts → v3-client-DZp2NEhK.d.ts} +37 -21
  70. package/package.json +6 -3
@@ -245,15 +245,19 @@ function getOAuth2Tokens(data) {
245
245
  const now = /* @__PURE__ */ new Date();
246
246
  return new Date(now.getTime() + seconds * 1e3);
247
247
  };
248
+ const record = data;
249
+ const expiresIn = typeof record.expires_in === "number" ? record.expires_in : void 0;
250
+ const refreshTokenExpiresIn = typeof record.refresh_token_expires_in === "number" ? record.refresh_token_expires_in : void 0;
251
+ const scope = record.scope;
248
252
  return {
249
- tokenType: data.token_type,
250
- accessToken: data.access_token,
251
- refreshToken: data.refresh_token,
252
- accessTokenExpiresAt: data.expires_in ? getDate(data.expires_in) : void 0,
253
- refreshTokenExpiresAt: data.refresh_token_expires_in ? getDate(data.refresh_token_expires_in) : void 0,
254
- scopes: data?.scope ? typeof data.scope === "string" ? data.scope.split(" ") : data.scope : [],
255
- idToken: data.id_token,
256
- raw: data
253
+ tokenType: typeof record.token_type === "string" ? record.token_type : void 0,
254
+ accessToken: typeof record.access_token === "string" ? record.access_token : void 0,
255
+ refreshToken: typeof record.refresh_token === "string" ? record.refresh_token : void 0,
256
+ accessTokenExpiresAt: expiresIn != null ? getDate(expiresIn) : void 0,
257
+ refreshTokenExpiresAt: refreshTokenExpiresIn != null ? getDate(refreshTokenExpiresIn) : void 0,
258
+ scopes: scope ? typeof scope === "string" ? scope.split(" ") : Array.isArray(scope) ? scope.filter((s) => typeof s === "string") : [] : [],
259
+ idToken: typeof record.id_token === "string" ? record.id_token : void 0,
260
+ raw: record
257
261
  };
258
262
  }
259
263
 
@@ -2184,9 +2188,9 @@ var line = (options) => {
2184
2188
  }
2185
2189
  if (!profile) return null;
2186
2190
  const userMap = await options.mapProfileToUser?.(profile);
2187
- const id = profile.sub || profile.userId;
2188
- const name = profile.name || profile.displayName || "";
2189
- const image = profile.picture || profile.pictureUrl || void 0;
2191
+ const id = profile.sub;
2192
+ const name = profile.name || "";
2193
+ const image = profile.picture || void 0;
2190
2194
  const email = profile.email;
2191
2195
  return {
2192
2196
  user: {