@valtown/sdk 1.6.0 → 1.8.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.0 (2025-07-29)
4
+
5
+ Full Changelog: [v1.7.0...v1.8.0](https://github.com/val-town/sdk/compare/v1.7.0...v1.8.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([5609e4e](https://github.com/val-town/sdk/commit/5609e4ef225866ddb65d054955178ccbf089d583))
10
+
11
+ ## 1.7.0 (2025-07-29)
12
+
13
+ Full Changelog: [v1.6.0...v1.7.0](https://github.com/val-town/sdk/compare/v1.6.0...v1.7.0)
14
+
15
+ ### Features
16
+
17
+ * clean up environment call outs ([72f87ab](https://github.com/val-town/sdk/commit/72f87abf6c665e92298ca593712057c7a4dea9f6))
18
+
3
19
  ## 1.6.0 (2025-07-10)
4
20
 
5
21
  Full Changelog: [v1.5.0...v1.6.0](https://github.com/val-town/sdk/compare/v1.5.0...v1.6.0)
package/README.md CHANGED
@@ -37,7 +37,9 @@ The full API of this library can be found in [api.md](api.md).
37
37
  ```js
38
38
  import ValTown from '@valtown/sdk';
39
39
 
40
- const client = new ValTown();
40
+ const client = new ValTown({
41
+ bearerToken: process.env['VAL_TOWN_API_KEY'], // This is the default and can be omitted
42
+ });
41
43
 
42
44
  const response = await client.emails.send();
43
45
 
@@ -52,7 +54,9 @@ This library includes TypeScript definitions for all request params and response
52
54
  ```ts
53
55
  import ValTown from '@valtown/sdk';
54
56
 
55
- const client = new ValTown();
57
+ const client = new ValTown({
58
+ bearerToken: process.env['VAL_TOWN_API_KEY'], // This is the default and can be omitted
59
+ });
56
60
 
57
61
  const response: ValTown.EmailSendResponse = await client.emails.send();
58
62
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valtown/sdk",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "description": "The official TypeScript library for the Val Town API",
5
5
  "author": "Val Town <support@val.town>",
6
6
  "types": "./index.d.ts",
@@ -6,8 +6,9 @@ export declare class Traces extends APIResource {
6
6
  * Get OpenTelemetry traces within a specified time window with flexible pagination
7
7
  * options: Pass in only the end time to paginate backwards from there. Pass in a
8
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.
9
+ * get resources within the time window. Choose to return in end_time order instead
10
+ * to view traces that completed in a window or since a time. Filter additionally
11
+ * by branch_ids or file_id.
11
12
  */
12
13
  list(query: TraceListParams, options?: Core.RequestOptions): Core.APIPromise<TraceListResponse>;
13
14
  }
@@ -24,6 +25,9 @@ export interface TraceListResponse {
24
25
  export declare namespace TraceListResponse {
25
26
  interface Data {
26
27
  attributes: Array<Data.Attribute>;
28
+ /**
29
+ * 0 if trace is unfinished
30
+ */
27
31
  endTimeUnixNano: string;
28
32
  name: string;
29
33
  startTimeUnixNano: string;
@@ -57,6 +61,12 @@ export interface TraceListParams {
57
61
  * Maximum items to return in each paginated response
58
62
  */
59
63
  limit: number;
64
+ /**
65
+ * When set to end_time, traces are sorted by their end time, and pending traces
66
+ * are omitted. When set to start_time, all traces are included, with pending
67
+ * traces given "0" for their end time.
68
+ */
69
+ order_by: 'start_time' | 'end_time';
60
70
  /**
61
71
  * Branch IDs to filter by
62
72
  */
@@ -1 +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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AK;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;;;;OAIG;IACH,QAAQ,EAAE,YAAY,GAAG,UAAU,CAAC;IAEpC;;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"}
@@ -8,8 +8,9 @@ class Traces extends resource_1.APIResource {
8
8
  * Get OpenTelemetry traces within a specified time window with flexible pagination
9
9
  * options: Pass in only the end time to paginate backwards from there. Pass in a
10
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.
11
+ * get resources within the time window. Choose to return in end_time order instead
12
+ * to view traces that completed in a window or since a time. Filter additionally
13
+ * by branch_ids or file_id.
13
14
  */
14
15
  list(query, options) {
15
16
  return this._client.get('/v1/telemetry/traces', { query, ...options });
@@ -1 +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"}
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;;;;;;;OAOG;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;AAZD,wBAYC"}
@@ -5,8 +5,9 @@ export class Traces extends APIResource {
5
5
  * Get OpenTelemetry traces within a specified time window with flexible pagination
6
6
  * options: Pass in only the end time to paginate backwards from there. Pass in a
7
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.
8
+ * get resources within the time window. Choose to return in end_time order instead
9
+ * to view traces that completed in a window or since a time. Filter additionally
10
+ * by branch_ids or file_id.
10
11
  */
11
12
  list(query, options) {
12
13
  return this._client.get('/v1/telemetry/traces', { query, ...options });
@@ -1 +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"}
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;;;;;;;OAOG;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"}
@@ -9,8 +9,9 @@ export class Traces extends APIResource {
9
9
  * Get OpenTelemetry traces within a specified time window with flexible pagination
10
10
  * options: Pass in only the end time to paginate backwards from there. Pass in a
11
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.
12
+ * get resources within the time window. Choose to return in end_time order instead
13
+ * to view traces that completed in a window or since a time. Filter additionally
14
+ * by branch_ids or file_id.
14
15
  */
15
16
  list(query: TraceListParams, options?: Core.RequestOptions): Core.APIPromise<TraceListResponse> {
16
17
  return this._client.get('/v1/telemetry/traces', { query, ...options });
@@ -33,6 +34,9 @@ export namespace TraceListResponse {
33
34
  export interface Data {
34
35
  attributes: Array<Data.Attribute>;
35
36
 
37
+ /**
38
+ * 0 if trace is unfinished
39
+ */
36
40
  endTimeUnixNano: string;
37
41
 
38
42
  name: string;
@@ -83,6 +87,13 @@ export interface TraceListParams {
83
87
  */
84
88
  limit: number;
85
89
 
90
+ /**
91
+ * When set to end_time, traces are sorted by their end time, and pending traces
92
+ * are omitted. When set to start_time, all traces are included, with pending
93
+ * traces given "0" for their end time.
94
+ */
95
+ order_by: 'start_time' | 'end_time';
96
+
86
97
  /**
87
98
  * Branch IDs to filter by
88
99
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.6.0'; // x-release-please-version
1
+ export const VERSION = '1.8.0'; // x-release-please-version
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.6.0";
1
+ export declare const VERSION = "1.8.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.6.0'; // x-release-please-version
4
+ exports.VERSION = '1.8.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.6.0'; // x-release-please-version
1
+ export const VERSION = '1.8.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map