casedev 0.57.0 → 0.59.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/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +14 -0
- package/client.js.map +1 -1
- package/client.mjs +14 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent/v1/chat/chat.d.mts +6 -7
- package/resources/agent/v1/chat/chat.d.mts.map +1 -1
- package/resources/agent/v1/chat/chat.d.ts +6 -7
- package/resources/agent/v1/chat/chat.d.ts.map +1 -1
- package/resources/agent/v1/chat/chat.js +5 -6
- package/resources/agent/v1/chat/chat.js.map +1 -1
- package/resources/agent/v1/chat/chat.mjs +5 -6
- package/resources/agent/v1/chat/chat.mjs.map +1 -1
- package/resources/agent/v1/run.d.mts +7 -3
- package/resources/agent/v1/run.d.mts.map +1 -1
- package/resources/agent/v1/run.d.ts +7 -3
- package/resources/agent/v1/run.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/worker/index.d.mts +3 -0
- package/resources/worker/index.d.mts.map +1 -0
- package/resources/worker/index.d.ts +3 -0
- package/resources/worker/index.d.ts.map +1 -0
- package/resources/worker/index.js +9 -0
- package/resources/worker/index.js.map +1 -0
- package/resources/worker/index.mjs +4 -0
- package/resources/worker/index.mjs.map +1 -0
- package/resources/worker/v1.d.mts +62 -0
- package/resources/worker/v1.d.mts.map +1 -0
- package/resources/worker/v1.d.ts +62 -0
- package/resources/worker/v1.d.ts.map +1 -0
- package/resources/worker/v1.js +94 -0
- package/resources/worker/v1.js.map +1 -0
- package/resources/worker/v1.mjs +90 -0
- package/resources/worker/v1.mjs.map +1 -0
- package/resources/worker/worker.d.mts +10 -0
- package/resources/worker/worker.d.mts.map +1 -0
- package/resources/worker/worker.d.ts +10 -0
- package/resources/worker/worker.d.ts.map +1 -0
- package/resources/worker/worker.js +17 -0
- package/resources/worker/worker.js.map +1 -0
- package/resources/worker/worker.mjs +12 -0
- package/resources/worker/worker.mjs.map +1 -0
- package/resources/worker.d.mts +2 -0
- package/resources/worker.d.mts.map +1 -0
- package/resources/worker.d.ts +2 -0
- package/resources/worker.d.ts.map +1 -0
- package/resources/worker.js +6 -0
- package/resources/worker.js.map +1 -0
- package/resources/worker.mjs +3 -0
- package/resources/worker.mjs.map +1 -0
- package/src/client.ts +17 -0
- package/src/resources/agent/v1/chat/chat.ts +6 -7
- package/src/resources/agent/v1/run.ts +8 -3
- package/src/resources/index.ts +1 -0
- package/src/resources/worker/index.ts +11 -0
- package/src/resources/worker/v1.ts +130 -0
- package/src/resources/worker/worker.ts +29 -0
- package/src/resources/worker.ts +3 -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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as V1API from "./v1.mjs";
|
|
3
|
+
import { V1, V1ProxyDeleteParams, V1ProxyGetParams, V1ProxyPatchParams, V1ProxyPostParams, V1ProxyPutParams } from "./v1.mjs";
|
|
4
|
+
export declare class Worker extends APIResource {
|
|
5
|
+
v1: V1API.V1;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Worker {
|
|
8
|
+
export { V1 as V1, type V1ProxyDeleteParams as V1ProxyDeleteParams, type V1ProxyGetParams as V1ProxyGetParams, type V1ProxyPatchParams as V1ProxyPatchParams, type V1ProxyPostParams as V1ProxyPostParams, type V1ProxyPutParams as V1ProxyPutParams, };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=worker.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.d.mts","sourceRoot":"","sources":["../../src/resources/worker/worker.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,KAAK;OACV,EACL,EAAE,EACF,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EACjB;AAED,qBAAa,MAAO,SAAQ,WAAW;IACrC,EAAE,EAAE,KAAK,CAAC,EAAE,CAA8B;CAC3C;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,EAAE,IAAI,EAAE,EACR,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as V1API from "./v1.js";
|
|
3
|
+
import { V1, V1ProxyDeleteParams, V1ProxyGetParams, V1ProxyPatchParams, V1ProxyPostParams, V1ProxyPutParams } from "./v1.js";
|
|
4
|
+
export declare class Worker extends APIResource {
|
|
5
|
+
v1: V1API.V1;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Worker {
|
|
8
|
+
export { V1 as V1, type V1ProxyDeleteParams as V1ProxyDeleteParams, type V1ProxyGetParams as V1ProxyGetParams, type V1ProxyPatchParams as V1ProxyPatchParams, type V1ProxyPostParams as V1ProxyPostParams, type V1ProxyPutParams as V1ProxyPutParams, };
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../src/resources/worker/worker.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,KAAK;OACV,EACL,EAAE,EACF,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EACjB;AAED,qBAAa,MAAO,SAAQ,WAAW;IACrC,EAAE,EAAE,KAAK,CAAC,EAAE,CAA8B;CAC3C;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,EAAE,IAAI,EAAE,EACR,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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.Worker = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const V1API = tslib_1.__importStar(require("./v1.js"));
|
|
8
|
+
const v1_1 = require("./v1.js");
|
|
9
|
+
class Worker extends resource_1.APIResource {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.v1 = new V1API.V1(this._client);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Worker = Worker;
|
|
16
|
+
Worker.V1 = v1_1.V1;
|
|
17
|
+
//# sourceMappingURL=worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../src/resources/worker/worker.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,uDAA8B;AAC9B,gCAOc;AAEd,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,OAAE,GAAa,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;CAAA;AAFD,wBAEC;AAED,MAAM,CAAC,EAAE,GAAG,OAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as V1API from "./v1.mjs";
|
|
4
|
+
import { V1, } from "./v1.mjs";
|
|
5
|
+
export class Worker extends APIResource {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.v1 = new V1API.V1(this._client);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
Worker.V1 = V1;
|
|
12
|
+
//# sourceMappingURL=worker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.mjs","sourceRoot":"","sources":["../../src/resources/worker/worker.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,KAAK;OACV,EACL,EAAE,GAMH;AAED,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,OAAE,GAAa,IAAI,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;CAAA;AAED,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.d.mts","sourceRoot":"","sources":["../src/resources/worker.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/resources/worker.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./worker/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/resources/worker.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.mjs","sourceRoot":"","sources":["../src/resources/worker.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/src/client.ts
CHANGED
|
@@ -65,6 +65,7 @@ import {
|
|
|
65
65
|
} from './resources/vault/vault';
|
|
66
66
|
import { Voice } from './resources/voice/voice';
|
|
67
67
|
import { Webhooks } from './resources/webhooks/webhooks';
|
|
68
|
+
import { Worker } from './resources/worker/worker';
|
|
68
69
|
import { type Fetch } from './internal/builtin-types';
|
|
69
70
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
70
71
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -238,6 +239,18 @@ export class Casedev {
|
|
|
238
239
|
this.fetch = options.fetch ?? Shims.getDefaultFetch();
|
|
239
240
|
this.#encoder = Opts.FallbackEncoder;
|
|
240
241
|
|
|
242
|
+
const customHeadersEnv = readEnv('CASEDEV_CUSTOM_HEADERS');
|
|
243
|
+
if (customHeadersEnv) {
|
|
244
|
+
const parsed: Record<string, string> = {};
|
|
245
|
+
for (const line of customHeadersEnv.split('\n')) {
|
|
246
|
+
const colon = line.indexOf(':');
|
|
247
|
+
if (colon >= 0) {
|
|
248
|
+
parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim();
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
|
|
252
|
+
}
|
|
253
|
+
|
|
241
254
|
this._options = options;
|
|
242
255
|
|
|
243
256
|
this.apiKey = apiKey;
|
|
@@ -791,6 +804,7 @@ export class Casedev {
|
|
|
791
804
|
* Public system metadata and discovery endpoints
|
|
792
805
|
*/
|
|
793
806
|
system: API.System = new API.System(this);
|
|
807
|
+
worker: API.Worker = new API.Worker(this);
|
|
794
808
|
compute: API.Compute = new API.Compute(this);
|
|
795
809
|
database: API.Database = new API.Database(this);
|
|
796
810
|
format: API.Format = new API.Format(this);
|
|
@@ -822,6 +836,7 @@ export class Casedev {
|
|
|
822
836
|
|
|
823
837
|
Casedev.Agent = Agent;
|
|
824
838
|
Casedev.System = System;
|
|
839
|
+
Casedev.Worker = Worker;
|
|
825
840
|
Casedev.Compute = Compute;
|
|
826
841
|
Casedev.Database = Database;
|
|
827
842
|
Casedev.Format = Format;
|
|
@@ -848,6 +863,8 @@ export declare namespace Casedev {
|
|
|
848
863
|
|
|
849
864
|
export { System as System, type SystemListServicesResponse as SystemListServicesResponse };
|
|
850
865
|
|
|
866
|
+
export { Worker as Worker };
|
|
867
|
+
|
|
851
868
|
export { Compute as Compute };
|
|
852
869
|
|
|
853
870
|
export { Database as Database };
|
|
@@ -16,9 +16,8 @@ export class Chat extends APIResource {
|
|
|
16
16
|
files: FilesAPI.Files = new FilesAPI.Files(this._client);
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Creates a persistent
|
|
20
|
-
*
|
|
21
|
-
* requests.
|
|
19
|
+
* Creates a persistent chat session backed by a Daytona or Vercel runtime. Session
|
|
20
|
+
* state is retained and can be resumed or recovered across requests.
|
|
22
21
|
*/
|
|
23
22
|
create(
|
|
24
23
|
body: ChatCreateParams | null | undefined = {},
|
|
@@ -36,14 +35,14 @@ export class Chat extends APIResource {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
|
-
* Aborts the active
|
|
38
|
+
* Aborts the active generation for this chat session.
|
|
40
39
|
*/
|
|
41
40
|
cancel(id: string, options?: RequestOptions): APIPromise<ChatCancelResponse> {
|
|
42
41
|
return this._client.post(path`/agent/v1/chat/${id}/cancel`, options);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
/**
|
|
46
|
-
* Answers a pending
|
|
45
|
+
* Answers a pending runtime question for the chat session bound to this agent
|
|
47
46
|
* chat.
|
|
48
47
|
*/
|
|
49
48
|
replyToQuestion(
|
|
@@ -109,7 +108,7 @@ export class Chat extends APIResource {
|
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
/**
|
|
112
|
-
* Relays
|
|
111
|
+
* Relays runtime SSE events for this chat. Supports replay from buffered events
|
|
113
112
|
* using Last-Event-ID.
|
|
114
113
|
*/
|
|
115
114
|
stream(
|
|
@@ -166,7 +165,7 @@ export interface ChatCreateParams {
|
|
|
166
165
|
idleTimeoutMs?: number | null;
|
|
167
166
|
|
|
168
167
|
/**
|
|
169
|
-
* Optional model override for the
|
|
168
|
+
* Optional model override for the chat runtime session
|
|
170
169
|
*/
|
|
171
170
|
model?: string | null;
|
|
172
171
|
|
|
@@ -225,7 +225,7 @@ export namespace RunGetDetailsResponse {
|
|
|
225
225
|
finalResponse?: Result.FinalResponse | null;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
|
-
* Sandbox execution logs (
|
|
228
|
+
* Sandbox execution logs (runtime server + runner script)
|
|
229
229
|
*/
|
|
230
230
|
logs?: Result.Logs | null;
|
|
231
231
|
|
|
@@ -247,11 +247,11 @@ export namespace RunGetDetailsResponse {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
/**
|
|
250
|
-
* Sandbox execution logs (
|
|
250
|
+
* Sandbox execution logs (runtime server + runner script)
|
|
251
251
|
*/
|
|
252
252
|
export interface Logs {
|
|
253
253
|
/**
|
|
254
|
-
*
|
|
254
|
+
* Legacy runtime server stdout/stderr
|
|
255
255
|
*/
|
|
256
256
|
opencode?: string;
|
|
257
257
|
|
|
@@ -259,6 +259,11 @@ export namespace RunGetDetailsResponse {
|
|
|
259
259
|
* Runner script stdout/stderr
|
|
260
260
|
*/
|
|
261
261
|
runner?: string;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Runtime server stdout/stderr
|
|
265
|
+
*/
|
|
266
|
+
runtime?: string;
|
|
262
267
|
}
|
|
263
268
|
}
|
|
264
269
|
|
package/src/resources/index.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
V1,
|
|
5
|
+
type V1ProxyDeleteParams,
|
|
6
|
+
type V1ProxyGetParams,
|
|
7
|
+
type V1ProxyPatchParams,
|
|
8
|
+
type V1ProxyPostParams,
|
|
9
|
+
type V1ProxyPutParams,
|
|
10
|
+
} from './v1';
|
|
11
|
+
export { Worker } from './worker';
|
|
@@ -0,0 +1,130 @@
|
|
|
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 { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class V1 extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Creates a Daytona-backed worker runtime. The worker exposes its native runtime
|
|
12
|
+
* API through /worker/v1/:id/\* without reshaping payloads or events.
|
|
13
|
+
*/
|
|
14
|
+
create(options?: RequestOptions): APIPromise<void> {
|
|
15
|
+
return this._client.post('/worker/v1', {
|
|
16
|
+
...options,
|
|
17
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Get worker
|
|
23
|
+
*/
|
|
24
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<void> {
|
|
25
|
+
return this._client.get(path`/worker/v1/${id}`, {
|
|
26
|
+
...options,
|
|
27
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* End worker
|
|
33
|
+
*/
|
|
34
|
+
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
35
|
+
return this._client.delete(path`/worker/v1/${id}`, {
|
|
36
|
+
...options,
|
|
37
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Forwards a DELETE request to the worker runtime without translating response
|
|
43
|
+
* shapes.
|
|
44
|
+
*/
|
|
45
|
+
proxyDelete(workerPath: string, params: V1ProxyDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
46
|
+
const { id } = params;
|
|
47
|
+
return this._client.delete(path`/worker/v1/${id}/${workerPath}`, {
|
|
48
|
+
...options,
|
|
49
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Forwards a GET request to the worker runtime without translating response or SSE
|
|
55
|
+
* event shapes.
|
|
56
|
+
*/
|
|
57
|
+
proxyGet(workerPath: string, params: V1ProxyGetParams, options?: RequestOptions): APIPromise<void> {
|
|
58
|
+
const { id } = params;
|
|
59
|
+
return this._client.get(path`/worker/v1/${id}/${workerPath}`, {
|
|
60
|
+
...options,
|
|
61
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Forwards a PATCH request to the worker runtime without translating request or
|
|
67
|
+
* response shapes.
|
|
68
|
+
*/
|
|
69
|
+
proxyPatch(workerPath: string, params: V1ProxyPatchParams, options?: RequestOptions): APIPromise<void> {
|
|
70
|
+
const { id } = params;
|
|
71
|
+
return this._client.patch(path`/worker/v1/${id}/${workerPath}`, {
|
|
72
|
+
...options,
|
|
73
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Forwards a POST request to the worker runtime without translating request,
|
|
79
|
+
* response, or SSE event shapes.
|
|
80
|
+
*/
|
|
81
|
+
proxyPost(workerPath: string, params: V1ProxyPostParams, options?: RequestOptions): APIPromise<void> {
|
|
82
|
+
const { id } = params;
|
|
83
|
+
return this._client.post(path`/worker/v1/${id}/${workerPath}`, {
|
|
84
|
+
...options,
|
|
85
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Forwards a PUT request to the worker runtime without translating request or
|
|
91
|
+
* response shapes.
|
|
92
|
+
*/
|
|
93
|
+
proxyPut(workerPath: string, params: V1ProxyPutParams, options?: RequestOptions): APIPromise<void> {
|
|
94
|
+
const { id } = params;
|
|
95
|
+
return this._client.put(path`/worker/v1/${id}/${workerPath}`, {
|
|
96
|
+
...options,
|
|
97
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface V1ProxyDeleteParams {
|
|
103
|
+
id: string;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface V1ProxyGetParams {
|
|
107
|
+
id: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface V1ProxyPatchParams {
|
|
111
|
+
id: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface V1ProxyPostParams {
|
|
115
|
+
id: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface V1ProxyPutParams {
|
|
119
|
+
id: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export declare namespace V1 {
|
|
123
|
+
export {
|
|
124
|
+
type V1ProxyDeleteParams as V1ProxyDeleteParams,
|
|
125
|
+
type V1ProxyGetParams as V1ProxyGetParams,
|
|
126
|
+
type V1ProxyPatchParams as V1ProxyPatchParams,
|
|
127
|
+
type V1ProxyPostParams as V1ProxyPostParams,
|
|
128
|
+
type V1ProxyPutParams as V1ProxyPutParams,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
@@ -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 V1API from './v1';
|
|
5
|
+
import {
|
|
6
|
+
V1,
|
|
7
|
+
V1ProxyDeleteParams,
|
|
8
|
+
V1ProxyGetParams,
|
|
9
|
+
V1ProxyPatchParams,
|
|
10
|
+
V1ProxyPostParams,
|
|
11
|
+
V1ProxyPutParams,
|
|
12
|
+
} from './v1';
|
|
13
|
+
|
|
14
|
+
export class Worker extends APIResource {
|
|
15
|
+
v1: V1API.V1 = new V1API.V1(this._client);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
Worker.V1 = V1;
|
|
19
|
+
|
|
20
|
+
export declare namespace Worker {
|
|
21
|
+
export {
|
|
22
|
+
V1 as V1,
|
|
23
|
+
type V1ProxyDeleteParams as V1ProxyDeleteParams,
|
|
24
|
+
type V1ProxyGetParams as V1ProxyGetParams,
|
|
25
|
+
type V1ProxyPatchParams as V1ProxyPatchParams,
|
|
26
|
+
type V1ProxyPostParams as V1ProxyPostParams,
|
|
27
|
+
type V1ProxyPutParams as V1ProxyPutParams,
|
|
28
|
+
};
|
|
29
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.59.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.59.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.59.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.59.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|