Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow users to manage their attachments in uc #6731

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
349 changes: 247 additions & 102 deletions api-docs/openapi/v3_0/aggregated.json
Original file line number Diff line number Diff line change
Expand Up @@ -14722,87 +14722,6 @@
]
}
},
"/apis/uc.api.content.halo.run/v1alpha1/attachments": {
"post": {
"description": "Create attachment for the given post.",
"operationId": "CreateAttachmentForPost",
"parameters": [
{
"description": "Wait for permalink.",
"in": "query",
"name": "waitForPermalink",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/PostAttachmentRequest"
}
}
}
},
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
},
"description": "default response"
}
},
"tags": [
"AttachmentV1alpha1Uc"
]
}
},
"/apis/uc.api.content.halo.run/v1alpha1/attachments/-/upload-from-url": {
"post": {
"description": "Upload attachment from the given URL.",
"operationId": "ExternalTransferAttachment_1",
"parameters": [
{
"description": "Wait for permalink.",
"in": "query",
"name": "waitForPermalink",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadFromUrlRequest"
}
}
},
"required": true
},
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
},
"description": "default response"
}
},
"tags": [
"AttachmentV1alpha1Uc"
]
}
},
"/apis/uc.api.content.halo.run/v1alpha1/posts": {
"get": {
"description": "List posts owned by the current user.",
Expand Down Expand Up @@ -15570,6 +15489,217 @@
"PersonalAccessTokenV1alpha1Uc"
]
}
},
"/apis/uc.api.storage.halo.run/v1alpha1/attachments": {
"get": {
"description": "List attachments of the current user uploaded.",
"operationId": "ListMyAttachments",
"parameters": [
{
"description": "Page number. Default is 0.",
"in": "query",
"name": "page",
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"description": "Size number. Default is 0.",
"in": "query",
"name": "size",
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"description": "Label selector. e.g.: hidden!\u003dtrue",
"in": "query",
"name": "labelSelector",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"description": "Field selector. e.g.: metadata.name\u003d\u003dhalo",
"in": "query",
"name": "fieldSelector",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
"in": "query",
"name": "sort",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"description": "Filter attachments without group. This parameter will ignore group parameter.",
"in": "query",
"name": "ungrouped",
"schema": {
"type": "boolean"
}
},
{
"description": "Keyword for searching.",
"in": "query",
"name": "keyword",
"schema": {
"type": "string"
}
},
{
"description": "Acceptable media types.",
"in": "query",
"name": "accepts",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/AttachmentList"
}
}
},
"description": "default response"
}
},
"tags": [
"AttachmentV1alpha1Uc"
]
},
"post": {
"description": "Create attachment for the given post.",
"operationId": "CreateAttachmentForPost",
"parameters": [
{
"description": "Wait for permalink.",
"in": "query",
"name": "waitForPermalink",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/PostAttachmentRequest"
}
}
}
},
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
},
"description": "default response"
}
},
"tags": [
"AttachmentV1alpha1Uc"
]
}
},
"/apis/uc.api.storage.halo.run/v1alpha1/attachments/-/upload": {
"post": {
"description": "Upload attachment to user center storage.",
"operationId": "UploadUcAttachment",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/UcUploadRequest"
}
}
},
"required": true
},
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
},
"description": "default response"
}
},
"tags": [
"AttachmentV1alpha1Uc"
]
}
},
"/apis/uc.api.storage.halo.run/v1alpha1/attachments/-/upload-from-url": {
"post": {
"description": "Upload attachment from the given URL.",
"operationId": "ExternalTransferAttachment_1",
"parameters": [
{
"description": "Wait for permalink.",
"in": "query",
"name": "waitForPermalink",
"schema": {
"type": "boolean"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadFromUrlRequest"
}
}
},
"required": true
},
"responses": {
"default": {
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Attachment"
}
}
},
"description": "default response"
}
},
"tags": [
"AttachmentV1alpha1Uc"
]
}
}
},
"components": {
Expand Down Expand Up @@ -19740,6 +19870,9 @@
}
}
},
"Part": {
"type": "object"
},
"PasswordRequest": {
"required": [
"password"
Expand Down Expand Up @@ -23476,6 +23609,39 @@
}
}
},
"UcUploadRequest": {
"required": [
"file"
],
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
},
"formData": {
"type": "object",
"properties": {
"all": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/Part"
},
"writeOnly": true
},
"empty": {
"type": "boolean"
}
},
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Part"
}
}
}
}
},
"UpgradeFromUriRequest": {
"required": [
"uri"
Expand Down Expand Up @@ -23625,36 +23791,15 @@
},
"UserConnectionSpec": {
"required": [
"accessToken",
"displayName",
"providerUserId",
"registrationId",
"username"
],
"type": "object",
"properties": {
"accessToken": {
"type": "string"
},
"avatarUrl": {
"type": "string"
},
"displayName": {
"type": "string"
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"profileUrl": {
"type": "string"
},
"providerUserId": {
"type": "string"
},
"refreshToken": {
"type": "string"
},
"registrationId": {
"type": "string"
},
Expand Down
Loading
Loading