@hipnation-truth/sdk 0.28.0 → 0.30.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.
package/dist/index.d.mts CHANGED
@@ -1592,8 +1592,42 @@ declare const reportSchema: z.ZodObject<{
1592
1592
  }, z.core.$strip>>;
1593
1593
  }, z.core.$strip>>;
1594
1594
  pending: z.ZodBoolean;
1595
+ doctorRoster: z.ZodOptional<z.ZodArray<z.ZodString>>;
1595
1596
  }, z.core.$strip>;
1596
1597
  type MemberActivationReport = z.infer<typeof reportSchema>;
1598
+ declare const memberActivationByDoctorSchema: z.ZodObject<{
1599
+ doctor: z.ZodString;
1600
+ generatedAt: z.ZodNullable<z.ZodString>;
1601
+ employers: z.ZodArray<z.ZodObject<{
1602
+ employerId: z.ZodString;
1603
+ employerName: z.ZodString;
1604
+ counts: z.ZodObject<{
1605
+ outreach: z.ZodNumber;
1606
+ scheduled: z.ZodNumber;
1607
+ review: z.ZodNumber;
1608
+ data: z.ZodNumber;
1609
+ }, z.core.$strip>;
1610
+ members: z.ZodArray<z.ZodObject<{
1611
+ status: z.ZodEnum<{
1612
+ data: "data";
1613
+ activated: "activated";
1614
+ outreach: "outreach";
1615
+ scheduled: "scheduled";
1616
+ review: "review";
1617
+ }>;
1618
+ reason: z.ZodNullable<z.ZodString>;
1619
+ elationId: z.ZodString;
1620
+ name: z.ZodString;
1621
+ doctor: z.ZodNullable<z.ZodString>;
1622
+ membershipStart: z.ZodString;
1623
+ daysSinceMembershipStart: z.ZodNumber;
1624
+ activationDate: z.ZodNullable<z.ZodString>;
1625
+ futureApptDate: z.ZodNullable<z.ZodString>;
1626
+ hasLink: z.ZodBoolean;
1627
+ }, z.core.$strip>>;
1628
+ }, z.core.$strip>>;
1629
+ }, z.core.$strip>;
1630
+ type MemberActivationByDoctor = z.infer<typeof memberActivationByDoctorSchema>;
1597
1631
  declare class ReportsError extends Error {
1598
1632
  readonly status: number;
1599
1633
  /**
@@ -1623,6 +1657,17 @@ declare class ReportsResource {
1623
1657
  memberActivation(params?: {
1624
1658
  employerId?: string;
1625
1659
  }): Promise<MemberActivationReport>;
1660
+ /**
1661
+ * Fetches one doctor's non-activated members across every employer from
1662
+ * GET /reports/member-activation/by-doctor. The server matches names
1663
+ * ignoring case, spacing, punctuation and Dr./MD/DO, so "Dr. Marie Curie"
1664
+ * and "Marie Curie, MD" return the same employers. An unknown doctor
1665
+ * returns `employers: []`, not an error. Requires the user JWT (same as
1666
+ * `memberActivation`); throws `ReportsError` on a non-OK response.
1667
+ */
1668
+ memberActivationByDoctor(params: {
1669
+ doctor: string;
1670
+ }): Promise<MemberActivationByDoctor>;
1626
1671
  }
1627
1672
 
1628
1673
  type TaskStatus = "open" | "in_progress" | "resolved" | "cancelled";
@@ -2440,4 +2485,4 @@ declare function subscriptionToJSON(sub: PushSubscription): {
2440
2485
  };
2441
2486
  declare function onServiceWorkerMessage(type: string, callback: (payload: unknown) => void): () => void;
2442
2487
 
