FHIRClient - v3.0.0
    Preparing search index...

    Interface Adapter

    interface Adapter {
        base64urldecode: (input: string) => string;
        base64urlencode: (input: string | Uint8Array<ArrayBufferLike>) => string;
        options: BrowserFHIRSettings;
        security: {
            digestSha256: (payload: string) => Promise<Uint8Array<ArrayBufferLike>>;
            generatePKCEChallenge: (
                entropy?: number,
            ) => Promise<{ codeChallenge: string; codeVerifier: string }>;
            importJWK: (jwk: JWK) => Promise<CryptoKey>;
            randomBytes: (count: number) => Uint8Array;
            signCompactJws: (
                alg: "ES384" | "RS384",
                privateKey: CryptoKey,
                header: any,
                payload: any,
            ) => Promise<string>;
        };
        atob(str: string): string;
        btoa(str: string): string;
        getSmartApi(): SMART;
        getStorage(): Storage;
        getUrl(): URL;
        redirect(to: string): void | Promise<any>;
        relative(path: string): string;
    }

    Implemented by

    Index
    base64urldecode: (input: string) => string

    Base64Url to ASCII string

    base64urlencode: (input: string | Uint8Array<ArrayBufferLike>) => string

    ASCII string or Uint8Array to Base64URL

    Environment-specific options

    security: {
        digestSha256: (payload: string) => Promise<Uint8Array<ArrayBufferLike>>;
        generatePKCEChallenge: (
            entropy?: number,
        ) => Promise<{ codeChallenge: string; codeVerifier: string }>;
        importJWK: (jwk: JWK) => Promise<CryptoKey>;
        randomBytes: (count: number) => Uint8Array;
        signCompactJws: (
            alg: "ES384" | "RS384",
            privateKey: CryptoKey,
            header: any,
            payload: any,
        ) => Promise<string>;
    }
    • ASCII string to Base64

      Parameters

      • str: string

      Returns string

    • Base64 to ASCII string

      Parameters

      • str: string

      Returns string

    • Creates and returns adapter-aware SMART api. Not that while the shape of the returned object is well known, the arguments to this function are not. Those who override this method are free to require any environment-specific arguments. For example in node we will need a request, a response and optionally a storage or storage factory function.

      Returns SMART

    • Given the current environment, this method returns the current url as URL instance

      Returns URL

    • Given the current environment, this method must redirect to the given path

      Parameters

      • to: string

        The relative path to redirect to

      Returns void | Promise<any>

    • Given a relative path, compute and return the full url, assuming that it is relative to the current location

      Parameters

      • path: string

        The path to convert to absolute

      Returns string