@onkernel/sdk 0.88.0 → 0.91.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 (127) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/client.d.mts +9 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/auth/connections.d.mts +42 -0
  12. package/resources/auth/connections.d.mts.map +1 -1
  13. package/resources/auth/connections.d.ts +42 -0
  14. package/resources/auth/connections.d.ts.map +1 -1
  15. package/resources/browser-pools.d.mts +44 -0
  16. package/resources/browser-pools.d.mts.map +1 -1
  17. package/resources/browser-pools.d.ts +44 -0
  18. package/resources/browser-pools.d.ts.map +1 -1
  19. package/resources/browsers/browsers.d.mts +109 -1
  20. package/resources/browsers/browsers.d.mts.map +1 -1
  21. package/resources/browsers/browsers.d.ts +109 -1
  22. package/resources/browsers/browsers.d.ts.map +1 -1
  23. package/resources/browsers/browsers.js.map +1 -1
  24. package/resources/browsers/browsers.mjs.map +1 -1
  25. package/resources/browsers/index.d.mts +1 -1
  26. package/resources/browsers/index.d.mts.map +1 -1
  27. package/resources/browsers/index.d.ts +1 -1
  28. package/resources/browsers/index.d.ts.map +1 -1
  29. package/resources/browsers/index.js.map +1 -1
  30. package/resources/browsers/index.mjs.map +1 -1
  31. package/resources/browsers/telemetry.d.mts +1 -1
  32. package/resources/browsers/telemetry.d.ts +1 -1
  33. package/resources/browsers/telemetry.js +1 -1
  34. package/resources/browsers/telemetry.mjs +1 -1
  35. package/resources/credential-providers.d.mts +8 -4
  36. package/resources/credential-providers.d.mts.map +1 -1
  37. package/resources/credential-providers.d.ts +8 -4
  38. package/resources/credential-providers.d.ts.map +1 -1
  39. package/resources/index.d.mts +2 -1
  40. package/resources/index.d.mts.map +1 -1
  41. package/resources/index.d.ts +2 -1
  42. package/resources/index.d.ts.map +1 -1
  43. package/resources/index.js +3 -1
  44. package/resources/index.js.map +1 -1
  45. package/resources/index.mjs +1 -0
  46. package/resources/index.mjs.map +1 -1
  47. package/resources/invocations.d.mts +13 -0
  48. package/resources/invocations.d.mts.map +1 -1
  49. package/resources/invocations.d.ts +13 -0
  50. package/resources/invocations.d.ts.map +1 -1
  51. package/resources/organization/limits.d.mts +18 -3
  52. package/resources/organization/limits.d.mts.map +1 -1
  53. package/resources/organization/limits.d.ts +18 -3
  54. package/resources/organization/limits.d.ts.map +1 -1
  55. package/resources/organization/limits.js +1 -3
  56. package/resources/organization/limits.js.map +1 -1
  57. package/resources/organization/limits.mjs +1 -3
  58. package/resources/organization/limits.mjs.map +1 -1
  59. package/resources/projects/limits.d.mts +4 -4
  60. package/resources/projects/limits.d.mts.map +1 -1
  61. package/resources/projects/limits.d.ts +4 -4
  62. package/resources/projects/limits.d.ts.map +1 -1
  63. package/resources/projects/limits.js +6 -6
  64. package/resources/projects/limits.js.map +1 -1
  65. package/resources/projects/limits.mjs +6 -6
  66. package/resources/projects/limits.mjs.map +1 -1
  67. package/resources/projects/projects.d.mts +12 -10
  68. package/resources/projects/projects.d.mts.map +1 -1
  69. package/resources/projects/projects.d.ts +12 -10
  70. package/resources/projects/projects.d.ts.map +1 -1
  71. package/resources/projects/projects.js +11 -9
  72. package/resources/projects/projects.js.map +1 -1
  73. package/resources/projects/projects.mjs +11 -9
  74. package/resources/projects/projects.mjs.map +1 -1
  75. package/resources/telemetry/destinations.d.mts +138 -0
  76. package/resources/telemetry/destinations.d.mts.map +1 -0
  77. package/resources/telemetry/destinations.d.ts +138 -0
  78. package/resources/telemetry/destinations.d.ts.map +1 -0
  79. package/resources/telemetry/destinations.js +63 -0
  80. package/resources/telemetry/destinations.js.map +1 -0
  81. package/resources/telemetry/destinations.mjs +59 -0
  82. package/resources/telemetry/destinations.mjs.map +1 -0
  83. package/resources/telemetry/index.d.mts +3 -0
  84. package/resources/telemetry/index.d.mts.map +1 -0
  85. package/resources/telemetry/index.d.ts +3 -0
  86. package/resources/telemetry/index.d.ts.map +1 -0
  87. package/resources/telemetry/index.js +9 -0
  88. package/resources/telemetry/index.js.map +1 -0
  89. package/resources/telemetry/index.mjs +4 -0
  90. package/resources/telemetry/index.mjs.map +1 -0
  91. package/resources/telemetry/telemetry.d.mts +10 -0
  92. package/resources/telemetry/telemetry.d.mts.map +1 -0
  93. package/resources/telemetry/telemetry.d.ts +10 -0
  94. package/resources/telemetry/telemetry.d.ts.map +1 -0
  95. package/resources/telemetry/telemetry.js +17 -0
  96. package/resources/telemetry/telemetry.js.map +1 -0
  97. package/resources/telemetry/telemetry.mjs +12 -0
  98. package/resources/telemetry/telemetry.mjs.map +1 -0
  99. package/resources/telemetry.d.mts +2 -0
  100. package/resources/telemetry.d.mts.map +1 -0
  101. package/resources/telemetry.d.ts +2 -0
  102. package/resources/telemetry.d.ts.map +1 -0
  103. package/resources/telemetry.js +6 -0
  104. package/resources/telemetry.js.map +1 -0
  105. package/resources/telemetry.mjs +3 -0
  106. package/resources/telemetry.mjs.map +1 -0
  107. package/src/client.ts +20 -0
  108. package/src/resources/auth/connections.ts +72 -0
  109. package/src/resources/browser-pools.ts +53 -0
  110. package/src/resources/browsers/browsers.ts +130 -0
  111. package/src/resources/browsers/index.ts +3 -0
  112. package/src/resources/browsers/telemetry.ts +1 -1
  113. package/src/resources/credential-providers.ts +8 -4
  114. package/src/resources/index.ts +4 -0
  115. package/src/resources/invocations.ts +16 -0
  116. package/src/resources/organization/limits.ts +21 -3
  117. package/src/resources/projects/limits.ts +6 -6
  118. package/src/resources/projects/projects.ts +15 -13
  119. package/src/resources/telemetry/destinations.ts +188 -0
  120. package/src/resources/telemetry/index.ts +11 -0
  121. package/src/resources/telemetry/telemetry.ts +29 -0
  122. package/src/resources/telemetry.ts +3 -0
  123. package/src/version.ts +1 -1
  124. package/version.d.mts +1 -1
  125. package/version.d.ts +1 -1
  126. package/version.js +1 -1
  127. package/version.mjs +1 -1
