@terminal3/t3n-sdk 5.10.0 → 5.12.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
@@ -5610,16 +5610,14 @@ declare class SessionUsageReportClient {
5610
5610
  */
5611
5611
  getOrgUsageReport(input: OrgUsageReportInput): Promise<OrgUsageReport>;
5612
5612
  /**
5613
- * Fetch how many calls an organisation's members and their agents have
5614
- * completed so far this calendar year (UTC).
5613
+ * How many protected-workflow executions the organisation has completed so
5614
+ * far this calendar year (UTC).
5615
5615
  *
5616
- * Counted by CALLER, not by contract owner, so calls into the platform's own
5617
- * system contracts count as the organisation's usage. Unsuccessful calls and
5618
- * admin-contract dispatches are excluded, the latter so that reading this
5619
- * number does not increase it.
5620
- *
5621
- * Refuses with `not_org_admin: ...` when the authenticated session DID is
5622
- * not in the org's admin set, exactly as {@link getOrgUsageReport} does.
5616
+ * A protected workflow is the organisation's **own** registered contract, so
5617
+ * platform traffic — signing in, profile edits, credential issuance,
5618
+ * organisation administration — leaves this untouched, as do unsuccessful
5619
+ * executions. Attributed by caller, so an agent's land on its owner's org.
5620
+ * Refuses with `not_org_admin: ...` off the org's admin set.
5623
5621
  */
5624
5622
  getOrgCallCountThisYear(orgDid: string): Promise<number>;
5625
5623
  /** As {@link getOrgCallCountThisYear}, for a given UTC calendar year. */
@@ -5638,6 +5636,22 @@ declare class SessionUsageReportClient {
5638
5636
  * the partial count the node reports. The year forms cannot reach that.
5639
5637
  */
5640
5638
  getOrgCallCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5639
+ /**
5640
+ * How many protected-workflow executions the organisation's agents ran over
5641
+ * `[fromMs, toMs)` — **refused and failed ones included**, since reviewing
5642
+ * agents means seeing the attempts.
5643
+ *
5644
+ * So this is independent of {@link getOrgCallCountForWindow}, not a share of
5645
+ * it: a window of nothing but refused executions reads non-zero here and
5646
+ * zero there. Never render one as a percentage of the other. Separate reads,
5647
+ * so both figures cost two calls.
5648
+ *
5649
+ * Agent or person comes from the actor classification stamped when the
5650
+ * execution happened, and is never revised: one an agent ran before its DID
5651
+ * was classified stays in the human share. Window rules, refusal and
5652
+ * truncation throw are {@link getOrgCallCountForWindow}'s; no year form.
5653
+ */
5654
+ getOrgAgentCallCountForWindow(orgDid: string, fromMs: number, toMs: number): Promise<number>;
5641
5655
  }
5642
5656
  /**
5643
5657
  * Construct a {@link SessionUsageReportClient} from a caller-owned