@adcp/sdk API Reference - v17.0.0-rc.0
    Preparing search index...

    Interface ReliableReportingConsumerV1<TCredential>

    interface ReliableReportingConsumerV1<TCredential = unknown> {
        start(): void;
        stop(): Promise<void>;
        replaceAccounts(
            accounts: readonly ReliableReportingConsumerAccountV1<TCredential>[],
        ): void;
        runAccount(
            accountId: string,
            reason?: ReliableReportingConsumerRunReasonV1,
            consumerScope?: string,
        ): Promise<ReliableReportingConsumerRunResultV1>;
        handleAuthenticatedPrincipalChanged(
            payload: unknown,
            authentication: { consumerScope: string },
        ): Promise<ReliableReportingConsumerRunResultV1[] | null>;
        handleAuthenticatedNotification(
            payload: unknown,
            authentication: { consumerScope: string },
        ): Promise<ReliableReportingConsumerRunResultV1 | null>;
    }

    Type Parameters

    • TCredential = unknown
    Index
    • Handle an authenticated, signature-verified principal.changed webhook: call onPrincipalChanged (for example to re-read get_principal, record accounts_unauthorized and replace the roster), then reconcile every account of that consumer scope. A retry with an already seen idempotency_key returns an empty list, and notifications arriving while the scope is being reconciled share one trailing run. Returns null for any other payload.

      Parameters

      • payload: unknown
      • authentication: { consumerScope: string }

      Returns Promise<ReliableReportingConsumerRunResultV1[] | null>