@runpod/typescript-api-sdk 0.3.0 → 0.6.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/README.md +14 -7
- package/dist/index.cjs +7 -14
- package/dist/index.d.cts +3931 -873
- package/dist/index.d.ts +3931 -873
- package/dist/index.js +7 -14
- package/package.json +18 -24
package/README.md
CHANGED
|
@@ -13,6 +13,10 @@ and billing.
|
|
|
13
13
|
Supports **Node.js 20+**, ESM, and CommonJS. For Serverless job submission and
|
|
14
14
|
results, use the existing [runpod-sdk](https://github.com/runpod/js-sdk).
|
|
15
15
|
|
|
16
|
+
<!-- runpod-agent-setup:start -->
|
|
17
|
+
**For AI agents:** setup instructions for the Runpod skills and MCP server are at https://agents.runpod.io/
|
|
18
|
+
<!-- runpod-agent-setup:end -->
|
|
19
|
+
|
|
16
20
|
## Using an AI agent instead?
|
|
17
21
|
|
|
18
22
|
The **[Runpod plugin](https://github.com/runpod/runpod-plugins-official#install)**
|
|
@@ -55,14 +59,17 @@ required; Python and the source build tools are not needed to use the npm packag
|
|
|
55
59
|
|
|
56
60
|
## Build from source
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
The SDK's source lives in the
|
|
63
|
+
[runpod-mcp repository](https://github.com/runpod/runpod-mcp) at
|
|
64
|
+
`packages/typescript-api-sdk/`. To build it, install **Node.js 20+** and
|
|
65
|
+
**pnpm 10**. Python is only needed when regenerating types or running the spec
|
|
66
|
+
tests.
|
|
62
67
|
|
|
63
68
|
```bash
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
git clone https://github.com/runpod/runpod-mcp.git
|
|
70
|
+
cd runpod-mcp
|
|
71
|
+
pnpm install --frozen-lockfile # also builds this package
|
|
72
|
+
cd packages/typescript-api-sdk
|
|
66
73
|
cp .env.example .env
|
|
67
74
|
```
|
|
68
75
|
|
|
@@ -74,7 +81,7 @@ node --env-file=.env examples/catalog.mjs
|
|
|
74
81
|
|
|
75
82
|
### Install a local build
|
|
76
83
|
|
|
77
|
-
Create a local package from
|
|
84
|
+
Create a local package from `packages/typescript-api-sdk/`:
|
|
78
85
|
|
|
79
86
|
```bash
|
|
80
87
|
npm pack
|
package/dist/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ __export(index_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(index_exports);
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/openapi-fetch@0.17.0/node_modules/openapi-fetch/dist/index.mjs
|
|
34
|
+
// ../../node_modules/.pnpm/openapi-fetch@0.17.0/node_modules/openapi-fetch/dist/index.mjs
|
|
35
35
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
36
36
|
var supportsRequestInitExt = () => {
|
|
37
37
|
return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
|
|
@@ -507,7 +507,7 @@ function removeTrailingSlash(url) {
|
|
|
507
507
|
return url;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
// node_modules/.pnpm/structured-headers@2.1.
|
|
510
|
+
// ../../node_modules/.pnpm/structured-headers@2.1.1/node_modules/structured-headers/dist/util.js
|
|
511
511
|
var asciiRe = /^[\x20-\x7E]*$/;
|
|
512
512
|
var tokenRe = /^[a-zA-Z*][:/!#$%&'*+\-.^_`|~A-Za-z0-9]*$/;
|
|
513
513
|
function isAscii(str) {
|
|
@@ -526,7 +526,7 @@ function base64ToArrayBuffer(b64) {
|
|
|
526
526
|
return bytes.buffer;
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
// node_modules/.pnpm/structured-headers@2.1.
|
|
529
|
+
// ../../node_modules/.pnpm/structured-headers@2.1.1/node_modules/structured-headers/dist/token.js
|
|
530
530
|
var Token = class {
|
|
531
531
|
constructor(value) {
|
|
532
532
|
if (!isValidTokenStr(value)) {
|
|
@@ -539,7 +539,7 @@ var Token = class {
|
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
|
|
542
|
-
// node_modules/.pnpm/structured-headers@2.1.
|
|
542
|
+
// ../../node_modules/.pnpm/structured-headers@2.1.1/node_modules/structured-headers/dist/displaystring.js
|
|
543
543
|
var DisplayString = class {
|
|
544
544
|
constructor(value) {
|
|
545
545
|
this.value = value;
|
|
@@ -549,7 +549,7 @@ var DisplayString = class {
|
|
|
549
549
|
}
|
|
550
550
|
};
|
|
551
551
|
|
|
552
|
-
// node_modules/.pnpm/structured-headers@2.1.
|
|
552
|
+
// ../../node_modules/.pnpm/structured-headers@2.1.1/node_modules/structured-headers/dist/parser.js
|
|
553
553
|
function parseList(input) {
|
|
554
554
|
const parser = new Parser(input);
|
|
555
555
|
return parser.parseList();
|
|
@@ -611,10 +611,7 @@ var Parser = class {
|
|
|
611
611
|
parseItem(standaloneItem = true) {
|
|
612
612
|
if (standaloneItem)
|
|
613
613
|
this.skipWS();
|
|
614
|
-
const result = [
|
|
615
|
-
this.parseBareItem(),
|
|
616
|
-
this.parseParameters()
|
|
617
|
-
];
|
|
614
|
+
const result = [this.parseBareItem(), this.parseParameters()];
|
|
618
615
|
if (standaloneItem)
|
|
619
616
|
this.checkTrail();
|
|
620
617
|
return result;
|
|
@@ -634,10 +631,7 @@ var Parser = class {
|
|
|
634
631
|
this.skipWS();
|
|
635
632
|
if (this.lookChar() === ")") {
|
|
636
633
|
this.pos++;
|
|
637
|
-
return [
|
|
638
|
-
innerList,
|
|
639
|
-
this.parseParameters()
|
|
640
|
-
];
|
|
634
|
+
return [innerList, this.parseParameters()];
|
|
641
635
|
}
|
|
642
636
|
innerList.push(this.parseItem(false));
|
|
643
637
|
const nextChar = this.lookChar();
|
|
@@ -1234,7 +1228,6 @@ var LogEventParser = class {
|
|
|
1234
1228
|
constructor(maxEventBytes) {
|
|
1235
1229
|
this.maxEventBytes = maxEventBytes;
|
|
1236
1230
|
}
|
|
1237
|
-
maxEventBytes;
|
|
1238
1231
|
line = "";
|
|
1239
1232
|
dataLines = [];
|
|
1240
1233
|
eventName = "";
|