runpod-sdk 1.2.0-beta.2 → 2.0.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/LICENSE +21 -0
- package/README.md +53 -200
- package/dist/index.cjs +247 -0
- package/dist/index.d.cts +127 -0
- package/dist/index.d.ts +127 -0
- package/dist/index.js +208 -0
- package/package.json +55 -29
- package/dist/package.json +0 -24
- package/dist/src/graphql/client.d.ts +0 -22
- package/dist/src/graphql/client.js +0 -75
- package/dist/src/graphql/client.js.map +0 -1
- package/dist/src/graphql/generated/index.d.ts +0 -742
- package/dist/src/graphql/generated/index.js +0 -347
- package/dist/src/graphql/generated/index.js.map +0 -1
- package/dist/src/graphql/generated/operations.d.ts +0 -428
- package/dist/src/graphql/generated/operations.js +0 -2
- package/dist/src/graphql/generated/operations.js.map +0 -1
- package/dist/src/graphql/generated/sdk.d.ts +0 -31
- package/dist/src/graphql/generated/sdk.js +0 -232
- package/dist/src/graphql/generated/sdk.js.map +0 -1
- package/dist/src/graphql/generated/types.d.ts +0 -4281
- package/dist/src/graphql/generated/types.js +0 -2
- package/dist/src/graphql/generated/types.js.map +0 -1
- package/dist/src/index.d.ts +0 -170
- package/dist/src/index.js +0 -252
- package/dist/src/index.js.map +0 -1
- package/dist/src/pods/generated-gpu-types.d.ts +0 -299
- package/dist/src/pods/generated-gpu-types.js +0 -148
- package/dist/src/pods/generated-gpu-types.js.map +0 -1
- package/dist/src/pods/index.d.ts +0 -122
- package/dist/src/pods/index.js +0 -242
- package/dist/src/pods/index.js.map +0 -1
- package/schema.gql +0 -161
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/graphql/generated/types.ts"],"names":[],"mappings":""}
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { PodManager } from './pods/index.js';
|
|
2
|
-
export type ExecutionPolicy = {
|
|
3
|
-
executionTimeout?: number;
|
|
4
|
-
lowPriority?: boolean;
|
|
5
|
-
ttl?: number;
|
|
6
|
-
};
|
|
7
|
-
export type S3Config = {
|
|
8
|
-
accessId: string;
|
|
9
|
-
accessSecret: string;
|
|
10
|
-
bucketName: string;
|
|
11
|
-
endpointUrl: string;
|
|
12
|
-
objectPath?: string;
|
|
13
|
-
};
|
|
14
|
-
export type EndpointInputPayload = {
|
|
15
|
-
input: any;
|
|
16
|
-
webhook?: string;
|
|
17
|
-
webhookV2?: string;
|
|
18
|
-
s3Config?: S3Config;
|
|
19
|
-
policy?: ExecutionPolicy;
|
|
20
|
-
};
|
|
21
|
-
export type EndpointIncompleteOutput = {
|
|
22
|
-
delayTime?: number;
|
|
23
|
-
status: string;
|
|
24
|
-
id: string;
|
|
25
|
-
};
|
|
26
|
-
export type EndpointCompletedOutput = {
|
|
27
|
-
status: string;
|
|
28
|
-
id: string;
|
|
29
|
-
output: any;
|
|
30
|
-
executionTime: number;
|
|
31
|
-
delayTime: number;
|
|
32
|
-
};
|
|
33
|
-
export type EndpointOutput = EndpointCompletedOutput | EndpointIncompleteOutput;
|
|
34
|
-
export type EndpointStreamOutput = {
|
|
35
|
-
status: string;
|
|
36
|
-
stream: [any];
|
|
37
|
-
};
|
|
38
|
-
export type CancelOutput = {
|
|
39
|
-
status: string;
|
|
40
|
-
id: string;
|
|
41
|
-
executionTime: number;
|
|
42
|
-
delayTime: number;
|
|
43
|
-
};
|
|
44
|
-
export type HealthCheck = {
|
|
45
|
-
jobs: {
|
|
46
|
-
completed: number;
|
|
47
|
-
failed: number;
|
|
48
|
-
inProgress: number;
|
|
49
|
-
inQueue: number;
|
|
50
|
-
retried: number;
|
|
51
|
-
};
|
|
52
|
-
workers: {
|
|
53
|
-
idle: number;
|
|
54
|
-
initializing: number;
|
|
55
|
-
ready: number;
|
|
56
|
-
running: number;
|
|
57
|
-
throttled: number;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export type PurgeQueueOutput = {
|
|
61
|
-
removed: number;
|
|
62
|
-
status: string;
|
|
63
|
-
};
|
|
64
|
-
export type SdkOptions = {
|
|
65
|
-
baseUrl?: string;
|
|
66
|
-
graphqlUrl?: string;
|
|
67
|
-
timeout?: number;
|
|
68
|
-
retries?: number;
|
|
69
|
-
};
|
|
70
|
-
export declare const runpodServerlessBaseUrlProd = "https://api.runpod.ai/v2";
|
|
71
|
-
export declare const runpodServerlessBaseUrlDev = "https://dev-api.runpod.ai/v2";
|
|
72
|
-
export declare const runSync: import("ts-toolbelt/out/Function/Curry.js").Curry<(baseUrl: string, apiKey: string, endpointId: string, request: EndpointInputPayload, timeout?: number) => Promise<{
|
|
73
|
-
started: boolean;
|
|
74
|
-
completed: boolean;
|
|
75
|
-
delayTime?: number | undefined;
|
|
76
|
-
status: string;
|
|
77
|
-
id: string;
|
|
78
|
-
} | {
|
|
79
|
-
started: boolean;
|
|
80
|
-
completed: boolean;
|
|
81
|
-
status: string;
|
|
82
|
-
id: string;
|
|
83
|
-
output: any;
|
|
84
|
-
executionTime: number;
|
|
85
|
-
delayTime: number;
|
|
86
|
-
} | {
|
|
87
|
-
started: boolean;
|
|
88
|
-
completed: boolean;
|
|
89
|
-
succeeded: boolean;
|
|
90
|
-
delayTime?: number | undefined;
|
|
91
|
-
status: string;
|
|
92
|
-
id: string;
|
|
93
|
-
} | {
|
|
94
|
-
started: boolean;
|
|
95
|
-
completed: boolean;
|
|
96
|
-
succeeded: boolean;
|
|
97
|
-
status: string;
|
|
98
|
-
id: string;
|
|
99
|
-
output: any;
|
|
100
|
-
executionTime: number;
|
|
101
|
-
delayTime: number;
|
|
102
|
-
}>>;
|
|
103
|
-
export declare const run: import("ts-toolbelt/out/Function/Curry.js").Curry<(baseUrl: string, apiKey: string, endpointId: string, request: EndpointInputPayload, timeout?: number) => Promise<any>>;
|
|
104
|
-
export declare const status: import("ts-toolbelt/out/Function/Curry.js").Curry<(baseUrl: string, apiKey: string, endpointId: string, requestId: string, timeout?: number) => Promise<any>>;
|
|
105
|
-
export declare function stream(baseUrl: string, apiKey: string, endpointId: string, requestId: string, timeout?: number): AsyncGenerator<any, void, unknown>;
|
|
106
|
-
export declare const health: import("ts-toolbelt/out/Function/Curry.js").Curry<(baseUrl: string, apiKey: string, endpointId: string, timeout?: number) => Promise<any>>;
|
|
107
|
-
export declare const purgeQueue: import("ts-toolbelt/out/Function/Curry.js").Curry<(baseUrl: string, apiKey: string, endpointId: string, timeout?: number) => Promise<any>>;
|
|
108
|
-
declare class Endpoint {
|
|
109
|
-
endpointId: string;
|
|
110
|
-
baseUrl: string;
|
|
111
|
-
private apiKey;
|
|
112
|
-
constructor(baseUrl: string, apiKey: string, endpointId: string);
|
|
113
|
-
runSync(request: EndpointInputPayload, timeout?: number): Promise<EndpointCompletedOutput>;
|
|
114
|
-
run(request: EndpointInputPayload, timeout?: number): Promise<EndpointIncompleteOutput>;
|
|
115
|
-
status(requestId: string, timeout?: number): Promise<EndpointOutput>;
|
|
116
|
-
statusSync(requestId: string, timeout?: number): Promise<EndpointOutput>;
|
|
117
|
-
stream(requestId: string, timeout?: number): AsyncGenerator<any>;
|
|
118
|
-
cancel(requestId: string, timeout?: number): Promise<CancelOutput>;
|
|
119
|
-
health(timeout?: number): Promise<HealthCheck>;
|
|
120
|
-
purgeQueue(timeout?: number): Promise<PurgeQueueOutput>;
|
|
121
|
-
}
|
|
122
|
-
declare class RunpodSdk {
|
|
123
|
-
private apiKey;
|
|
124
|
-
private options;
|
|
125
|
-
private graphqlClient;
|
|
126
|
-
private _pods?;
|
|
127
|
-
constructor(apiKey: string, options?: SdkOptions);
|
|
128
|
-
/**
|
|
129
|
-
* Get serverless endpoint instance (existing functionality)
|
|
130
|
-
*/
|
|
131
|
-
endpoint(endpointId: string): Endpoint | null;
|
|
132
|
-
/**
|
|
133
|
-
* Pod management API
|
|
134
|
-
*/
|
|
135
|
-
get pods(): PodManager;
|
|
136
|
-
/**
|
|
137
|
-
* Get current user profile and usage information
|
|
138
|
-
*/
|
|
139
|
-
getProfile(): Promise<{
|
|
140
|
-
id?: string | null | undefined;
|
|
141
|
-
email?: string | null | undefined;
|
|
142
|
-
machineQuota?: number | null | undefined;
|
|
143
|
-
currentSpendPerHr?: number | null | undefined;
|
|
144
|
-
spendLimit?: number | null | undefined;
|
|
145
|
-
referralEarned?: number | null | undefined;
|
|
146
|
-
} | null | undefined>;
|
|
147
|
-
/**
|
|
148
|
-
* List available GPU types
|
|
149
|
-
*/
|
|
150
|
-
listGpuTypes(): Promise<{
|
|
151
|
-
id: string;
|
|
152
|
-
displayName: string;
|
|
153
|
-
memoryInGb: number;
|
|
154
|
-
secureCloud: boolean;
|
|
155
|
-
communityCloud: boolean;
|
|
156
|
-
}[]>;
|
|
157
|
-
/**
|
|
158
|
-
* Update API key for both REST and GraphQL clients
|
|
159
|
-
*/
|
|
160
|
-
updateApiKey(apiKey: string): void;
|
|
161
|
-
/**
|
|
162
|
-
* Switch between production and development environments
|
|
163
|
-
*/
|
|
164
|
-
setEnvironment(env: 'production' | 'development'): void;
|
|
165
|
-
}
|
|
166
|
-
declare const _default: (apiKey: string, options?: SdkOptions) => RunpodSdk;
|
|
167
|
-
export default _default;
|
|
168
|
-
export { RunpodSdk, PodManager };
|
|
169
|
-
export type { Pod, PodConfig, PodFilters, GpuType, GpuTypeId } from './pods/index.js';
|
|
170
|
-
export { GpuTypes, getGpuDisplayName } from './pods/index.js';
|
package/dist/src/index.js
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import xior from "xior";
|
|
2
|
-
import { curry, clamp, isNil } from "ramda";
|
|
3
|
-
import { createRequire } from 'module';
|
|
4
|
-
import { RunPodGraphQLClient } from './graphql/client.js';
|
|
5
|
-
import { PodManager } from './pods/index.js';
|
|
6
|
-
import { getSdk } from './graphql/generated/index.js';
|
|
7
|
-
const require = createRequire(import.meta.url);
|
|
8
|
-
const pkg = require('../package.json');
|
|
9
|
-
const axios = xior.create();
|
|
10
|
-
function getUserAgent() {
|
|
11
|
-
const sdkVersion = pkg.version;
|
|
12
|
-
let environmentInfo = 'Unknown Environment';
|
|
13
|
-
if (typeof window !== 'undefined' && window.navigator) {
|
|
14
|
-
environmentInfo = `Browser/${window.navigator.userAgent}`;
|
|
15
|
-
}
|
|
16
|
-
return `RunPod-JS-SDK/${sdkVersion} (${environmentInfo})`;
|
|
17
|
-
}
|
|
18
|
-
const getAuthHeader = (apiKey) => ({
|
|
19
|
-
headers: {
|
|
20
|
-
"Authorization": `Bearer ${apiKey}`,
|
|
21
|
-
"content-type": "application/json",
|
|
22
|
-
"User-Agent": getUserAgent()
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
const print = console.log;
|
|
26
|
-
const handleErrors = async (axiosRequest) => {
|
|
27
|
-
const resp = await axiosRequest;
|
|
28
|
-
const { status, statusText } = resp;
|
|
29
|
-
if (status !== 200) {
|
|
30
|
-
return { status, statusText };
|
|
31
|
-
}
|
|
32
|
-
return resp.data;
|
|
33
|
-
};
|
|
34
|
-
const handleErrorsStatus = async (axiosRequest) => {
|
|
35
|
-
const resp = await axiosRequest;
|
|
36
|
-
const { status, statusText } = resp;
|
|
37
|
-
if (status !== 200) {
|
|
38
|
-
return { status, statusText, started: false };
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
...resp.data,
|
|
42
|
-
started: true,
|
|
43
|
-
completed: isCompleted(resp.data.status),
|
|
44
|
-
succeeded: resp.data.status === "COMPLETED",
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
export const runpodServerlessBaseUrlProd = "https://api.runpod.ai/v2";
|
|
48
|
-
export const runpodServerlessBaseUrlDev = "https://dev-api.runpod.ai/v2";
|
|
49
|
-
const getEndpointUrl = curry((baseUrl, endpointId) => `${baseUrl}/${endpointId}`);
|
|
50
|
-
const isCompleted = (status) => ["COMPLETED", "FAILED", "CANCELLED", "TIMED_OUT"].includes(status);
|
|
51
|
-
//run and then poll status
|
|
52
|
-
export const runSync = curry(async (baseUrl, apiKey, endpointId, request, timeout = 90000) => {
|
|
53
|
-
const startTime = Date.now();
|
|
54
|
-
const getRemainingTime = () => clamp(1000, 90000, timeout - (Date.now() - startTime));
|
|
55
|
-
const runResp = await runsync(baseUrl, apiKey, endpointId, request, timeout);
|
|
56
|
-
let data = { ...runResp };
|
|
57
|
-
const { id } = data;
|
|
58
|
-
const start = Date.now();
|
|
59
|
-
while (!isCompleted(data.status)) {
|
|
60
|
-
if (Date.now() - start > timeout) {
|
|
61
|
-
print(`${id} timed out after ${timeout / 1000} seconds`);
|
|
62
|
-
return { ...data, started: true, completed: false };
|
|
63
|
-
}
|
|
64
|
-
data = await statusSync(baseUrl, apiKey, endpointId, id, getRemainingTime());
|
|
65
|
-
print(`${id}: ${data.status}`);
|
|
66
|
-
}
|
|
67
|
-
return { ...data, started: true, completed: true, succeeded: data.status === "COMPLETED" };
|
|
68
|
-
});
|
|
69
|
-
//wrapper over /status-sync
|
|
70
|
-
const statusSync = curry((baseUrl, apiKey, endpointId, requestId, timeout = 90000) => {
|
|
71
|
-
const wait = clamp(1000, 90000, timeout);
|
|
72
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/status-sync/" + requestId + `?wait=${wait}`;
|
|
73
|
-
const authHeader = getAuthHeader(apiKey);
|
|
74
|
-
return handleErrorsStatus(axios.get(url, { ...authHeader }));
|
|
75
|
-
});
|
|
76
|
-
//wrapper over /runsync
|
|
77
|
-
const runsync = curry((baseUrl, apiKey, endpointId, request, timeout = 90000) => {
|
|
78
|
-
const wait = clamp(1000, 90000, timeout);
|
|
79
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/runsync" + `?wait=${wait}`;
|
|
80
|
-
const authHeader = getAuthHeader(apiKey);
|
|
81
|
-
return handleErrorsStatus(axios.post(url, request, { ...authHeader }));
|
|
82
|
-
});
|
|
83
|
-
//wrapper over /run
|
|
84
|
-
export const run = curry((baseUrl, apiKey, endpointId, request, timeout = 3000) => {
|
|
85
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/run";
|
|
86
|
-
const authHeader = getAuthHeader(apiKey);
|
|
87
|
-
return handleErrors(axios.post(url, request, { ...authHeader, timeout }));
|
|
88
|
-
});
|
|
89
|
-
//wrapper over /status
|
|
90
|
-
export const status = curry((baseUrl, apiKey, endpointId, requestId, timeout = 3000) => {
|
|
91
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/status/" + requestId;
|
|
92
|
-
const authHeader = getAuthHeader(apiKey);
|
|
93
|
-
return handleErrorsStatus(axios.get(url, { ...authHeader, timeout }));
|
|
94
|
-
});
|
|
95
|
-
//generator yielding results of stream
|
|
96
|
-
export async function* stream(baseUrl, apiKey, endpointId, requestId, timeout = 0) {
|
|
97
|
-
let completed = false;
|
|
98
|
-
const start = Date.now();
|
|
99
|
-
while (!completed) {
|
|
100
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/stream/" + requestId;
|
|
101
|
-
const authHeader = getAuthHeader(apiKey);
|
|
102
|
-
const resp = await handleErrors(axios.get(url, authHeader));
|
|
103
|
-
if (timeout !== 0 && Date.now() - start > timeout) {
|
|
104
|
-
print(`stream timed out after ${timeout / 1000} seconds`);
|
|
105
|
-
completed = true;
|
|
106
|
-
}
|
|
107
|
-
if (isCompleted(resp.status)) {
|
|
108
|
-
completed = true;
|
|
109
|
-
}
|
|
110
|
-
for (const output of resp?.stream) {
|
|
111
|
-
yield output;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
//wrapper over /cancel
|
|
116
|
-
const cancel = curry((baseUrl, apiKey, endpointId, requestId, timeout = 3000) => {
|
|
117
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/cancel/" + requestId;
|
|
118
|
-
const authHeader = getAuthHeader(apiKey);
|
|
119
|
-
return handleErrors(axios.post(url, {}, { ...authHeader, timeout }));
|
|
120
|
-
});
|
|
121
|
-
//wrapper over /health
|
|
122
|
-
export const health = curry((baseUrl, apiKey, endpointId, timeout = 3000) => {
|
|
123
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/health";
|
|
124
|
-
const authHeader = getAuthHeader(apiKey);
|
|
125
|
-
return handleErrors(axios.get(url, { ...authHeader, timeout }));
|
|
126
|
-
});
|
|
127
|
-
//wrapper over /purge-queue
|
|
128
|
-
export const purgeQueue = curry((baseUrl, apiKey, endpointId, timeout = 3000) => {
|
|
129
|
-
const url = getEndpointUrl(baseUrl, endpointId) + "/purge-queue";
|
|
130
|
-
const authHeader = getAuthHeader(apiKey);
|
|
131
|
-
return handleErrors(axios.post(url, {}, { ...authHeader, timeout }));
|
|
132
|
-
});
|
|
133
|
-
class Endpoint {
|
|
134
|
-
constructor(baseUrl, apiKey, endpointId) {
|
|
135
|
-
this.endpointId = "";
|
|
136
|
-
this.baseUrl = runpodServerlessBaseUrlProd;
|
|
137
|
-
this.apiKey = "";
|
|
138
|
-
this.baseUrl = baseUrl;
|
|
139
|
-
this.apiKey = apiKey;
|
|
140
|
-
this.endpointId = endpointId;
|
|
141
|
-
}
|
|
142
|
-
async runSync(request, timeout = 90000) {
|
|
143
|
-
return runSync(this.baseUrl, this.apiKey, this.endpointId, request, timeout);
|
|
144
|
-
}
|
|
145
|
-
async run(request, timeout = 3000) {
|
|
146
|
-
return run(this.baseUrl, this.apiKey, this.endpointId, request, timeout);
|
|
147
|
-
}
|
|
148
|
-
async status(requestId, timeout = 3000) {
|
|
149
|
-
return status(this.baseUrl, this.apiKey, this.endpointId, requestId, timeout);
|
|
150
|
-
}
|
|
151
|
-
async statusSync(requestId, timeout = 90000) {
|
|
152
|
-
return statusSync(this.baseUrl, this.apiKey, this.endpointId, requestId, timeout);
|
|
153
|
-
}
|
|
154
|
-
//default to no timeout
|
|
155
|
-
stream(requestId, timeout = 0) {
|
|
156
|
-
return stream(this.baseUrl, this.apiKey, this.endpointId, requestId, timeout);
|
|
157
|
-
}
|
|
158
|
-
async cancel(requestId, timeout = 3000) {
|
|
159
|
-
return cancel(this.baseUrl, this.apiKey, this.endpointId, requestId, timeout);
|
|
160
|
-
}
|
|
161
|
-
async health(timeout = 3000) {
|
|
162
|
-
return health(this.baseUrl, this.apiKey, this.endpointId, timeout);
|
|
163
|
-
}
|
|
164
|
-
async purgeQueue(timeout = 3000) {
|
|
165
|
-
return purgeQueue(this.baseUrl, this.apiKey, this.endpointId, timeout);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
const defaultSdkOptions = {
|
|
169
|
-
baseUrl: runpodServerlessBaseUrlProd,
|
|
170
|
-
graphqlUrl: 'https://api.runpod.io/graphql',
|
|
171
|
-
timeout: 30000,
|
|
172
|
-
retries: 3,
|
|
173
|
-
};
|
|
174
|
-
class RunpodSdk {
|
|
175
|
-
constructor(apiKey, options = {}) {
|
|
176
|
-
if (isNil(apiKey)) {
|
|
177
|
-
print("Api key not supplied");
|
|
178
|
-
throw new Error("API key is required");
|
|
179
|
-
}
|
|
180
|
-
this.apiKey = apiKey;
|
|
181
|
-
this.options = { ...defaultSdkOptions, ...options };
|
|
182
|
-
// Initialize GraphQL client
|
|
183
|
-
this.graphqlClient = new RunPodGraphQLClient({
|
|
184
|
-
apiKey: this.apiKey,
|
|
185
|
-
baseUrl: this.options.graphqlUrl,
|
|
186
|
-
timeout: this.options.timeout,
|
|
187
|
-
retries: this.options.retries
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Get serverless endpoint instance (existing functionality)
|
|
192
|
-
*/
|
|
193
|
-
endpoint(endpointId) {
|
|
194
|
-
if (isNil(endpointId)) {
|
|
195
|
-
print("Endpoint id not supplied");
|
|
196
|
-
return null;
|
|
197
|
-
}
|
|
198
|
-
return new Endpoint(this.options.baseUrl, this.apiKey, endpointId);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Pod management API
|
|
202
|
-
*/
|
|
203
|
-
get pods() {
|
|
204
|
-
if (!this._pods) {
|
|
205
|
-
this._pods = new PodManager(this.graphqlClient);
|
|
206
|
-
}
|
|
207
|
-
return this._pods;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Get current user profile and usage information
|
|
211
|
-
*/
|
|
212
|
-
async getProfile() {
|
|
213
|
-
const sdk = getSdk(this.graphqlClient.graphqlClient);
|
|
214
|
-
const result = await sdk.GetMyProfile();
|
|
215
|
-
return result.myself;
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* List available GPU types
|
|
219
|
-
*/
|
|
220
|
-
async listGpuTypes() {
|
|
221
|
-
const sdk = getSdk(this.graphqlClient.graphqlClient);
|
|
222
|
-
const result = await sdk.ListGpuTypes();
|
|
223
|
-
return result.gpuTypes || [];
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Update API key for both REST and GraphQL clients
|
|
227
|
-
*/
|
|
228
|
-
updateApiKey(apiKey) {
|
|
229
|
-
this.apiKey = apiKey;
|
|
230
|
-
this.graphqlClient.updateApiKey(apiKey);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Switch between production and development environments
|
|
234
|
-
*/
|
|
235
|
-
setEnvironment(env) {
|
|
236
|
-
if (env === 'development') {
|
|
237
|
-
this.options.baseUrl = runpodServerlessBaseUrlDev;
|
|
238
|
-
this.options.graphqlUrl = 'https://api.runpod.dev/graphql';
|
|
239
|
-
}
|
|
240
|
-
else {
|
|
241
|
-
this.options.baseUrl = runpodServerlessBaseUrlProd;
|
|
242
|
-
this.options.graphqlUrl = 'https://api.runpod.io/graphql';
|
|
243
|
-
}
|
|
244
|
-
// Update GraphQL client endpoint
|
|
245
|
-
this.graphqlClient.setEndpoint(this.options.graphqlUrl);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
export default (apiKey, options = {}) => new RunpodSdk(apiKey, options);
|
|
249
|
-
// Named exports for convenience
|
|
250
|
-
export { RunpodSdk, PodManager };
|
|
251
|
-
export { GpuTypes, getGpuDisplayName } from './pods/index.js';
|
|
252
|
-
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index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