@types/apple-signin-api
TypeScript icon, indicating that this package has built-in type declarations

1.5.3 • Public • Published

Installation

npm install --save @types/apple-signin-api

Summary

This package contains type definitions for apple-signin-api (https://developer.apple.com/documentation/signinwithapplejs).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/apple-signin-api.

index.d.ts

declare var AppleID: AppleSignInAPI.AppleID;

declare namespace AppleSignInAPI {
    // https://developer.apple.com/documentation/signinwithapplejs/authorizationi
    interface AuthorizationI {
        code: string;
        id_token: string;
        state: string;
        nonce?: string | undefined;
    }
    // https://developer.apple.com/documentation/signinwithapplejs/namei
    interface NameI {
        firstName: string;
        lastName: string;
    }
    // https://developer.apple.com/documentation/signinwithapplejs/signinerrori
    interface SignInErrorI {
        error: string;
    }
    // https://developer.apple.com/documentation/signinwithapplejs/signinresponsei
    interface SignInResponseI {
        authorization: AuthorizationI;
        user?: UserI | undefined;
    }
    // https://developer.apple.com/documentation/signinwithapplejs/useri
    interface UserI {
        email: string;
        name: NameI;
    }
    // https://developer.apple.com/documentation/signinwithapplejs/authi
    interface AuthI {
        init: (config: ClientConfigI) => void;
        signIn: (signInConfig?: ClientConfigI) => Promise<SignInResponseI>;
        renderButton: () => void;
    }
    // https://developer.apple.com/documentation/signinwithapplejs/clientconfigi
    interface ClientConfigI {
        clientId?: string | undefined;
        redirectURI?: string | undefined;
        scope?: string | undefined;
        state?: string | undefined;
        nonce?: string | undefined;
        usePopup?: boolean | undefined;
    }
    interface AppleID {
        auth: AuthI;
    }
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Julius Lungys, and Koen Punt.

/@types/apple-signin-api/

    Package Sidebar

    Install

    npm i @types/apple-signin-api

    Weekly Downloads

    15,427

    Version

    1.5.3

    License

    MIT

    Unpacked Size

    6.02 kB

    Total Files

    5

    Last publish

    Collaborators

    • types