2443
- export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, type AuthTokenFetcher, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type CancelScheduledNotificationResult, type CareInboxConvexClient, type CareInboxEmailMessage, type CareInboxEmailThreadSummary, CareInboxError, type CareInboxErrorCode, type CareInboxErrorFields, type CareInboxErrorInfo, type CareInboxErrorReason, type CareInboxLinkResult, type CareInboxMailbox, type CareInboxMailboxAccess, CareInboxResource, type CareInboxSdkSource, type CareInboxSendResult, type CareInboxSourceDeps, type CareInboxThreadDetail, type ComposeEmailInput, type ConversationAddress, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type ConversationTaskPriority, type ConversationTaskStatus, ConversationsError, ConversationsResource, type CreateConversationNoteInput, type CreateConversationTaskInput, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type EmailDirection, type EmailMailbox, type EmailMailboxAccessView, type EmailMailboxView, type EmailMessage, type EmailMessageView, type EmailParticipant, type EmailParticipantView, type EmailThreadBodiesView, type EmailThreadDetail, type EmailThreadDetailView, type EmailThreadListFilter, type EmailThreadPageView, type EmailThreadSummary, type EmailThreadSummaryView, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, type LinkEmailMessageInput, type LinkMessageArgs, type LinkResult, type LinkedPatientContact, type ListThreadsArgs, type MailboxAccess, type MarkEmailThreadReadResult, type MarkReadArgs, type MarkReadResult, type MemberActivationReport, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationPlatform, type NotificationPreferences, type NotificationSentPayload, NotificationsError, NotificationsResource, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientLinkCandidate, type PatientLinkCandidateView, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type Physician, PhysiciansResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushEventPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type RegisterDeviceInput, type RegisterDeviceResult, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, type ReplyToEmailThreadInput, ReportsError, ReportsResource, SECURITY_EVENTS, type ScheduleNotificationInput, type ScheduleNotificationResult, type ScheduleReminderInput, type ScheduleReminderResult, type ScheduledJobStatus, type ScheduledNotification, type SecurityAccessDeniedPayload, type SecurityEventType, type SendConversationMessageInput, type SendConversationMessageResult, type SendEmailArgs, type SendNotificationInput, type SendNotificationResult, type SendReplyArgs, type SendResult, type SendSmsParams, type SendSmsResponse, type SetConversationTaskStatusInput, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type ThreadListFilter, type ThreadPage, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UnlinkEmailMessageInput, type UnlinkMessageArgs, type UnlinkedEmailPageView, type UnlinkedMessagePage, type UnregisterDeviceInput, type UpdateNotificationsInput, type UpdateNotificationsResult, type UpdatePreferencesInput, type UpdateTaskStatusInput, type UserSettings, UserSettingsResource, type VoicemailAuthResponse, type WebPushConfig, careInboxErrorInfo, careInboxRefs, createCareInboxSource, generateUuidV7, isCareInboxError, isWebPushSupported, onServiceWorkerMessage, registerServiceWorker, subscribeToPush, subscriptionToJSON, toCareInboxError, toEmailMailbox, toEmailMessage, toEmailThreadDetail, toEmailThreadSummary, toMailboxAccess, toMarkReadResult, toThreadPage, toUnlinkedMessagePage };
2488
+ export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, type AuthTokenFetcher, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type CancelScheduledNotificationResult, type CareInboxConvexClient, type CareInboxEmailMessage, type CareInboxEmailThreadSummary, CareInboxError, type CareInboxErrorCode, type CareInboxErrorFields, type CareInboxErrorInfo, type CareInboxErrorReason, type CareInboxLinkResult, type CareInboxMailbox, type CareInboxMailboxAccess, CareInboxResource, type CareInboxSdkSource, type CareInboxSendResult, type CareInboxSourceDeps, type CareInboxThreadDetail, type ComposeEmailInput, type ConversationAddress, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type ConversationTaskPriority, type ConversationTaskStatus, ConversationsError, ConversationsResource, type CreateConversationNoteInput, type CreateConversationTaskInput, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type EmailDirection, type EmailMailbox, type EmailMailboxAccessView, type EmailMailboxView, type EmailMessage, type EmailMessageView, type EmailParticipant, type EmailParticipantView, type EmailThreadBodiesView, type EmailThreadDetail, type EmailThreadDetailView, type EmailThreadListFilter, type EmailThreadPageView, type EmailThreadSummary, type EmailThreadSummaryView, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, type LinkEmailMessageInput, type LinkMessageArgs, type LinkResult, type LinkedPatientContact, type ListThreadsArgs, type MailboxAccess, type MarkEmailThreadReadResult, type MarkReadArgs, type MarkReadResult, type MemberActivationByDoctor, type MemberActivationReport, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationPlatform, type NotificationPreferences, type NotificationSentPayload, NotificationsError, NotificationsResource, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientLinkCandidate, type PatientLinkCandidateView, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type Physician, PhysiciansResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushEventPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type RegisterDeviceInput, type RegisterDeviceResult, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, type ReplyToEmailThreadInput, ReportsError, ReportsResource, SECURITY_EVENTS, type ScheduleNotificationInput, type ScheduleNotificationResult, type ScheduleReminderInput, type ScheduleReminderResult, type ScheduledJobStatus, type ScheduledNotification, type SecurityAccessDeniedPayload, type SecurityEventType, type SendConversationMessageInput, type SendConversationMessageResult, type SendEmailArgs, type SendNotificationInput, type SendNotificationResult, type SendReplyArgs, type SendResult, type SendSmsParams, type SendSmsResponse, type SetConversationTaskStatusInput, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type ThreadListFilter, type ThreadPage, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UnlinkEmailMessageInput, type UnlinkMessageArgs, type UnlinkedEmailPageView, type UnlinkedMessagePage, type UnregisterDeviceInput, type UpdateNotificationsInput, type UpdateNotificationsResult, type UpdatePreferencesInput, type UpdateTaskStatusInput, type UserSettings, UserSettingsResource, type VoicemailAuthResponse, type WebPushConfig, careInboxErrorInfo, careInboxRefs, createCareInboxSource, generateUuidV7, isCareInboxError, isWebPushSupported, onServiceWorkerMessage, registerServiceWorker, subscribeToPush, subscriptionToJSON, toCareInboxError, toEmailMailbox, toEmailMessage, toEmailThreadDetail, toEmailThreadSummary, toMailboxAccess, toMarkReadResult, toThreadPage, toUnlinkedMessagePage };
package/dist/index.d.ts CHANGED
@@ -1592,8 +1592,42 @@ declare const reportSchema: z.ZodObject<{
1592
1592
  }, z.core.$strip>>;
