@finueva/auth 0.32.0 → 0.34.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.
@@ -125,7 +125,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
125
125
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
126
126
  SOFTWARE.
127
127
 
128
- ## unstorage 1.17.5
128
+ ## unstorage 1.17.6
129
129
 
130
130
  Source: https://github.com/unjs/unstorage
131
131
 
package/dist/device.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- import { $ as OrganizationTeam, C as CreatedOrganizationTeam, Dt as SocialIdTokenProvider, Et as SocialIdTokenInput, Ft as UpdateOrganizationDisplayInput, G as OrganizationMemberAuthority, Gt as AuthErrorStatus, H as OrganizationInvitation, It as UpdateOrganizationTeamDisplayInput, J as OrganizationMemberPageInput, K as OrganizationMemberAuthorityV2, Kt as UserApiCredential, Lt as UpdateProfileInput, Mt as TwoFactorStatus, O as DriveCredential, S as CreatedOrganizationMemberInvitation, U as OrganizationInvitationPage, Ut as AuthError, V as OrganizationDisplay, W as OrganizationMember, Wt as AuthErrorCode, X as OrganizationPageInput, Y as OrganizationPage, b as CreateOrganizationMemberInvitationInput, c as AuthSessionInventory, et as OrganizationTeamDisplay, ht as ReceivedOrganizationInvitationPage, i as AuthOrganization, it as PasskeyInventory, k as DriveCredentialInput, m as CeremonyHandoffInput, mt as ReceivedOrganizationInvitation, nt as OrganizationTeamPage, p as CeremonyHandoff, q as OrganizationMemberPage, qt as UserApiCredentialInput, s as AuthSession, tt as OrganizationTeamMemberPage, x as CreatedOrganization } from "./types-BU8vZrhF.js";
1
+ import { $ as OrganizationPage, At as SocialIdTokenInput, Bt as UpdateOrganizationTeamDisplayInput, D as CreatedOrganizationTeam, E as CreatedOrganizationMemberInvitation, G as OrganizationDisplay, It as TwoFactorStatus, J as OrganizationMember, Jt as AuthErrorAccountDeletion, K as OrganizationInvitation, M as DriveCredential, N as DriveCredentialInput, Q as OrganizationMemberPageInput, Qt as UserApiCredentialInput, T as CreatedOrganization, Vt as UpdateProfileInput, X as OrganizationMemberAuthorityV2, Xt as AuthErrorStatus, Y as OrganizationMemberAuthority, Yt as AuthErrorCode, Z as OrganizationMemberPage, Zt as UserApiCredential, _ as CeremonyHandoff, a as AccountDeletionStartRequest, at as OrganizationTeamMemberPage, c as AuthOrganization, ct as PasskeyInventory, d as AuthSession, et as OrganizationPageInput, f as AuthSessionInventory, i as AccountDeletionRestoreInput, it as OrganizationTeamDisplay, jt as SocialIdTokenProvider, n as AccountDeletionEligibility, ot as OrganizationTeamPage, q as OrganizationInvitationPage, qt as AuthError, r as AccountDeletionOrganization, rt as OrganizationTeam, v as CeremonyHandoffInput, vt as ReceivedOrganizationInvitation, w as CreateOrganizationMemberInvitationInput, yt as ReceivedOrganizationInvitationPage, zt as UpdateOrganizationDisplayInput } from "./types-QJnXZXYY.js";
2
2
  //#region src/device.d.ts
