@terminal3/t3n-sdk 5.3.0 → 5.4.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.ts CHANGED
@@ -5256,6 +5256,35 @@ declare class SessionUsageReportClient {
5256
5256
  * org's usage.
5257
5257
  */
5258
5258
  getOrgUsageReport(input: OrgUsageReportInput): Promise<OrgUsageReport>;
5259
+ /**
5260
+ * Fetch how many calls an organisation's members and their agents have
5261
+ * completed so far this calendar year (UTC).
5262
+ *
5263
+ * Counted by CALLER, not by contract owner, so calls into the platform's own
5264
+ * system contracts count as the organisation's usage. Unsuccessful calls and
5265
+ * admin-contract dispatches are excluded, the latter so that reading this
5266
+ * number does not increase it.
5267
+ *
5268
+ * Refuses with `not_org_admin: ...` when the authenticated session DID is
5269
+ * not in the org's admin set, exactly as {@link getOrgUsageReport} does.
5270
+ */
5271
+ getOrgCallCountThisYear(orgDid: string): Promise<number>;
5272
+ /** As {@link getOrgCallCountThisYear}, for a given UTC calendar year. */
5273
+ getOrgCallCountForYear(orgDid: string, year: number): Promise<number>;
5274
+ /**
5275
+ * As {@link getOrgCallCountThisYear}, over an explicit `[fromMs, toMs)`
5276
+ * window in milliseconds.
5277
+ *
5278
+ * Pass whole UTC days (multiples of 86400000) unless you can live with a
5279
+ * figure wider than its label: the counter has day granularity, so the node
5280
+ * widens a ragged window to the days it touches and the count then includes
5281
+ * the hours either side of what was asked for.
5282
+ *
5283
+ * Throws when the window covers more active days than the node reads in one
5284
+ * call — roughly eleven years of unbroken daily use — rather than returning
5285
+ * the partial count the node reports. The year forms cannot reach that.
5286
+ */
5287
+ getOrgCallCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5259
5288
  }
5260
5289
  /**
5261
5290
  * Construct a {@link SessionUsageReportClient} from a caller-owned