2
0

(s3) Improve storage management and type safety

Closes #756
This commit is contained in:
Baptiste Arnaud
2023-09-08 15:28:11 +02:00
parent 43be38cf50
commit fbb198af9d
47 changed files with 790 additions and 128 deletions

View File

@@ -32214,6 +32214,148 @@
}
}
}
},
"/generate-upload-url": {
"post": {
"operationId": "generateUploadUrl",
"summary": "Generate upload URL",
"description": "Generate the needed URL to upload a file from the client",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"filePathProps": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string"
},
"typebotId": {
"type": "string"
},
"blockId": {
"type": "string"
},
"itemId": {
"type": "string"
}
},
"required": [
"workspaceId",
"typebotId",
"blockId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string"
},
"typebotId": {
"type": "string"
},
"fileName": {
"type": "string"
}
},
"required": [
"workspaceId",
"typebotId",
"fileName"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"fileName": {
"type": "string"
}
},
"required": [
"userId",
"fileName"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"workspaceId": {
"type": "string"
},
"fileName": {
"type": "string"
}
},
"required": [
"workspaceId",
"fileName"
],
"additionalProperties": false
}
]
},
"fileType": {
"type": "string"
}
},
"required": [
"filePathProps"
],
"additionalProperties": false
}
}
}
},
"parameters": [],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"presignedUrl": {
"type": "string"
},
"fileUrl": {
"type": "string"
}
},
"required": [
"presignedUrl",
"fileUrl"
],
"additionalProperties": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
}
}
}
},
"components": {