1593
1593
  }, z.core.$strip>>;
1594
1594
  pending: z.ZodBoolean;
1595
+ doctorRoster: z.ZodOptional<z.ZodArray<z.ZodString>>;
1595
1596
  }, z.core.$strip>;
1596
1597
  type MemberActivationReport = z.infer<typeof reportSchema>;
1598
+ declare const memberActivationByDoctorSchema: z.ZodObject<{
1599
+ doctor: z.ZodString;
1600
+ generatedAt: z.ZodNullable<z.ZodString>;
1601
+ employers: z.ZodArray<z.ZodObject<{
1602
+ employerId: z.ZodString;
1603
+ employerName: z.ZodString;
1604
+ counts: z.ZodObject<{
1605
+ outreach: z.ZodNumber;
1606
+ scheduled: z.ZodNumber;
1607
+ review: z.ZodNumber;
1608
+ data: z.ZodNumber;
1609
+ }, z.core.$strip>;
1610
+ members: z.ZodArray<z.ZodObject<{
1611
+ status: z.ZodEnum<{
1612
+ data: "data";
1613
+ activated: "activated";
1614
+ outreach: "outreach";
1615
+ scheduled: "scheduled";
1616
+ review: "review";
1617
+ }>;
1618
+ reason: z.ZodNullable<z.ZodString>;
1619
+ elationId: z.ZodString;
1620
+ name: z.ZodString;
1621
+ doctor: z.ZodNullable<z.ZodString>;
1622
+ membershipStart: z.ZodString;
1623
+ daysSinceMembershipStart: z.ZodNumber;
1624
+ activationDate: z.ZodNullable<z.ZodString>;
1625
+ futureApptDate: z.ZodNullable<z.ZodString>;
1626
+ hasLink: z.ZodBoolean;
1627
+ }, z.core.$strip>>;
1628
+ }, z.core.$strip>>;
1629
+ }, z.core.$strip>;
1630
+ type MemberActivationByDoctor = z.infer<typeof memberActivationByDoctorSchema>;
1597
1631
  declare class ReportsError extends Error {
1598
1632
  readonly status: number;
1599
1633
  /**
@@ -1623,6 +1657,17 @@ declare class ReportsResource {
1623
1657
  memberActivation(params?: {
1624
1658
  employerId?: string;
1625
1659
  }): Promise<MemberActivationReport>;
1660
+ /**
1661
+ * Fetches one doctor's non-activated members across every employer from
1662
+ * GET /reports/member-activation/by-doctor. The server matches names
1663
+ * ignoring case, spacing, punctuation and Dr./MD/DO, so "Dr. Marie Curie"
1664
+ * and "Marie Curie, MD" return the same employers. An unknown doctor
1665
+ * returns `employers: []`, not an error. Requires the user JWT (same as
1666
+ * `memberActivation`); throws `ReportsError` on a non-OK response.
1667
+ */
1668
+ memberActivationByDoctor(params: {
1669
+ doctor: string;
1670
+ }): Promise<MemberActivationByDoctor>;
1626
1671
  }
