api.service.d.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { IMessage, ButtonTypeEnum, MessageActionStatusEnum, IPaginatedResponse } from '@novu/shared';
  2. import { ITabCountQuery, IStoreQuery, IUserPreferenceSettings, IUnseenCountQuery, IUnreadCountQuery, IUserGlobalPreferenceSettings } from '../index';
  3. export declare class ApiService {
  4. private backendUrl;
  5. private httpClient;
  6. isAuthenticated: boolean;
  7. constructor(backendUrl: string);
  8. setAuthorizationToken(token: string): void;
  9. disposeAuthorizationToken(): void;
  10. updateAction(messageId: string, executedType: ButtonTypeEnum, status: MessageActionStatusEnum, payload?: Record<string, unknown>): Promise<any>;
  11. markMessageAs(messageId: string | string[], mark: {
  12. seen?: boolean;
  13. read?: boolean;
  14. }): Promise<any>;
  15. removeMessage(messageId: string): Promise<any>;
  16. removeMessages(messageIds: string[]): Promise<any>;
  17. removeAllMessages(feedId?: string): Promise<any>;
  18. markAllMessagesAsRead(feedId?: string | string[]): Promise<any>;
  19. markAllMessagesAsSeen(feedId?: string | string[]): Promise<any>;
  20. getNotificationsList(page: number, { payload, ...rest }?: IStoreQuery): Promise<IPaginatedResponse<IMessage>>;
  21. initializeSession(appId: string, subscriberId: string, hmacHash?: any): Promise<any>;
  22. postUsageLog(name: string, payload: {
  23. [key: string]: string | boolean | undefined;
  24. }): Promise<any>;
  25. getUnseenCount(query?: IUnseenCountQuery): Promise<any>;
  26. getUnreadCount(query?: IUnreadCountQuery): Promise<any>;
  27. getTabCount(query?: ITabCountQuery): Promise<any>;
  28. getOrganization(): Promise<any>;
  29. getUserPreference(): Promise<IUserPreferenceSettings[]>;
  30. getUserGlobalPreference(): Promise<IUserGlobalPreferenceSettings[]>;
  31. updateSubscriberPreference(templateId: string, channelType: string, enabled: boolean): Promise<IUserPreferenceSettings>;
  32. updateSubscriberGlobalPreference(preferences: {
  33. channelType: string;
  34. enabled: boolean;
  35. }[], enabled?: boolean): Promise<IUserPreferenceSettings>;
  36. }
  37. //# sourceMappingURL=api.service.d.ts.map