@limitry/client - v0.4.1
    Preparing search index...

    Class QuotaAlerts

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Delete a quota alert

      Remove an alert configuration

      Parameters

      • alertId: string

        No description provided

      Returns Promise<{ success: boolean }>

      Alert deleted successfully

      const result = await client.quotaAlerts.delete("alertid_123");
      console.log(result);

      Unauthorized

      Alert not found

      If a network error occurs

    • Get a quota alert

      Get details of a specific alert

      Parameters

      • alertId: string

        No description provided

      Returns Promise<
          {
              createdAt: string;
              id: string;
              lastTriggeredAt?: string
              | null;
              quotaId: string;
              threshold: number;
              updatedAt: string;
          },
      >

      Alert details

      const result = await client.quotaAlerts.get("alertid_123");
      console.log(result);

      Unauthorized

      Alert not found

      If a network error occurs

    • Get alert history

      View a log of triggered alerts for a specific alert

      Parameters

      • alertId: string

        No description provided

      • Optionallimit: string

        Maximum number of log entries to return (1-100, default: 50) (default: "50")

      • Optionalcursor: string

        Pagination cursor from the previous response

      Returns Promise<QuotaAlertsGetHistoryResponse>

      Alert history

      const items = await client.quotaAlerts.getHistory("alertid_123");
      for (const item of items.data) {
      console.log(item);
      }

      Unauthorized

      Alert not found

      If a network error occurs

    • Update a quota alert

      Update the threshold for an alert

      Parameters

      • alertId: string

        No description provided

      • request: { threshold?: number }

        Request body

        • Optionalthreshold?: number

          Threshold percentage (1-100) at which to trigger the alert

      Returns Promise<
          {
              createdAt: string;
              id: string;
              lastTriggeredAt?: string
              | null;
              quotaId: string;
              threshold: number;
              updatedAt: string;
          },
      >

      Alert updated successfully

      const request: Request = {
      threshold: 123
      };

      const result = await client.quotaAlerts.update(
      "alertid_123",
      request
      );
      console.log(result);

      Unauthorized

      Alert not found

      If a network error occurs