1627
1672
 
1628
1673
  type TaskStatus = "open" | "in_progress" | "resolved" | "cancelled";
@@ -2440,4 +2485,4 @@ declare function subscriptionToJSON(sub: PushSubscription): {
2440
2485
  };
2441
2486
  declare function onServiceWorkerMessage(type: string, callback: (payload: unknown) => void): () => void;
2442
2487
 
2443
- export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, type AuthTokenFetcher, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type CancelScheduledNotificationResult, type CareInboxConvexClient, type CareInboxEmailMessage, type CareInboxEmailThreadSummary, CareInboxError, type CareInboxErrorCode, type CareInboxErrorFields, type CareInboxErrorInfo, type CareInboxErrorReason, type CareInboxLinkResult, type CareInboxMailbox, type CareInboxMailboxAccess, CareInboxResource, type CareInboxSdkSource, type CareInboxSendResult, type CareInboxSourceDeps, type CareInboxThreadDetail, type ComposeEmailInput, type ConversationAddress, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type ConversationTaskPriority, type ConversationTaskStatus, ConversationsError, ConversationsResource, type CreateConversationNoteInput, type CreateConversationTaskInput, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type EmailDirection, type EmailMailbox, type EmailMailboxAccessView, type EmailMailboxView, type EmailMessage, type EmailMessageView, type EmailParticipant, type EmailParticipantView, type EmailThreadBodiesView, type EmailThreadDetail, type EmailThreadDetailView, type EmailThreadListFilter, type EmailThreadPageView, type EmailThreadSummary, type EmailThreadSummaryView, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, type LinkEmailMessageInput, type LinkMessageArgs, type LinkResult, type LinkedPatientContact, type ListThreadsArgs, type MailboxAccess, type MarkEmailThreadReadResult, type MarkReadArgs, type MarkReadResult, type MemberActivationReport, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationPlatform, type NotificationPreferences, type NotificationSentPayload, NotificationsError, NotificationsResource, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientLinkCandidate, type PatientLinkCandidateView, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type Physician, PhysiciansResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushEventPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type RegisterDeviceInput, type RegisterDeviceResult, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, type ReplyToEmailThreadInput, ReportsError, ReportsResource, SECURITY_EVENTS, type ScheduleNotificationInput, type ScheduleNotificationResult, type ScheduleReminderInput, type ScheduleReminderResult, type ScheduledJobStatus, type ScheduledNotification, type SecurityAccessDeniedPayload, type SecurityEventType, type SendConversationMessageInput, type SendConversationMessageResult, type SendEmailArgs, type SendNotificationInput, type SendNotificationResult, type SendReplyArgs, type SendResult, type SendSmsParams, type SendSmsResponse, type SetConversationTaskStatusInput, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type ThreadListFilter, type ThreadPage, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UnlinkEmailMessageInput, type UnlinkMessageArgs, type UnlinkedEmailPageView, type UnlinkedMessagePage, type UnregisterDeviceInput, type UpdateNotificationsInput, type UpdateNotificationsResult, type UpdatePreferencesInput, type UpdateTaskStatusInput, type UserSettings, UserSettingsResource, type VoicemailAuthResponse, type WebPushConfig, careInboxErrorInfo, careInboxRefs, createCareInboxSource, generateUuidV7, isCareInboxError, isWebPushSupported, onServiceWorkerMessage, registerServiceWorker, subscribeToPush, subscriptionToJSON, toCareInboxError, toEmailMailbox, toEmailMessage, toEmailThreadDetail, toEmailThreadSummary, toMailboxAccess, toMarkReadResult, toThreadPage, toUnlinkedMessagePage };
2488
+ export { AUTH_EVENTS, type ActorContext, type Appointment, type AppointmentListOptions, AppointmentResource, type Attachment, AttachmentsError, AttachmentsResource, type AuthEventType, type AuthLoginFailedPayload, type AuthLoginSucceededPayload, type AuthTokenFetcher, CALL_EVENTS, CONVERSATION_EVENTS, type CallConnectedPayload, type CallEndedPayload, type CallEventType, type CallInitiatedPayload, type CallMissedPayload, type CallStatusResponse, type CancelScheduledNotificationResult, type CareInboxConvexClient, type CareInboxEmailMessage, type CareInboxEmailThreadSummary, CareInboxError, type CareInboxErrorCode, type CareInboxErrorFields, type CareInboxErrorInfo, type CareInboxErrorReason, type CareInboxLinkResult, type CareInboxMailbox, type CareInboxMailboxAccess, CareInboxResource, type CareInboxSdkSource, type CareInboxSendResult, type CareInboxSourceDeps, type CareInboxThreadDetail, type ComposeEmailInput, type ConversationAddress, type ConversationAttachmentDownloadedPayload, type ConversationAttachmentUploadedPayload, type ConversationCreatedPayload, type ConversationEventType, type ConversationMarkedReadPayload, type ConversationMessageReceivedPayload, type ConversationMessageSentPayload, type ConversationTaskPriority, type ConversationTaskStatus, ConversationsError, ConversationsResource, type CreateConversationNoteInput, type CreateConversationTaskInput, type CreateTaskInput, type CreateUploadUrlInput, type CreateUploadUrlResult, type DetectionResult, type DialpadNumberInfo, DialpadProxyError, DialpadResource, type DialpadUser, ENVIRONMENTS, EVENT_TYPES, EhrProviderProxy, EhrProxyError, EhrResource, type EmailDirection, type EmailMailbox, type EmailMailboxAccessView, type EmailMailboxView, type EmailMessage, type EmailMessageView, type EmailParticipant, type EmailParticipantView, type EmailThreadBodiesView, type EmailThreadDetail, type EmailThreadDetailView, type EmailThreadListFilter, type EmailThreadPageView, type EmailThreadSummary, type EmailThreadSummaryView, type Environment, type EventActor, type EventCompliance, type EventEnvelope, type EventPayloadMap, type EventSubject, type EventType, type GetDownloadUrlResult, type InitiateCallResponse, type LinkEmailMessageInput, type LinkMessageArgs, type LinkResult, type LinkedPatientContact, type ListThreadsArgs, type MailboxAccess, type MarkEmailThreadReadResult, type MarkReadArgs, type MarkReadResult, type MemberActivationByDoctor, type MemberActivationReport, MessagesResource, NOTIFICATION_EVENTS, type NonVisitNoteBullet, NotesError, NotesResource, type NotificationDeliveredPayload, type NotificationEventType, type NotificationOpenedPayload, type NotificationPlatform, type NotificationPreferences, type NotificationSentPayload, NotificationsError, NotificationsResource, PROVIDER_EVENTS, type PaginatedResult, type Patient, type PatientBasicDetailsResult, PatientDetailsError, type PatientDetailsInput, PatientDetailsResource, type PatientDetailsResult, type PatientLinkCandidate, type PatientLinkCandidateView, type PatientListOptions, type PatientMedicalDetailsResult, PatientResource, type Physician, PhysiciansResource, type ProviderEventType, type ProviderSyncFailedPayload, type ProviderSyncStartedPayload, type ProviderSyncSucceededPayload, type PushEventPayload, type PushNoteToElationInput, type PushNoteToElationResult, REMINDER_EVENTS, type RecordAttachmentInput, type RegisterDeviceInput, type RegisterDeviceResult, type Reminder, type ReminderEventType, type ReminderScheduledPayload, type ReminderStatus, type ReminderTriggeredPayload, RemindersResource, type ReplyToEmailThreadInput, ReportsError, ReportsResource, SECURITY_EVENTS, type ScheduleNotificationInput, type ScheduleNotificationResult, type ScheduleReminderInput, type ScheduleReminderResult, type ScheduledJobStatus, type ScheduledNotification, type SecurityAccessDeniedPayload, type SecurityEventType, type SendConversationMessageInput, type SendConversationMessageResult, type SendEmailArgs, type SendNotificationInput, type SendNotificationResult, type SendReplyArgs, type SendResult, type SendSmsParams, type SendSmsResponse, type SetConversationTaskStatusInput, TASK_EVENTS, TRANSLATION_EVENTS, type Task, type TaskAssignedPayload, type TaskCreatedPayload, type TaskEventType, type TaskStatus, type TaskStatusChangedPayload, TasksResource, type ThreadListFilter, type ThreadPage, type TrackOptions, Tracker, type TranslateBatchInput, type TranslateTextInput, type TranslationCompletedPayload, TranslationError, type TranslationEventType, type TranslationRequestedPayload, TranslationResource, type TranslationResult, TruthClient, type TruthClientConfig, type UnlinkEmailMessageInput, type UnlinkMessageArgs, type UnlinkedEmailPageView, type UnlinkedMessagePage, type UnregisterDeviceInput, type UpdateNotificationsInput, type UpdateNotificationsResult, type UpdatePreferencesInput, type UpdateTaskStatusInput, type UserSettings, UserSettingsResource, type VoicemailAuthResponse, type WebPushConfig, careInboxErrorInfo, careInboxRefs, createCareInboxSource, generateUuidV7, isCareInboxError, isWebPushSupported, onServiceWorkerMessage, registerServiceWorker, subscribeToPush, subscriptionToJSON, toCareInboxError, toEmailMailbox, toEmailMessage, toEmailThreadDetail, toEmailThreadSummary, toMailboxAccess, toMarkReadResult, toThreadPage, toUnlinkedMessagePage };
package/dist/index.js CHANGED
@@ -2044,7 +2044,30 @@ var reportSchema = import_zod.z.object({
2044
2044
  // True when the requested employer has no materialized report row yet
2045
2045
  // (ehr-sync's dailyHandler has not run for it). `selected` is null in that
2046
2046
  // case — the caller sees the employer roster but no report data to render.
2047
- pending: import_zod.z.boolean()
2047
+ pending: import_zod.z.boolean(),
2048
+ // #249: every distinct doctor across all stored employer reports (deduped
2049
+ // server-side by normalized name). Optional: older servers omit it, and
2050
+ // the server omits it when the roster query fails.
2051
+ doctorRoster: import_zod.z.array(import_zod.z.string()).optional()
2052
+ });
2053
+ var memberActivationByDoctorSchema = import_zod.z.object({
2054
+ doctor: import_zod.z.string(),
2055
+ // Oldest generatedAt of the stored employer reports used; null when no
2056
+ // employer matched.
2057
+ generatedAt: import_zod.z.string().nullable(),
2058
+ employers: import_zod.z.array(
2059
+ import_zod.z.object({
2060
+ employerId: import_zod.z.string(),
2061
+ employerName: import_zod.z.string(),
2062
+ counts: import_zod.z.object({
2063
+ outreach: import_zod.z.number(),
2064
+ scheduled: import_zod.z.number(),
2065
+ review: import_zod.z.number(),
2066
+ data: import_zod.z.number()
2067
+ }),
2068
+ members: import_zod.z.array(memberSchema.omit({ lastName: true, firstName: true }))
2069
+ })
2070
+ )
2048
2071
  });
