@roarkanalytics/sdk 5.8.0 → 5.9.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +9 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/analytics.d.mts +354 -0
  12. package/resources/analytics.d.mts.map +1 -0
  13. package/resources/analytics.d.ts +354 -0
  14. package/resources/analytics.d.ts.map +1 -0
  15. package/resources/analytics.js +55 -0
  16. package/resources/analytics.js.map +1 -0
  17. package/resources/analytics.mjs +51 -0
  18. package/resources/analytics.mjs.map +1 -0
  19. package/resources/config.d.mts +578 -8
  20. package/resources/config.d.mts.map +1 -1
  21. package/resources/config.d.ts +578 -8
  22. package/resources/config.d.ts.map +1 -1
  23. package/resources/dashboard.d.mts +2280 -0
  24. package/resources/dashboard.d.mts.map +1 -0
  25. package/resources/dashboard.d.ts +2280 -0
  26. package/resources/dashboard.d.ts.map +1 -0
  27. package/resources/dashboard.js +170 -0
  28. package/resources/dashboard.js.map +1 -0
  29. package/resources/dashboard.mjs +166 -0
  30. package/resources/dashboard.mjs.map +1 -0
  31. package/resources/index.d.mts +3 -0
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +3 -0
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +7 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +3 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/usage.d.mts +114 -0
  40. package/resources/usage.d.mts.map +1 -0
  41. package/resources/usage.d.ts +114 -0
  42. package/resources/usage.d.ts.map +1 -0
  43. package/resources/usage.js +27 -0
  44. package/resources/usage.js.map +1 -0
  45. package/resources/usage.mjs +23 -0
  46. package/resources/usage.mjs.map +1 -0
  47. package/src/client.ts +63 -0
  48. package/src/resources/analytics.ts +573 -0
  49. package/src/resources/config.ts +1441 -41
  50. package/src/resources/dashboard.ts +3752 -0
  51. package/src/resources/index.ts +27 -0
  52. package/src/resources/usage.ts +147 -0
  53. package/src/version.ts +1 -1
  54. package/version.d.mts +1 -1
  55. package/version.d.ts +1 -1
  56. package/version.js +1 -1
  57. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,KAAK,GAUN,oBAAgB;AACjB,OAAO,EACL,WAAW,GAUZ,2BAAuB;AACxB,OAAO,EACL,aAAa,GAQd,6BAAyB;AAC1B,OAAO,EACL,WAAW,GAMZ,2BAAuB;AACxB,OAAO,EACL,cAAc,GAaf,8BAA0B;AAC3B,OAAO,EACL,SAAS,GAYV,wBAAoB;AACrB,OAAO,EACL,IAAI,GAeL,mBAAe;AAChB,OAAO,EACL,MAAM,GAOP,qBAAiB;AAClB,OAAO,EACL,YAAY,GAgBb,4BAAwB;AACzB,OAAO,EACL,oBAAoB,GASrB,sCAAkC;AACnC,OAAO,EACL,qBAAqB,GAQtB,sCAAkC;AACnC,OAAO,EAAE,MAAM,EAA0B,qBAAiB;AAC1D,OAAO,EACL,EAAE,GAOH,iBAAa;AACd,OAAO,EACL,MAAM,GAOP,qBAAiB;AAClB,OAAO,EACL,mBAAmB,GAMpB,oCAAgC;AACjC,OAAO,EACL,YAAY,GASb,4BAAwB;AACzB,OAAO,EACL,aAAa,GAUd,6BAAyB;AAC1B,OAAO,EAAE,OAAO,EAA4B,sBAAkB;AAC9D,OAAO,EACL,UAAU,GAKX,yBAAqB;AACtB,OAAO,EACL,qBAAqB,GAStB,qCAAiC;AAClC,OAAO,EACL,eAAe,GAUhB,+BAA2B;AAC5B,OAAO,EACL,aAAa,GAId,6BAAyB;AAC1B,OAAO,EAAE,qBAAqB,EAA0C,uCAAmC;AAC3G,OAAO,EACL,iBAAiB,GAQlB,iCAA6B;AAC9B,OAAO,EACL,kBAAkB,GAQnB,mCAA+B;AAChC,OAAO,EACL,iBAAiB,GASlB,kCAA8B;AAC/B,OAAO,EACL,oBAAoB,GAWrB,sCAAkC;AACnC,OAAO,EAAE,kBAAkB,EAAuC,kCAA8B;AAChG,OAAO,EACL,qBAAqB,GAQtB,sCAAkC;AACnC,OAAO,EACL,OAAO,GAOR,sBAAkB"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,KAAK,GAUN,oBAAgB;AACjB,OAAO,EACL,WAAW,GAUZ,2BAAuB;AACxB,OAAO,EACL,aAAa,GAQd,6BAAyB;AAC1B,OAAO,EACL,WAAW,GAMZ,2BAAuB;AACxB,OAAO,EACL,SAAS,GAIV,wBAAoB;AACrB,OAAO,EACL,cAAc,GAaf,8BAA0B;AAC3B,OAAO,EACL,SAAS,GAYV,wBAAoB;AACrB,OAAO,EACL,IAAI,GAeL,mBAAe;AAChB,OAAO,EACL,MAAM,GAOP,qBAAiB;AAClB,OAAO,EACL,YAAY,GAgBb,4BAAwB;AACzB,OAAO,EACL,oBAAoB,GASrB,sCAAkC;AACnC,OAAO,EACL,SAAS,GAkBV,wBAAoB;AACrB,OAAO,EACL,qBAAqB,GAQtB,sCAAkC;AACnC,OAAO,EAAE,MAAM,EAA0B,qBAAiB;AAC1D,OAAO,EACL,EAAE,GAOH,iBAAa;AACd,OAAO,EACL,MAAM,GAOP,qBAAiB;AAClB,OAAO,EACL,mBAAmB,GAMpB,oCAAgC;AACjC,OAAO,EACL,YAAY,GASb,4BAAwB;AACzB,OAAO,EACL,aAAa,GAUd,6BAAyB;AAC1B,OAAO,EAAE,OAAO,EAA4B,sBAAkB;AAC9D,OAAO,EACL,UAAU,GAKX,yBAAqB;AACtB,OAAO,EACL,qBAAqB,GAStB,qCAAiC;AAClC,OAAO,EACL,eAAe,GAUhB,+BAA2B;AAC5B,OAAO,EACL,aAAa,GAId,6BAAyB;AAC1B,OAAO,EAAE,qBAAqB,EAA0C,uCAAmC;AAC3G,OAAO,EACL,iBAAiB,GAQlB,iCAA6B;AAC9B,OAAO,EACL,kBAAkB,GAQnB,mCAA+B;AAChC,OAAO,EACL,iBAAiB,GASlB,kCAA8B;AAC/B,OAAO,EACL,oBAAoB,GAWrB,sCAAkC;AACnC,OAAO,EAAE,kBAAkB,EAAuC,kCAA8B;AAChG,OAAO,EACL,qBAAqB,GAQtB,sCAAkC;AACnC,OAAO,EAAE,KAAK,EAA8C,oBAAgB;AAC5E,OAAO,EACL,OAAO,GAOR,sBAAkB"}
