@auditauth/core 0.2.0-beta.1 → 0.2.0-beta.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.
@@ -1,4 +1,4 @@
1
- import { SessionUser } from "../types";
1
+ import type { SessionUser } from '../types.js';
2
2
  type AuthorizePayload = {
3
3
  code: string | null;
4
4
  client_type: 'browser' | 'server';
@@ -1,4 +1,4 @@
1
- import { CORE_SETTINGS } from "../settings";
1
+ import { CORE_SETTINGS } from '../settings.js';
2
2
  const authorizeCode = async ({ code, client_type }) => {
3
3
  if (!code)
4
4
  throw new Error('Invalid code');
@@ -1,4 +1,4 @@
1
- import { CORE_SETTINGS } from "../settings";
1
+ import { CORE_SETTINGS } from '../settings.js';
2
2
  const buildAuthUrl = async ({ apiKey, redirectUrl }) => {
3
3
  const response = await fetch(`${CORE_SETTINGS.domains.api}/applications/login`, {
4
4
  method: 'POST',
@@ -1,4 +1,4 @@
1
- export { default as buildAuthUrl } from './buildAuthUrl';
2
- export { default as authorizeCode } from './authorizeCode';
3
- export { default as revokeSession } from './revokeSession';
4
- export { default as refreshTokens } from './refreshTokens';
1
+ export { default as buildAuthUrl } from './buildAuthUrl.js';
2
+ export { default as authorizeCode } from './authorizeCode.js';
3
+ export { default as revokeSession } from './revokeSession.js';
4
+ export { default as refreshTokens } from './refreshTokens.js';
@@ -1,4 +1,4 @@
1
- export { default as buildAuthUrl } from './buildAuthUrl';
2
- export { default as authorizeCode } from './authorizeCode';
3
- export { default as revokeSession } from './revokeSession';
4
- export { default as refreshTokens } from './refreshTokens';
1
+ export { default as buildAuthUrl } from './buildAuthUrl.js';
2
+ export { default as authorizeCode } from './authorizeCode.js';
3
+ export { default as revokeSession } from './revokeSession.js';
4
+ export { default as refreshTokens } from './refreshTokens.js';
@@ -1,4 +1,4 @@
1
- import { CredentialsResponse } from "../types";
1
+ import type { CredentialsResponse } from '../types.js';
2
2
  type RefreshTokensPayload = {
3
3
  client_type: 'browser' | 'server';
4
4
  refresh_token?: string;
@@ -1,4 +1,4 @@
1
- import { CORE_SETTINGS } from "../settings";
1
+ import { CORE_SETTINGS } from '../settings.js';
2
2
  const refreshTokens = async ({ client_type, refresh_token }) => {
3
3
  const response = await fetch(`${CORE_SETTINGS.domains.api}/auth/refresh`, {
4
4
  method: 'POST',
@@ -1,4 +1,4 @@
1
- import { CORE_SETTINGS } from "../settings";
1
+ import { CORE_SETTINGS } from '../settings.js';
2
2
  const revokeSession = async ({ access_token }) => {
3
3
  const response = await fetch(`${CORE_SETTINGS.domains.api}/auth/revoke`, {
4
4
  method: 'PATCH',
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './settings';
2
- export type * from './types';
3
- export * from './auth';
4
- export * from './portal';
5
- export * from './metrics';
1
+ export * from './settings.js';
2
+ export type * from './types.js';
3
+ export * from './auth/index.js';
4
+ export * from './portal/index.js';
5
+ export * from './metrics/index.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export * from './settings';
2
- export * from './auth';
3
- export * from './portal';
4
- export * from './metrics';
1
+ export * from './settings.js';
2
+ export * from './auth/index.js';
3
+ export * from './portal/index.js';
4
+ export * from './metrics/index.js';
@@ -1 +1 @@
1
- export { default as sendMetrics } from './sendMetrics';
1
+ export { default as sendMetrics } from './sendMetrics.js';
@@ -1 +1 @@
1
- export { default as sendMetrics } from './sendMetrics';
1
+ export { default as sendMetrics } from './sendMetrics.js';
@@ -1,4 +1,4 @@
1
- import { Metric } from "../types";
1
+ import type { Metric } from '../types.js';
2
2
  type SendMetricsPayload = {
3
3
  payload: Metric;
4
4
  appId: string;
@@ -1,4 +1,4 @@
1
- import { CORE_SETTINGS } from "../settings";
1
+ import { CORE_SETTINGS } from '../settings.js';
2
2
  const sendMetrics = async ({ apiKey, appId, payload }) => {
3
3
  await fetch(`${CORE_SETTINGS.domains.api}/metrics`, {
4
4
  method: 'POST',
@@ -1,4 +1,4 @@
1
- import { CORE_SETTINGS } from "../settings";
1
+ import { CORE_SETTINGS } from '../settings.js';
2
2
  const buildPortalUrl = async ({ access_token, redirectUrl }) => {
3
3
  const response = await fetch(`${CORE_SETTINGS.domains.api}/portal/exchange`, {
4
4
  method: 'GET',
@@ -1 +1 @@
1
- export { default as buildPortalUrl } from './buildPortalUrl';
1
+ export { default as buildPortalUrl } from './buildPortalUrl.js';
@@ -1 +1 @@
1
- export { default as buildPortalUrl } from './buildPortalUrl';
1
+ export { default as buildPortalUrl } from './buildPortalUrl.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auditauth/core",
3
- "version": "0.2.0-beta.1",
3
+ "version": "0.2.0-beta.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Nimibyte",