@blaxel/core 0.2.49-preview.109 → 0.2.49-preview.111
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/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/client/responseInterceptor.js +53 -0
- package/dist/cjs/client/sdk.gen.js +143 -3
- package/dist/cjs/common/autoload.js +7 -0
- package/dist/cjs/common/settings.js +2 -2
- package/dist/cjs/types/client/responseInterceptor.d.ts +12 -0
- package/dist/cjs/types/client/sdk.gen.d.ts +41 -1
- package/dist/cjs/types/client/types.gen.d.ts +599 -16
- package/dist/cjs-browser/.tsbuildinfo +1 -1
- package/dist/cjs-browser/client/responseInterceptor.js +53 -0
- package/dist/cjs-browser/client/sdk.gen.js +143 -3
- package/dist/cjs-browser/common/autoload.js +7 -0
- package/dist/cjs-browser/common/settings.js +2 -2
- package/dist/cjs-browser/types/client/responseInterceptor.d.ts +12 -0
- package/dist/cjs-browser/types/client/sdk.gen.d.ts +41 -1
- package/dist/cjs-browser/types/client/types.gen.d.ts +599 -16
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/client/responseInterceptor.js +49 -0
- package/dist/esm/client/sdk.gen.js +132 -0
- package/dist/esm/common/autoload.js +7 -0
- package/dist/esm/common/settings.js +2 -2
- package/dist/esm-browser/.tsbuildinfo +1 -1
- package/dist/esm-browser/client/responseInterceptor.js +49 -0
- package/dist/esm-browser/client/sdk.gen.js +132 -0
- package/dist/esm-browser/common/autoload.js +7 -0
- package/dist/esm-browser/common/settings.js +2 -2
- package/package.json +2 -2
|
@@ -310,6 +310,70 @@ export const listFunctionRevisions = (options) => {
|
|
|
310
310
|
...options
|
|
311
311
|
});
|
|
312
312
|
};
|
|
313
|
+
/**
|
|
314
|
+
* List images
|
|
315
|
+
* Returns a list of all images in the workspace grouped by repository with tags.
|
|
316
|
+
*/
|
|
317
|
+
export const listImages = (options) => {
|
|
318
|
+
return (options?.client ?? _heyApiClient).get({
|
|
319
|
+
security: [
|
|
320
|
+
{
|
|
321
|
+
scheme: 'bearer',
|
|
322
|
+
type: 'http'
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
url: '/images',
|
|
326
|
+
...options
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* Delete image by name
|
|
331
|
+
* Deletes an image by name.
|
|
332
|
+
*/
|
|
333
|
+
export const deleteImage = (options) => {
|
|
334
|
+
return (options.client ?? _heyApiClient).delete({
|
|
335
|
+
security: [
|
|
336
|
+
{
|
|
337
|
+
scheme: 'bearer',
|
|
338
|
+
type: 'http'
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
url: '/images/{resourceType}/{imageName}',
|
|
342
|
+
...options
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Get image by name
|
|
347
|
+
* Returns an image by name.
|
|
348
|
+
*/
|
|
349
|
+
export const getImage = (options) => {
|
|
350
|
+
return (options.client ?? _heyApiClient).get({
|
|
351
|
+
security: [
|
|
352
|
+
{
|
|
353
|
+
scheme: 'bearer',
|
|
354
|
+
type: 'http'
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
url: '/images/{resourceType}/{imageName}',
|
|
358
|
+
...options
|
|
359
|
+
});
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Delete image tag
|
|
363
|
+
* Deletes a specific tag from an image.
|
|
364
|
+
*/
|
|
365
|
+
export const deleteImageTag = (options) => {
|
|
366
|
+
return (options.client ?? _heyApiClient).delete({
|
|
367
|
+
security: [
|
|
368
|
+
{
|
|
369
|
+
scheme: 'bearer',
|
|
370
|
+
type: 'http'
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
url: '/images/{resourceType}/{imageName}/tags/{tagName}',
|
|
374
|
+
...options
|
|
375
|
+
});
|
|
376
|
+
};
|
|
313
377
|
/**
|
|
314
378
|
* List integrations connections
|
|
315
379
|
* Returns integration information by name.
|
|
@@ -550,6 +614,74 @@ export const updateJob = (options) => {
|
|
|
550
614
|
}
|
|
551
615
|
});
|
|
552
616
|
};
|
|
617
|
+
/**
|
|
618
|
+
* List job executions
|
|
619
|
+
* Returns a list of all executions for a job by name.
|
|
620
|
+
*/
|
|
621
|
+
export const listJobExecutions = (options) => {
|
|
622
|
+
return (options.client ?? _heyApiClient).get({
|
|
623
|
+
security: [
|
|
624
|
+
{
|
|
625
|
+
scheme: 'bearer',
|
|
626
|
+
type: 'http'
|
|
627
|
+
}
|
|
628
|
+
],
|
|
629
|
+
url: '/jobs/{jobId}/executions',
|
|
630
|
+
...options
|
|
631
|
+
});
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* Create job execution
|
|
635
|
+
* Creates a new execution for a job by name.
|
|
636
|
+
*/
|
|
637
|
+
export const createJobExecution = (options) => {
|
|
638
|
+
return (options.client ?? _heyApiClient).post({
|
|
639
|
+
security: [
|
|
640
|
+
{
|
|
641
|
+
scheme: 'bearer',
|
|
642
|
+
type: 'http'
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
url: '/jobs/{jobId}/executions',
|
|
646
|
+
...options,
|
|
647
|
+
headers: {
|
|
648
|
+
'Content-Type': 'application/json',
|
|
649
|
+
...options?.headers
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
};
|
|
653
|
+
/**
|
|
654
|
+
* Delete job execution
|
|
655
|
+
* Stop an execution for a job by name.
|
|
656
|
+
*/
|
|
657
|
+
export const deleteJobExecution = (options) => {
|
|
658
|
+
return (options.client ?? _heyApiClient).delete({
|
|
659
|
+
security: [
|
|
660
|
+
{
|
|
661
|
+
scheme: 'bearer',
|
|
662
|
+
type: 'http'
|
|
663
|
+
}
|
|
664
|
+
],
|
|
665
|
+
url: '/jobs/{jobId}/executions/{executionId}',
|
|
666
|
+
...options
|
|
667
|
+
});
|
|
668
|
+
};
|
|
669
|
+
/**
|
|
670
|
+
* Get job execution
|
|
671
|
+
* Returns an execution for a job by name.
|
|
672
|
+
*/
|
|
673
|
+
export const getJobExecution = (options) => {
|
|
674
|
+
return (options.client ?? _heyApiClient).get({
|
|
675
|
+
security: [
|
|
676
|
+
{
|
|
677
|
+
scheme: 'bearer',
|
|
678
|
+
type: 'http'
|
|
679
|
+
}
|
|
680
|
+
],
|
|
681
|
+
url: '/jobs/{jobId}/executions/{executionId}',
|
|
682
|
+
...options
|
|
683
|
+
});
|
|
684
|
+
};
|
|
553
685
|
/**
|
|
554
686
|
* List job revisions
|
|
555
687
|
* Returns revisions for a job by name.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { client } from "../client/client.gen.js";
|
|
2
2
|
import { interceptors } from "../client/interceptors.js";
|
|
3
|
+
import { responseInterceptors } from "../client/responseInterceptor.js";
|
|
3
4
|
import { client as clientSandbox } from "../sandbox/client/client.gen.js";
|
|
4
5
|
import { settings } from "./settings.js";
|
|
5
6
|
client.setConfig({
|
|
6
7
|
baseUrl: settings.baseUrl,
|
|
7
8
|
});
|
|
9
|
+
// Register request interceptors
|
|
8
10
|
for (const interceptor of interceptors) {
|
|
9
11
|
// @ts-expect-error - Interceptor is not typed
|
|
10
12
|
client.interceptors.request.use(interceptor);
|
|
11
13
|
// @ts-expect-error - Interceptor is not typed
|
|
12
14
|
clientSandbox.interceptors.request.use(interceptor);
|
|
13
15
|
}
|
|
16
|
+
// Register response interceptors for authentication error handling
|
|
17
|
+
for (const interceptor of responseInterceptors) {
|
|
18
|
+
client.interceptors.response.use(interceptor);
|
|
19
|
+
clientSandbox.interceptors.response.use(interceptor);
|
|
20
|
+
}
|
|
14
21
|
// Allow to set custom configuration for browser environment
|
|
15
22
|
export function initialize(config) {
|
|
16
23
|
settings.setConfig(config);
|
|
@@ -7,7 +7,7 @@ function getPackageVersion() {
|
|
|
7
7
|
if (typeof require !== "undefined") {
|
|
8
8
|
// Try to require package.json (Node.js only, gracefully fails in browser)
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
10
|
-
const packageJson = {"version":"0.2.49-preview.
|
|
10
|
+
const packageJson = {"version":"0.2.49-preview.111","commit":"26ddeed4df5d6c810926b377dfe1a52bbea62022"};
|
|
11
11
|
return packageJson.version || "unknown";
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
@@ -59,7 +59,7 @@ function getCommitHash() {
|
|
|
59
59
|
if (typeof require !== "undefined") {
|
|
60
60
|
// Try to require package.json and look for commit field (set during build)
|
|
61
61
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
62
|
-
const packageJson = {"version":"0.2.49-preview.
|
|
62
|
+
const packageJson = {"version":"0.2.49-preview.111","commit":"26ddeed4df5d6c810926b377dfe1a52bbea62022"};
|
|
63
63
|
// Check for commit in various possible locations
|
|
64
64
|
const commit = packageJson.commit || packageJson.buildInfo?.commit;
|
|
65
65
|
if (commit) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaxel/core",
|
|
3
|
-
"version": "0.2.49-preview.
|
|
3
|
+
"version": "0.2.49-preview.111",
|
|
4
4
|
"description": "Blaxel Core SDK for TypeScript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Blaxel, INC (https://blaxel.ai)",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"vite": "^5.2.0",
|
|
75
75
|
"vitest": "^1.5.0"
|
|
76
76
|
},
|
|
77
|
-
"commit": "
|
|
77
|
+
"commit": "26ddeed4df5d6c810926b377dfe1a52bbea62022",
|
|
78
78
|
"scripts": {
|
|
79
79
|
"lint": "eslint src/",
|
|
80
80
|
"dev": "tsc --watch",
|