2049
2072
  var ReportsError = class extends Error {
2050
2073
  /**
@@ -2104,6 +2127,37 @@ var ReportsResource = class {
2104
2127
  return yield res.json();
2105
2128
  });
2106
2129
  }
2130
+ /**
2131
+ * Fetches one doctor's non-activated members across every employer from
2132
+ * GET /reports/member-activation/by-doctor. The server matches names
2133
+ * ignoring case, spacing, punctuation and Dr./MD/DO, so "Dr. Marie Curie"
2134
+ * and "Marie Curie, MD" return the same employers. An unknown doctor
2135
+ * returns `employers: []`, not an error. Requires the user JWT (same as
2136
+ * `memberActivation`); throws `ReportsError` on a non-OK response.
2137
+ */
2138
+ memberActivationByDoctor(params) {
2139
+ return __async(this, null, function* () {
2140
+ const url = new URL(
2141
+ `${this.baseUrl}/api/reports/member-activation/by-doctor`
2142
+ );
2143
+ url.searchParams.set("doctor", params.doctor);
2144
+ const res = yield fetch(url.toString(), {
2145
+ method: "GET",
2146
+ headers: yield buildAuthHeaders(this.auth, {
2147
+ requireUserToken: true
2148
+ })
2149
+ });
2150
+ if (!res.ok) {
2151
+ const text = yield res.text().catch(() => "");
2152
+ throw new ReportsError(
2153
+ "member-activation-by-doctor",
2154
+ res.status,
2155
+ text.slice(0, 200)
2156
+ );
2157
+ }
2158
+ return yield res.json();
2159
+ });
2160
+ }
2107
2161
  };
2108
2162
 
2109
2163
  // src/resources/tasks.ts