Skip to content

Commit

Permalink
feat: PPT-1518 Added Uploads Listing Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
naqvis committed Sep 11, 2024
1 parent afea979 commit 7c17d0a
Show file tree
Hide file tree
Showing 4 changed files with 318 additions and 23 deletions.
249 changes: 232 additions & 17 deletions OPENAPI_DOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17611,43 +17611,70 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__ContentError'
/api/engine/v2/uploads/new:
/api/engine/v2/uploads:
get:
summary: check the storage provider for a new file upload
summary: returns the list of uploads for current domain authority
tags:
- Uploads
operationId: PlaceOS::Api::Uploads_storage_name
operationId: PlaceOS::Api::Uploads_index
parameters:
- name: file_name
- name: file_search
in: query
description: Name of file which will be uploaded to cloud storage
example: test.jpeg
required: true
description: filters results to returns ones where file_name contains this
search string
example: my-file
required: false
schema:
type: string
- name: file_size
nullable: true
- name: limit
in: query
description: Size of file which will be uploaded to cloud storage
example: "1234"
required: true
description: the maximum number of results to return
example: "10000"
required: false
schema:
type: integer
format: Int64
- name: file_mime
format: Int32
- name: offset
in: query
description: Mime-Type of file which will be uploaded to cloud storage
example: image/jpeg
description: the starting offset of the result set. Used to implement pagination
required: false
schema:
type: integer
format: Int32
- name: q
in: query
description: returns results based on a [simple query string](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html)
required: false
schema:
type: string
- name: ref
in: query
description: a token for accessing the next page of results, provided in the
`Link` header
required: false
schema:
type: string
nullable: true
- name: fields
in: query
description: (Optional, comma separated array of strings) Array of fields
you wish to search. Accepts wildcard expresssions and boost relevance score
for matches for particular field using a caret ^ operator.
required: false
schema:
type: array
items:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/NamedTuple_residence__String_'
type: array
items:
$ref: '#/components/schemas/PlaceOS__Model__Upload'
409:
description: Conflict
content:
Expand Down Expand Up @@ -17698,7 +17725,6 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__ContentError'
/api/engine/v2/uploads:
post:
summary: initiate a new upload
tags:
Expand Down Expand Up @@ -17768,6 +17794,93 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__ContentError'
/api/engine/v2/uploads/new:
get:
summary: check the storage provider for a new file upload
tags:
- Uploads
operationId: PlaceOS::Api::Uploads_storage_name
parameters:
- name: file_name
in: query
description: Name of file which will be uploaded to cloud storage
example: test.jpeg
required: true
schema:
type: string
- name: file_size
in: query
description: Size of file which will be uploaded to cloud storage
example: "1234"
required: true
schema:
type: integer
format: Int64
- name: file_mime
in: query
description: Mime-Type of file which will be uploaded to cloud storage
example: image/jpeg
required: false
schema:
type: string
nullable: true
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/NamedTuple_residence__String_'
409:
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__CommonError'
401:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__CommonError'
403:
description: Forbidden
404:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__CommonError'
408:
description: Request Timeout
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__CommonError'
400:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__ParameterError'
422:
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__ParameterError'
406:
description: Not Acceptable
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__ContentError'
415:
description: Unsupported Media Type
content:
application/json:
schema:
$ref: '#/components/schemas/PlaceOS__Api__Application__ContentError'
/api/engine/v2/uploads/{id}/url:
get:
summary: obtain a temporary link to a private resource
Expand Down Expand Up @@ -22162,6 +22275,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -22616,6 +22732,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -23033,6 +23152,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -23542,6 +23664,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -24005,6 +24130,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -25032,6 +25160,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -25449,6 +25580,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -26268,6 +26402,81 @@ components:
id:
type: string
nullable: true
PlaceOS__Model__Upload:
type: object
properties:
created_at:
type: integer
format: Int64
nullable: true
updated_at:
type: integer
format: Int64
nullable: true
uploaded_email:
type: string
format: email
nullable: true
file_name:
type: string
nullable: true
file_size:
type: integer
format: Int64
nullable: true
file_path:
type: string
nullable: true
object_key:
type: string
nullable: true
file_md5:
type: string
nullable: true
public:
type: boolean
nullable: true
permissions:
type: string
enum:
- none
- admin
- support
nullable: true
object_options:
type: object
additionalProperties:
type: object
nullable: true
resumable_id:
type: string
nullable: true
resumable:
type: boolean
nullable: true
part_list:
type: array
items:
type: integer
format: Int32
nullable: true
part_data:
type: object
additionalProperties:
type: object
nullable: true
upload_complete:
type: boolean
nullable: true
storage_id:
type: string
nullable: true
uploaded_by:
type: string
nullable: true
id:
type: string
nullable: true
NamedTuple_residence__String_:
type: object
properties:
Expand Down Expand Up @@ -27579,6 +27788,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down Expand Up @@ -27996,6 +28208,9 @@ components:
items:
type: string
nullable: true
place_id:
type: string
nullable: true
parent_id:
type: string
nullable: true
Expand Down
Loading

0 comments on commit 7c17d0a

Please sign in to comment.