@@ -0,0 +1,114 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class Usage extends APIResource {
5
+ /**
6
+ * Report billable usage and cost for the organization over a time window, broken
7
+ * down by project (highest spend first). Pass `from`/`to` as ISO 8601 timestamps;
8
+ * optionally pass `projectId` to scope the report to one project. Amounts are
9
+ * billable spend only (what we absorb is never included). Authenticated by an
10
+ * organization API key with the `usage:read` permission.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const usage = await client.usage.get({
15
+ * from: '2026-09-01T00:00:00Z',
16
+ * to: '2026-10-01T00:00:00Z',
17
+ * });
18
+ * ```
19
+ */
20
+ get(query: UsageGetParams, options?: RequestOptions): APIPromise<UsageGetResponse>;
21
+ }
22
+ export interface UsageGetResponse {
23
+ data: UsageGetResponse.Data;
24
+ }
25
+ export declare namespace UsageGetResponse {
26
+ interface Data {
27
+ currency: 'usd';
28
+ /**
29
+ * The resolved window start, echoed back as ISO 8601.
30
+ */
31
+ from: string;
32
+ /**
33
+ * Per-project billable spend, highest first. Only projects with spend in the
34
+ * window appear.
35
+ */
36
+ projects: Array<Data.Project>;
37
+ /**
38
+ * The resolved window end, echoed back as ISO 8601.
39
+ */
40
+ to: string;
41
+ /**
42
+ * The same total in US dollars.
43
+ */
44
+ totalUsd: number;
45
+ /**
46
+ * Total billable spend across the organization (or the single project) in
47
+ * micro-dollars.
48
+ */
49
+ totalUsdMicros: number;
50
+ }
51
+ namespace Data {
52
+ interface Project {
53
+ /**
54
+ * The same billable spend in US dollars. For display; use amountUsdMicros to
55
+ * reconcile.
56
+ */
57
+ amountUsd: number;
58
+ /**
59
+ * Billable spend in integer micro-dollars (1,000,000 = $1). The exact value.
60
+ */
61
+ amountUsdMicros: number;
62
+ /**
63
+ * This project's spend split by cost type, highest first. Sums to amountUsdMicros.
64
+ */
65
+ breakdown: Array<Project.Breakdown>;
66
+ projectId: string;
67
+ /**
68
+ * Null only if the project no longer exists in this organization.
69
+ */
70
+ projectName: string | null;
71
+ }
72
+ namespace Project {
73
+ interface Breakdown {
74
+ /**
75
+ * The same figure in US dollars.
76
+ */
77
+ amountUsd: number;
78
+ /**
79
+ * Billable spend for this type, in micro-dollars.
80
+ */
81
+ amountUsdMicros: number;
82
+ /**
83
+ * The cost source, e.g. SIM*PLATFORM_FEE, SIM_LLM, SIM_TTS, SIM_STT,
84
+ * SIM_TELEPHONY, METRIC, or TRANSCRIPTION. These are the granular sources behind
85
+ * the Billing screen categories (SIM*\* roll up into "Simulation").
86
+ */
87
+ source: 'SIM_PLATFORM_FEE' | 'SIM_TTS' | 'SIM_STT' | 'SIM_LLM' | 'SIM_TELEPHONY' | 'METRIC' | 'TRANSCRIPTION' | 'INTERNAL_LLM' | 'INTERNAL_STT';
88
+ /**
89
+ * Whether this cost came from a SIMULATION or a production call (POST_CALL).
90
+ */
91
+ surface: 'SIMULATION' | 'POST_CALL';
92
+ }
93
+ }
94
+ }
95
+ }
96
+ export interface UsageGetParams {
97
+ /**
98
+ * Start of the window (inclusive), ISO 8601.
99
+ */
100
+ from: string;
101
+ /**
102
+ * End of the window (exclusive), ISO 8601. Must be after `from`, and the window
103
+ * may not exceed 366 days.
104
+ */
105
+ to: string;
106
+ /**
107
+ * Limit the report to a single project. Omit for the whole organization.
108
+ */
109
+ projectId?: string;
110
+ }
111
+ export declare namespace Usage {
112
+ export { type UsageGetResponse as UsageGetResponse, type UsageGetParams as UsageGetParams };
113
+ }
114
+ //# sourceMappingURL=usage.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.d.mts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAGnF;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;CAC7B;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB,QAAQ,EAAE,KAAK,CAAC;QAEhB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE9B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;;WAGG;QACH,cAAc,EAAE,MAAM,CAAC;KACxB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,OAAO;YACtB;;;eAGG;YACH,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,eAAe,EAAE,MAAM,CAAC;YAExB;;eAEG;YACH,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAEpC,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;SAC5B;QAED,UAAiB,OAAO,CAAC;YACvB,UAAiB,SAAS;gBACxB;;mBAEG;gBACH,SAAS,EAAE,MAAM,CAAC;gBAElB;;mBAEG;gBACH,eAAe,EAAE,MAAM,CAAC;gBAExB;;;;mBAIG;gBACH,MAAM,EACF,kBAAkB,GAClB,SAAS,GACT,SAAS,GACT,SAAS,GACT,eAAe,GACf,QAAQ,GACR,eAAe,GACf,cAAc,GACd,cAAc,CAAC;gBAEnB;;mBAEG;gBACH,OAAO,EAAE,YAAY,GAAG,WAAW,CAAC;aACrC;SACF;KACF;CACF;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,CAAC;CAC7F"}
@@ -0,0 +1,114 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class Usage extends APIResource {
5
+ /**
6
+ * Report billable usage and cost for the organization over a time window, broken
7
+ * down by project (highest spend first). Pass `from`/`to` as ISO 8601 timestamps;
8
+ * optionally pass `projectId` to scope the report to one project. Amounts are
9
+ * billable spend only (what we absorb is never included). Authenticated by an
10
+ * organization API key with the `usage:read` permission.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const usage = await client.usage.get({
15
+ * from: '2026-09-01T00:00:00Z',
16
+ * to: '2026-10-01T00:00:00Z',
17
+ * });
18
+ * ```
19
+ */
20
+ get(query: UsageGetParams, options?: RequestOptions): APIPromise<UsageGetResponse>;
21
+ }
22
+ export interface UsageGetResponse {
23
+ data: UsageGetResponse.Data;
24
+ }
25
+ export declare namespace UsageGetResponse {
26
+ interface Data {
27
+ currency: 'usd';
28
+ /**
29
+ * The resolved window start, echoed back as ISO 8601.
30
+ */
31
+ from: string;
32
+ /**
33
+ * Per-project billable spend, highest first. Only projects with spend in the
34
+ * window appear.
35
+ */
36
+ projects: Array<Data.Project>;
37
+ /**
38
+ * The resolved window end, echoed back as ISO 8601.
39
+ */
40
+ to: string;
41
+ /**
42
+ * The same total in US dollars.
43
+ */
44
+ totalUsd: number;
45
+ /**
46
+ * Total billable spend across the organization (or the single project) in
47
+ * micro-dollars.
48
+ */
49
+ totalUsdMicros: number;
50
+ }
51
+ namespace Data {
52
+ interface Project {
53
+ /**
54
+ * The same billable spend in US dollars. For display; use amountUsdMicros to
55
+ * reconcile.
56
+ */
57
+ amountUsd: number;
58
+ /**
59
+ * Billable spend in integer micro-dollars (1,000,000 = $1). The exact value.
60
+ */
61
+ amountUsdMicros: number;
62
+ /**
63
+ * This project's spend split by cost type, highest first. Sums to amountUsdMicros.
64
+ */
65
+ breakdown: Array<Project.Breakdown>;
66
+ projectId: string;
67
+ /**
68
+ * Null only if the project no longer exists in this organization.
69
+ */
70
+ projectName: string | null;
71
+ }
72
+ namespace Project {
73
+ interface Breakdown {
74
+ /**
75
+ * The same figure in US dollars.
76
+ */
77
+ amountUsd: number;
78
+ /**
79
+ * Billable spend for this type, in micro-dollars.
80
+ */
81
+ amountUsdMicros: number;
82
+ /**
83
+ * The cost source, e.g. SIM*PLATFORM_FEE, SIM_LLM, SIM_TTS, SIM_STT,
84
+ * SIM_TELEPHONY, METRIC, or TRANSCRIPTION. These are the granular sources behind
85
+ * the Billing screen categories (SIM*\* roll up into "Simulation").
86
+ */
87
+ source: 'SIM_PLATFORM_FEE' | 'SIM_TTS' | 'SIM_STT' | 'SIM_LLM' | 'SIM_TELEPHONY' | 'METRIC' | 'TRANSCRIPTION' | 'INTERNAL_LLM' | 'INTERNAL_STT';
88
+ /**
89
+ * Whether this cost came from a SIMULATION or a production call (POST_CALL).
90
+ */
91
+ surface: 'SIMULATION' | 'POST_CALL';
92
+ }
93
+ }
94
+ }
95
+ }
96
+ export interface UsageGetParams {
97
+ /**
98
+ * Start of the window (inclusive), ISO 8601.
99
+ */
100
+ from: string;
101
+ /**
102
+ * End of the window (exclusive), ISO 8601. Must be after `from`, and the window
103
+ * may not exceed 366 days.
104
+ */
105
+ to: string;
106
+ /**
107
+ * Limit the report to a single project. Omit for the whole organization.
108
+ */
109
+ projectId?: string;
110
+ }
111
+ export declare namespace Usage {
112
+ export { type UsageGetResponse as UsageGetResponse, type UsageGetParams as UsageGetParams };
113
+ }
114
+ //# sourceMappingURL=usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;CAGnF;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC;CAC7B;AAED,yBAAiB,gBAAgB,CAAC;IAChC,UAAiB,IAAI;QACnB,QAAQ,EAAE,KAAK,CAAC;QAEhB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAE9B;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;;WAGG;QACH,cAAc,EAAE,MAAM,CAAC;KACxB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,OAAO;YACtB;;;eAGG;YACH,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,eAAe,EAAE,MAAM,CAAC;YAExB;;eAEG;YACH,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YAEpC,SAAS,EAAE,MAAM,CAAC;YAElB;;eAEG;YACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;SAC5B;QAED,UAAiB,OAAO,CAAC;YACvB,UAAiB,SAAS;gBACxB;;mBAEG;gBACH,SAAS,EAAE,MAAM,CAAC;gBAElB;;mBAEG;gBACH,eAAe,EAAE,MAAM,CAAC;gBAExB;;;;mBAIG;gBACH,MAAM,EACF,kBAAkB,GAClB,SAAS,GACT,SAAS,GACT,SAAS,GACT,eAAe,GACf,QAAQ,GACR,eAAe,GACf,cAAc,GACd,cAAc,CAAC;gBAEnB;;mBAEG;gBACH,OAAO,EAAE,YAAY,GAAG,WAAW,CAAC;aACrC;SACF;KACF;CACF;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EAAE,KAAK,gBAAgB,IAAI,gBAAgB,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,CAAC;CAC7F"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Usage = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ class Usage extends resource_1.APIResource {
7
+ /**
8
+ * Report billable usage and cost for the organization over a time window, broken
9
+ * down by project (highest spend first). Pass `from`/`to` as ISO 8601 timestamps;
10
+ * optionally pass `projectId` to scope the report to one project. Amounts are
11
+ * billable spend only (what we absorb is never included). Authenticated by an
12
+ * organization API key with the `usage:read` permission.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const usage = await client.usage.get({
17
+ * from: '2026-09-01T00:00:00Z',
18
+ * to: '2026-10-01T00:00:00Z',
19
+ * });
20
+ * ```
21
+ */
22
+ get(query, options) {
23
+ return this._client.get('/v1/usage', { query, ...options });
24
+ }
25
+ }
26
+ exports.Usage = Usage;
27
+ //# sourceMappingURL=usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.js","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,KAAqB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AAnBD,sBAmBC"}
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ export class Usage extends APIResource {
4
+ /**
5
+ * Report billable usage and cost for the organization over a time window, broken
6
+ * down by project (highest spend first). Pass `from`/`to` as ISO 8601 timestamps;
7
+ * optionally pass `projectId` to scope the report to one project. Amounts are
8
+ * billable spend only (what we absorb is never included). Authenticated by an
9
+ * organization API key with the `usage:read` permission.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const usage = await client.usage.get({
14
+ * from: '2026-09-01T00:00:00Z',
15
+ * to: '2026-10-01T00:00:00Z',
16
+ * });
17
+ * ```
18
+ */
19
+ get(query, options) {
20
+ return this._client.get('/v1/usage', { query, ...options });
21
+ }
22
+ }
23
+ //# sourceMappingURL=usage.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.mjs","sourceRoot":"","sources":["../src/resources/usage.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,KAAqB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -59,6 +59,12 @@ import {
59
59
  AgentPromptUpdateParams,