3
- type DeviceAuthorizationErrorCode = "device_access_denied" | "device_authorization_cancelled" | "device_code_expired" | "invalid_device_authorization" | "identity_authority_unavailable";
4
- declare class DeviceAuthorizationError extends Error {
3
+ export type DeviceAuthorizationErrorCode = "device_access_denied" | "device_authorization_cancelled" | "device_code_expired" | "invalid_device_authorization" | "identity_authority_unavailable";
4
+ export declare class DeviceAuthorizationError extends Error {
5
5
  readonly code: DeviceAuthorizationErrorCode;
6
6
  constructor(code: DeviceAuthorizationErrorCode);
7
7
  }
8
- interface DeviceToken {
8
+ export interface DeviceToken {
9
9
  accessToken: string;
10
10
  tokenType: "Bearer";
11
11
  expiresAt: Date;
12
12
  scope: "openid";
13
13
  }
14
- interface DeviceTokenPersistence {
14
+ export interface DeviceTokenPersistence {
15
15
  read(signal: AbortSignal): DeviceToken | null | Promise<DeviceToken | null>;
16
16
  replace(token: DeviceToken, signal: AbortSignal): void | Promise<void>;
17
17
  delete(signal: AbortSignal): void | Promise<void>;
18
18
  }
19
- interface DeviceAuthorization {
19
+ export interface DeviceAuthorization {
20
20
  deviceCode: string;
21
21
  userCode: string;
22
22
  verificationUri: string;
@@ -24,7 +24,7 @@ interface DeviceAuthorization {
24
24
  expiresAt: Date;
25
25
  intervalSeconds: number;
26
26
  }
27
- interface DeviceAuthOptions {
27
+ export interface DeviceAuthOptions {
28
28
  authOrigin: string;
29
29
  clientId: string;
30
30
  fetch?: typeof globalThis.fetch;
@@ -33,10 +33,10 @@ interface DeviceAuthOptions {
33
33
  timeoutMs?: number;
34
34
  maxPollingMs?: number;
35
35
  }
36
- interface PollDeviceOptions {
36
+ export interface PollDeviceOptions {
37
37
  signal?: AbortSignal;
38
38
  }
39
- interface DeviceAuthClient {
39
+ export interface DeviceAuthClient {
40
40
  readonly _type: "device";
41
41
  requestAuthorization(options?: {
42
42
  signal?: AbortSignal;
@@ -80,6 +80,10 @@ interface DeviceAuthClient {
80
80
  * browser. The device never runs WebAuthn for the Auth Relying Party itself.
81
81
  */
82
82
  createCeremonyHandoff(input: CeremonyHandoffInput): Promise<CeremonyHandoff>;
83
+ /** Reads whether this device's User can delete the account now. The read changes nothing. */
84
+ getAccountDeletionEligibility(): Promise<AccountDeletionEligibility>;
85
+ /** Restores an account that is scheduled for deletion. It needs no session and creates none. */
86
+ restoreAccount(input: AccountDeletionRestoreInput): Promise<void>;
83
87
  listPasskeys(): Promise<PasskeyInventory>;
84
88
  renamePasskey(passkeyId: string, name: string): Promise<void>;
85
89
  signInWithSocialIdToken(input: SocialIdTokenInput): Promise<AuthSession>;
@@ -90,6 +94,6 @@ interface DeviceAuthClient {
90
94
  revokeCurrentDevice(): Promise<void>;
91
95
  revokeAllSessions(): Promise<void>;
92
96
  }
93
- declare function createDeviceAuth(options: DeviceAuthOptions): DeviceAuthClient;
97
+ export declare function createDeviceAuth(options: DeviceAuthOptions): DeviceAuthClient;
94
98
  //#endregion
95
- export { AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type CreateOrganizationMemberInvitationInput, type CreatedOrganization, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, DeviceAuthClient, DeviceAuthOptions, DeviceAuthorization, DeviceAuthorizationError, DeviceAuthorizationErrorCode, DeviceToken, DeviceTokenPersistence, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberAuthorityV2, type OrganizationMemberPage, type OrganizationMemberPageInput, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, PollDeviceOptions, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type SocialIdTokenInput, type SocialIdTokenProvider, type TwoFactorStatus, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UserApiCredential, type UserApiCredentialInput, createDeviceAuth };
99
+ export { type AccountDeletionEligibility, type AccountDeletionOrganization, type AccountDeletionRestoreInput, type AccountDeletionStartRequest, AuthError, type AuthErrorAccountDeletion, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type CreateOrganizationMemberInvitationInput, type CreatedOrganization, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberAuthorityV2, type OrganizationMemberPage, type OrganizationMemberPageInput, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type SocialIdTokenInput, type SocialIdTokenProvider, type TwoFactorStatus, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UserApiCredential, type UserApiCredentialInput };