@valtown/sdk 1.3.0 → 1.5.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 +21 -0
- package/README.md +12 -24
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/index.js +2 -3
- package/index.js.map +1 -1
- package/index.mjs +2 -3
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +2 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/telemetry/index.d.ts +4 -0
- package/resources/telemetry/index.d.ts.map +1 -0
- package/resources/telemetry/index.js +11 -0
- package/resources/telemetry/index.js.map +1 -0
- package/resources/telemetry/index.mjs +5 -0
- package/resources/telemetry/index.mjs.map +1 -0
- package/resources/telemetry/logs.d.ts +85 -0
- package/resources/telemetry/logs.d.ts.map +1 -0
- package/resources/telemetry/logs.js +19 -0
- package/resources/telemetry/logs.js.map +1 -0
- package/resources/telemetry/logs.mjs +15 -0
- package/resources/telemetry/logs.mjs.map +1 -0
- package/resources/telemetry/telemetry.d.ts +17 -0
- package/resources/telemetry/telemetry.d.ts.map +1 -0
- package/resources/telemetry/telemetry.js +46 -0
- package/resources/telemetry/telemetry.js.map +1 -0
- package/resources/telemetry/telemetry.mjs +19 -0
- package/resources/telemetry/telemetry.mjs.map +1 -0
- package/resources/telemetry/traces.d.ts +80 -0
- package/resources/telemetry/traces.d.ts.map +1 -0
- package/resources/telemetry/traces.js +19 -0
- package/resources/telemetry/traces.js.map +1 -0
- package/resources/telemetry/traces.mjs +15 -0
- package/resources/telemetry/traces.mjs.map +1 -0
- package/resources/telemetry.d.ts +1 -65
- package/resources/telemetry.d.ts.map +1 -1
- package/resources/telemetry.js +15 -23
- package/resources/telemetry.js.map +1 -1
- package/resources/telemetry.mjs +1 -20
- package/resources/telemetry.mjs.map +1 -1
- package/src/index.ts +3 -14
- package/src/resources/index.ts +1 -6
- package/src/resources/telemetry/index.ts +5 -0
- package/src/resources/telemetry/logs.ts +119 -0
- package/src/resources/telemetry/telemetry.ts +28 -0
- package/src/resources/telemetry/traces.ts +109 -0
- package/src/resources/telemetry.ts +1 -102
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
import * as Shared from "../shared.js";
|
|
4
|
+
export declare class Traces extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get OpenTelemetry traces within a specified time window with flexible pagination
|
|
7
|
+
* options: Pass in only the end time to paginate backwards from there. Pass in a
|
|
8
|
+
* start time to paginate backwards from now until the start time. Pass in both to
|
|
9
|
+
* get resources within the time window. Filter additionally by branch_ids or
|
|
10
|
+
* file_id.
|
|
11
|
+
*/
|
|
12
|
+
list(query: TraceListParams, options?: Core.RequestOptions): Core.APIPromise<TraceListResponse>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A paginated result set
|
|
16
|
+
*/
|
|
17
|
+
export interface TraceListResponse {
|
|
18
|
+
data: Array<TraceListResponse.Data>;
|
|
19
|
+
/**
|
|
20
|
+
* Links to use for pagination
|
|
21
|
+
*/
|
|
22
|
+
links: Shared.PaginationLinks;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace TraceListResponse {
|
|
25
|
+
interface Data {
|
|
26
|
+
attributes: Array<Data.Attribute>;
|
|
27
|
+
endTimeUnixNano: string;
|
|
28
|
+
name: string;
|
|
29
|
+
startTimeUnixNano: string;
|
|
30
|
+
status: Data.Status;
|
|
31
|
+
traceId: string;
|
|
32
|
+
}
|
|
33
|
+
namespace Data {
|
|
34
|
+
interface Attribute {
|
|
35
|
+
key: string;
|
|
36
|
+
value: Attribute.Value;
|
|
37
|
+
}
|
|
38
|
+
namespace Attribute {
|
|
39
|
+
interface Value {
|
|
40
|
+
arrayValue?: unknown;
|
|
41
|
+
boolValue?: boolean;
|
|
42
|
+
bytesValue?: string;
|
|
43
|
+
doubleValue?: number;
|
|
44
|
+
intValue?: string;
|
|
45
|
+
kvlistValue?: unknown;
|
|
46
|
+
stringValue?: string;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
interface Status {
|
|
50
|
+
code: number;
|
|
51
|
+
message: string;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export interface TraceListParams {
|
|
56
|
+
/**
|
|
57
|
+
* Maximum items to return in each paginated response
|
|
58
|
+
*/
|
|
59
|
+
limit: number;
|
|
60
|
+
/**
|
|
61
|
+
* Branch IDs to filter by
|
|
62
|
+
*/
|
|
63
|
+
branch_ids?: Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
* End date of the time window (latest time)
|
|
66
|
+
*/
|
|
67
|
+
end?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Include only resources from a given file identified by its ID
|
|
70
|
+
*/
|
|
71
|
+
file_id?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Start date of the time window (earliest time)
|
|
74
|
+
*/
|
|
75
|
+
start?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare namespace Traces {
|
|
78
|
+
export { type TraceListResponse as TraceListResponse, type TraceListParams as TraceListParams };
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=traces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traces.d.ts","sourceRoot":"","sources":["../../src/resources/telemetry/traces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AAEpC,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;OAMG;IACH,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;CAGhG;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC;CAC/B;AAED,yBAAiB,iBAAiB,CAAC;IACjC,UAAiB,IAAI;QACnB,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAElC,eAAe,EAAE,MAAM,CAAC;QAExB,IAAI,EAAE,MAAM,CAAC;QAEb,iBAAiB,EAAE,MAAM,CAAC;QAE1B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QAEpB,OAAO,EAAE,MAAM,CAAC;KACjB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,SAAS;YACxB,GAAG,EAAE,MAAM,CAAC;YAEZ,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC;SACxB;QAED,UAAiB,SAAS,CAAC;YACzB,UAAiB,KAAK;gBACpB,UAAU,CAAC,EAAE,OAAO,CAAC;gBAErB,SAAS,CAAC,EAAE,OAAO,CAAC;gBAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;gBAEpB,WAAW,CAAC,EAAE,MAAM,CAAC;gBAErB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAElB,WAAW,CAAC,EAAE,OAAO,CAAC;gBAEtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB;SACF;QAED,UAAiB,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC;YAEb,OAAO,EAAE,MAAM,CAAC;SACjB;KACF;CACF;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACjG"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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.Traces = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
class Traces extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get OpenTelemetry traces within a specified time window with flexible pagination
|
|
9
|
+
* options: Pass in only the end time to paginate backwards from there. Pass in a
|
|
10
|
+
* start time to paginate backwards from now until the start time. Pass in both to
|
|
11
|
+
* get resources within the time window. Filter additionally by branch_ids or
|
|
12
|
+
* file_id.
|
|
13
|
+
*/
|
|
14
|
+
list(query, options) {
|
|
15
|
+
return this._client.get('/v1/telemetry/traces', { query, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Traces = Traces;
|
|
19
|
+
//# sourceMappingURL=traces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traces.js","sourceRoot":"","sources":["../../src/resources/telemetry/traces.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAI7C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;OAMG;IACH,IAAI,CAAC,KAAsB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF;AAXD,wBAWC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
export class Traces extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Get OpenTelemetry traces within a specified time window with flexible pagination
|
|
6
|
+
* options: Pass in only the end time to paginate backwards from there. Pass in a
|
|
7
|
+
* start time to paginate backwards from now until the start time. Pass in both to
|
|
8
|
+
* get resources within the time window. Filter additionally by branch_ids or
|
|
9
|
+
* file_id.
|
|
10
|
+
*/
|
|
11
|
+
list(query, options) {
|
|
12
|
+
return this._client.get('/v1/telemetry/traces', { query, ...options });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=traces.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"traces.mjs","sourceRoot":"","sources":["../../src/resources/telemetry/traces.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;OAMG;IACH,IAAI,CAAC,KAAsB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;CACF"}
|
package/resources/telemetry.d.ts
CHANGED
|
@@ -1,66 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import * as Core from "../core.js";
|
|
3
|
-
import { PageCursorURL, type PageCursorURLParams } from "../pagination.js";
|
|
4
|
-
/**
|
|
5
|
-
* OpenTelemetry traces for your val executions
|
|
6
|
-
*/
|
|
7
|
-
export declare class Telemetry extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Get OpenTelemetry traces for a given time window and filter by branch_id or
|
|
10
|
-
* file_id
|
|
11
|
-
*/
|
|
12
|
-
list(query: TelemetryListParams, options?: Core.RequestOptions): Core.PagePromise<TelemetryListResponsesPageCursorURL, TelemetryListResponse>;
|
|
13
|
-
}
|
|
14
|
-
export declare class TelemetryListResponsesPageCursorURL extends PageCursorURL<TelemetryListResponse> {
|
|
15
|
-
}
|
|
16
|
-
export interface TelemetryListResponse {
|
|
17
|
-
attributes: Array<TelemetryListResponse.Attribute>;
|
|
18
|
-
endTimeUnixNano: string;
|
|
19
|
-
name: string;
|
|
20
|
-
startTimeUnixNano: string;
|
|
21
|
-
status: TelemetryListResponse.Status;
|
|
22
|
-
traceId: string;
|
|
23
|
-
}
|
|
24
|
-
export declare namespace TelemetryListResponse {
|
|
25
|
-
interface Attribute {
|
|
26
|
-
key: string;
|
|
27
|
-
value: Attribute.Value;
|
|
28
|
-
}
|
|
29
|
-
namespace Attribute {
|
|
30
|
-
interface Value {
|
|
31
|
-
arrayValue?: unknown;
|
|
32
|
-
boolValue?: boolean;
|
|
33
|
-
bytesValue?: string;
|
|
34
|
-
doubleValue?: number;
|
|
35
|
-
intValue?: string;
|
|
36
|
-
kvlistValue?: unknown;
|
|
37
|
-
stringValue?: string;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
interface Status {
|
|
41
|
-
code: number;
|
|
42
|
-
message: string;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export interface TelemetryListParams extends PageCursorURLParams {
|
|
46
|
-
/**
|
|
47
|
-
* End date of the time window
|
|
48
|
-
*/
|
|
49
|
-
end_timestamp: string;
|
|
50
|
-
/**
|
|
51
|
-
* Start date of the time window
|
|
52
|
-
*/
|
|
53
|
-
start_timestamp: string;
|
|
54
|
-
/**
|
|
55
|
-
* Branch IDs to filter by
|
|
56
|
-
*/
|
|
57
|
-
branch_ids?: Array<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Include only traces from a given file identified by its ID
|
|
60
|
-
*/
|
|
61
|
-
file_id?: string;
|
|
62
|
-
}
|
|
63
|
-
export declare namespace Telemetry {
|
|
64
|
-
export { type TelemetryListResponse as TelemetryListResponse, TelemetryListResponsesPageCursorURL as TelemetryListResponsesPageCursorURL, type TelemetryListParams as TelemetryListParams, };
|
|
65
|
-
}
|
|
1
|
+
export * from "./telemetry/index.js";
|
|
66
2
|
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC"}
|
package/resources/telemetry.js
CHANGED
|
@@ -1,27 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* OpenTelemetry traces for your val executions
|
|
9
|
-
*/
|
|
10
|
-
class Telemetry extends resource_1.APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Get OpenTelemetry traces for a given time window and filter by branch_id or
|
|
13
|
-
* file_id
|
|
14
|
-
*/
|
|
15
|
-
list(query, options) {
|
|
16
|
-
return this._client.getAPIList('/v1/telemetry/traces', TelemetryListResponsesPageCursorURL, {
|
|
17
|
-
query,
|
|
18
|
-
...options,
|
|
19
|
-
});
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
8
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./telemetry/index.js"), exports);
|
|
27
19
|
//# sourceMappingURL=telemetry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":";AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,uDAAkC"}
|
package/resources/telemetry.mjs
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { PageCursorURL } from "../pagination.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* OpenTelemetry traces for your val executions
|
|
6
|
-
*/
|
|
7
|
-
export class Telemetry extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Get OpenTelemetry traces for a given time window and filter by branch_id or
|
|
10
|
-
* file_id
|
|
11
|
-
*/
|
|
12
|
-
list(query, options) {
|
|
13
|
-
return this._client.getAPIList('/v1/telemetry/traces', TelemetryListResponsesPageCursorURL, {
|
|
14
|
-
query,
|
|
15
|
-
...options,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export class TelemetryListResponsesPageCursorURL extends PageCursorURL {
|
|
20
|
-
}
|
|
21
|
-
Telemetry.TelemetryListResponsesPageCursorURL = TelemetryListResponsesPageCursorURL;
|
|
2
|
+
export * from "./telemetry/index.mjs";
|
|
22
3
|
//# sourceMappingURL=telemetry.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.mjs","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"telemetry.mjs","sourceRoot":"","sources":["../src/resources/telemetry.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/src/index.ts
CHANGED
|
@@ -11,16 +11,11 @@ import * as API from './resources/index';
|
|
|
11
11
|
import { BlobListParams, BlobListResponse, BlobStoreParams, Blobs } from './resources/blobs';
|
|
12
12
|
import { EmailSendParams, EmailSendResponse, Emails } from './resources/emails';
|
|
13
13
|
import { Sqlite, SqliteBatchParams, SqliteBatchResponse, SqliteExecuteParams } from './resources/sqlite';
|
|
14
|
-
import {
|
|
15
|
-
Telemetry,
|
|
16
|
-
TelemetryListParams,
|
|
17
|
-
TelemetryListResponse,
|
|
18
|
-
TelemetryListResponsesPageCursorURL,
|
|
19
|
-
} from './resources/telemetry';
|
|
20
14
|
import { Users } from './resources/users';
|
|
21
15
|
import { Alias } from './resources/alias/alias';
|
|
22
16
|
import { Me } from './resources/me/me';
|
|
23
17
|
import { Search } from './resources/search/search';
|
|
18
|
+
import { Telemetry } from './resources/telemetry/telemetry';
|
|
24
19
|
import { ValCreateParams, ValListParams, ValListResponse, Vals } from './resources/vals/vals';
|
|
25
20
|
|
|
26
21
|
export interface ClientOptions {
|
|
@@ -161,7 +156,7 @@ export class ValTown extends Core.APIClient {
|
|
|
161
156
|
*/
|
|
162
157
|
sqlite: API.Sqlite = new API.Sqlite(this);
|
|
163
158
|
/**
|
|
164
|
-
* OpenTelemetry traces for your val executions
|
|
159
|
+
* OpenTelemetry traces and logs for your val executions
|
|
165
160
|
*/
|
|
166
161
|
telemetry: API.Telemetry = new API.Telemetry(this);
|
|
167
162
|
/**
|
|
@@ -220,7 +215,6 @@ ValTown.Blobs = Blobs;
|
|
|
220
215
|
ValTown.Users = Users;
|
|
221
216
|
ValTown.Sqlite = Sqlite;
|
|
222
217
|
ValTown.Telemetry = Telemetry;
|
|
223
|
-
ValTown.TelemetryListResponsesPageCursorURL = TelemetryListResponsesPageCursorURL;
|
|
224
218
|
ValTown.Vals = Vals;
|
|
225
219
|
ValTown.Emails = Emails;
|
|
226
220
|
export declare namespace ValTown {
|
|
@@ -254,12 +248,7 @@ export declare namespace ValTown {
|
|
|
254
248
|
type SqliteExecuteParams as SqliteExecuteParams,
|
|
255
249
|
};
|
|
256
250
|
|
|
257
|
-
export {
|
|
258
|
-
Telemetry as Telemetry,
|
|
259
|
-
type TelemetryListResponse as TelemetryListResponse,
|
|
260
|
-
TelemetryListResponsesPageCursorURL as TelemetryListResponsesPageCursorURL,
|
|
261
|
-
type TelemetryListParams as TelemetryListParams,
|
|
262
|
-
};
|
|
251
|
+
export { Telemetry as Telemetry };
|
|
263
252
|
|
|
264
253
|
export {
|
|
265
254
|
Vals as Vals,
|
package/src/resources/index.ts
CHANGED
|
@@ -7,11 +7,6 @@ export { Emails, type EmailSendResponse, type EmailSendParams } from './emails';
|
|
|
7
7
|
export { Me } from './me/me';
|
|
8
8
|
export { Search } from './search/search';
|
|
9
9
|
export { Sqlite, type SqliteBatchResponse, type SqliteBatchParams, type SqliteExecuteParams } from './sqlite';
|
|
10
|
-
export {
|
|
11
|
-
TelemetryListResponsesPageCursorURL,
|
|
12
|
-
Telemetry,
|
|
13
|
-
type TelemetryListResponse,
|
|
14
|
-
type TelemetryListParams,
|
|
15
|
-
} from './telemetry';
|
|
10
|
+
export { Telemetry } from './telemetry/telemetry';
|
|
16
11
|
export { Users } from './users';
|
|
17
12
|
export { Vals, type ValListResponse, type ValCreateParams, type ValListParams } from './vals/vals';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { Logs, type LogListResponse, type LogListParams } from './logs';
|
|
4
|
+
export { Telemetry } from './telemetry';
|
|
5
|
+
export { Traces, type TraceListResponse, type TraceListParams } from './traces';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
import * as Shared from '../shared';
|
|
6
|
+
|
|
7
|
+
export class Logs extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get OpenTelemetry logs within a specified time window with flexible pagination
|
|
10
|
+
* options: Pass in only the end time to paginate backwards from there. Pass in a
|
|
11
|
+
* start time to paginate backwards from now until the start time. Pass in both to
|
|
12
|
+
* get resources within the time window. Filter additionally by branch_ids or
|
|
13
|
+
* file_id.
|
|
14
|
+
*/
|
|
15
|
+
list(query: LogListParams, options?: Core.RequestOptions): Core.APIPromise<LogListResponse> {
|
|
16
|
+
return this._client.get('/v1/telemetry/logs', { query, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A paginated result set
|
|
22
|
+
*/
|
|
23
|
+
export interface LogListResponse {
|
|
24
|
+
data: Array<LogListResponse.Data>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Links to use for pagination
|
|
28
|
+
*/
|
|
29
|
+
links: Shared.PaginationLinks;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export namespace LogListResponse {
|
|
33
|
+
export interface Data {
|
|
34
|
+
attributes: Array<Data.Attribute>;
|
|
35
|
+
|
|
36
|
+
body: Data.Body;
|
|
37
|
+
|
|
38
|
+
severityText: string;
|
|
39
|
+
|
|
40
|
+
timeUnixNano: string;
|
|
41
|
+
|
|
42
|
+
traceId: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export namespace Data {
|
|
46
|
+
export interface Attribute {
|
|
47
|
+
key: string;
|
|
48
|
+
|
|
49
|
+
value: Attribute.Value;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export namespace Attribute {
|
|
53
|
+
export interface Value {
|
|
54
|
+
arrayValue?: unknown;
|
|
55
|
+
|
|
56
|
+
boolValue?: boolean;
|
|
57
|
+
|
|
58
|
+
bytesValue?: string;
|
|
59
|
+
|
|
60
|
+
doubleValue?: number;
|
|
61
|
+
|
|
62
|
+
intValue?: string;
|
|
63
|
+
|
|
64
|
+
kvlistValue?: unknown;
|
|
65
|
+
|
|
66
|
+
stringValue?: string;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface Body {
|
|
71
|
+
arrayValue?: unknown;
|
|
72
|
+
|
|
73
|
+
boolValue?: boolean;
|
|
74
|
+
|
|
75
|
+
bytesValue?: string;
|
|
76
|
+
|
|
77
|
+
doubleValue?: number;
|
|
78
|
+
|
|
79
|
+
intValue?: string;
|
|
80
|
+
|
|
81
|
+
kvlistValue?: unknown;
|
|
82
|
+
|
|
83
|
+
stringValue?: string;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface LogListParams {
|
|
89
|
+
/**
|
|
90
|
+
* Maximum items to return in each paginated response
|
|
91
|
+
*/
|
|
92
|
+
limit: number;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Branch IDs to filter by
|
|
96
|
+
*/
|
|
97
|
+
branch_ids?: Array<string>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* End date of the time window (latest time)
|
|
101
|
+
*/
|
|
102
|
+
end?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Include only resources from a given file identified by its ID
|
|
106
|
+
*/
|
|
107
|
+
file_id?: string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Start date of the time window (earliest time)
|
|
111
|
+
*/
|
|
112
|
+
start?: string;
|
|
113
|
+
|
|
114
|
+
trace_ids?: Array<string>;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export declare namespace Logs {
|
|
118
|
+
export { type LogListResponse as LogListResponse, type LogListParams as LogListParams };
|
|
119
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as LogsAPI from './logs';
|
|
5
|
+
import { LogListParams, LogListResponse, Logs } from './logs';
|
|
6
|
+
import * as TracesAPI from './traces';
|
|
7
|
+
import { TraceListParams, TraceListResponse, Traces } from './traces';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* OpenTelemetry traces and logs for your val executions
|
|
11
|
+
*/
|
|
12
|
+
export class Telemetry extends APIResource {
|
|
13
|
+
traces: TracesAPI.Traces = new TracesAPI.Traces(this._client);
|
|
14
|
+
logs: LogsAPI.Logs = new LogsAPI.Logs(this._client);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
Telemetry.Traces = Traces;
|
|
18
|
+
Telemetry.Logs = Logs;
|
|
19
|
+
|
|
20
|
+
export declare namespace Telemetry {
|
|
21
|
+
export {
|
|
22
|
+
Traces as Traces,
|
|
23
|
+
type TraceListResponse as TraceListResponse,
|
|
24
|
+
type TraceListParams as TraceListParams,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { Logs as Logs, type LogListResponse as LogListResponse, type LogListParams as LogListParams };
|
|
28
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
import * as Shared from '../shared';
|
|
6
|
+
|
|
7
|
+
export class Traces extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get OpenTelemetry traces within a specified time window with flexible pagination
|
|
10
|
+
* options: Pass in only the end time to paginate backwards from there. Pass in a
|
|
11
|
+
* start time to paginate backwards from now until the start time. Pass in both to
|
|
12
|
+
* get resources within the time window. Filter additionally by branch_ids or
|
|
13
|
+
* file_id.
|
|
14
|
+
*/
|
|
15
|
+
list(query: TraceListParams, options?: Core.RequestOptions): Core.APIPromise<TraceListResponse> {
|
|
16
|
+
return this._client.get('/v1/telemetry/traces', { query, ...options });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A paginated result set
|
|
22
|
+
*/
|
|
23
|
+
export interface TraceListResponse {
|
|
24
|
+
data: Array<TraceListResponse.Data>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Links to use for pagination
|
|
28
|
+
*/
|
|
29
|
+
links: Shared.PaginationLinks;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export namespace TraceListResponse {
|
|
33
|
+
export interface Data {
|
|
34
|
+
attributes: Array<Data.Attribute>;
|
|
35
|
+
|
|
36
|
+
endTimeUnixNano: string;
|
|
37
|
+
|
|
38
|
+
name: string;
|
|
39
|
+
|
|
40
|
+
startTimeUnixNano: string;
|
|
41
|
+
|
|
42
|
+
status: Data.Status;
|
|
43
|
+
|
|
44
|
+
traceId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export namespace Data {
|
|
48
|
+
export interface Attribute {
|
|
49
|
+
key: string;
|
|
50
|
+
|
|
51
|
+
value: Attribute.Value;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export namespace Attribute {
|
|
55
|
+
export interface Value {
|
|
56
|
+
arrayValue?: unknown;
|
|
57
|
+
|
|
58
|
+
boolValue?: boolean;
|
|
59
|
+
|
|
60
|
+
bytesValue?: string;
|
|
61
|
+
|
|
62
|
+
doubleValue?: number;
|
|
63
|
+
|
|
64
|
+
intValue?: string;
|
|
65
|
+
|
|
66
|
+
kvlistValue?: unknown;
|
|
67
|
+
|
|
68
|
+
stringValue?: string;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface Status {
|
|
73
|
+
code: number;
|
|
74
|
+
|
|
75
|
+
message: string;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface TraceListParams {
|
|
81
|
+
/**
|
|
82
|
+
* Maximum items to return in each paginated response
|
|
83
|
+
*/
|
|
84
|
+
limit: number;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Branch IDs to filter by
|
|
88
|
+
*/
|
|
89
|
+
branch_ids?: Array<string>;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* End date of the time window (latest time)
|
|
93
|
+
*/
|
|
94
|
+
end?: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Include only resources from a given file identified by its ID
|
|
98
|
+
*/
|
|
99
|
+
file_id?: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Start date of the time window (earliest time)
|
|
103
|
+
*/
|
|
104
|
+
start?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export declare namespace Traces {
|
|
108
|
+
export { type TraceListResponse as TraceListResponse, type TraceListParams as TraceListParams };
|
|
109
|
+
}
|