@xylex-group/athena 2.8.0 → 2.8.2
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/README.md +13 -6
- package/dist/browser.cjs +663 -17
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +7 -7
- package/dist/browser.d.ts +7 -7
- package/dist/browser.js +663 -17
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +693 -18
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +3 -3
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +693 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +664 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +664 -17
- package/dist/index.js.map +1 -1
- package/dist/{model-form-DMed05gE.d.cts → model-form-Cx3wtvi8.d.ts} +641 -36
- package/dist/{model-form-DXPlOnlI.d.ts → model-form-_ugfOXao.d.cts} +641 -36
- package/dist/{pipeline-D4sJRKqN.d.cts → pipeline-BtD-Uo5X.d.cts} +1 -1
- package/dist/{pipeline-CkMnhwPI.d.ts → pipeline-yCIZNJHE.d.ts} +1 -1
- package/dist/{react-email-DZhDDlEl.d.cts → react-email-CiiSVa9F.d.cts} +4 -6
- package/dist/{react-email-Lrz9A-BW.d.ts → react-email-WN8UU3AL.d.ts} +4 -6
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +4 -4
- package/dist/react.d.ts +4 -4
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/{types-CAtTGGoz.d.cts → types-89EfjLjV.d.cts} +2 -1
- package/dist/{types-BzY6fETM.d.ts → types-C2kiTt6-.d.ts} +2 -1
- package/dist/{types-vikz9YIO.d.cts → types-g8G6J0xE.d.cts} +4 -1
- package/dist/{types-vikz9YIO.d.ts → types-g8G6J0xE.d.ts} +4 -1
- package/package.json +26 -56
package/dist/browser.js
CHANGED
|
@@ -800,7 +800,7 @@ var getCookieCache = async (request, config) => {
|
|
|
800
800
|
|
|
801
801
|
// package.json
|
|
802
802
|
var package_default = {
|
|
803
|
-
version: "2.8.
|
|
803
|
+
version: "2.8.2"
|
|
804
804
|
};
|
|
805
805
|
|
|
806
806
|
// src/sdk-version.ts
|
|
@@ -3396,7 +3396,12 @@ function createStorageFileModule(base, config = {}) {
|
|
|
3396
3396
|
content_type: input.content_type ?? source.contentType,
|
|
3397
3397
|
size_bytes: source.sizeBytes,
|
|
3398
3398
|
public: input.public,
|
|
3399
|
-
metadata: input.metadata
|
|
3399
|
+
metadata: input.metadata,
|
|
3400
|
+
server_side_encryption: input.server_side_encryption,
|
|
3401
|
+
sse: input.sse,
|
|
3402
|
+
ssekms_key_id: input.ssekms_key_id,
|
|
3403
|
+
kms_key_id: input.kms_key_id,
|
|
3404
|
+
bucket_key_enabled: input.bucket_key_enabled
|
|
3400
3405
|
}
|
|
3401
3406
|
};
|
|
3402
3407
|
});
|
|
@@ -3407,10 +3412,17 @@ function createStorageFileModule(base, config = {}) {
|
|
|
3407
3412
|
for (let index = 0; index < uploadRequests.length; index += 1) {
|
|
3408
3413
|
const request = uploadRequests[index];
|
|
3409
3414
|
const uploadUrl = uploadUrls[index];
|
|
3410
|
-
const response = await putUploadBody(
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3415
|
+
const response = await putUploadBody(
|
|
3416
|
+
uploadUrl.upload.url,
|
|
3417
|
+
uploadUrl.upload.headers ?? {},
|
|
3418
|
+
request.source,
|
|
3419
|
+
input,
|
|
3420
|
+
options,
|
|
3421
|
+
(progress) => {
|
|
3422
|
+
aggregateLoaded[index] = progress.loaded;
|
|
3423
|
+
input.onProgress?.(createProgressSnapshot("uploading", sources, index, progress.loaded, sum(aggregateLoaded)));
|
|
3424
|
+
}
|
|
3425
|
+
);
|
|
3414
3426
|
uploaded.push({
|
|
3415
3427
|
file: uploadUrl.file,
|
|
3416
3428
|
upload: uploadUrl.upload,
|
|
@@ -3513,8 +3525,9 @@ function validateUploadConstraints(sources, input) {
|
|
|
3513
3525
|
}
|
|
3514
3526
|
}
|
|
3515
3527
|
}
|
|
3516
|
-
async function putUploadBody(url, source, input, options, onProgress) {
|
|
3517
|
-
const headers = new Headers(
|
|
3528
|
+
async function putUploadBody(url, uploadHeaders, source, input, options, onProgress) {
|
|
3529
|
+
const headers = new Headers(uploadHeaders);
|
|
3530
|
+
new Headers(input.uploadHeaders).forEach((value, key) => headers.set(key, value));
|
|
3518
3531
|
if (source.contentType && !headers.has("Content-Type")) {
|
|
3519
3532
|
headers.set("Content-Type", source.contentType);
|
|
3520
3533
|
}
|
|
@@ -3839,6 +3852,23 @@ var storageSdkManifest = {
|
|
|
3839
3852
|
responseEnvelope: "athena",
|
|
3840
3853
|
responseType: "StorageFileMutationResponse"
|
|
3841
3854
|
},
|
|
3855
|
+
{
|
|
3856
|
+
name: "postStorageFileVisibility",
|
|
3857
|
+
method: "POST",
|
|
3858
|
+
path: "/storage/files/{file_id}/visibility",
|
|
3859
|
+
pathParams: ["file_id"],
|
|
3860
|
+
requestType: "SetStorageFileVisibilityRequest",
|
|
3861
|
+
responseEnvelope: "athena",
|
|
3862
|
+
responseType: "StorageFileMutationResponse"
|
|
3863
|
+
},
|
|
3864
|
+
{
|
|
3865
|
+
name: "setManyStorageFileVisibility",
|
|
3866
|
+
method: "POST",
|
|
3867
|
+
path: "/storage/files/visibility-many",
|
|
3868
|
+
requestType: "SetManyStorageFileVisibilityRequest",
|
|
3869
|
+
responseEnvelope: "athena",
|
|
3870
|
+
responseType: "StorageFileMutationManyResponse"
|
|
3871
|
+
},
|
|
3842
3872
|
{
|
|
3843
3873
|
name: "deleteStorageFolder",
|
|
3844
3874
|
method: "POST",
|
|
@@ -3854,6 +3884,484 @@ var storageSdkManifest = {
|
|
|
3854
3884
|
requestType: "MoveStorageFolderRequest",
|
|
3855
3885
|
responseEnvelope: "athena",
|
|
3856
3886
|
responseType: "StorageFolderMutationResponse"
|
|
3887
|
+
},
|
|
3888
|
+
{
|
|
3889
|
+
name: "searchStorageFiles",
|
|
3890
|
+
method: "POST",
|
|
3891
|
+
path: "/storage/files/search",
|
|
3892
|
+
requestType: "SearchStorageFilesRequest",
|
|
3893
|
+
responseEnvelope: "athena",
|
|
3894
|
+
responseType: "StorageListFilesResponse"
|
|
3895
|
+
},
|
|
3896
|
+
{
|
|
3897
|
+
name: "confirmStorageUpload",
|
|
3898
|
+
method: "POST",
|
|
3899
|
+
path: "/storage/files/{file_id}/confirm-upload",
|
|
3900
|
+
pathParams: ["file_id"],
|
|
3901
|
+
requestType: "ConfirmStorageUploadRequest",
|
|
3902
|
+
responseEnvelope: "athena",
|
|
3903
|
+
responseType: "StorageFileMutationResponse"
|
|
3904
|
+
},
|
|
3905
|
+
{
|
|
3906
|
+
name: "uploadStorageFileBinary",
|
|
3907
|
+
method: "PUT",
|
|
3908
|
+
path: "/storage/files/{file_id}/upload",
|
|
3909
|
+
pathParams: ["file_id"],
|
|
3910
|
+
responseEnvelope: "athena",
|
|
3911
|
+
responseType: "StorageFileMutationResponse",
|
|
3912
|
+
binary: true
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
name: "copyStorageFile",
|
|
3916
|
+
method: "POST",
|
|
3917
|
+
path: "/storage/files/{file_id}/copy",
|
|
3918
|
+
pathParams: ["file_id"],
|
|
3919
|
+
requestType: "CopyStorageFileRequest",
|
|
3920
|
+
responseEnvelope: "athena",
|
|
3921
|
+
responseType: "StorageFileMutationResponse"
|
|
3922
|
+
},
|
|
3923
|
+
{
|
|
3924
|
+
name: "deleteManyStorageFiles",
|
|
3925
|
+
method: "POST",
|
|
3926
|
+
path: "/storage/files/delete-many",
|
|
3927
|
+
requestType: "DeleteManyStorageFilesRequest",
|
|
3928
|
+
responseEnvelope: "athena",
|
|
3929
|
+
responseType: "StorageFileMutationManyResponse"
|
|
3930
|
+
},
|
|
3931
|
+
{
|
|
3932
|
+
name: "updateManyStorageFiles",
|
|
3933
|
+
method: "POST",
|
|
3934
|
+
path: "/storage/files/update-many",
|
|
3935
|
+
requestType: "UpdateManyStorageFilesRequest",
|
|
3936
|
+
responseEnvelope: "athena",
|
|
3937
|
+
responseType: "StorageFileMutationManyResponse"
|
|
3938
|
+
},
|
|
3939
|
+
{
|
|
3940
|
+
name: "restoreStorageFile",
|
|
3941
|
+
method: "POST",
|
|
3942
|
+
path: "/storage/files/{file_id}/restore",
|
|
3943
|
+
pathParams: ["file_id"],
|
|
3944
|
+
responseEnvelope: "athena",
|
|
3945
|
+
responseType: "StorageFileMutationResponse"
|
|
3946
|
+
},
|
|
3947
|
+
{
|
|
3948
|
+
name: "purgeStorageFile",
|
|
3949
|
+
method: "DELETE",
|
|
3950
|
+
path: "/storage/files/{file_id}/purge",
|
|
3951
|
+
pathParams: ["file_id"],
|
|
3952
|
+
responseEnvelope: "athena",
|
|
3953
|
+
responseType: "StorageFileMutationResponse"
|
|
3954
|
+
},
|
|
3955
|
+
{
|
|
3956
|
+
name: "getStorageFilePublicUrl",
|
|
3957
|
+
method: "GET",
|
|
3958
|
+
path: "/storage/files/{file_id}/public-url",
|
|
3959
|
+
pathParams: ["file_id"],
|
|
3960
|
+
responseEnvelope: "athena",
|
|
3961
|
+
responseType: "Record<string, unknown>"
|
|
3962
|
+
},
|
|
3963
|
+
{
|
|
3964
|
+
name: "getStorageFileProxyUrl",
|
|
3965
|
+
method: "GET",
|
|
3966
|
+
path: "/storage/files/{file_id}/proxy-url",
|
|
3967
|
+
pathParams: ["file_id"],
|
|
3968
|
+
queryParams: ["purpose"],
|
|
3969
|
+
responseEnvelope: "athena",
|
|
3970
|
+
responseType: "Record<string, unknown>"
|
|
3971
|
+
},
|
|
3972
|
+
{
|
|
3973
|
+
name: "listStorageFileVersions",
|
|
3974
|
+
method: "GET",
|
|
3975
|
+
path: "/storage/files/{file_id}/versions",
|
|
3976
|
+
pathParams: ["file_id"],
|
|
3977
|
+
responseEnvelope: "athena",
|
|
3978
|
+
responseType: "Record<string, unknown>"
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
name: "restoreStorageFileVersion",
|
|
3982
|
+
method: "POST",
|
|
3983
|
+
path: "/storage/files/{file_id}/versions/{version_id}/restore",
|
|
3984
|
+
pathParams: ["file_id", "version_id"],
|
|
3985
|
+
responseEnvelope: "athena",
|
|
3986
|
+
responseType: "Record<string, unknown>"
|
|
3987
|
+
},
|
|
3988
|
+
{
|
|
3989
|
+
name: "deleteStorageFileVersion",
|
|
3990
|
+
method: "DELETE",
|
|
3991
|
+
path: "/storage/files/{file_id}/versions/{version_id}",
|
|
3992
|
+
pathParams: ["file_id", "version_id"],
|
|
3993
|
+
responseEnvelope: "athena",
|
|
3994
|
+
responseType: "Record<string, unknown>"
|
|
3995
|
+
},
|
|
3996
|
+
{
|
|
3997
|
+
name: "getStorageFileRetention",
|
|
3998
|
+
method: "GET",
|
|
3999
|
+
path: "/storage/files/{file_id}/retention",
|
|
4000
|
+
pathParams: ["file_id"],
|
|
4001
|
+
queryParams: ["version_id"],
|
|
4002
|
+
responseEnvelope: "athena",
|
|
4003
|
+
responseType: "Record<string, unknown>"
|
|
4004
|
+
},
|
|
4005
|
+
{
|
|
4006
|
+
name: "setStorageFileRetention",
|
|
4007
|
+
method: "POST",
|
|
4008
|
+
path: "/storage/files/{file_id}/retention",
|
|
4009
|
+
pathParams: ["file_id"],
|
|
4010
|
+
requestType: "StorageFileRetentionRequest",
|
|
4011
|
+
responseEnvelope: "athena",
|
|
4012
|
+
responseType: "Record<string, unknown>"
|
|
4013
|
+
},
|
|
4014
|
+
{
|
|
4015
|
+
name: "listStorageFolders",
|
|
4016
|
+
method: "POST",
|
|
4017
|
+
path: "/storage/folders/list",
|
|
4018
|
+
requestType: "ListStorageFoldersRequest",
|
|
4019
|
+
responseEnvelope: "athena",
|
|
4020
|
+
responseType: "Record<string, unknown>"
|
|
4021
|
+
},
|
|
4022
|
+
{
|
|
4023
|
+
name: "treeStorageFolders",
|
|
4024
|
+
method: "POST",
|
|
4025
|
+
path: "/storage/folders/tree",
|
|
4026
|
+
requestType: "TreeStorageFoldersRequest",
|
|
4027
|
+
responseEnvelope: "athena",
|
|
4028
|
+
responseType: "Record<string, unknown>"
|
|
4029
|
+
},
|
|
4030
|
+
{
|
|
4031
|
+
name: "listStoragePermissions",
|
|
4032
|
+
method: "POST",
|
|
4033
|
+
path: "/storage/permissions/list",
|
|
4034
|
+
requestType: "StoragePermissionListRequest",
|
|
4035
|
+
responseEnvelope: "athena",
|
|
4036
|
+
responseType: "StoragePermissionListResponse"
|
|
4037
|
+
},
|
|
4038
|
+
{
|
|
4039
|
+
name: "grantStoragePermission",
|
|
4040
|
+
method: "POST",
|
|
4041
|
+
path: "/storage/permissions/grant",
|
|
4042
|
+
requestType: "StoragePermissionGrantRequest",
|
|
4043
|
+
responseEnvelope: "athena",
|
|
4044
|
+
responseType: "Record<string, unknown>"
|
|
4045
|
+
},
|
|
4046
|
+
{
|
|
4047
|
+
name: "revokeStoragePermission",
|
|
4048
|
+
method: "POST",
|
|
4049
|
+
path: "/storage/permissions/revoke",
|
|
4050
|
+
requestType: "StoragePermissionRevokeRequest",
|
|
4051
|
+
responseEnvelope: "athena",
|
|
4052
|
+
responseType: "Record<string, unknown>"
|
|
4053
|
+
},
|
|
4054
|
+
{
|
|
4055
|
+
name: "checkStoragePermission",
|
|
4056
|
+
method: "POST",
|
|
4057
|
+
path: "/storage/permissions/check",
|
|
4058
|
+
requestType: "StoragePermissionCheckRequest",
|
|
4059
|
+
responseEnvelope: "athena",
|
|
4060
|
+
responseType: "StoragePermissionCheckResponse"
|
|
4061
|
+
},
|
|
4062
|
+
{
|
|
4063
|
+
name: "listStorageObjects",
|
|
4064
|
+
method: "POST",
|
|
4065
|
+
path: "/storage/objects",
|
|
4066
|
+
requestType: "StorageListObjectsRequest",
|
|
4067
|
+
responseEnvelope: "athena",
|
|
4068
|
+
responseType: "Record<string, unknown>"
|
|
4069
|
+
},
|
|
4070
|
+
{
|
|
4071
|
+
name: "headStorageObject",
|
|
4072
|
+
method: "POST",
|
|
4073
|
+
path: "/storage/objects/head",
|
|
4074
|
+
requestType: "StorageObjectRequest",
|
|
4075
|
+
responseEnvelope: "athena",
|
|
4076
|
+
responseType: "Record<string, unknown>"
|
|
4077
|
+
},
|
|
4078
|
+
{
|
|
4079
|
+
name: "existsStorageObject",
|
|
4080
|
+
method: "POST",
|
|
4081
|
+
path: "/storage/objects/exists",
|
|
4082
|
+
requestType: "StorageObjectRequest",
|
|
4083
|
+
responseEnvelope: "athena",
|
|
4084
|
+
responseType: "Record<string, unknown>"
|
|
4085
|
+
},
|
|
4086
|
+
{
|
|
4087
|
+
name: "validateStorageObject",
|
|
4088
|
+
method: "POST",
|
|
4089
|
+
path: "/storage/objects/validate",
|
|
4090
|
+
requestType: "StorageObjectValidateRequest",
|
|
4091
|
+
responseEnvelope: "athena",
|
|
4092
|
+
responseType: "Record<string, unknown>"
|
|
4093
|
+
},
|
|
4094
|
+
{
|
|
4095
|
+
name: "updateStorageObject",
|
|
4096
|
+
method: "POST",
|
|
4097
|
+
path: "/storage/objects/update",
|
|
4098
|
+
requestType: "StorageUpdateObjectRequest",
|
|
4099
|
+
responseEnvelope: "athena",
|
|
4100
|
+
responseType: "Record<string, unknown>"
|
|
4101
|
+
},
|
|
4102
|
+
{
|
|
4103
|
+
name: "copyStorageObject",
|
|
4104
|
+
method: "POST",
|
|
4105
|
+
path: "/storage/objects/copy",
|
|
4106
|
+
requestType: "StorageObjectCopyRequest",
|
|
4107
|
+
responseEnvelope: "athena",
|
|
4108
|
+
responseType: "Record<string, unknown>"
|
|
4109
|
+
},
|
|
4110
|
+
{
|
|
4111
|
+
name: "getStorageObjectUrl",
|
|
4112
|
+
method: "POST",
|
|
4113
|
+
path: "/storage/objects/url",
|
|
4114
|
+
requestType: "StorageObjectRequest",
|
|
4115
|
+
responseEnvelope: "athena",
|
|
4116
|
+
responseType: "Record<string, unknown>"
|
|
4117
|
+
},
|
|
4118
|
+
{
|
|
4119
|
+
name: "getStorageObjectPublicUrl",
|
|
4120
|
+
method: "POST",
|
|
4121
|
+
path: "/storage/objects/public-url",
|
|
4122
|
+
requestType: "StorageObjectPublicUrlRequest",
|
|
4123
|
+
responseEnvelope: "athena",
|
|
4124
|
+
responseType: "Record<string, unknown>"
|
|
4125
|
+
},
|
|
4126
|
+
{
|
|
4127
|
+
name: "deleteStorageObject",
|
|
4128
|
+
method: "POST",
|
|
4129
|
+
path: "/storage/objects/delete",
|
|
4130
|
+
requestType: "StorageObjectRequest",
|
|
4131
|
+
responseEnvelope: "athena",
|
|
4132
|
+
responseType: "Record<string, unknown>"
|
|
4133
|
+
},
|
|
4134
|
+
{
|
|
4135
|
+
name: "createStorageObjectUploadUrl",
|
|
4136
|
+
method: "POST",
|
|
4137
|
+
path: "/storage/objects/upload-url",
|
|
4138
|
+
requestType: "StoragePresignUploadRequest",
|
|
4139
|
+
responseEnvelope: "athena",
|
|
4140
|
+
responseType: "Record<string, unknown>"
|
|
4141
|
+
},
|
|
4142
|
+
{
|
|
4143
|
+
name: "createStorageObjectPostPolicy",
|
|
4144
|
+
method: "POST",
|
|
4145
|
+
path: "/storage/objects/post-policy",
|
|
4146
|
+
requestType: "StorageSignedPostPolicyRequest",
|
|
4147
|
+
responseEnvelope: "athena",
|
|
4148
|
+
responseType: "Record<string, unknown>"
|
|
4149
|
+
},
|
|
4150
|
+
{
|
|
4151
|
+
name: "listStorageObjectVersions",
|
|
4152
|
+
method: "POST",
|
|
4153
|
+
path: "/storage/objects/versions",
|
|
4154
|
+
requestType: "StorageObjectVersionListRequest",
|
|
4155
|
+
responseEnvelope: "athena",
|
|
4156
|
+
responseType: "Record<string, unknown>"
|
|
4157
|
+
},
|
|
4158
|
+
{
|
|
4159
|
+
name: "restoreStorageObjectVersion",
|
|
4160
|
+
method: "POST",
|
|
4161
|
+
path: "/storage/objects/versions/restore",
|
|
4162
|
+
requestType: "StorageObjectVersionMutationRequest",
|
|
4163
|
+
responseEnvelope: "athena",
|
|
4164
|
+
responseType: "Record<string, unknown>"
|
|
4165
|
+
},
|
|
4166
|
+
{
|
|
4167
|
+
name: "deleteStorageObjectVersion",
|
|
4168
|
+
method: "POST",
|
|
4169
|
+
path: "/storage/objects/versions/delete",
|
|
4170
|
+
requestType: "StorageObjectVersionMutationRequest",
|
|
4171
|
+
responseEnvelope: "athena",
|
|
4172
|
+
responseType: "Record<string, unknown>"
|
|
4173
|
+
},
|
|
4174
|
+
{
|
|
4175
|
+
name: "createStorageObjectFolder",
|
|
4176
|
+
method: "POST",
|
|
4177
|
+
path: "/storage/objects/folder",
|
|
4178
|
+
requestType: "StorageObjectFolderCreateRequest",
|
|
4179
|
+
responseEnvelope: "athena",
|
|
4180
|
+
responseType: "Record<string, unknown>"
|
|
4181
|
+
},
|
|
4182
|
+
{
|
|
4183
|
+
name: "deleteStorageObjectFolder",
|
|
4184
|
+
method: "POST",
|
|
4185
|
+
path: "/storage/objects/folder/delete",
|
|
4186
|
+
requestType: "StorageObjectFolderDeleteRequest",
|
|
4187
|
+
responseEnvelope: "athena",
|
|
4188
|
+
responseType: "Record<string, unknown>"
|
|
4189
|
+
},
|
|
4190
|
+
{
|
|
4191
|
+
name: "renameStorageObjectFolder",
|
|
4192
|
+
method: "POST",
|
|
4193
|
+
path: "/storage/objects/folder/rename",
|
|
4194
|
+
requestType: "StorageObjectFolderRenameRequest",
|
|
4195
|
+
responseEnvelope: "athena",
|
|
4196
|
+
responseType: "Record<string, unknown>"
|
|
4197
|
+
},
|
|
4198
|
+
{
|
|
4199
|
+
name: "listStorageBuckets",
|
|
4200
|
+
method: "POST",
|
|
4201
|
+
path: "/storage/buckets/list",
|
|
4202
|
+
requestType: "Omit<StorageObjectBaseRequest, 'bucket'>",
|
|
4203
|
+
responseEnvelope: "athena",
|
|
4204
|
+
responseType: "Record<string, unknown>"
|
|
4205
|
+
},
|
|
4206
|
+
{
|
|
4207
|
+
name: "createStorageBucket",
|
|
4208
|
+
method: "POST",
|
|
4209
|
+
path: "/storage/buckets/create",
|
|
4210
|
+
requestType: "StorageObjectBaseRequest",
|
|
4211
|
+
responseEnvelope: "athena",
|
|
4212
|
+
responseType: "Record<string, unknown>"
|
|
4213
|
+
},
|
|
4214
|
+
{
|
|
4215
|
+
name: "deleteStorageBucket",
|
|
4216
|
+
method: "POST",
|
|
4217
|
+
path: "/storage/buckets/delete",
|
|
4218
|
+
requestType: "StorageObjectBaseRequest",
|
|
4219
|
+
responseEnvelope: "athena",
|
|
4220
|
+
responseType: "Record<string, unknown>"
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
name: "getStorageBucketLifecycle",
|
|
4224
|
+
method: "POST",
|
|
4225
|
+
path: "/storage/buckets/lifecycle",
|
|
4226
|
+
requestType: "StorageBucketLifecycleRequest",
|
|
4227
|
+
responseEnvelope: "athena",
|
|
4228
|
+
responseType: "Record<string, unknown>"
|
|
4229
|
+
},
|
|
4230
|
+
{
|
|
4231
|
+
name: "setStorageBucketLifecycle",
|
|
4232
|
+
method: "POST",
|
|
4233
|
+
path: "/storage/buckets/lifecycle/set",
|
|
4234
|
+
requestType: "StorageSetBucketLifecycleRequest",
|
|
4235
|
+
responseEnvelope: "athena",
|
|
4236
|
+
responseType: "Record<string, unknown>"
|
|
4237
|
+
},
|
|
4238
|
+
{
|
|
4239
|
+
name: "deleteStorageBucketLifecycle",
|
|
4240
|
+
method: "POST",
|
|
4241
|
+
path: "/storage/buckets/lifecycle/delete",
|
|
4242
|
+
requestType: "StorageBucketLifecycleRequest",
|
|
4243
|
+
responseEnvelope: "athena",
|
|
4244
|
+
responseType: "Record<string, unknown>"
|
|
4245
|
+
},
|
|
4246
|
+
{
|
|
4247
|
+
name: "getStorageBucketPolicy",
|
|
4248
|
+
method: "POST",
|
|
4249
|
+
path: "/storage/buckets/policy",
|
|
4250
|
+
requestType: "StorageBucketPolicyRequest",
|
|
4251
|
+
responseEnvelope: "athena",
|
|
4252
|
+
responseType: "Record<string, unknown>"
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
name: "setStorageBucketPolicy",
|
|
4256
|
+
method: "POST",
|
|
4257
|
+
path: "/storage/buckets/policy/set",
|
|
4258
|
+
requestType: "StorageSetBucketPolicyRequest",
|
|
4259
|
+
responseEnvelope: "athena",
|
|
4260
|
+
responseType: "Record<string, unknown>"
|
|
4261
|
+
},
|
|
4262
|
+
{
|
|
4263
|
+
name: "deleteStorageBucketPolicy",
|
|
4264
|
+
method: "POST",
|
|
4265
|
+
path: "/storage/buckets/policy/delete",
|
|
4266
|
+
requestType: "StorageBucketPolicyRequest",
|
|
4267
|
+
responseEnvelope: "athena",
|
|
4268
|
+
responseType: "Record<string, unknown>"
|
|
4269
|
+
},
|
|
4270
|
+
{
|
|
4271
|
+
name: "getStorageBucketPublicAccess",
|
|
4272
|
+
method: "POST",
|
|
4273
|
+
path: "/storage/buckets/public-access",
|
|
4274
|
+
requestType: "StoragePublicAccessBlockRequest",
|
|
4275
|
+
responseEnvelope: "athena",
|
|
4276
|
+
responseType: "Record<string, unknown>"
|
|
4277
|
+
},
|
|
4278
|
+
{
|
|
4279
|
+
name: "setStorageBucketPublicAccess",
|
|
4280
|
+
method: "POST",
|
|
4281
|
+
path: "/storage/buckets/public-access/set",
|
|
4282
|
+
requestType: "StorageSetPublicAccessBlockRequest",
|
|
4283
|
+
responseEnvelope: "athena",
|
|
4284
|
+
responseType: "Record<string, unknown>"
|
|
4285
|
+
},
|
|
4286
|
+
{
|
|
4287
|
+
name: "deleteStorageBucketPublicAccess",
|
|
4288
|
+
method: "POST",
|
|
4289
|
+
path: "/storage/buckets/public-access/delete",
|
|
4290
|
+
requestType: "StoragePublicAccessBlockRequest",
|
|
4291
|
+
responseEnvelope: "athena",
|
|
4292
|
+
responseType: "Record<string, unknown>"
|
|
4293
|
+
},
|
|
4294
|
+
{
|
|
4295
|
+
name: "getStorageBucketCors",
|
|
4296
|
+
method: "POST",
|
|
4297
|
+
path: "/storage/buckets/cors",
|
|
4298
|
+
requestType: "StorageBucketCorsRequest",
|
|
4299
|
+
responseEnvelope: "athena",
|
|
4300
|
+
responseType: "Record<string, unknown>"
|
|
4301
|
+
},
|
|
4302
|
+
{
|
|
4303
|
+
name: "setStorageBucketCors",
|
|
4304
|
+
method: "POST",
|
|
4305
|
+
path: "/storage/buckets/cors/set",
|
|
4306
|
+
requestType: "StorageSetBucketCorsRequest",
|
|
4307
|
+
responseEnvelope: "athena",
|
|
4308
|
+
responseType: "Record<string, unknown>"
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
name: "deleteStorageBucketCors",
|
|
4312
|
+
method: "POST",
|
|
4313
|
+
path: "/storage/buckets/cors/delete",
|
|
4314
|
+
requestType: "StorageBucketCorsRequest",
|
|
4315
|
+
responseEnvelope: "athena",
|
|
4316
|
+
responseType: "Record<string, unknown>"
|
|
4317
|
+
},
|
|
4318
|
+
{
|
|
4319
|
+
name: "createStorageMultipartUpload",
|
|
4320
|
+
method: "POST",
|
|
4321
|
+
path: "/storage/multipart/create",
|
|
4322
|
+
requestType: "StorageMultipartCreateRequest",
|
|
4323
|
+
responseEnvelope: "athena",
|
|
4324
|
+
responseType: "Record<string, unknown>"
|
|
4325
|
+
},
|
|
4326
|
+
{
|
|
4327
|
+
name: "signStorageMultipartPart",
|
|
4328
|
+
method: "POST",
|
|
4329
|
+
path: "/storage/multipart/sign-part",
|
|
4330
|
+
requestType: "StorageMultipartSignPartRequest",
|
|
4331
|
+
responseEnvelope: "athena",
|
|
4332
|
+
responseType: "Record<string, unknown>"
|
|
4333
|
+
},
|
|
4334
|
+
{
|
|
4335
|
+
name: "completeStorageMultipartUpload",
|
|
4336
|
+
method: "POST",
|
|
4337
|
+
path: "/storage/multipart/complete",
|
|
4338
|
+
requestType: "StorageMultipartCompleteRequest",
|
|
4339
|
+
responseEnvelope: "athena",
|
|
4340
|
+
responseType: "StorageFileMutationResponse"
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
name: "abortStorageMultipartUpload",
|
|
4344
|
+
method: "POST",
|
|
4345
|
+
path: "/storage/multipart/abort",
|
|
4346
|
+
requestType: "StorageMultipartAbortRequest",
|
|
4347
|
+
responseEnvelope: "athena",
|
|
4348
|
+
responseType: "Record<string, unknown>"
|
|
4349
|
+
},
|
|
4350
|
+
{
|
|
4351
|
+
name: "listStorageMultipartParts",
|
|
4352
|
+
method: "POST",
|
|
4353
|
+
path: "/storage/multipart/list-parts",
|
|
4354
|
+
requestType: "StorageMultipartListPartsRequest",
|
|
4355
|
+
responseEnvelope: "athena",
|
|
4356
|
+
responseType: "Record<string, unknown>"
|
|
4357
|
+
},
|
|
4358
|
+
{
|
|
4359
|
+
name: "listStorageAuditEvents",
|
|
4360
|
+
method: "POST",
|
|
4361
|
+
path: "/storage/audit/list",
|
|
4362
|
+
requestType: "StorageAuditQueryRequest",
|
|
4363
|
+
responseEnvelope: "athena",
|
|
4364
|
+
responseType: "StorageAuditListResponse"
|
|
3857
4365
|
}
|
|
3858
4366
|
]
|
|
3859
4367
|
};
|
|
@@ -4314,7 +4822,7 @@ async function putPresignedUploadBody(uploadUrl, uploadHeaders, body, options) {
|
|
|
4314
4822
|
return fetch(uploadUrl, init);
|
|
4315
4823
|
}
|
|
4316
4824
|
function attachManagedUpload(upload) {
|
|
4317
|
-
const headers = {};
|
|
4825
|
+
const headers = { ...upload.headers ?? {} };
|
|
4318
4826
|
return {
|
|
4319
4827
|
...upload,
|
|
4320
4828
|
method: "PUT",
|
|
@@ -4360,7 +4868,12 @@ function normalizeUploadUrlRequest(input) {
|
|
|
4360
4868
|
file_id: input.file_id ?? input.fileId,
|
|
4361
4869
|
public: input.public,
|
|
4362
4870
|
visibility: input.visibility,
|
|
4363
|
-
metadata: input.metadata
|
|
4871
|
+
metadata: input.metadata,
|
|
4872
|
+
server_side_encryption: input.server_side_encryption,
|
|
4873
|
+
sse: input.sse,
|
|
4874
|
+
ssekms_key_id: input.ssekms_key_id,
|
|
4875
|
+
kms_key_id: input.kms_key_id,
|
|
4876
|
+
bucket_key_enabled: input.bucket_key_enabled
|
|
4364
4877
|
};
|
|
4365
4878
|
}
|
|
4366
4879
|
async function callStorageUploadBinaryEndpoint(gateway, endpoint, body, options, runtimeOptions) {
|
|
@@ -4511,6 +5024,12 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
4511
5024
|
options,
|
|
4512
5025
|
resolvedRuntimeOptions
|
|
4513
5026
|
);
|
|
5027
|
+
const callStorageFileVisibility = (fileId, method, input, options) => callAthena2(
|
|
5028
|
+
withPathParam("/storage/files/{file_id}/visibility", "file_id", fileId),
|
|
5029
|
+
method,
|
|
5030
|
+
input,
|
|
5031
|
+
options
|
|
5032
|
+
);
|
|
4514
5033
|
const base = {
|
|
4515
5034
|
listStorageCatalogs(options) {
|
|
4516
5035
|
return callRaw("/storage/catalogs", "GET", void 0, options);
|
|
@@ -4560,7 +5079,7 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
4560
5079
|
return callAthena2(withPathParam("/storage/files/{file_id}", "file_id", fileId), "DELETE", void 0, options);
|
|
4561
5080
|
},
|
|
4562
5081
|
setStorageFileVisibility(fileId, input, options) {
|
|
4563
|
-
return
|
|
5082
|
+
return callStorageFileVisibility(fileId, "PATCH", input, options);
|
|
4564
5083
|
},
|
|
4565
5084
|
deleteStorageFolder(input, options) {
|
|
4566
5085
|
return callAthena2("/storage/folders/delete", "POST", input, options);
|
|
@@ -4632,13 +5151,62 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
4632
5151
|
publicUrl(fileId, options) {
|
|
4633
5152
|
return callAthena2(withPathParam("/storage/files/{file_id}/public-url", "file_id", fileId), "GET", void 0, options);
|
|
4634
5153
|
},
|
|
5154
|
+
proxyUrl(fileId, query, options) {
|
|
5155
|
+
const path = appendQuery(
|
|
5156
|
+
withPathParam("/storage/files/{file_id}/proxy-url", "file_id", fileId),
|
|
5157
|
+
query
|
|
5158
|
+
);
|
|
5159
|
+
return callAthena2(path, "GET", void 0, options);
|
|
5160
|
+
},
|
|
4635
5161
|
proxy(fileId, query, options) {
|
|
4636
5162
|
return base.getStorageFileProxy(fileId, query, options);
|
|
4637
5163
|
},
|
|
4638
|
-
|
|
5164
|
+
versions(fileId, options) {
|
|
5165
|
+
return callAthena2(withPathParam("/storage/files/{file_id}/versions", "file_id", fileId), "GET", void 0, options);
|
|
5166
|
+
},
|
|
5167
|
+
restoreVersion(fileId, versionId, options) {
|
|
5168
|
+
return callAthena2(
|
|
5169
|
+
withPathParam(
|
|
5170
|
+
withPathParam("/storage/files/{file_id}/versions/{version_id}/restore", "file_id", fileId),
|
|
5171
|
+
"version_id",
|
|
5172
|
+
versionId
|
|
5173
|
+
),
|
|
5174
|
+
"POST",
|
|
5175
|
+
{},
|
|
5176
|
+
options
|
|
5177
|
+
);
|
|
5178
|
+
},
|
|
5179
|
+
deleteVersion(fileId, versionId, options) {
|
|
5180
|
+
return callAthena2(
|
|
5181
|
+
withPathParam(
|
|
5182
|
+
withPathParam("/storage/files/{file_id}/versions/{version_id}", "file_id", fileId),
|
|
5183
|
+
"version_id",
|
|
5184
|
+
versionId
|
|
5185
|
+
),
|
|
5186
|
+
"DELETE",
|
|
5187
|
+
void 0,
|
|
5188
|
+
options
|
|
5189
|
+
);
|
|
5190
|
+
},
|
|
5191
|
+
retention: {
|
|
5192
|
+
get(fileId, query, options) {
|
|
5193
|
+
const path = appendQuery(
|
|
5194
|
+
withPathParam("/storage/files/{file_id}/retention", "file_id", fileId),
|
|
5195
|
+
query
|
|
5196
|
+
);
|
|
5197
|
+
return callAthena2(path, "GET", void 0, options);
|
|
5198
|
+
},
|
|
4639
5199
|
set(fileId, input, options) {
|
|
5200
|
+
return callAthena2(withPathParam("/storage/files/{file_id}/retention", "file_id", fileId), "POST", input, options);
|
|
5201
|
+
}
|
|
5202
|
+
},
|
|
5203
|
+
visibility: {
|
|
5204
|
+
update(fileId, input, options) {
|
|
4640
5205
|
return base.setStorageFileVisibility(fileId, input, options);
|
|
4641
5206
|
},
|
|
5207
|
+
set(fileId, input, options) {
|
|
5208
|
+
return callStorageFileVisibility(fileId, "POST", input, options);
|
|
5209
|
+
},
|
|
4642
5210
|
setMany(input, options) {
|
|
4643
5211
|
return callAthena2("/storage/files/visibility-many", "POST", input, options);
|
|
4644
5212
|
}
|
|
@@ -4733,6 +5301,18 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
4733
5301
|
uploadUrl(input, options) {
|
|
4734
5302
|
return callAthena2("/storage/objects/upload-url", "POST", input, options);
|
|
4735
5303
|
},
|
|
5304
|
+
versions(input, options) {
|
|
5305
|
+
return callAthena2("/storage/objects/versions", "POST", input, options);
|
|
5306
|
+
},
|
|
5307
|
+
restoreVersion(input, options) {
|
|
5308
|
+
return callAthena2("/storage/objects/versions/restore", "POST", input, options);
|
|
5309
|
+
},
|
|
5310
|
+
deleteVersion(input, options) {
|
|
5311
|
+
return callAthena2("/storage/objects/versions/delete", "POST", input, options);
|
|
5312
|
+
},
|
|
5313
|
+
postPolicy(input, options) {
|
|
5314
|
+
return callAthena2("/storage/objects/post-policy", "POST", input, options);
|
|
5315
|
+
},
|
|
4736
5316
|
folder: objectFolder
|
|
4737
5317
|
};
|
|
4738
5318
|
const bucket = {
|
|
@@ -4745,6 +5325,39 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
4745
5325
|
delete(input, options) {
|
|
4746
5326
|
return callAthena2("/storage/buckets/delete", "POST", input, options);
|
|
4747
5327
|
},
|
|
5328
|
+
lifecycle: {
|
|
5329
|
+
get(input, options) {
|
|
5330
|
+
return callAthena2("/storage/buckets/lifecycle", "POST", input, options);
|
|
5331
|
+
},
|
|
5332
|
+
set(input, options) {
|
|
5333
|
+
return callAthena2("/storage/buckets/lifecycle/set", "POST", input, options);
|
|
5334
|
+
},
|
|
5335
|
+
delete(input, options) {
|
|
5336
|
+
return callAthena2("/storage/buckets/lifecycle/delete", "POST", input, options);
|
|
5337
|
+
}
|
|
5338
|
+
},
|
|
5339
|
+
policy: {
|
|
5340
|
+
get(input, options) {
|
|
5341
|
+
return callAthena2("/storage/buckets/policy", "POST", input, options);
|
|
5342
|
+
},
|
|
5343
|
+
set(input, options) {
|
|
5344
|
+
return callAthena2("/storage/buckets/policy/set", "POST", input, options);
|
|
5345
|
+
},
|
|
5346
|
+
delete(input, options) {
|
|
5347
|
+
return callAthena2("/storage/buckets/policy/delete", "POST", input, options);
|
|
5348
|
+
}
|
|
5349
|
+
},
|
|
5350
|
+
publicAccess: {
|
|
5351
|
+
get(input, options) {
|
|
5352
|
+
return callAthena2("/storage/buckets/public-access", "POST", input, options);
|
|
5353
|
+
},
|
|
5354
|
+
set(input, options) {
|
|
5355
|
+
return callAthena2("/storage/buckets/public-access/set", "POST", input, options);
|
|
5356
|
+
},
|
|
5357
|
+
delete(input, options) {
|
|
5358
|
+
return callAthena2("/storage/buckets/public-access/delete", "POST", input, options);
|
|
5359
|
+
}
|
|
5360
|
+
},
|
|
4748
5361
|
cors: {
|
|
4749
5362
|
get(input, options) {
|
|
4750
5363
|
return callAthena2("/storage/buckets/cors", "POST", input, options);
|
|
@@ -7511,21 +8124,54 @@ function resolveServiceUrls(config) {
|
|
|
7511
8124
|
storageUrl: resolveServiceUrlOverride(config.storage?.url, "Athena storage base URL") ?? resolveServiceUrlOverride(config.storageUrl, "Athena storage base URL") ?? (baseUrl ? appendServicePath(baseUrl, "storage") : void 0)
|
|
7512
8125
|
};
|
|
7513
8126
|
}
|
|
8127
|
+
function resolveOptionalClientName(value) {
|
|
8128
|
+
if (value === void 0 || value === null) {
|
|
8129
|
+
return void 0;
|
|
8130
|
+
}
|
|
8131
|
+
const normalizedValue = value.trim();
|
|
8132
|
+
return normalizedValue ? normalizedValue : void 0;
|
|
8133
|
+
}
|
|
8134
|
+
function resolveRequiredClientApiKey(value) {
|
|
8135
|
+
if (value === void 0 || value === null) {
|
|
8136
|
+
throw new Error(
|
|
8137
|
+
"Athena API key is required. Pass createClient(url, key) with a real API key, or set key in the config object."
|
|
8138
|
+
);
|
|
8139
|
+
}
|
|
8140
|
+
const normalizedValue = value.trim();
|
|
8141
|
+
if (!normalizedValue) {
|
|
8142
|
+
throw new Error(
|
|
8143
|
+
"Athena API key is required. Pass createClient(url, key) with a real API key, or set key in the config object."
|
|
8144
|
+
);
|
|
8145
|
+
}
|
|
8146
|
+
return normalizedValue;
|
|
8147
|
+
}
|
|
7514
8148
|
function normalizeAuthClientConfig(auth, defaultBaseUrl) {
|
|
7515
8149
|
if (!auth && defaultBaseUrl === void 0) {
|
|
7516
8150
|
return void 0;
|
|
7517
8151
|
}
|
|
7518
|
-
const {
|
|
8152
|
+
const {
|
|
8153
|
+
url,
|
|
8154
|
+
baseUrl,
|
|
8155
|
+
apiKey,
|
|
8156
|
+
bearerToken,
|
|
8157
|
+
...rest
|
|
8158
|
+
} = auth ?? {};
|
|
7519
8159
|
const normalized = {
|
|
7520
8160
|
...rest
|
|
7521
8161
|
};
|
|
7522
8162
|
const resolvedBaseUrl = resolveClientServiceBaseUrl(
|
|
7523
|
-
url ??
|
|
8163
|
+
url ?? baseUrl ?? defaultBaseUrl,
|
|
7524
8164
|
"Athena auth base URL"
|
|
7525
8165
|
);
|
|
7526
8166
|
if (resolvedBaseUrl !== void 0) {
|
|
7527
8167
|
normalized.baseUrl = resolvedBaseUrl;
|
|
7528
8168
|
}
|
|
8169
|
+
if (typeof apiKey === "string") {
|
|
8170
|
+
normalized.apiKey = apiKey;
|
|
8171
|
+
}
|
|
8172
|
+
if (typeof bearerToken === "string") {
|
|
8173
|
+
normalized.bearerToken = bearerToken;
|
|
8174
|
+
}
|
|
7529
8175
|
return normalized;
|
|
7530
8176
|
}
|
|
7531
8177
|
function resolveCreateClientConfig(config) {
|
|
@@ -7537,8 +8183,8 @@ function resolveCreateClientConfig(config) {
|
|
|
7537
8183
|
}
|
|
7538
8184
|
return {
|
|
7539
8185
|
baseUrl: resolvedUrls.dbUrl,
|
|
7540
|
-
apiKey: config.key,
|
|
7541
|
-
client: config.client,
|
|
8186
|
+
apiKey: resolveRequiredClientApiKey(config.key),
|
|
8187
|
+
client: resolveOptionalClientName(config.client),
|
|
7542
8188
|
backend: toBackendConfig(config.backend),
|
|
7543
8189
|
headers: config.headers,
|
|
7544
8190
|
auth: config.auth,
|
|
@@ -7661,7 +8307,7 @@ var AthenaClient = class {
|
|
|
7661
8307
|
}
|
|
7662
8308
|
};
|
|
7663
8309
|
function createClient(configOrUrl, apiKey, options) {
|
|
7664
|
-
if (typeof configOrUrl === "string") {
|
|
8310
|
+
if (typeof configOrUrl === "string" || configOrUrl === null || configOrUrl === void 0) {
|
|
7665
8311
|
return createClientFromConfig(resolveCreateClientConfig({
|
|
7666
8312
|
url: configOrUrl,
|
|
7667
8313
|
key: apiKey ?? "",
|