elioria-sst-x
    Preparing search index...

    Class SupabaseInspectionNotificationRepository

    Implements

    Index
    db: PostgresJsDatabase<packages/db/src/schema> & {}

    The db value.

    • Generated

      Updates data through createEscalationNotification.

      Parameters

      • data: {
            entityId: string;
            entityType: string;
            escalationLevel: string;
            escalationRuleId: string;
            message: string;
            notificationType: string;
            recipientId: string;
            tenantId: string;
            title: string;
        }

        The data value.

      Returns Promise<InspectionNotification | null>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-notification.repository.ts, change data through createEscalationNotification.

      Behavior: Async; accepts data; returns a value; invokes this.db.insert(inspectionNotifications).values({ tenantId: d.

    • Generated

      Executes existsEscalationNotification.

      Parameters

      • entityType: string

        The entityType value.

      • entityId: string

        The entityId value.

      • escalationRuleId: string

        The escalationRuleId value.

      • sinceDate: Date

        The sinceDate value.

      Returns Promise<boolean>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-notification.repository.ts, run existsEscalationNotification.

      Behavior: Async; accepts entityType and entityId and escalationRuleId and sinceDate; returns a value; invokes this.db.select({ id: inspectionNotifications.id }) .from(ins.

    • Generated

      Returns the result of findByRecipient.

      Parameters

      • recipientId: string

        The recipientId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InspectionNotification[]>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-notification.repository.ts, retrieve data through findByRecipient.

      Behavior: Async; accepts recipientId and tenantId; returns a value; invokes this.db.select().from(inspectionNotifications) .where(and(eq.

    • Generated

      Returns the result of findUnreadByRecipient.

      Parameters

      • recipientId: string

        The recipientId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InspectionNotification[]>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-notification.repository.ts, retrieve data through findUnreadByRecipient.

      Behavior: Async; accepts recipientId and tenantId; returns a value; invokes this.db.select().from(inspectionNotifications) .where(and( e.

    • Generated

      Executes markAllAsRead.

      Parameters

      • recipientId: string

        The recipientId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<number>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-notification.repository.ts, run markAllAsRead.

      Behavior: Async; accepts recipientId and tenantId; returns a value; invokes this.db.update(inspectionNotifications) .set({ readAt: new D.

    • Generated

      Executes markAsRead.

      Parameters

      • id: string

        The id value.

      • recipientId: string

        The recipientId value.

      • tenantId: string

        The tenantId value.

      Returns Promise<InspectionNotification | null>

      The function result.

      Objective: In module packages/db/src/repositories/inspection-notification.repository.ts, run markAsRead.

      Behavior: Async; accepts id and recipientId and tenantId; returns a value; invokes this.db.update(inspectionNotifications) .set({ readAt: new D.