60
60
  AgentPromptUpdateResponse,
61
61
  } from './resources/agent-prompt';
62
+ import {
63
+ Analytics,
64
+ AnalyticsGetSchemaResponse,
65
+ AnalyticsQueryParams,
66
+ AnalyticsQueryResponse,
67
+ } from './resources/analytics';
62
68
  import {
63
69
  AutoimproveJob,
64
70
  AutoimproveJobAnswerQuestionParams,
@@ -143,6 +149,26 @@ import {
143
149
  CustomerFlowEdgeCaseUpdateParams,
144
150
  CustomerFlowEdgeCaseUpdateResponse,
145
151
  } from './resources/customer-flow-edge-case';
152
+ import {
153
+ Dashboard,
154
+ DashboardCreateParams,
155
+ DashboardCreateResponse,
156
+ DashboardCreateWidgetParams,
157
+ DashboardCreateWidgetResponse,
158
+ DashboardDeleteResponse,
159
+ DashboardDeleteWidgetParams,
160
+ DashboardDeleteWidgetResponse,
161
+ DashboardGetByIDResponse,
162
+ DashboardGetDataParams,
163
+ DashboardGetDataResponse,
164
+ DashboardGetWidgetDataParams,
165
+ DashboardGetWidgetDataResponse,
166
+ DashboardListResponse,
167
+ DashboardUpdateParams,
168
+ DashboardUpdateResponse,
169
+ DashboardUpdateWidgetParams,
170
+ DashboardUpdateWidgetResponse,
171
+ } from './resources/dashboard';
146
172
  import { Health, HealthGetResponse } from './resources/health';
147
173
  import {
148
174
  HTTPRequestDefinition,
@@ -299,6 +325,7 @@ import {
299
325
  SimulationToolFixtureUpdateParams,
300
326
  SimulationToolFixtureUpdateResponse,
301
327
  } from './resources/simulation-tool-fixture';
328
+ import { Usage, UsageGetParams, UsageGetResponse } from './resources/usage';
302
329
  import {
303
330
  Webhook,
304
331
  WebhookCreateParams,
@@ -1057,7 +1084,10 @@ export class Roark {
1057
1084
  health: API.Health = new API.Health(this);
1058
1085
  me: API.Me = new API.Me(this);
1059
1086
  project: API.Project = new API.Project(this);
1087
+ usage: API.Usage = new API.Usage(this);
1060
1088
  call: API.Call = new API.Call(this);
1089
+ analytics: API.Analytics = new API.Analytics(this);
1090
+ dashboard: API.Dashboard = new API.Dashboard(this);
1061
1091
  metric: API.Metric = new API.Metric(this);
1062
1092
  metricPolicy: API.MetricPolicy = new API.MetricPolicy(this);
1063
1093
  metricCollectionJob: API.MetricCollectionJob = new API.MetricCollectionJob(this);
@@ -1089,7 +1119,10 @@ export class Roark {
1089
1119
  Roark.Health = Health;
1090
1120
  Roark.Me = Me;
1091
1121
  Roark.Project = Project;
1122
+ Roark.Usage = Usage;
1092
1123
  Roark.Call = Call;
1124
+ Roark.Analytics = Analytics;
1125
+ Roark.Dashboard = Dashboard;
1093
1126
  Roark.Metric = Metric;
1094
1127
  Roark.MetricPolicy = MetricPolicy;
1095
1128
  Roark.MetricCollectionJob = MetricCollectionJob;
@@ -1134,6 +1167,8 @@ export declare namespace Roark {
1134
1167
 
1135
1168
  export { Project as Project, type ProjectListResponse as ProjectListResponse };
1136
1169
 
1170
+ export { Usage as Usage, type UsageGetResponse as UsageGetResponse, type UsageGetParams as UsageGetParams };
1171
+
1137
1172
  export {
1138
1173
  Call as Call,
1139
1174
  type CallCreateResponse as CallCreateResponse,
@@ -1152,6 +1187,34 @@ export declare namespace Roark {
1152
1187
  type CallUpdatePropertiesParams as CallUpdatePropertiesParams,
1153
1188
  };
1154
1189
 
1190
+ export {
1191
+ Analytics as Analytics,
1192
+ type AnalyticsGetSchemaResponse as AnalyticsGetSchemaResponse,
1193
+ type AnalyticsQueryResponse as AnalyticsQueryResponse,
1194
+ type AnalyticsQueryParams as AnalyticsQueryParams,
1195
+ };
1196
+
1197
+ export {
1198
+ Dashboard as Dashboard,
1199
+ type DashboardCreateResponse as DashboardCreateResponse,
1200
+ type DashboardUpdateResponse as DashboardUpdateResponse,
1201
+ type DashboardListResponse as DashboardListResponse,
1202
+ type DashboardDeleteResponse as DashboardDeleteResponse,
1203
+ type DashboardCreateWidgetResponse as DashboardCreateWidgetResponse,
1204
+ type DashboardDeleteWidgetResponse as DashboardDeleteWidgetResponse,
1205
+ type DashboardGetByIDResponse as DashboardGetByIDResponse,
1206
+ type DashboardGetDataResponse as DashboardGetDataResponse,
1207
+ type DashboardGetWidgetDataResponse as DashboardGetWidgetDataResponse,
1208
+ type DashboardUpdateWidgetResponse as DashboardUpdateWidgetResponse,
1209
+ type DashboardCreateParams as DashboardCreateParams,
1210
+ type DashboardUpdateParams as DashboardUpdateParams,
1211
+ type DashboardCreateWidgetParams as DashboardCreateWidgetParams,
1212
+ type DashboardDeleteWidgetParams as DashboardDeleteWidgetParams,
1213
+ type DashboardGetDataParams as DashboardGetDataParams,
1214
+ type DashboardGetWidgetDataParams as DashboardGetWidgetDataParams,
1215
+ type DashboardUpdateWidgetParams as DashboardUpdateWidgetParams,
1216
+ };
1217
+
1155
1218
  export {
1156
1219
  Metric as Metric,
1157
1220
  type MetricCreateDefinitionResponse as MetricCreateDefinitionResponse,