import { MetricsGetRequest } from "@polar-sh/sdk/models/operations/metricsget.js";
import { RFCDate } from "@polar-sh/sdk/types/rfcdate.js";
let value: MetricsGetRequest = {
startDate: new RFCDate("2025-11-18"),
endDate: new RFCDate("2025-09-30"),
interval: "day",
organizationId: [
"1dbfc517-0bbf-4301-9ba8-555ca42b9737",
],
};
Field |
Type |
Required |
Description |
startDate |
RFCDate |
✔️ |
Start date. |
endDate |
RFCDate |
✔️ |
End date. |
interval |
components.TimeInterval |
✔️ |
Interval between two timestamps. |
organizationId |
operations.MetricsGetQueryParamOrganizationIDFilter |
➖ |
Filter by organization ID. |
productId |
operations.MetricsGetQueryParamProductIDFilter |
➖ |
Filter by product ID. |
billingType |
operations.QueryParamProductBillingTypeFilter |
➖ |
Filter by billing type. recurring will filter data corresponding to subscriptions creations or renewals. one_time will filter data corresponding to one-time purchases. |
customerId |
operations.MetricsGetQueryParamCustomerIDFilter |
➖ |
Filter by customer ID. |