@@ -18,12 +18,12 @@ export class Limits extends APIResource {
18
18
  * @example
19
19
  * ```ts
20
20
  * const projectLimits = await client.projects.limits.retrieve(
21
- * 'id',
21
+ * 'id_or_name',
22
22
  * );
23
23
  * ```
24
24
  */
25
- retrieve(id: string, options?: RequestOptions): APIPromise<ProjectLimits> {
26
- return this._client.get(path`/org/projects/${id}/limits`, options);
25
+ retrieve(idOrName: string, options?: RequestOptions): APIPromise<ProjectLimits> {
26
+ return this._client.get(path`/org/projects/${idOrName}/limits`, options);
27
27
  }
28
28
 
29
29
  /**
@@ -34,12 +34,12 @@ export class Limits extends APIResource {
34
34
  * @example
35
35
  * ```ts
36
36
  * const projectLimits = await client.projects.limits.update(
37
- * 'id',
37
+ * 'id_or_name',
38
38
  * );
39
39
  * ```
40
40
  */
41
- update(id: string, body: LimitUpdateParams, options?: RequestOptions): APIPromise<ProjectLimits> {
42
- return this._client.patch(path`/org/projects/${id}/limits`, { body, ...options });
41
+ update(idOrName: string, body: LimitUpdateParams, options?: RequestOptions): APIPromise<ProjectLimits> {
42
+ return this._client.patch(path`/org/projects/${idOrName}/limits`, { body, ...options });
43
43
  }
44
44
  }
45
45
 
@@ -36,11 +36,13 @@ export class Projects extends APIResource {
36
36
  *
37
37
  * @example
38
38
  * ```ts
39
- * const project = await client.projects.retrieve('id');
39
+ * const project = await client.projects.retrieve(
40
+ * 'id_or_name',
41
+ * );
40
42
  * ```
41
43
  */
42
- retrieve(id: string, options?: RequestOptions): APIPromise<Project> {
43
- return this._client.get(path`/org/projects/${id}`, options);
44
+ retrieve(idOrName: string, options?: RequestOptions): APIPromise<Project> {
45
+ return this._client.get(path`/org/projects/${idOrName}`, options);
44
46
  }
45
47
 
46
48
  /**
@@ -48,11 +50,11 @@ export class Projects extends APIResource {
48
50
  *
49
51
  * @example
50
52
  * ```ts
51
- * const project = await client.projects.update('id');
53
+ * const project = await client.projects.update('id_or_name');
52
54
  * ```
53
55
  */
54
- update(id: string, body: ProjectUpdateParams, options?: RequestOptions): APIPromise<Project> {
55
- return this._client.patch(path`/org/projects/${id}`, { body, ...options });
56
+ update(idOrName: string, body: ProjectUpdateParams, options?: RequestOptions): APIPromise<Project> {
57
+ return this._client.patch(path`/org/projects/${idOrName}`, { body, ...options });
56
58
  }
57
59
 
58
60
  /**
@@ -78,11 +80,11 @@ export class Projects extends APIResource {
78
80
  *
79
81
  * @example
80
82
  * ```ts
81
- * await client.projects.delete('id');
83
+ * await client.projects.delete('id_or_name');
82
84
  * ```
83
85
  */
84
- delete(id: string, options?: RequestOptions): APIPromise<void> {
85
- return this._client.delete(path`/org/projects/${id}`, {
86
+ delete(idOrName: string, options?: RequestOptions): APIPromise<void> {
87
+ return this._client.delete(path`/org/projects/${idOrName}`, {
86
88
  ...options,
87
89
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
88
90
  });
@@ -93,7 +95,7 @@ export type ProjectsOffsetPagination = OffsetPagination<Project>;
93
95
 
94
96
  export interface CreateProjectRequest {
95
97
  /**
96
- * Project name (1-255 Unicode code points)
98
+ * Project name (1-255 Unicode code points; cannot contain `/` or `%`)
97
99
  */
98
100
  name: string;
99
101
  }
@@ -127,7 +129,7 @@ export interface Project {
127
129
 
128
130
  export interface UpdateProjectRequest {
129
131
  /**
130
- * New project name (1-255 Unicode code points)
132
+ * New project name (1-255 Unicode code points; cannot contain `/` or `%`)
131
133
  */
132
134
  name?: string;
133
135
 
@@ -139,14 +141,14 @@ export interface UpdateProjectRequest {
139
141
 
140
142
  export interface ProjectCreateParams {
141
143
  /**
142
- * Project name (1-255 Unicode code points)
144
+ * Project name (1-255 Unicode code points; cannot contain `/` or `%`)
143
145
  */
144
146
  name: string;
145
147
  }
146
148
 
147
149
  export interface ProjectUpdateParams {
148
150
  /**
149
- * New project name (1-255 Unicode code points)
151
+ * New project name (1-255 Unicode code points; cannot contain `/` or `%`)
150
152
  */
151
153
  name?: string;
152
154
 
@@ -0,0 +1,188 @@
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 { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../../core/pagination';
6
+ import { buildHeaders } from '../../internal/headers';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+ import { path } from '../../internal/utils/path';
9
+
10
+ /**
11
+ * Stream live telemetry events from a browser session, and manage the destinations sessions export them to.
12
+ */
13
+ export class Destinations extends APIResource {
14
+ /**
15
+ * Create an OTLP export destination in the resolved project. Names must be unique
16
+ * within the project.
17
+ */
18
+ create(body: DestinationCreateParams, options?: RequestOptions): APIPromise<OtlpDestination> {
19
+ return this._client.post('/telemetry/destinations', { body, ...options });
20
+ }
21
+
22
+ /**
23
+ * Retrieve a single OTLP destination in the resolved project by its ID or name.
24
+ */
25
+ retrieve(idOrName: string, options?: RequestOptions): APIPromise<OtlpDestination> {
26
+ return this._client.get(path`/telemetry/destinations/${idOrName}`, options);
27
+ }
28
+
29
+ /**
30
+ * Update an OTLP destination. Sessions already exporting to it pick up the new
31
+ * values without restarting, which makes this the way to rotate credentials
32
+ * without interrupting export.
33
+ *
34
+ * Names must be unique within the project. Renaming is refused with a 409 while a
35
+ * managed auth connection selects this destination by name, since that connection
36
+ * resolves the name on every login. Every other field, including `headers`, stays
37
+ * editable.
38
+ */
39
+ update(
40
+ idOrName: string,
41
+ body: DestinationUpdateParams,
42
+ options?: RequestOptions,
43
+ ): APIPromise<OtlpDestination> {
44
+ return this._client.patch(path`/telemetry/destinations/${idOrName}`, { body, ...options });
45
+ }
46
+
47
+ /**
48
+ * List OTLP export destinations in the resolved project.
49
+ */
50
+ list(
51
+ query: DestinationListParams | null | undefined = {},
52
+ options?: RequestOptions,
53
+ ): PagePromise<OtlpDestinationsOffsetPagination, OtlpDestination> {
54
+ return this._client.getAPIList('/telemetry/destinations', OffsetPagination<OtlpDestination>, {
55
+ query,
56
+ ...options,
57
+ });
58
+ }
59
+
60
+ /**
61
+ * Delete an OTLP destination. Sessions bound to it are still exporting, so the
62
+ * delete is refused with a 409 while any exist; either wait for those sessions to
63
+ * end or delete them first. It is refused the same way while a managed auth
64
+ * connection still selects it, because that connection re-resolves the destination
65
+ * on every login, and while a managed auth login using it is still in progress.
66
+ */
67
+ delete(idOrName: string, options?: RequestOptions): APIPromise<void> {
68
+ return this._client.delete(path`/telemetry/destinations/${idOrName}`, {
69
+ ...options,
70
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
71
+ });
72
+ }
73
+ }
74
+
75
+ export type OtlpDestinationsOffsetPagination = OffsetPagination<OtlpDestination>;
76
+
77
+ /**
78
+ * An OTLP endpoint to export browser session telemetry to. Reference one from
79
+ * `telemetry.export.otlp.destination` when creating a browser to export that
80
+ * session's captured telemetry to it.
81
+ */
82
+ export interface OtlpDestination {
83
+ id: string;
84
+
85
+ created_at: string;
86
+
87
+ /**
88
+ * OTLP/HTTP endpoint telemetry is sent to.
89
+ */
90
+ endpoint: string;
91
+
92
+ /**
93
+ * Headers sent with each export request. Names are returned in canonical form
94
+ * (`Authorization`, not `authorization`). Values are returned redacted as empty
95
+ * strings, so the keys are visible but the credentials are not.
96
+ */
97
+ headers: { [key: string]: string };
98
+
99
+ /**
100
+ * Unique within the project. Usable in place of the ID when selecting a
101
+ * destination, so it cannot be shaped like an ID.
102
+ */
103
+ name: string;
104
+
105
+ updated_at: string;
106
+
107
+ description?: string;
108
+ }
109
+
110
+ export interface DestinationCreateParams {
111
+ /**
112
+ * Base endpoint of the OTLP/HTTP collector, without a signal path. Kernel appends
113
+ * the signal path itself, so pass `https://api.honeycomb.io` rather than
114
+ * `https://api.honeycomb.io/v1/logs`. If your provider's docs give you a
115
+ * signal-specific URL, drop the trailing `/v1/logs`, `/v1/traces`, or
116
+ * `/v1/metrics` — an endpoint that already carries one is rejected.
117
+ *
118
+ * Must be http or https, must resolve to a public address, and must carry no query
119
+ * string or fragment. Examples: `https://api.honeycomb.io`,
120
+ * `https://otlp-gateway-prod-us-east-0.grafana.net/otlp`,
121
+ * `https://otlp.datadoghq.com` (Datadog's OTLP intake for US1, not its logs
122
+ * intake).
123
+ */
124
+ endpoint: string;
125
+
126
+ /**
127
+ * Unique within the project.
128
+ */
129
+ name: string;
130
+
131
+ description?: string;
132
+
133
+ /**
134
+ * Headers sent with each export request, typically an ingestion key. Encrypted at
135
+ * rest and returned redacted. Names and values must be valid HTTP header tokens,
136
+ * and the names and values together cannot exceed 8192 bytes. Names are matched
137
+ * case-insensitively and stored canonicalized, so supplying two spellings of one
138
+ * header is rejected.
139
+ */
140
+ headers?: { [key: string]: string };
141
+ }
142
+
143
+ export interface DestinationUpdateParams {
144
+ description?: string;
145
+
146
+ /**
147
+ * Base endpoint of the OTLP/HTTP collector, without a signal path. Same rules as
148
+ * on create.
149
+ */
150
+ endpoint?: string;
151
+
152
+ /**
153
+ * Edits stored headers key by key rather than replacing the map. A string value
154
+ * adds or replaces that header, `null` deletes it, and any key you omit is left as
155
+ * it is. Names are matched case-insensitively, so `authorization` replaces a
156
+ * stored `Authorization` rather than adding a second entry. This is the credential
157
+ * rotation path; sessions already exporting pick up the new values without
158
+ * restarting. Names and values must be valid HTTP header tokens, and the names and
159
+ * values together cannot exceed 8192 bytes.
160
+ */
161
+ headers?: { [key: string]: string | null };
162
+
163
+ name?: string;
164
+ }
165
+
166
+ export interface DestinationListParams extends OffsetPaginationParams {
167
+ /**
168
+ * Exact-match filter on destination name using the database collation. In
169
+ * production, matching is case- and accent-insensitive.
170
+ */
171
+ name?: string;
172
+
173
+ /**
174
+ * Case-insensitive substring match against destination name or endpoint. IDs match
175
+ * by exact value.
176
+ */
177
+ query?: string;
178
+ }
179
+
180
+ export declare namespace Destinations {
181
+ export {
182
+ type OtlpDestination as OtlpDestination,
183
+ type OtlpDestinationsOffsetPagination as OtlpDestinationsOffsetPagination,
184
+ type DestinationCreateParams as DestinationCreateParams,
185
+ type DestinationUpdateParams as DestinationUpdateParams,
186
+ type DestinationListParams as DestinationListParams,
187
+ };
188
+ }
@@ -0,0 +1,11 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Destinations,
5
+ type OtlpDestination,
6
+ type DestinationCreateParams,
7
+ type DestinationUpdateParams,
8
+ type DestinationListParams,
9
+ type OtlpDestinationsOffsetPagination,
10
+ } from './destinations';
11
+ export { Telemetry } from './telemetry';
@@ -0,0 +1,29 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as DestinationsAPI from './destinations';
5
+ import {
6
+ DestinationCreateParams,
7
+ DestinationListParams,
8
+ DestinationUpdateParams,
9
+ Destinations,
10
+ OtlpDestination,
11
+ OtlpDestinationsOffsetPagination,
12
+ } from './destinations';
13
+
14
+ export class Telemetry extends APIResource {
15
+ destinations: DestinationsAPI.Destinations = new DestinationsAPI.Destinations(this._client);
16
+ }
17
+
18
+ Telemetry.Destinations = Destinations;
19
+
20
+ export declare namespace Telemetry {
21
+ export {
22
+ Destinations as Destinations,
23
+ type OtlpDestination as OtlpDestination,
24
+ type OtlpDestinationsOffsetPagination as OtlpDestinationsOffsetPagination,
25
+ type DestinationCreateParams as DestinationCreateParams,
26
+ type DestinationUpdateParams as DestinationUpdateParams,
27
+ type DestinationListParams as DestinationListParams,
28
+ };
29
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './telemetry/index';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.88.0'; // x-release-please-version
1
+ export const VERSION = '0.91.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.88.0";
1
+ export declare const VERSION = "0.91.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.88.0";
1
+ export declare const VERSION = "0.91.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 = '0.88.0'; // x-release-please-version
4
+ exports.VERSION = '0.91.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.88.0'; // x-release-please-version
1
+ export const VERSION = '0.91.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map