@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.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +9 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -0
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/analytics.d.mts +354 -0
- package/resources/analytics.d.mts.map +1 -0
- package/resources/analytics.d.ts +354 -0
- package/resources/analytics.d.ts.map +1 -0
- package/resources/analytics.js +55 -0
- package/resources/analytics.js.map +1 -0
- package/resources/analytics.mjs +51 -0
- package/resources/analytics.mjs.map +1 -0
- package/resources/config.d.mts +578 -8
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +578 -8
- package/resources/config.d.ts.map +1 -1
- package/resources/dashboard.d.mts +2280 -0
- package/resources/dashboard.d.mts.map +1 -0
- package/resources/dashboard.d.ts +2280 -0
- package/resources/dashboard.d.ts.map +1 -0
- package/resources/dashboard.js +170 -0
- package/resources/dashboard.js.map +1 -0
- package/resources/dashboard.mjs +166 -0
- package/resources/dashboard.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/usage.d.mts +114 -0
- package/resources/usage.d.mts.map +1 -0
- package/resources/usage.d.ts +114 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +27 -0
- package/resources/usage.js.map +1 -0
- package/resources/usage.mjs +23 -0
- package/resources/usage.mjs.map +1 -0
- package/src/client.ts +63 -0
- package/src/resources/analytics.ts +573 -0
- package/src/resources/config.ts +1441 -41
- package/src/resources/dashboard.ts +3752 -0
- package/src/resources/index.ts +27 -0
- package/src/resources/usage.ts +147 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/index.ts
CHANGED
|
@@ -42,6 +42,12 @@ export {
|
|
|
42
42
|
type AgentPromptUpdateParams,
|
|
43
43
|
type AgentPromptListVersionsParams,
|
|
44
44
|
} from './agent-prompt';
|
|
45
|
+
export {
|
|
46
|
+
Analytics,
|
|
47
|
+
type AnalyticsGetSchemaResponse,
|
|
48
|
+
type AnalyticsQueryResponse,
|
|
49
|
+
type AnalyticsQueryParams,
|
|
50
|
+
} from './analytics';
|
|
45
51
|
export {
|
|
46
52
|
AutoimproveJob,
|
|
47
53
|
type AutoimproveLogEntry,
|
|
@@ -126,6 +132,26 @@ export {
|
|
|
126
132
|
type CustomerFlowEdgeCasePromoteParams,
|
|
127
133
|
type CustomerFlowEdgeCaseRemoveParams,
|
|
128
134
|
} from './customer-flow-edge-case';
|
|
135
|
+
export {
|
|
136
|
+
Dashboard,
|
|
137
|
+
type DashboardCreateResponse,
|
|
138
|
+
type DashboardUpdateResponse,
|
|
139
|
+
type DashboardListResponse,
|
|
140
|
+
type DashboardDeleteResponse,
|
|
141
|
+
type DashboardCreateWidgetResponse,
|
|
142
|
+
type DashboardDeleteWidgetResponse,
|
|
143
|
+
type DashboardGetByIDResponse,
|
|
144
|
+
type DashboardGetDataResponse,
|
|
145
|
+
type DashboardGetWidgetDataResponse,
|
|
146
|
+
type DashboardUpdateWidgetResponse,
|
|
147
|
+
type DashboardCreateParams,
|
|
148
|
+
type DashboardUpdateParams,
|
|
149
|
+
type DashboardCreateWidgetParams,
|
|
150
|
+
type DashboardDeleteWidgetParams,
|
|
151
|
+
type DashboardGetDataParams,
|
|
152
|
+
type DashboardGetWidgetDataParams,
|
|
153
|
+
type DashboardUpdateWidgetParams,
|
|
154
|
+
} from './dashboard';
|
|
129
155
|
export {
|
|
130
156
|
HTTPRequestDefinition,
|
|
131
157
|
type HTTPRequestDefinitionCreateResponse,
|
|
@@ -279,6 +305,7 @@ export {
|
|
|
279
305
|
type SimulationToolFixtureUpdateParams,
|
|
280
306
|
type SimulationToolFixtureListParams,
|
|
281
307
|
} from './simulation-tool-fixture';
|
|
308
|
+
export { Usage, type UsageGetResponse, type UsageGetParams } from './usage';
|
|
282
309
|
export {
|
|
283
310
|
Webhook,
|
|
284
311
|
type WebhookCreateResponse,
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Usage extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Report billable usage and cost for the organization over a time window, broken
|
|
10
|
+
* down by project (highest spend first). Pass `from`/`to` as ISO 8601 timestamps;
|
|
11
|
+
* optionally pass `projectId` to scope the report to one project. Amounts are
|
|
12
|
+
* billable spend only (what we absorb is never included). Authenticated by an
|
|
13
|
+
* organization API key with the `usage:read` permission.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const usage = await client.usage.get({
|
|
18
|
+
* from: '2026-09-01T00:00:00Z',
|
|
19
|
+
* to: '2026-10-01T00:00:00Z',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
get(query: UsageGetParams, options?: RequestOptions): APIPromise<UsageGetResponse> {
|
|
24
|
+
return this._client.get('/v1/usage', { query, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UsageGetResponse {
|
|
29
|
+
data: UsageGetResponse.Data;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export namespace UsageGetResponse {
|
|
33
|
+
export interface Data {
|
|
34
|
+
currency: 'usd';
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The resolved window start, echoed back as ISO 8601.
|
|
38
|
+
*/
|
|
39
|
+
from: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Per-project billable spend, highest first. Only projects with spend in the
|
|
43
|
+
* window appear.
|
|
44
|
+
*/
|
|
45
|
+
projects: Array<Data.Project>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The resolved window end, echoed back as ISO 8601.
|
|
49
|
+
*/
|
|
50
|
+
to: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The same total in US dollars.
|
|
54
|
+
*/
|
|
55
|
+
totalUsd: number;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Total billable spend across the organization (or the single project) in
|
|
59
|
+
* micro-dollars.
|
|
60
|
+
*/
|
|
61
|
+
totalUsdMicros: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export namespace Data {
|
|
65
|
+
export interface Project {
|
|
66
|
+
/**
|
|
67
|
+
* The same billable spend in US dollars. For display; use amountUsdMicros to
|
|
68
|
+
* reconcile.
|
|
69
|
+
*/
|
|
70
|
+
amountUsd: number;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Billable spend in integer micro-dollars (1,000,000 = $1). The exact value.
|
|
74
|
+
*/
|
|
75
|
+
amountUsdMicros: number;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* This project's spend split by cost type, highest first. Sums to amountUsdMicros.
|
|
79
|
+
*/
|
|
80
|
+
breakdown: Array<Project.Breakdown>;
|
|
81
|
+
|
|
82
|
+
projectId: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Null only if the project no longer exists in this organization.
|
|
86
|
+
*/
|
|
87
|
+
projectName: string | null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export namespace Project {
|
|
91
|
+
export interface Breakdown {
|
|
92
|
+
/**
|
|
93
|
+
* The same figure in US dollars.
|
|
94
|
+
*/
|
|
95
|
+
amountUsd: number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Billable spend for this type, in micro-dollars.
|
|
99
|
+
*/
|
|
100
|
+
amountUsdMicros: number;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The cost source, e.g. SIM*PLATFORM_FEE, SIM_LLM, SIM_TTS, SIM_STT,
|
|
104
|
+
* SIM_TELEPHONY, METRIC, or TRANSCRIPTION. These are the granular sources behind
|
|
105
|
+
* the Billing screen categories (SIM*\* roll up into "Simulation").
|
|
106
|
+
*/
|
|
107
|
+
source:
|
|
108
|
+
| 'SIM_PLATFORM_FEE'
|
|
109
|
+
| 'SIM_TTS'
|
|
110
|
+
| 'SIM_STT'
|
|
111
|
+
| 'SIM_LLM'
|
|
112
|
+
| 'SIM_TELEPHONY'
|
|
113
|
+
| 'METRIC'
|
|
114
|
+
| 'TRANSCRIPTION'
|
|
115
|
+
| 'INTERNAL_LLM'
|
|
116
|
+
| 'INTERNAL_STT';
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Whether this cost came from a SIMULATION or a production call (POST_CALL).
|
|
120
|
+
*/
|
|
121
|
+
surface: 'SIMULATION' | 'POST_CALL';
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface UsageGetParams {
|
|
128
|
+
/**
|
|
129
|
+
* Start of the window (inclusive), ISO 8601.
|
|
130
|
+
*/
|
|
131
|
+
from: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* End of the window (exclusive), ISO 8601. Must be after `from`, and the window
|
|
135
|
+
* may not exceed 366 days.
|
|
136
|
+
*/
|
|
137
|
+
to: string;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Limit the report to a single project. Omit for the whole organization.
|
|
141
|
+
*/
|
|
142
|
+
projectId?: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export declare namespace Usage {
|
|
146
|
+
export { type UsageGetResponse as UsageGetResponse, type UsageGetParams as UsageGetParams };
|
|
147
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '5.
|
|
1
|
+
export const VERSION = '5.9.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "5.
|
|
1
|
+
export declare const VERSION = "5.9.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "5.
|
|
1
|
+
export declare const VERSION = "5.9.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '5.
|
|
1
|
+
export const VERSION = '5.9.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|