@aignostics/sdk 3.8.1 → 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.d.cts CHANGED
@@ -39,7 +39,9 @@ interface PlatformSDK {
39
39
  sort?: string[];
40
40
  }): Promise<RunReadResponse[]>;
41
41
  createApplicationRun(request: RunCreationRequest): Promise<RunCreationResponse>;
42
- getRun(applicationRunId: string): Promise<RunReadResponse>;
42
+ getRun(applicationRunId: string, options?: {
43
+ shareToken?: string;
44
+ }): Promise<RunReadResponse>;
43
45
  cancelApplicationRun(applicationRunId: string): Promise<void>;
44
46
  listRunResults(applicationRunId: string, options?: {
45
47
  page?: number;
@@ -48,14 +50,21 @@ interface PlatformSDK {
48
50
  externalIdIn?: string[];
49
51
  state?: ItemState;
50
52
  terminationReason?: ItemTerminationReason;
53
+ shareToken?: string;
51
54
  }): Promise<ItemResultReadResponse[]>;
52
- getRunItem(applicationRunId: string, externalId: string): Promise<ItemResultReadResponse>;
55
+ getRunItem(applicationRunId: string, externalId: string, options?: {
56
+ shareToken?: string;
57
+ }): Promise<ItemResultReadResponse>;
53
58
  updateRunMetadata(applicationRunId: string, customMetadata: Record<string, unknown> | null, customMetadataChecksum?: string | null): Promise<CustomMetadataUpdateResponse>;
54
59
  updateRunItemMetadata(applicationRunId: string, externalId: string, customMetadata: Record<string, unknown> | null, customMetadataChecksum?: string | null): Promise<CustomMetadataUpdateResponse>;
55
60
  deleteRunResults(applicationRunId: string): Promise<void>;
56
61
  getApplicationVersionDetails(applicationId: string, version: string): Promise<VersionReadResponse>;
57
- downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
58
- downloadArtifactStream(runId: string, artifactId: string): Promise<Readable>;
62
+ downloadArtifact(runId: string, artifactId: string, options?: {
63
+ shareToken?: string;
64
+ }): Promise<ArrayBuffer>;
65
+ downloadArtifactStream(runId: string, artifactId: string, options?: {
66
+ shareToken?: string;
67
+ }): Promise<Readable>;
59
68
  createGrant(request: GrantCreateRequest): Promise<GrantReadResponse>;
60
69
  listGrants(options?: {
61
70
  resourceType?: ResourceType;
@@ -293,6 +302,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
293
302
  * its current status, progress, metadata, and execution information.
294
303
  *
295
304
  * @param applicationRunId - The unique identifier of the application run
305
+ * @param options - Optional request options
306
+ * @param options.shareToken - Share token granting access to a run shared by link
296
307
  * @returns A promise that resolves to the run details object
297
308
  * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
298
309
  *
@@ -311,7 +322,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
311
322
  * }
312
323
  * ```
313
324
  */
314
- getRun(applicationRunId: string): Promise<RunReadResponse>;
325
+ getRun(applicationRunId: string, { shareToken }?: {
326
+ shareToken?: string;
327
+ }): Promise<RunReadResponse>;
315
328
  /**
316
329
  * Cancel a running or queued application run
317
330
  *
@@ -348,6 +361,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
348
361
  * artifacts from the AI model execution.
349
362
  *
350
363
  * @param applicationRunId - The unique identifier of the application run
364
+ * @param options - Optional pagination, sorting and filtering options
365
+ * @param options.shareToken - Share token granting access to a run shared by link
351
366
  * @returns A promise that resolves to an array of result items
352
367
  * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
353
368
  *
@@ -370,13 +385,14 @@ declare class PlatformSDKHttp implements PlatformSDK {
370
385
  * }
371
386
  * ```
372
387
  */
373
- listRunResults(applicationRunId: string, { page, pageSize, sort, externalIdIn, state, terminationReason }?: {
388
+ listRunResults(applicationRunId: string, { page, pageSize, sort, externalIdIn, state, terminationReason, shareToken }?: {
374
389
  page?: number;
375
390
  pageSize?: number;
376
391
  sort?: string[];
377
392
  externalIdIn?: string[];
378
393
  state?: ItemState;
379
394
  terminationReason?: ItemTerminationReason;
395
+ shareToken?: string;
380
396
  }): Promise<ItemResultReadResponse[]>;
381
397
  /**
382
398
  * Retrieve a single item from an application run by its external ID
@@ -386,6 +402,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
386
402
  *
387
403
  * @param applicationRunId - The unique identifier of the application run
388
404
  * @param externalId - The external ID of the item, as supplied when creating the run
405
+ * @param options - Optional request options
406
+ * @param options.shareToken - Share token granting access to a run shared by link
389
407
  * @returns A promise that resolves to the enriched run item
390
408
  * @throws {AuthenticationError} If no valid authentication token is available
391
409
  * @throws {APIError} If the request fails (e.g., 404 if the item doesn't exist)
@@ -402,7 +420,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
402
420
  * }
403
421
  * ```
404
422
  */
405
- getRunItem(applicationRunId: string, externalId: string): Promise<ItemResultReadResponse>;
423
+ getRunItem(applicationRunId: string, externalId: string, { shareToken }?: {
424
+ shareToken?: string;
425
+ }): Promise<ItemResultReadResponse>;
406
426
  /**
407
427
  * Set (replace) the custom metadata attached to an application run
408
428
  *
@@ -530,6 +550,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
530
550
  *
531
551
  * @param runId - The unique identifier of the application run
532
552
  * @param artifactId - The unique identifier of the artifact to download
553
+ * @param options - Optional request options
554
+ * @param options.shareToken - Share token granting access to a run shared by link
533
555
  * @returns A promise that resolves to an ArrayBuffer containing the artifact's binary content
534
556
  * @throws {AuthenticationError} If no valid authentication token is available
535
557
  * @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
@@ -550,7 +572,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
550
572
  * }
551
573
  * ```
552
574
  */
553
- downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
575
+ downloadArtifact(runId: string, artifactId: string, { shareToken }?: {
576
+ shareToken?: string;
577
+ }): Promise<ArrayBuffer>;
554
578
  /**
555
579
  * Download an artifact file from a completed application run as a stream
556
580
  *
@@ -564,6 +588,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
564
588
  *
565
589
  * @param runId - The unique identifier of the application run
566
590
  * @param artifactId - The unique identifier of the artifact to download
591
+ * @param options - Optional request options
592
+ * @param options.shareToken - Share token granting access to a run shared by link
567
593
  * @returns A promise that resolves to a Node.js `Readable` stream yielding the artifact's binary content
568
594
  * @throws {AuthenticationError} If no valid authentication token is available
569
595
  * @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
@@ -584,7 +610,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
584
610
  * streaming, a mid-stream connection drop CANNOT be retried by this method — the consumer must
585
611
  * listen for the stream's `error` event and re-download if needed.
586
612
  */
587
- downloadArtifactStream(runId: string, artifactId: string): Promise<Readable>;
613
+ downloadArtifactStream(runId: string, artifactId: string, { shareToken }?: {
614
+ shareToken?: string;
615
+ }): Promise<Readable>;
588
616
  /**
589
617
  * Create a grant to share access to a resource with a subject (user or organization)
590
618
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/platform-sdk.ts","../src/errors.ts","../src/entities/application-run/types.ts","../src/entities/application-run/utils.ts","../src/entities/run-item/types.ts","../src/entities/run-item/utils.ts"],"mappings":";;;;;;;KAqGY,sBAAsB;;;;UAKjB;;;;EAIf;;;;;EAMA,eAAe;;;;EAKf;;UAGe;EACf;EACA,aAAa;EACb,kBAAkB;EAClB,oBAAoB,QAAQ;EAC5B,eAAe,wBAAwB,QAAQ;EAC/C,oBAAoB;IAClB;IACA;IACA;IACA;IACA;IACA;MACE,QAAQ;EACZ,qBAAqB,SAAS,qBAAqB,QAAQ;EAC3D,OAAO,2BAA2B,QAAQ;EAC1C,qBAAqB,2BAA2B;EAChD,eACE,0BACA;IACE;IACA;IACA;IACA;IACA,QAAQ;IACR,oBAAoB;MAErB,QAAQ;EACX,WAAW,0BAA0B,qBAAqB,QAAQ;EAClE,kBACE,0BACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,sBACE,0BACA,oBACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,iBAAiB,2BAA2B;EAC5C,6BACE,uBACA,kBACC,QAAQ;EACX,iBAAiB,eAAe,qBAAqB,QAAQ;EAC7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AAA,iBAAiB,UAAS;;;;;KC/G5B;;;;;;;;;;;iBCUI,eAAe,KAAK;;;;;;;;;;;;;;;;;iBAkCpB,aAAa,KAAK,kBAAkB;;;;;;;;cAsCvC,sBAAuB,KAAK;;;;KClF7B;;;;;;;;;;;cCUC,kBAAmB,MAAM;;cAKzB,2BAAyB;;;;;;;;;;;;;;iBAoBtB,cAAc,MAAM,yBAAyB"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/platform-sdk.ts","../src/errors.ts","../src/entities/application-run/types.ts","../src/entities/application-run/utils.ts","../src/entities/run-item/types.ts","../src/entities/run-item/utils.ts"],"mappings":";;;;;;;KAqGY,sBAAsB;;;;UAKjB;;;;EAIf;;;;;EAMA,eAAe;;;;EAKf;;UAGe;EACf;EACA,aAAa;EACb,kBAAkB;EAClB,oBAAoB,QAAQ;EAC5B,eAAe,wBAAwB,QAAQ;EAC/C,oBAAoB;IAClB;IACA;IACA;IACA;IACA;IACA;MACE,QAAQ;EACZ,qBAAqB,SAAS,qBAAqB,QAAQ;EAC3D,OAAO,0BAA0B;IAAY;MAAwB,QAAQ;EAC7E,qBAAqB,2BAA2B;EAChD,eACE,0BACA;IACE;IACA;IACA;IACA;IACA,QAAQ;IACR,oBAAoB;IACpB;MAED,QAAQ;EACX,WACE,0BACA,oBACA;IAAY;MACX,QAAQ;EACX,kBACE,0BACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,sBACE,0BACA,oBACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,iBAAiB,2BAA2B;EAC5C,6BACE,uBACA,kBACC,QAAQ;EACX,iBACE,eACA,oBACA;IAAY;MACX,QAAQ;EACX,uBACE,eACA,oBACA;IAAY;MACX,QAAQ;EACX,YAAY,SAAS,qBAAqB,QAAQ;EAClD,WAAW;IACT,eAAe;IACf;IACA,cAAc;IACd;IACA,WAAW;IACX;IACA;IACA;IACA;MACE,QAAQ;EACZ,SAAS,kBAAkB,QAAQ;EACnC,YAAY,kBAAkB,Q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;;;KClF7B;;;;;;;;;;;cCUC,kBAAmB,MAAM;;cAKzB,2BAAyB;;;;;;;;;;;;;;iBAoBtB,cAAc,MAAM,yBAAyB"}
package/dist/index.d.ts CHANGED
@@ -39,7 +39,9 @@ interface PlatformSDK {
39
39
  sort?: string[];
40
40
  }): Promise<RunReadResponse[]>;
41
41
  createApplicationRun(request: RunCreationRequest): Promise<RunCreationResponse>;
42
- getRun(applicationRunId: string): Promise<RunReadResponse>;
42
+ getRun(applicationRunId: string, options?: {
43
+ shareToken?: string;
44
+ }): Promise<RunReadResponse>;
43
45
  cancelApplicationRun(applicationRunId: string): Promise<void>;
44
46
  listRunResults(applicationRunId: string, options?: {
45
47
  page?: number;
@@ -48,14 +50,21 @@ interface PlatformSDK {
48
50
  externalIdIn?: string[];
49
51
  state?: ItemState;
50
52
  terminationReason?: ItemTerminationReason;
53
+ shareToken?: string;
51
54
  }): Promise<ItemResultReadResponse[]>;
52
- getRunItem(applicationRunId: string, externalId: string): Promise<ItemResultReadResponse>;
55
+ getRunItem(applicationRunId: string, externalId: string, options?: {
56
+ shareToken?: string;
57
+ }): Promise<ItemResultReadResponse>;
53
58
  updateRunMetadata(applicationRunId: string, customMetadata: Record<string, unknown> | null, customMetadataChecksum?: string | null): Promise<CustomMetadataUpdateResponse>;
54
59
  updateRunItemMetadata(applicationRunId: string, externalId: string, customMetadata: Record<string, unknown> | null, customMetadataChecksum?: string | null): Promise<CustomMetadataUpdateResponse>;
55
60
  deleteRunResults(applicationRunId: string): Promise<void>;
56
61
  getApplicationVersionDetails(applicationId: string, version: string): Promise<VersionReadResponse>;
57
- downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
58
- downloadArtifactStream(runId: string, artifactId: string): Promise<Readable>;
62
+ downloadArtifact(runId: string, artifactId: string, options?: {
63
+ shareToken?: string;
64
+ }): Promise<ArrayBuffer>;
65
+ downloadArtifactStream(runId: string, artifactId: string, options?: {
66
+ shareToken?: string;
67
+ }): Promise<Readable>;
59
68
  createGrant(request: GrantCreateRequest): Promise<GrantReadResponse>;
60
69
  listGrants(options?: {
61
70
  resourceType?: ResourceType;
@@ -293,6 +302,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
293
302
  * its current status, progress, metadata, and execution information.
294
303
  *
295
304
  * @param applicationRunId - The unique identifier of the application run
305
+ * @param options - Optional request options
306
+ * @param options.shareToken - Share token granting access to a run shared by link
296
307
  * @returns A promise that resolves to the run details object
297
308
  * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
298
309
  *
@@ -311,7 +322,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
311
322
  * }
312
323
  * ```
313
324
  */
314
- getRun(applicationRunId: string): Promise<RunReadResponse>;
325
+ getRun(applicationRunId: string, { shareToken }?: {
326
+ shareToken?: string;
327
+ }): Promise<RunReadResponse>;
315
328
  /**
316
329
  * Cancel a running or queued application run
317
330
  *
@@ -348,6 +361,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
348
361
  * artifacts from the AI model execution.
349
362
  *
350
363
  * @param applicationRunId - The unique identifier of the application run
364
+ * @param options - Optional pagination, sorting and filtering options
365
+ * @param options.shareToken - Share token granting access to a run shared by link
351
366
  * @returns A promise that resolves to an array of result items
352
367
  * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
353
368
  *
@@ -370,13 +385,14 @@ declare class PlatformSDKHttp implements PlatformSDK {
370
385
  * }
371
386
  * ```
372
387
  */
373
- listRunResults(applicationRunId: string, { page, pageSize, sort, externalIdIn, state, terminationReason }?: {
388
+ listRunResults(applicationRunId: string, { page, pageSize, sort, externalIdIn, state, terminationReason, shareToken }?: {
374
389
  page?: number;
375
390
  pageSize?: number;
376
391
  sort?: string[];
377
392
  externalIdIn?: string[];
378
393
  state?: ItemState;
379
394
  terminationReason?: ItemTerminationReason;
395
+ shareToken?: string;
380
396
  }): Promise<ItemResultReadResponse[]>;
381
397
  /**
382
398
  * Retrieve a single item from an application run by its external ID
@@ -386,6 +402,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
386
402
  *
387
403
  * @param applicationRunId - The unique identifier of the application run
388
404
  * @param externalId - The external ID of the item, as supplied when creating the run
405
+ * @param options - Optional request options
406
+ * @param options.shareToken - Share token granting access to a run shared by link
389
407
  * @returns A promise that resolves to the enriched run item
390
408
  * @throws {AuthenticationError} If no valid authentication token is available
391
409
  * @throws {APIError} If the request fails (e.g., 404 if the item doesn't exist)
@@ -402,7 +420,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
402
420
  * }
403
421
  * ```
404
422
  */
405
- getRunItem(applicationRunId: string, externalId: string): Promise<ItemResultReadResponse>;
423
+ getRunItem(applicationRunId: string, externalId: string, { shareToken }?: {
424
+ shareToken?: string;
425
+ }): Promise<ItemResultReadResponse>;
406
426
  /**
407
427
  * Set (replace) the custom metadata attached to an application run
408
428
  *
@@ -530,6 +550,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
530
550
  *
531
551
  * @param runId - The unique identifier of the application run
532
552
  * @param artifactId - The unique identifier of the artifact to download
553
+ * @param options - Optional request options
554
+ * @param options.shareToken - Share token granting access to a run shared by link
533
555
  * @returns A promise that resolves to an ArrayBuffer containing the artifact's binary content
534
556
  * @throws {AuthenticationError} If no valid authentication token is available
535
557
  * @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
@@ -550,7 +572,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
550
572
  * }
551
573
  * ```
552
574
  */
553
- downloadArtifact(runId: string, artifactId: string): Promise<ArrayBuffer>;
575
+ downloadArtifact(runId: string, artifactId: string, { shareToken }?: {
576
+ shareToken?: string;
577
+ }): Promise<ArrayBuffer>;
554
578
  /**
555
579
  * Download an artifact file from a completed application run as a stream
556
580
  *
@@ -564,6 +588,8 @@ declare class PlatformSDKHttp implements PlatformSDK {
564
588
  *
565
589
  * @param runId - The unique identifier of the application run
566
590
  * @param artifactId - The unique identifier of the artifact to download
591
+ * @param options - Optional request options
592
+ * @param options.shareToken - Share token granting access to a run shared by link
567
593
  * @returns A promise that resolves to a Node.js `Readable` stream yielding the artifact's binary content
568
594
  * @throws {AuthenticationError} If no valid authentication token is available
569
595
  * @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
@@ -584,7 +610,9 @@ declare class PlatformSDKHttp implements PlatformSDK {
584
610
  * streaming, a mid-stream connection drop CANNOT be retried by this method — the consumer must
585
611
  * listen for the stream's `error` event and re-download if needed.
586
612
  */
587
- downloadArtifactStream(runId: string, artifactId: string): Promise<Readable>;
613
+ downloadArtifactStream(runId: string, artifactId: string, { shareToken }?: {
614
+ shareToken?: string;
615
+ }): Promise<Readable>;
588
616
  /**
589
617
  * Create a grant to share access to a resource with a subject (user or organization)
590
618
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/platform-sdk.ts","../src/errors.ts","../src/entities/application-run/types.ts","../src/entities/application-run/utils.ts","../src/entities/run-item/types.ts","../src/entities/run-item/utils.ts"],"mappings":";;;;;;;KAqGY,sBAAsB;;;;UAKjB;;;;EAIf;;;;;EAMA,eAAe;;;;EAKf;;UAGe;EACf;EACA,aAAa;EACb,kBAAkB;EAClB,oBAAoB,QAAQ;EAC5B,eAAe,wBAAwB,QAAQ;EAC/C,oBAAoB;IAClB;IACA;IACA;IACA;IACA;IACA;MACE,QAAQ;EACZ,qBAAqB,SAAS,qBAAqB,QAAQ;EAC3D,OAAO,2BAA2B,QAAQ;EAC1C,qBAAqB,2BAA2B;EAChD,eACE,0BACA;IACE;IACA;IACA;IACA;IACA,QAAQ;IACR,oBAAoB;MAErB,QAAQ;EACX,WAAW,0BAA0B,qBAAqB,QAAQ;EAClE,kBACE,0BACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,sBACE,0BACA,oBACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,iBAAiB,2BAA2B;EAC5C,6BACE,uBACA,kBACC,QAAQ;EACX,iBAAiB,eAAe,qBAAqB,QAAQ;EAC7D,u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,iBAAiB,UAAS;;;;;KC/G5B;;;;;;;;;;;iBCUI,eAAe,KAAK;;;;;;;;;;;;;;;;;iBAkCpB,aAAa,KAAK,kBAAkB;;;;;;;;cAsCvC,sBAAuB,KAAK;;;;KClF7B;;;;;;;;;;;cCUC,kBAAmB,MAAM;;cAKzB,2BAAyB;;;;;;;;;;;;;;iBAoBtB,cAAc,MAAM,yBAAyB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/platform-sdk.ts","../src/errors.ts","../src/entities/application-run/types.ts","../src/entities/application-run/utils.ts","../src/entities/run-item/types.ts","../src/entities/run-item/utils.ts"],"mappings":";;;;;;;KAqGY,sBAAsB;;;;UAKjB;;;;EAIf;;;;;EAMA,eAAe;;;;EAKf;;UAGe;EACf;EACA,aAAa;EACb,kBAAkB;EAClB,oBAAoB,QAAQ;EAC5B,eAAe,wBAAwB,QAAQ;EAC/C,oBAAoB;IAClB;IACA;IACA;IACA;IACA;IACA;MACE,QAAQ;EACZ,qBAAqB,SAAS,qBAAqB,QAAQ;EAC3D,OAAO,0BAA0B;IAAY;MAAwB,QAAQ;EAC7E,qBAAqB,2BAA2B;EAChD,eACE,0BACA;IACE;IACA;IACA;IACA;IACA,QAAQ;IACR,oBAAoB;IACpB;MAED,QAAQ;EACX,WACE,0BACA,oBACA;IAAY;MACX,QAAQ;EACX,kBACE,0BACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,sBACE,0BACA,oBACA,gBAAgB,gCAChB,yCACC,QAAQ;EACX,iBAAiB,2BAA2B;EAC5C,6BACE,uBACA,kBACC,QAAQ;EACX,iBACE,eACA,oBACA;IAAY;MACX,QAAQ;EACX,uBACE,eACA,oBACA;IAAY;MACX,QAAQ;EACX,YAAY,SAAS,qBAAqB,QAAQ;EAClD,WAAW;IACT,eAAe;IACf;IACA,cAAc;IACd;IACA,WAAW;IACX;IACA;IACA;IACA;MACE,QAAQ;EACZ,SAAS,kBAAkB,QAAQ;EACnC,YAAY,kBAAkB,QAAQ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KClF7B;;;;;;;;;;;cCUC,kBAAmB,MAAM;;cAKzB,2BAAyB;;;;;;;;;;;;;;iBAoBtB,cAAc,MAAM,yBAAyB"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import globalAxios, { isAxiosError } from "axios";
2
2
  import z from "zod";
3
3
  //#region package.json
4
- var version = "3.8.1";
4
+ var version = "3.9.0";
5
5
  //#endregion
6
6
  //#region src/generated/base.ts
7
7
  const BASE_PATH = "/api".replace(/\/+$/, "");
@@ -2905,6 +2905,8 @@ var PlatformSDKHttp = class {
2905
2905
  * its current status, progress, metadata, and execution information.
2906
2906
  *
2907
2907
  * @param applicationRunId - The unique identifier of the application run
2908
+ * @param options - Optional request options
2909
+ * @param options.shareToken - Share token granting access to a run shared by link
2908
2910
  * @returns A promise that resolves to the run details object
2909
2911
  * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
2910
2912
  *
@@ -2923,10 +2925,13 @@ var PlatformSDKHttp = class {
2923
2925
  * }
2924
2926
  * ```
2925
2927
  */
2926
- async getRun(applicationRunId) {
2928
+ async getRun(applicationRunId, { shareToken } = {}) {
2927
2929
  const client = await this.#getClient();
2928
2930
  try {
2929
- return (await client.getRunV1RunsRunIdGet({ runId: applicationRunId })).data;
2931
+ return (await client.getRunV1RunsRunIdGet({
2932
+ runId: applicationRunId,
2933
+ shareToken
2934
+ })).data;
2930
2935
  } catch (error) {
2931
2936
  handleRequestError(error);
2932
2937
  }
@@ -2974,6 +2979,8 @@ var PlatformSDKHttp = class {
2974
2979
  * artifacts from the AI model execution.
2975
2980
  *
2976
2981
  * @param applicationRunId - The unique identifier of the application run
2982
+ * @param options - Optional pagination, sorting and filtering options
2983
+ * @param options.shareToken - Share token granting access to a run shared by link
2977
2984
  * @returns A promise that resolves to an array of result items
2978
2985
  * @throws {Error} If the request fails due to network issues, authentication problems, invalid run ID, or API errors
2979
2986
  *
@@ -2996,11 +3003,12 @@ var PlatformSDKHttp = class {
2996
3003
  * }
2997
3004
  * ```
2998
3005
  */
2999
- async listRunResults(applicationRunId, { page, pageSize, sort, externalIdIn, state, terminationReason } = {}) {
3006
+ async listRunResults(applicationRunId, { page, pageSize, sort, externalIdIn, state, terminationReason, shareToken } = {}) {
3000
3007
  const client = await this.#getClient();
3001
3008
  try {
3002
3009
  return (await client.listRunItemsV1RunsRunIdItemsGet({
3003
3010
  runId: applicationRunId,
3011
+ shareToken,
3004
3012
  page,
3005
3013
  pageSize,
3006
3014
  sort,
@@ -3020,6 +3028,8 @@ var PlatformSDKHttp = class {
3020
3028
  *
3021
3029
  * @param applicationRunId - The unique identifier of the application run
3022
3030
  * @param externalId - The external ID of the item, as supplied when creating the run
3031
+ * @param options - Optional request options
3032
+ * @param options.shareToken - Share token granting access to a run shared by link
3023
3033
  * @returns A promise that resolves to the enriched run item
3024
3034
  * @throws {AuthenticationError} If no valid authentication token is available
3025
3035
  * @throws {APIError} If the request fails (e.g., 404 if the item doesn't exist)
@@ -3036,12 +3046,13 @@ var PlatformSDKHttp = class {
3036
3046
  * }
3037
3047
  * ```
3038
3048
  */
3039
- async getRunItem(applicationRunId, externalId) {
3049
+ async getRunItem(applicationRunId, externalId, { shareToken } = {}) {
3040
3050
  const client = await this.#getClient();
3041
3051
  try {
3042
3052
  return (await client.getItemByRunV1RunsRunIdItemsExternalIdGet({
3043
3053
  runId: applicationRunId,
3044
- externalId
3054
+ externalId,
3055
+ shareToken
3045
3056
  })).data;
3046
3057
  } catch (error) {
3047
3058
  handleRequestError(error);
@@ -3212,6 +3223,8 @@ var PlatformSDKHttp = class {
3212
3223
  *
3213
3224
  * @param runId - The unique identifier of the application run
3214
3225
  * @param artifactId - The unique identifier of the artifact to download
3226
+ * @param options - Optional request options
3227
+ * @param options.shareToken - Share token granting access to a run shared by link
3215
3228
  * @returns A promise that resolves to an ArrayBuffer containing the artifact's binary content
3216
3229
  * @throws {AuthenticationError} If no valid authentication token is available
3217
3230
  * @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
@@ -3232,12 +3245,13 @@ var PlatformSDKHttp = class {
3232
3245
  * }
3233
3246
  * ```
3234
3247
  */
3235
- async downloadArtifact(runId, artifactId) {
3248
+ async downloadArtifact(runId, artifactId, { shareToken } = {}) {
3236
3249
  const client = await this.#getClient();
3237
3250
  try {
3238
3251
  return (await downloadWithRetry(() => client.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet({
3239
3252
  runId,
3240
- artifactId
3253
+ artifactId,
3254
+ shareToken
3241
3255
  }, { responseType: "arraybuffer" }), [
3242
3256
  403,
3243
3257
  404,
@@ -3261,6 +3275,8 @@ var PlatformSDKHttp = class {
3261
3275
  *
3262
3276
  * @param runId - The unique identifier of the application run
3263
3277
  * @param artifactId - The unique identifier of the artifact to download
3278
+ * @param options - Optional request options
3279
+ * @param options.shareToken - Share token granting access to a run shared by link
3264
3280
  * @returns A promise that resolves to a Node.js `Readable` stream yielding the artifact's binary content
3265
3281
  * @throws {AuthenticationError} If no valid authentication token is available
3266
3282
  * @throws {APIError} If the API request fails (e.g., 403, 404, 410, 422, or other HTTP errors)
@@ -3281,12 +3297,13 @@ var PlatformSDKHttp = class {
3281
3297
  * streaming, a mid-stream connection drop CANNOT be retried by this method — the consumer must
3282
3298
  * listen for the stream's `error` event and re-download if needed.
3283
3299
  */
3284
- async downloadArtifactStream(runId, artifactId) {
3300
+ async downloadArtifactStream(runId, artifactId, { shareToken } = {}) {
3285
3301
  const client = await this.#getClient();
3286
3302
  try {
3287
3303
  return (await downloadWithRetry(() => client.getArtifactUrlV1RunsRunIdArtifactsArtifactIdFileGet({
3288
3304
  runId,
3289
- artifactId
3305
+ artifactId,
3306
+ shareToken
3290
3307
  }, { responseType: "stream" }), [
3291
3308
  403,
3292
3309
  404,