@uipath/uipath-typescript 1.3.11 → 1.4.1
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/agent-memory/index.cjs +1772 -0
- package/dist/agent-memory/index.d.ts +588 -0
- package/dist/agent-memory/index.mjs +1770 -0
- package/dist/agents/index.cjs +1995 -0
- package/dist/agents/index.d.ts +961 -0
- package/dist/agents/index.mjs +1993 -0
- package/dist/assets/index.cjs +171 -39
- package/dist/assets/index.d.ts +84 -5
- package/dist/assets/index.mjs +171 -39
- package/dist/attachments/index.cjs +53 -15
- package/dist/attachments/index.d.ts +1 -0
- package/dist/attachments/index.mjs +53 -15
- package/dist/buckets/index.cjs +151 -130
- package/dist/buckets/index.d.ts +198 -84
- package/dist/buckets/index.mjs +151 -130
- package/dist/cases/index.cjs +220 -23
- package/dist/cases/index.d.ts +148 -10
- package/dist/cases/index.mjs +220 -24
- package/dist/conversational-agent/index.cjs +140 -66
- package/dist/conversational-agent/index.d.ts +190 -122
- package/dist/conversational-agent/index.mjs +140 -66
- package/dist/core/index.cjs +445 -108
- package/dist/core/index.d.ts +15 -0
- package/dist/core/index.mjs +445 -108
- package/dist/entities/index.cjs +365 -102
- package/dist/entities/index.d.ts +446 -114
- package/dist/entities/index.mjs +365 -102
- package/dist/feedback/index.cjs +53 -15
- package/dist/feedback/index.d.ts +1 -0
- package/dist/feedback/index.mjs +53 -15
- package/dist/governance/index.cjs +1789 -0
- package/dist/governance/index.d.ts +598 -0
- package/dist/governance/index.mjs +1787 -0
- package/dist/index.cjs +1453 -444
- package/dist/index.d.ts +4150 -1742
- package/dist/index.mjs +1452 -445
- package/dist/index.umd.js +5035 -4009
- package/dist/jobs/index.cjs +53 -15
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.mjs +53 -15
- package/dist/maestro-processes/index.cjs +189 -27
- package/dist/maestro-processes/index.d.ts +131 -9
- package/dist/maestro-processes/index.mjs +189 -27
- package/dist/orchestrator-du-module/index.cjs +1788 -0
- package/dist/orchestrator-du-module/index.d.ts +757 -0
- package/dist/orchestrator-du-module/index.mjs +1785 -0
- package/dist/processes/index.cjs +53 -15
- package/dist/processes/index.d.ts +1 -0
- package/dist/processes/index.mjs +53 -15
- package/dist/queues/index.cjs +53 -15
- package/dist/queues/index.d.ts +1 -0
- package/dist/queues/index.mjs +53 -15
- package/dist/tasks/index.cjs +116 -19
- package/dist/tasks/index.d.ts +110 -4
- package/dist/tasks/index.mjs +117 -20
- package/dist/traces/index.cjs +340 -15
- package/dist/traces/index.d.ts +483 -2
- package/dist/traces/index.mjs +339 -16
- package/package.json +42 -2
package/dist/buckets/index.d.ts
CHANGED
|
@@ -107,6 +107,7 @@ interface RequestWithPaginationOptions extends RequestSpec {
|
|
|
107
107
|
tokenParam?: string;
|
|
108
108
|
countParam?: string;
|
|
109
109
|
convertToSkip?: boolean;
|
|
110
|
+
zeroBased?: boolean;
|
|
110
111
|
};
|
|
111
112
|
};
|
|
112
113
|
}
|
|
@@ -438,10 +439,6 @@ interface BucketGetUriOptions extends BaseOptions {
|
|
|
438
439
|
* The ID of the bucket
|
|
439
440
|
*/
|
|
440
441
|
bucketId: number;
|
|
441
|
-
/**
|
|
442
|
-
* The ID of the folder
|
|
443
|
-
*/
|
|
444
|
-
folderId: number;
|
|
445
442
|
/**
|
|
446
443
|
* The full path to the BlobFile
|
|
447
444
|
*/
|
|
@@ -452,9 +449,23 @@ interface BucketGetUriOptions extends BaseOptions {
|
|
|
452
449
|
expiryInMinutes?: number;
|
|
453
450
|
}
|
|
454
451
|
/**
|
|
455
|
-
*
|
|
452
|
+
* Optional parameters for the preferred `getReadUri(bucketId, path, options?)` form.
|
|
453
|
+
* Contains folder scoping (`folderId` / `folderKey` / `folderPath`),
|
|
454
|
+
* `expiryInMinutes`, and standard query options (`expand`, `select`).
|
|
455
|
+
*/
|
|
456
|
+
interface BucketGetReadUriRequestOptions extends BaseOptions, FolderScopedOptions {
|
|
457
|
+
/**
|
|
458
|
+
* URL expiration time in minutes (0 for default)
|
|
459
|
+
*/
|
|
460
|
+
expiryInMinutes?: number;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* @deprecated Use the positional form: `getReadUri(bucketId, path, options?)`.
|
|
464
|
+
* See {@link BucketGetReadUriRequestOptions} for the supported options.
|
|
465
|
+
*
|
|
466
|
+
* Request options for getting a read URI for a file in a bucket.
|
|
456
467
|
*/
|
|
457
|
-
interface BucketGetReadUriOptions extends BucketGetUriOptions {
|
|
468
|
+
interface BucketGetReadUriOptions extends BucketGetUriOptions, FolderScopedOptions {
|
|
458
469
|
}
|
|
459
470
|
/**
|
|
460
471
|
* Request options for getting files in a bucket
|
|
@@ -468,7 +479,7 @@ interface BucketGetFileMetaDataOptions {
|
|
|
468
479
|
/**
|
|
469
480
|
* Request options for getting files in a bucket with pagination support
|
|
470
481
|
*/
|
|
471
|
-
type BucketGetFileMetaDataWithPaginationOptions = BucketGetFileMetaDataOptions & PaginationOptions;
|
|
482
|
+
type BucketGetFileMetaDataWithPaginationOptions = BucketGetFileMetaDataOptions & PaginationOptions & FolderScopedOptions;
|
|
472
483
|
/**
|
|
473
484
|
* Response from the GetFiles API
|
|
474
485
|
*/
|
|
@@ -543,17 +554,23 @@ type BucketGetFilesOptions = RequestOptions & PaginationOptions & FolderScopedOp
|
|
|
543
554
|
interface BucketDeleteFileOptions extends FolderScopedOptions {
|
|
544
555
|
}
|
|
545
556
|
/**
|
|
546
|
-
*
|
|
557
|
+
* Optional parameters for the preferred
|
|
558
|
+
* `uploadFile(bucketId, path, content, options?)` form. Contains folder
|
|
559
|
+
* scoping (`folderId` / `folderKey` / `folderPath`).
|
|
560
|
+
*/
|
|
561
|
+
interface BucketUploadFileRequestOptions extends FolderScopedOptions {
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* @deprecated Use the positional form: `uploadFile(bucketId, path, content, options?)`.
|
|
565
|
+
* See {@link BucketUploadFileRequestOptions} for the supported options.
|
|
566
|
+
*
|
|
567
|
+
* Options for uploading files to a bucket.
|
|
547
568
|
*/
|
|
548
|
-
interface BucketUploadFileOptions {
|
|
569
|
+
interface BucketUploadFileOptions extends FolderScopedOptions {
|
|
549
570
|
/**
|
|
550
571
|
* The ID of the bucket to upload to
|
|
551
572
|
*/
|
|
552
573
|
bucketId: number;
|
|
553
|
-
/**
|
|
554
|
-
* The folder/organization unit ID for context
|
|
555
|
-
*/
|
|
556
|
-
folderId: number;
|
|
557
574
|
/**
|
|
558
575
|
* Path where the file should be stored in the bucket
|
|
559
576
|
*/
|
|
@@ -671,81 +688,128 @@ interface BucketServiceModel {
|
|
|
671
688
|
*/
|
|
672
689
|
getByName(name: string, options?: BucketGetByNameOptions): Promise<BucketGetResponse>;
|
|
673
690
|
/**
|
|
674
|
-
* Gets metadata for files in a bucket with optional filtering and pagination
|
|
691
|
+
* Gets metadata for files in a bucket with optional filtering and pagination.
|
|
692
|
+
*
|
|
693
|
+
* Folder context can be supplied as `folderId`, `folderKey`, or `folderPath`
|
|
694
|
+
* inside the options.
|
|
675
695
|
*
|
|
676
696
|
* The method returns either:
|
|
677
697
|
* - A NonPaginatedResponse with items array (when no pagination parameters are provided)
|
|
678
698
|
* - A PaginatedResponse with navigation cursors (when any pagination parameter is provided)
|
|
679
699
|
*
|
|
680
700
|
* @param bucketId - The ID of the bucket to get file metadata from
|
|
681
|
-
* @param
|
|
682
|
-
* @param options - Optional parameters for filtering, pagination and access URL generation
|
|
701
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional parameters for filtering and pagination
|
|
683
702
|
* @returns Promise resolving to either an array of files metadata NonPaginatedResponse<BlobItem> or a PaginatedResponse<BlobItem> when pagination options are used.
|
|
684
703
|
* {@link BlobItem}
|
|
685
704
|
* @example
|
|
686
705
|
* ```typescript
|
|
687
|
-
* //
|
|
688
|
-
* const fileMetadata = await buckets.getFileMetaData(<bucketId>, <folderId>);
|
|
706
|
+
* // By folder ID
|
|
707
|
+
* const fileMetadata = await buckets.getFileMetaData(<bucketId>, { folderId: <folderId> });
|
|
689
708
|
*
|
|
690
|
-
* //
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
709
|
+
* // By folder key (GUID)
|
|
710
|
+
* await buckets.getFileMetaData(<bucketId>, { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
711
|
+
*
|
|
712
|
+
* // By folder path
|
|
713
|
+
* await buckets.getFileMetaData(<bucketId>, { folderPath: 'Shared/Finance' });
|
|
714
|
+
*
|
|
715
|
+
* // Filter by prefix
|
|
716
|
+
* await buckets.getFileMetaData(<bucketId>, { folderId: <folderId>, prefix: '/folder1' });
|
|
694
717
|
*
|
|
695
718
|
* // First page with pagination
|
|
696
|
-
* const page1 = await buckets.getFileMetaData(<bucketId>, <folderId>,
|
|
719
|
+
* const page1 = await buckets.getFileMetaData(<bucketId>, { folderId: <folderId>, pageSize: 10 });
|
|
697
720
|
*
|
|
698
721
|
* // Navigate using cursor
|
|
699
722
|
* if (page1.hasNextPage) {
|
|
700
|
-
* const page2 = await buckets.getFileMetaData(<bucketId>, <folderId>,
|
|
723
|
+
* const page2 = await buckets.getFileMetaData(<bucketId>, { folderId: <folderId>, cursor: page1.nextCursor });
|
|
701
724
|
* }
|
|
702
725
|
* ```
|
|
703
726
|
*/
|
|
727
|
+
getFileMetaData<T extends BucketGetFileMetaDataWithPaginationOptions = BucketGetFileMetaDataWithPaginationOptions>(bucketId: number, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<BlobItem> : NonPaginatedResponse<BlobItem>>;
|
|
728
|
+
/**
|
|
729
|
+
* Gets metadata for files in a bucket — positional `folderId` form.
|
|
730
|
+
*
|
|
731
|
+
* @deprecated Use the options-object form: `getFileMetaData(bucketId, { folderId })`. See {@link BucketGetFileMetaDataWithPaginationOptions} for the supported options.
|
|
732
|
+
*
|
|
733
|
+
* @param bucketId - The ID of the bucket to get file metadata from
|
|
734
|
+
* @param folderId - Required folder ID (numeric)
|
|
735
|
+
* @param options - Optional parameters for filtering and pagination
|
|
736
|
+
* @returns Promise resolving to either an array of files metadata NonPaginatedResponse<BlobItem> or a PaginatedResponse<BlobItem> when pagination options are used.
|
|
737
|
+
* {@link BlobItem}
|
|
738
|
+
*/
|
|
704
739
|
getFileMetaData<T extends BucketGetFileMetaDataWithPaginationOptions = BucketGetFileMetaDataWithPaginationOptions>(bucketId: number, folderId: number, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<BlobItem> : NonPaginatedResponse<BlobItem>>;
|
|
705
740
|
/**
|
|
706
|
-
* Gets a direct download URL for a file in the bucket
|
|
741
|
+
* Gets a direct download URL for a file in the bucket.
|
|
742
|
+
*
|
|
743
|
+
* Folder context can be supplied as `folderId`, `folderKey`, or `folderPath`
|
|
744
|
+
* in the options.
|
|
707
745
|
*
|
|
708
|
-
* @param
|
|
746
|
+
* @param bucketId - The ID of the bucket
|
|
747
|
+
* @param path - The full path to the file
|
|
748
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional `expiryInMinutes`
|
|
709
749
|
* @returns Promise resolving to blob file access information
|
|
710
750
|
* {@link BucketGetUriResponse}
|
|
711
751
|
* @example
|
|
712
752
|
* ```typescript
|
|
713
|
-
* //
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
717
|
-
*
|
|
718
|
-
*
|
|
753
|
+
* // By folder ID
|
|
754
|
+
* await buckets.getReadUri(<bucketId>, '/folder/file.pdf', { folderId: <folderId> });
|
|
755
|
+
*
|
|
756
|
+
* // By folder key (GUID)
|
|
757
|
+
* await buckets.getReadUri(<bucketId>, '/folder/file.pdf', { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
758
|
+
*
|
|
759
|
+
* // By folder path
|
|
760
|
+
* await buckets.getReadUri(<bucketId>, '/folder/file.pdf', { folderPath: 'Shared/Finance' });
|
|
719
761
|
* ```
|
|
720
762
|
*/
|
|
763
|
+
getReadUri(bucketId: number, path: string, options?: BucketGetReadUriRequestOptions): Promise<BucketGetUriResponse>;
|
|
764
|
+
/**
|
|
765
|
+
* Gets a direct download URL for a file in the bucket — options-only form.
|
|
766
|
+
*
|
|
767
|
+
* @deprecated Use the positional form: `getReadUri(bucketId, path, options?)`. See {@link BucketGetReadUriRequestOptions} for the supported options.
|
|
768
|
+
*
|
|
769
|
+
* @param options - Contains bucketId, folder scoping (`folderId` / `folderKey` / `folderPath`), file path and optional expiry time
|
|
770
|
+
* @returns Promise resolving to blob file access information
|
|
771
|
+
* {@link BucketGetUriResponse}
|
|
772
|
+
*/
|
|
721
773
|
getReadUri(options: BucketGetReadUriOptions): Promise<BucketGetUriResponse>;
|
|
722
774
|
/**
|
|
723
|
-
* Uploads a file to a bucket
|
|
775
|
+
* Uploads a file to a bucket.
|
|
724
776
|
*
|
|
725
|
-
*
|
|
777
|
+
* Folder context can be supplied as `folderId`, `folderKey`, or `folderPath`
|
|
778
|
+
* in the options.
|
|
779
|
+
*
|
|
780
|
+
* @param bucketId - The ID of the bucket to upload to
|
|
781
|
+
* @param path - Path where the file should be stored in the bucket
|
|
782
|
+
* @param content - File content to upload
|
|
783
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`)
|
|
726
784
|
* @returns Promise resolving bucket upload response
|
|
727
785
|
* {@link BucketUploadResponse}
|
|
728
786
|
* @example
|
|
729
787
|
* ```typescript
|
|
730
|
-
* //
|
|
788
|
+
* // By folder ID
|
|
731
789
|
* const file = new File(['file content'], 'example.txt');
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
*
|
|
737
|
-
*
|
|
790
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', file, { folderId: <folderId> });
|
|
791
|
+
*
|
|
792
|
+
* // By folder key (GUID)
|
|
793
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', file, { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
794
|
+
*
|
|
795
|
+
* // By folder path
|
|
796
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', file, { folderPath: 'Shared/Finance' });
|
|
738
797
|
*
|
|
739
798
|
* // In Node env with Uint8Array or Buffer
|
|
740
799
|
* const content = new TextEncoder().encode('file content');
|
|
741
|
-
*
|
|
742
|
-
* bucketId: <bucketId>,
|
|
743
|
-
* folderId: <folderId>,
|
|
744
|
-
* path: '/folder/example.txt',
|
|
745
|
-
* content,
|
|
746
|
-
* });
|
|
800
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', content, { folderId: <folderId> });
|
|
747
801
|
* ```
|
|
748
802
|
*/
|
|
803
|
+
uploadFile(bucketId: number, path: string, content: Blob | Uint8Array<ArrayBuffer> | File, options?: BucketUploadFileRequestOptions): Promise<BucketUploadResponse>;
|
|
804
|
+
/**
|
|
805
|
+
* Uploads a file to a bucket — options-only form.
|
|
806
|
+
*
|
|
807
|
+
* @deprecated Use the positional form: `uploadFile(bucketId, path, content, options?)`. See {@link BucketUploadFileRequestOptions} for the supported options.
|
|
808
|
+
*
|
|
809
|
+
* @param options - Options for file upload including bucket ID, folder scoping (`folderId` / `folderKey` / `folderPath`), path, and content
|
|
810
|
+
* @returns Promise resolving bucket upload response
|
|
811
|
+
* {@link BucketUploadResponse}
|
|
812
|
+
*/
|
|
749
813
|
uploadFile(options: BucketUploadFileOptions): Promise<BucketUploadResponse>;
|
|
750
814
|
/**
|
|
751
815
|
* Deletes a file from a bucket
|
|
@@ -896,16 +960,19 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
896
960
|
*/
|
|
897
961
|
getAll<T extends BucketGetAllOptions = BucketGetAllOptions>(options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<BucketGetResponse> : NonPaginatedResponse<BucketGetResponse>>;
|
|
898
962
|
/**
|
|
899
|
-
* Gets metadata for files in a bucket with optional filtering and pagination
|
|
963
|
+
* Gets metadata for files in a bucket with optional filtering and pagination.
|
|
964
|
+
*
|
|
965
|
+
* Folder context can be supplied as `folderId`, `folderKey`, or `folderPath`
|
|
966
|
+
* inside the options.
|
|
900
967
|
*
|
|
901
968
|
* The method returns either:
|
|
902
969
|
* - A NonPaginatedResponse with items array (when no pagination parameters are provided)
|
|
903
970
|
* - A PaginatedResponse with navigation cursors (when any pagination parameter is provided)
|
|
904
971
|
*
|
|
905
972
|
* @param bucketId - The ID of the bucket to get file metadata from
|
|
906
|
-
* @param
|
|
907
|
-
* @param options - Optional parameters for filtering, pagination and access URL generation
|
|
973
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional parameters for filtering and pagination
|
|
908
974
|
* @returns Promise resolving to the list of file metadata in the bucket or paginated result
|
|
975
|
+
* {@link BlobItem}
|
|
909
976
|
*
|
|
910
977
|
* @example
|
|
911
978
|
* ```typescript
|
|
@@ -913,29 +980,52 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
913
980
|
*
|
|
914
981
|
* const buckets = new Buckets(sdk);
|
|
915
982
|
*
|
|
916
|
-
* //
|
|
917
|
-
* const fileMetadata = await buckets.getFileMetaData(
|
|
983
|
+
* // By folder ID
|
|
984
|
+
* const fileMetadata = await buckets.getFileMetaData(<bucketId>, { folderId: <folderId> });
|
|
918
985
|
*
|
|
919
|
-
* //
|
|
920
|
-
*
|
|
921
|
-
*
|
|
922
|
-
*
|
|
986
|
+
* // By folder key (GUID)
|
|
987
|
+
* await buckets.getFileMetaData(<bucketId>, { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
988
|
+
*
|
|
989
|
+
* // By folder path
|
|
990
|
+
* await buckets.getFileMetaData(<bucketId>, { folderPath: 'Shared/Finance' });
|
|
991
|
+
*
|
|
992
|
+
* // Filter by prefix
|
|
993
|
+
* await buckets.getFileMetaData(<bucketId>, { folderId: <folderId>, prefix: '/folder1' });
|
|
923
994
|
*
|
|
924
995
|
* // First page with pagination
|
|
925
|
-
* const page1 = await buckets.getFileMetaData(
|
|
996
|
+
* const page1 = await buckets.getFileMetaData(<bucketId>, { folderId: <folderId>, pageSize: 10 });
|
|
926
997
|
*
|
|
927
998
|
* // Navigate using cursor
|
|
928
999
|
* if (page1.hasNextPage) {
|
|
929
|
-
* const page2 = await buckets.getFileMetaData(
|
|
1000
|
+
* const page2 = await buckets.getFileMetaData(<bucketId>, { folderId: <folderId>, cursor: page1.nextCursor });
|
|
930
1001
|
* }
|
|
931
1002
|
* ```
|
|
932
1003
|
*/
|
|
1004
|
+
getFileMetaData<T extends BucketGetFileMetaDataWithPaginationOptions = BucketGetFileMetaDataWithPaginationOptions>(bucketId: number, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<BlobItem> : NonPaginatedResponse<BlobItem>>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Gets metadata for files in a bucket — positional `folderId` form.
|
|
1007
|
+
*
|
|
1008
|
+
* @deprecated Use the options-object form: `getFileMetaData(bucketId, { folderId })`. See {@link BucketGetFileMetaDataWithPaginationOptions} for the supported options.
|
|
1009
|
+
*
|
|
1010
|
+
* @param bucketId - The ID of the bucket to get file metadata from
|
|
1011
|
+
* @param folderId - Required folder ID (numeric)
|
|
1012
|
+
* @param options - Optional parameters for filtering and pagination
|
|
1013
|
+
* @returns Promise resolving to the list of file metadata in the bucket or paginated result
|
|
1014
|
+
* {@link BlobItem}
|
|
1015
|
+
*/
|
|
933
1016
|
getFileMetaData<T extends BucketGetFileMetaDataWithPaginationOptions = BucketGetFileMetaDataWithPaginationOptions>(bucketId: number, folderId: number, options?: T): Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<BlobItem> : NonPaginatedResponse<BlobItem>>;
|
|
934
1017
|
/**
|
|
935
|
-
* Uploads a file to a bucket
|
|
1018
|
+
* Uploads a file to a bucket.
|
|
1019
|
+
*
|
|
1020
|
+
* Folder context can be supplied as `folderId`, `folderKey`, or `folderPath`
|
|
1021
|
+
* in the options.
|
|
936
1022
|
*
|
|
937
|
-
* @param
|
|
1023
|
+
* @param bucketId - The ID of the bucket to upload to
|
|
1024
|
+
* @param path - Path where the file should be stored in the bucket
|
|
1025
|
+
* @param content - File content to upload
|
|
1026
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`)
|
|
938
1027
|
* @returns Promise resolving to a response with success status and HTTP status code
|
|
1028
|
+
* {@link BucketUploadResponse}
|
|
939
1029
|
*
|
|
940
1030
|
* @example
|
|
941
1031
|
* ```typescript
|
|
@@ -943,31 +1033,43 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
943
1033
|
*
|
|
944
1034
|
* const buckets = new Buckets(sdk);
|
|
945
1035
|
*
|
|
946
|
-
* //
|
|
1036
|
+
* // By folder ID
|
|
947
1037
|
* const file = new File(['file content'], 'example.txt');
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
*
|
|
953
|
-
*
|
|
1038
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', file, { folderId: <folderId> });
|
|
1039
|
+
*
|
|
1040
|
+
* // By folder key (GUID)
|
|
1041
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', file, { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
1042
|
+
*
|
|
1043
|
+
* // By folder path
|
|
1044
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', file, { folderPath: 'Shared/Finance' });
|
|
954
1045
|
*
|
|
955
1046
|
* // In Node env with Buffer
|
|
956
1047
|
* const buffer = Buffer.from('file content');
|
|
957
|
-
*
|
|
958
|
-
* bucketId: 123,
|
|
959
|
-
* folderId: 456,
|
|
960
|
-
* path: '/folder/example.txt',
|
|
961
|
-
* content: buffer
|
|
962
|
-
* });
|
|
1048
|
+
* await buckets.uploadFile(<bucketId>, '/folder/example.txt', buffer, { folderId: <folderId> });
|
|
963
1049
|
* ```
|
|
964
1050
|
*/
|
|
1051
|
+
uploadFile(bucketId: number, path: string, content: Blob | Uint8Array<ArrayBuffer> | File, options?: BucketUploadFileRequestOptions): Promise<BucketUploadResponse>;
|
|
1052
|
+
/**
|
|
1053
|
+
* Uploads a file to a bucket — options-only form.
|
|
1054
|
+
*
|
|
1055
|
+
* @deprecated Use the positional form: `uploadFile(bucketId, path, content, options?)`. See {@link BucketUploadFileRequestOptions} for the supported options.
|
|
1056
|
+
*
|
|
1057
|
+
* @param options - Options for file upload including bucket ID, folder scoping (`folderId` / `folderKey` / `folderPath`), path, and content
|
|
1058
|
+
* @returns Promise resolving to a response with success status and HTTP status code
|
|
1059
|
+
* {@link BucketUploadResponse}
|
|
1060
|
+
*/
|
|
965
1061
|
uploadFile(options: BucketUploadFileOptions): Promise<BucketUploadResponse>;
|
|
966
1062
|
/**
|
|
967
|
-
* Gets a direct download URL for a file in the bucket
|
|
1063
|
+
* Gets a direct download URL for a file in the bucket.
|
|
1064
|
+
*
|
|
1065
|
+
* Folder context can be supplied as `folderId`, `folderKey`, or `folderPath`
|
|
1066
|
+
* inside the options.
|
|
968
1067
|
*
|
|
969
|
-
* @param
|
|
1068
|
+
* @param bucketId - The ID of the bucket
|
|
1069
|
+
* @param path - The full path to the file
|
|
1070
|
+
* @param options - Folder scoping (`folderId` / `folderKey` / `folderPath`) and optional `expiryInMinutes`
|
|
970
1071
|
* @returns Promise resolving to blob file access information
|
|
1072
|
+
* {@link BucketGetUriResponse}
|
|
971
1073
|
*
|
|
972
1074
|
* @example
|
|
973
1075
|
* ```typescript
|
|
@@ -975,14 +1077,26 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
975
1077
|
*
|
|
976
1078
|
* const buckets = new Buckets(sdk);
|
|
977
1079
|
*
|
|
978
|
-
* //
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
1080
|
+
* // By folder ID
|
|
1081
|
+
* await buckets.getReadUri(<bucketId>, '/folder/file.pdf', { folderId: <folderId> });
|
|
1082
|
+
*
|
|
1083
|
+
* // By folder key (GUID)
|
|
1084
|
+
* await buckets.getReadUri(<bucketId>, '/folder/file.pdf', { folderKey: '5f6dadf1-3677-49dc-8aca-c2999dd4b3ba' });
|
|
1085
|
+
*
|
|
1086
|
+
* // By folder path
|
|
1087
|
+
* await buckets.getReadUri(<bucketId>, '/folder/file.pdf', { folderPath: 'Shared/Finance' });
|
|
984
1088
|
* ```
|
|
985
1089
|
*/
|
|
1090
|
+
getReadUri(bucketId: number, path: string, options?: BucketGetReadUriRequestOptions): Promise<BucketGetUriResponse>;
|
|
1091
|
+
/**
|
|
1092
|
+
* Gets a direct download URL for a file in the bucket — options-only form.
|
|
1093
|
+
*
|
|
1094
|
+
* @deprecated Use the positional form: `getReadUri(bucketId, path, options?)`. See {@link BucketGetReadUriRequestOptions} for the supported options.
|
|
1095
|
+
*
|
|
1096
|
+
* @param options - Contains bucketId, folder scoping (`folderId` / `folderKey` / `folderPath`), file path and optional expiry time
|
|
1097
|
+
* @returns Promise resolving to blob file access information
|
|
1098
|
+
* {@link BucketGetUriResponse}
|
|
1099
|
+
*/
|
|
986
1100
|
getReadUri(options: BucketGetReadUriOptions): Promise<BucketGetUriResponse>;
|
|
987
1101
|
/**
|
|
988
1102
|
* Uploads content to the provided URI
|
|
@@ -995,8 +1109,8 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
995
1109
|
* Private method to handle common URI request logic
|
|
996
1110
|
* @param endpoint - The API endpoint to call
|
|
997
1111
|
* @param bucketId - The bucket ID
|
|
998
|
-
* @param folderId - The folder ID
|
|
999
1112
|
* @param path - The file path
|
|
1113
|
+
* @param headers - Pre-built folder-context headers (built via `resolveFolderHeaders`)
|
|
1000
1114
|
* @param queryOptions - Additional query parameters
|
|
1001
1115
|
* @returns Promise resolving to blob file access information
|
|
1002
1116
|
*/
|
|
@@ -1070,11 +1184,11 @@ declare class BucketService extends FolderScopedService implements BucketService
|
|
|
1070
1184
|
/**
|
|
1071
1185
|
* Gets a direct upload URL for a file in the bucket
|
|
1072
1186
|
*
|
|
1073
|
-
* @param options - Contains bucketId,
|
|
1187
|
+
* @param options - Contains bucketId, file path, optional expiry time, and pre-built folder-context headers
|
|
1074
1188
|
* @returns Promise resolving to blob file access information
|
|
1075
1189
|
*/
|
|
1076
1190
|
private _getWriteUri;
|
|
1077
1191
|
}
|
|
1078
1192
|
|
|
1079
1193
|
export { BucketOptions, BucketService, BucketService as Buckets };
|
|
1080
|
-
export type { BlobItem, BucketDeleteFileOptions, BucketFile, BucketGetAllOptions, BucketGetByIdOptions, BucketGetByNameOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetFilesOptions, BucketGetReadUriOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadResponse, ResponseDictionary };
|
|
1194
|
+
export type { BlobItem, BucketDeleteFileOptions, BucketFile, BucketGetAllOptions, BucketGetByIdOptions, BucketGetByNameOptions, BucketGetFileMetaDataOptions, BucketGetFileMetaDataResponse, BucketGetFileMetaDataWithPaginationOptions, BucketGetFilesOptions, BucketGetReadUriOptions, BucketGetReadUriRequestOptions, BucketGetResponse, BucketGetUriOptions, BucketGetUriResponse, BucketServiceModel, BucketUploadFileOptions, BucketUploadFileRequestOptions, BucketUploadResponse, ResponseDictionary };
|