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