@aignostics/sdk 3.8.0 → 3.9.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/dist/index.cjs +27 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +37 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ axios = require_rolldown_runtime.__toESM(axios, 1);
|
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
zod = require_rolldown_runtime.__toESM(zod, 1);
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "3.
|
|
11
|
+
var version = "3.9.0";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/generated/base.ts
|
|
14
14
|
const BASE_PATH = "/api".replace(/\/+$/, "");
|
|
@@ -2912,6 +2912,8 @@ var PlatformSDKHttp = class {
|
|
|
2912
2912
|
* its current status, progress, metadata, and execution information.
|
|
2913
2913
|
*
|
|
2914
2914
|
* @param applicationRunId - The unique identifier of the application run
|
|
2915
|
+
* @param options - Optional request options
|
|
2916
|
+
* @param options.shareToken - Share token granting access to a run shared by link
|
|
2915
2917
|
* @returns A promise that resolves to the run details object
|
|
2916
2918
|
* @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
|
|
2917
2919
|
*
|
|
@@ -2930,10 +2932,13 @@ var PlatformSDKHttp = class {
|
|
|
2930
2932
|
* }
|
|
2931
2933
|
* ```
|
|
2932
2934
|
*/
|
|
2933
|
-
async getRun(applicationRunId) {
|
|
2935
|
+
async getRun(applicationRunId, { shareToken } = {}) {
|
|
2934
2936
|
const client = await this.#getClient();
|
|
2935
2937
|
try {
|
|
2936
|
-
return (await client.getRunV1RunsRunIdGet({
|
|
2938
|
+
return (await client.getRunV1RunsRunIdGet({
|
|
2939
|
+
runId: applicationRunId,
|
|
2940
|
+
shareToken
|
|
2941
|
+
})).data;
|
|
2937
2942
|
} catch (error) {
|
|
2938
2943
|
handleRequestError(error);
|
|
2939
2944
|
}
|
|
@@ -2981,6 +2986,8 @@ var PlatformSDKHttp = class {
|
|
|
2981
2986
|
* artifacts from the AI model execution.
|
|
2982
2987
|
*
|
|
2983
2988
|
* @param applicationRunId - The unique identifier of the application run
|
|
2989
|
+
* @param options - Optional pagination, sorting and filtering options
|
|
2990
|
+
* @param options.shareToken - Share token granting access to a run shared by link
|
|
2984
2991
|
* @returns A promise that resolves to an array of result items
|
|
2985
2992
|
* @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
|
|
2986
2993
|
*
|
|
@@ -3003,11 +3010,12 @@ var PlatformSDKHttp = class {
|
|
|
3003
3010
|
* }
|
|
3004
3011
|
* ```
|
|
3005
3012
|
*/
|
|
3006
|
-
async listRunResults(applicationRunId, { page, pageSize, sort, externalIdIn, state, terminationReason } = {}) {
|
|
3013
|
+
async listRunResults(applicationRunId, { page, pageSize, sort, externalIdIn, state, terminationReason, shareToken } = {}) {
|
|
3007
3014
|
const client = await this.#getClient();
|
|
3008
3015
|
try {
|
|
3009
3016
|
return (await client.listRunItemsV1RunsRunIdItemsGet({
|
|
3010
3017
|
runId: applicationRunId,
|
|
3018
|
+
shareToken,
|
|
3011
3019
|
page,
|
|
3012
3020
|
pageSize,
|
|
3013
3021
|
sort,
|
|
@@ -3027,6 +3035,8 @@ var PlatformSDKHttp = class {
|
|
|
3027
3035
|
*
|
|
3028
3036
|
* @param applicationRunId - The unique identifier of the application run
|
|
3029
3037
|
* @param externalId - The external ID of the item, as supplied when creating the run
|
|
3038
|
+
* @param options - Optional request options
|
|
3039
|
+
* @param options.shareToken - Share token granting access to a run shared by link
|
|
3030
3040
|
* @returns A promise that resolves to the enriched run item
|
|
3031
3041
|
* @throws {AuthenticationError} If no valid authentication token is available
|
|
3032
3042
|
* @throws {APIError} If the request fails (e.g., 404 if the item doesn't exist)
|
|
@@ -3043,12 +3053,13 @@ var PlatformSDKHttp = class {
|
|
|
3043
3053
|
* }
|
|
3044
3054
|
* ```
|
|
3045
3055
|
*/
|
|
3046
|
-
async getRunItem(applicationRunId, externalId) {
|
|
3056
|
+
async getRunItem(applicationRunId, externalId, { shareToken } = {}) {
|
|
3047
3057
|
const client = await this.#getClient();
|
|
3048
3058
|
try {
|
|
3049
3059
|
return (await client.getItemByRunV1RunsRunIdItemsExternalIdGet({
|
|
3050
3060
|
runId: applicationRunId,
|
|
3051
|
-
externalId
|
|
3061
|
+
externalId,
|
|
3062
|
+
shareToken
|
|
3052
3063
|
})).data;
|
|
3053
3064
|
} catch (error) {
|
|
3054
3065
|
handleRequestError(error);
|
|
@@ -3219,6 +3230,8 @@ var PlatformSDKHttp = class {
|
|
|
3219
3230
|
*
|
|
3220
3231
|
* @param runId - The unique identifier of the application run
|
|
3221
3232
|
* @param artifactId - The unique identifier of the artifact to download
|
|
3233
|
+
* @param options - Optional request options
|
|
3234
|
+
* @param options.shareToken - Share token granting access to a run shared by link
|
|
3222
3235
|
* @returns A promise that resolves to an ArrayBuffer containing the artifact's binary content
|
|
3223
3236
|
* @throws {AuthenticationError} If no valid authentication token is available
|
|
3224
3237
|
* @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
|
|
@@ -3239,12 +3252,13 @@ var PlatformSDKHttp = class {
|
|
|
3239
3252
|
* }
|
|
3240
3253
|
* ```
|
|
3241
3254
|
*/
|
|
3242
|
-
async downloadArtifact(runId, artifactId) {
|
|
3255
|
+
async downloadArtifact(runId, artifactId, { shareToken } = {}) {
|
|
3243
3256
|
const client = await this.#getClient();
|
|
3244
3257
|
try {
|
|
3245
3258
|
return (await downloadWithRetry(() => client.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet({
|
|
3246
3259
|
runId,
|
|
3247
|
-
artifactId
|
|
3260
|
+
artifactId,
|
|
3261
|
+
shareToken
|
|
3248
3262
|
}, { responseType: "arraybuffer" }), [
|
|
3249
3263
|
403,
|
|
3250
3264
|
404,
|
|
@@ -3268,6 +3282,8 @@ var PlatformSDKHttp = class {
|
|
|
3268
3282
|
*
|
|
3269
3283
|
* @param runId - The unique identifier of the application run
|
|
3270
3284
|
* @param artifactId - The unique identifier of the artifact to download
|
|
3285
|
+
* @param options - Optional request options
|
|
3286
|
+
* @param options.shareToken - Share token granting access to a run shared by link
|
|
3271
3287
|
* @returns A promise that resolves to a Node.js `Readable` stream yielding the artifact's binary content
|
|
3272
3288
|
* @throws {AuthenticationError} If no valid authentication token is available
|
|
3273
3289
|
* @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
|
|
@@ -3288,12 +3304,13 @@ var PlatformSDKHttp = class {
|
|
|
3288
3304
|
* streaming, a mid-stream connection drop CANNOT be retried by this method — the consumer must
|
|
3289
3305
|
* listen for the stream's `error` event and re-download if needed.
|
|
3290
3306
|
*/
|
|
3291
|
-
async downloadArtifactStream(runId, artifactId) {
|
|
3307
|
+
async downloadArtifactStream(runId, artifactId, { shareToken } = {}) {
|
|
3292
3308
|
const client = await this.#getClient();
|
|
3293
3309
|
try {
|
|
3294
3310
|
return (await downloadWithRetry(() => client.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet({
|
|
3295
3311
|
runId,
|
|
3296
|
-
artifactId
|
|
3312
|
+
artifactId,
|
|
3313
|
+
shareToken
|
|
3297
3314
|
}, { responseType: "stream" }), [
|
|
3298
3315
|
403,
|
|
3299
3316
|
404,
|