@backblaze-labs/b2-sdk - v0.4.0
    Preparing search index...

    Interface PartnerAccountInfo

    Stores Partner API and Computer Backup authorization state between requests.

    Reauthorization follows the storage client's RetryTransport.onReauth contract: re-run PartnerRawClient.authorizePartner with the same Master Application Key credentials, store the fresh response with setAuth, then return authorizationToken to the retry transport.

    Partner authorize responses redact authorizationToken when passed to JSON.stringify, so do not persist getAuth() with direct JSON serialization. For trusted durable caches, serialize the output of partnerAuthorizeResponseForPersistence(getAuth()) into encrypted or otherwise credential-grade storage, or store authorizationToken directly in secure storage with the rest of the authorize response metadata.

    interface PartnerAccountInfo {
        clear(): void;
        getAccountId(): AccountId;
        getAuth(): PartnerAuthorizeResponse | null;
        getBackupApiUrl(): string | null;
        getBackupCapabilities(): readonly "all"[] | null;
        getGroupsApiUrl(): string | null;
        getGroupsCapabilities(): readonly "all"[] | null;
        getPartnerToken(): PartnerToken;
        setAuth(auth: PartnerAuthorizeResponse): void;
    }

    Implemented by

    Index
    • Base URL for Computer Backup API calls, or null when the suite is unavailable.

      Returns string | null

    • Capabilities granted for Computer Backup API calls, or null when the suite is unavailable.

      Returns readonly "all"[] | null

    • Base URL for Partner API calls, or null when the suite is unavailable.

      Returns string | null

    • Capabilities granted for Partner API calls, or null when the suite is unavailable.

      Returns readonly "all"[] | null