| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127 |
- openapi: 3.1.0
- info:
- title: Celestia Trace iOS Remote API
- version: 2026-07-24
- description: |
- iOS 客户端实际调用的远程接口契约。
- 维护规则:
- 1. backend 路由、请求字段或响应字段变化时,先更新本文件,再更新 Swift 模型。
- 2. 所有 JSON 接口使用统一响应 `{code, message, data}`。
- 3. 除登录、注册和刷新令牌外,接口均使用 Bearer access token。
- 4. 公网网关保留 `/celestia-trace/v1`;后端 Gin 路由本身使用 `/v1`。
- 5. 服务端时间使用 RFC 3339 / ISO 8601,客户端同时兼容带或不带小数秒。
- x-client-sources:
- - CelestiaTrace/Services/Network/APIClient.swift
- - CelestiaTrace/Services/Network/RemoteNetworkService.swift
- - CelestiaTrace/Services/Auth/RemoteAuthService.swift
- servers:
- - url: https://api.ccdw.life/celestia-trace/v1
- description: Production
- tags:
- - name: Health
- - name: Auth
- - name: User
- - name: Devices
- - name: Sessions
- - name: Assets
- - name: Sync
- paths:
- /health:
- get:
- tags: [Health]
- operationId: getHealth
- security: []
- responses:
- "200":
- description: API and database are healthy
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/HealthEnvelope"
- "503":
- $ref: "#/components/responses/Error"
- /auth/register:
- post:
- tags: [Auth]
- operationId: register
- security: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/RegisterRequest"
- responses:
- "200":
- description: Account and login session created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AuthEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "409":
- $ref: "#/components/responses/Error"
- /auth/login:
- post:
- tags: [Auth]
- operationId: login
- security: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/LoginRequest"
- responses:
- "200":
- description: Login session created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AuthEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- /auth/refresh:
- post:
- tags: [Auth]
- operationId: refreshAccessToken
- security: []
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required: [refreshToken]
- properties:
- refreshToken:
- type: string
- responses:
- "200":
- description: Tokens rotated; the old refresh token is no longer valid
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AuthEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- /auth/logout:
- post:
- tags: [Auth]
- operationId: logout
- responses:
- "200":
- $ref: "#/components/responses/EmptySuccess"
- "401":
- $ref: "#/components/responses/Error"
- /user/profile:
- get:
- tags: [User]
- operationId: getProfile
- responses:
- "200":
- description: Current user
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/UserEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- put:
- tags: [User]
- operationId: updateProfile
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/UpdateProfileRequest"
- responses:
- "200":
- description: Updated user
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/UserEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- "409":
- $ref: "#/components/responses/Error"
- /user/change-password:
- post:
- tags: [User]
- operationId: changePassword
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required: [oldPassword, newPassword]
- properties:
- oldPassword:
- type: string
- newPassword:
- type: string
- minLength: 6
- responses:
- "200":
- $ref: "#/components/responses/EmptySuccess"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- /devices:
- post:
- tags: [Devices]
- operationId: bindDevice
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/BindDeviceRequest"
- responses:
- "200":
- description: Bound or updated cloud device
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DeviceEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- /devices/{deviceId}:
- parameters:
- - $ref: "#/components/parameters/DeviceId"
- put:
- tags: [Devices]
- operationId: updateDevice
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/UpdateDeviceRequest"
- responses:
- "200":
- description: Updated cloud device
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DeviceEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- delete:
- tags: [Devices]
- operationId: unbindDevice
- responses:
- "200":
- description: Device unbound
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DeleteEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- /sessions:
- get:
- tags: [Sessions, Sync]
- operationId: getSessionSyncIndex
- description: |
- Lightweight first phase of field-record synchronization. Returns one
- timestamped row per record without events or assets. The client compares
- `updatedAt` (and `revision` as a monotonic guard) with local state, then
- fetches concrete content only for new or changed records from
- `/sessions/{sessionId}`.
- parameters:
- - name: includeDeleted
- in: query
- schema:
- type: boolean
- default: true
- description: iOS uses true to receive deletion tombstones.
- - name: updatedAfter
- in: query
- schema:
- type: string
- format: date-time
- description: Optional exclusive timestamp cursor for incremental checks.
- responses:
- "200":
- description: Timestamp index for records visible to the current user
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SessionSyncIndexEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- post:
- tags: [Sessions]
- operationId: upsertSession
- description: |
- Idempotent upsert by `(userId, clientId)`.
- Existing sessions must send `baseRevision`; a mismatch returns HTTP/code 409.
- `deletedEventClientIds` removes events deleted locally since the last pull.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SessionUpsertRequest"
- responses:
- "200":
- description: Created or updated session
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SessionEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- "409":
- description: Optimistic-lock conflict
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ConflictEnvelope"
- /sessions/{sessionId}:
- parameters:
- - $ref: "#/components/parameters/SessionId"
- get:
- tags: [Sessions]
- operationId: getSessionDetail
- description: Second synchronization phase for one new or changed record.
- responses:
- "200":
- description: Complete session metadata, events, and asset descriptors
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SessionEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- delete:
- tags: [Sessions]
- operationId: deleteSession
- description: Soft-deletes the session and its assets for the current user.
- responses:
- "200":
- description: Session deleted
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/DeleteEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- /sessions/{sessionId}/assets:
- parameters:
- - $ref: "#/components/parameters/SessionId"
- post:
- tags: [Assets]
- operationId: uploadAsset
- description: |
- Used for files smaller than 16 MiB. `clientId` makes retries idempotent.
- A new upload returns `{asset, sessionRevision}`. An idempotent replay may
- return the asset directly; the iOS decoder intentionally accepts both.
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- required: [clientId, kind, file]
- properties:
- clientId:
- type: string
- kind:
- $ref: "#/components/schemas/AssetKind"
- file:
- type: string
- format: binary
- responses:
- "200":
- description: Uploaded asset or idempotent existing asset
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AssetUploadEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- "413":
- $ref: "#/components/responses/QuotaError"
- /sessions/{sessionId}/assets/init:
- parameters:
- - $ref: "#/components/parameters/SessionId"
- post:
- tags: [Assets]
- operationId: initializeChunkedUpload
- description: iOS uses this flow for files at least 16 MiB, with 8 MiB chunks.
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ChunkUploadInitRequest"
- responses:
- "200":
- description: Chunked upload initialized
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ChunkUploadInitEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- "413":
- $ref: "#/components/responses/QuotaError"
- /sessions/{sessionId}/assets/chunk:
- parameters:
- - $ref: "#/components/parameters/SessionId"
- post:
- tags: [Assets]
- operationId: uploadChunk
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- required: [uploadId, chunkIndex, file]
- properties:
- uploadId:
- type: string
- format: uuid
- chunkIndex:
- type: integer
- minimum: 0
- file:
- type: string
- format: binary
- responses:
- "200":
- description: Chunk accepted
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ChunkProgressEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- "410":
- $ref: "#/components/responses/Error"
- /sessions/{sessionId}/assets/complete:
- parameters:
- - $ref: "#/components/parameters/SessionId"
- post:
- tags: [Assets]
- operationId: completeChunkedUpload
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- required: [uploadId, totalChunks]
- properties:
- uploadId:
- type: string
- format: uuid
- totalChunks:
- type: integer
- minimum: 1
- responses:
- "200":
- description: Chunks merged and asset created
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/AssetUploadEnvelope"
- "400":
- $ref: "#/components/responses/Error"
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- "410":
- $ref: "#/components/responses/Error"
- /sessions/{sessionId}/assets/{assetId}:
- parameters:
- - $ref: "#/components/parameters/SessionId"
- - $ref: "#/components/parameters/AssetId"
- get:
- tags: [Assets]
- operationId: downloadAsset
- responses:
- "200":
- description: Attachment bytes; Content-Disposition contains the original filename
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- "401":
- $ref: "#/components/responses/Error"
- "404":
- $ref: "#/components/responses/Error"
- /storage/quota:
- get:
- tags: [Sync]
- operationId: getStorageQuota
- description: Called before uploading the pending assets for a session.
- responses:
- "200":
- description: Current storage quota in bytes
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/StorageQuotaEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- /sync/trigger:
- post:
- tags: [Sync]
- operationId: recordSyncCheckpoint
- description: Called only after all session metadata and assets finish syncing.
- responses:
- "200":
- description: Client sync checkpoint recorded
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/SyncCheckpointEnvelope"
- "401":
- $ref: "#/components/responses/Error"
- components:
- securitySchemes:
- bearerAuth:
- type: http
- scheme: bearer
- bearerFormat: JWT
- parameters:
- DeviceId:
- name: deviceId
- in: path
- required: true
- schema:
- type: string
- format: uuid
- SessionId:
- name: sessionId
- in: path
- required: true
- schema:
- type: string
- format: uuid
- AssetId:
- name: assetId
- in: path
- required: true
- schema:
- type: string
- format: uuid
- responses:
- EmptySuccess:
- description: Success without a data payload
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/EmptyEnvelope"
- Error:
- description: Request failed
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/ErrorEnvelope"
- QuotaError:
- description: Storage quota exceeded
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/QuotaErrorEnvelope"
- schemas:
- EnvelopeBase:
- type: object
- required: [code, message]
- properties:
- code:
- type: integer
- message:
- type: string
- EmptyEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- properties:
- data:
- type: "null"
- ErrorEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- properties:
- data: {}
- HealthEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- type: string
- const: healthy
- RegisterRequest:
- type: object
- required: [username, identifier, password]
- properties:
- username:
- type: string
- minLength: 2
- identifier:
- type: string
- description: Email address or phone number.
- password:
- type: string
- minLength: 6
- LoginRequest:
- type: object
- required: [identifier, password]
- properties:
- identifier:
- type: string
- description: Username, email address, or phone number.
- password:
- type: string
- UpdateProfileRequest:
- type: object
- properties:
- username:
- type: [string, "null"]
- email:
- type: [string, "null"]
- phoneNumber:
- type: [string, "null"]
- avatarURL:
- type: [string, "null"]
- User:
- type: object
- required: [id, username, registeredAt]
- properties:
- id:
- type: string
- format: uuid
- username:
- type: string
- email:
- type: string
- phoneNumber:
- type: string
- avatarURL:
- type: string
- format: uri
- registeredAt:
- type: string
- format: date-time
- updatedAt:
- type: string
- format: date-time
- AuthData:
- type: object
- required: [user, token, refreshToken, expiresAt]
- properties:
- user:
- $ref: "#/components/schemas/User"
- token:
- type: string
- description: Short-lived access JWT.
- refreshToken:
- type: string
- description: Rotated on every refresh.
- expiresAt:
- type: string
- format: date-time
- AuthEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- $ref: "#/components/schemas/AuthData"
- UserEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- $ref: "#/components/schemas/User"
- BindDeviceRequest:
- type: object
- required: [name]
- properties:
- name:
- type: string
- peripheralUUID:
- type: string
- hardwareMAC:
- type: [string, "null"]
- firmwareVersion:
- type: [string, "null"]
- batteryLevel:
- type: [integer, "null"]
- minimum: 0
- maximum: 100
- freeStorageMB:
- type: [integer, "null"]
- totalStorageMB:
- type: [integer, "null"]
- UpdateDeviceRequest:
- type: object
- properties:
- name:
- type: [string, "null"]
- batteryLevel:
- type: [integer, "null"]
- minimum: 0
- maximum: 100
- isConnected:
- type: [boolean, "null"]
- firmwareVersion:
- type: [string, "null"]
- freeStorageMB:
- type: [integer, "null"]
- totalStorageMB:
- type: [integer, "null"]
- Device:
- type: object
- required: [id, name, peripheralUUID]
- properties:
- id:
- type: string
- format: uuid
- userId:
- type: string
- format: uuid
- name:
- type: string
- peripheralUUID:
- type: string
- hardwareMAC:
- type: string
- batteryLevel:
- type: integer
- firmwareVersion:
- type: string
- freeStorageMB:
- type: integer
- totalStorageMB:
- type: integer
- isConnected:
- type: boolean
- boundAt:
- type: string
- format: date-time
- updatedAt:
- type: string
- format: date-time
- DeviceEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- $ref: "#/components/schemas/Device"
- EventUpsert:
- type: object
- required: [clientId, relativeTimeMs, eventType]
- properties:
- clientId:
- type: string
- relativeTimeMs:
- type: integer
- format: int64
- eventType:
- type: string
- enum: [PHOTO, NOTE, MARKER, VOICE, CONTINUATION]
- textContent:
- type: [string, "null"]
- voiceStartOffsetMs:
- type: [integer, "null"]
- format: int64
- voiceEndOffsetMs:
- type: [integer, "null"]
- format: int64
- locationName:
- type: [string, "null"]
- locationAddress:
- type: [string, "null"]
- latitude:
- type: [number, "null"]
- format: double
- minimum: -90
- maximum: 90
- longitude:
- type: [number, "null"]
- format: double
- minimum: -180
- maximum: 180
- SessionUpsertRequest:
- type: object
- required: [clientId, title, startTime, durationMs, events, deletedEventClientIds]
- properties:
- clientId:
- type: string
- title:
- type: string
- startTime:
- type: string
- format: date-time
- endTime:
- type: [string, "null"]
- format: date-time
- durationMs:
- type: integer
- format: int64
- events:
- type: array
- items:
- $ref: "#/components/schemas/EventUpsert"
- baseRevision:
- type: [integer, "null"]
- format: int64
- deletedEventClientIds:
- type: array
- items:
- type: string
- RemoteEvent:
- allOf:
- - $ref: "#/components/schemas/EventUpsert"
- - type: object
- required: [id]
- properties:
- id:
- type: string
- format: uuid
- clientId:
- type: [string, "null"]
- createdAt:
- type: string
- format: date-time
- RemoteSession:
- type: object
- required: [id, title, startTime, durationMs, revision, updatedAt]
- properties:
- id:
- type: string
- format: uuid
- clientId:
- type: [string, "null"]
- title:
- type: string
- startTime:
- type: string
- format: date-time
- endTime:
- type: [string, "null"]
- format: date-time
- durationMs:
- type: integer
- format: int64
- revision:
- type: integer
- format: int64
- updatedAt:
- type: string
- format: date-time
- deletedAt:
- type: [string, "null"]
- format: date-time
- events:
- type: array
- items:
- $ref: "#/components/schemas/RemoteEvent"
- assets:
- type: array
- items:
- $ref: "#/components/schemas/Asset"
- SessionSyncIndexItem:
- type: object
- required:
- [id, title, startTime, durationMs, photoCount, noteCount, revision, updatedAt]
- properties:
- id:
- type: string
- format: uuid
- clientId:
- type: [string, "null"]
- title:
- type: string
- startTime:
- type: string
- format: date-time
- endTime:
- type: [string, "null"]
- format: date-time
- durationMs:
- type: integer
- format: int64
- photoCount:
- type: integer
- minimum: 0
- noteCount:
- type: integer
- minimum: 0
- revision:
- type: integer
- format: int64
- updatedAt:
- type: string
- format: date-time
- deletedAt:
- type: [string, "null"]
- format: date-time
- SessionEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- $ref: "#/components/schemas/RemoteSession"
- SessionSyncIndexEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- type: array
- items:
- $ref: "#/components/schemas/SessionSyncIndexItem"
- ConflictEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- type: object
- required: [serverRevision]
- properties:
- serverRevision:
- type: integer
- format: int64
- AssetKind:
- type: string
- enum: [AUDIO, PHOTO]
- Asset:
- type: object
- required: [id, clientId, kind, fileName, mimeType, sizeBytes, sha256]
- properties:
- id:
- type: string
- format: uuid
- clientId:
- type: string
- kind:
- $ref: "#/components/schemas/AssetKind"
- fileName:
- type: string
- mimeType:
- type: string
- sizeBytes:
- type: integer
- format: int64
- sha256:
- type: string
- pattern: "^[a-fA-F0-9]{64}$"
- createdAt:
- type: string
- format: date-time
- AssetUploadData:
- type: object
- required: [asset, sessionRevision]
- properties:
- asset:
- $ref: "#/components/schemas/Asset"
- sessionRevision:
- type: integer
- format: int64
- AssetUploadEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- oneOf:
- - $ref: "#/components/schemas/AssetUploadData"
- - $ref: "#/components/schemas/Asset"
- ChunkUploadInitRequest:
- type: object
- required: [clientId, kind, fileName, mimeType, fileSize, chunkSize]
- properties:
- clientId:
- type: string
- kind:
- $ref: "#/components/schemas/AssetKind"
- fileName:
- type: string
- mimeType:
- type: string
- fileSize:
- type: integer
- format: int64
- minimum: 1
- chunkSize:
- type: integer
- minimum: 1
- ChunkUploadInitEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- type: object
- required: [uploadId, totalChunks, chunkSize, expiresAt]
- properties:
- uploadId:
- type: string
- format: uuid
- totalChunks:
- type: integer
- chunkSize:
- type: integer
- expiresAt:
- type: string
- format: date-time
- ChunkProgressEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- type: object
- required: [uploadId, chunkIndex, uploadedChunks, totalChunks]
- properties:
- uploadId:
- type: string
- format: uuid
- chunkIndex:
- type: integer
- uploadedChunks:
- type: integer
- totalChunks:
- type: integer
- StorageQuota:
- type: object
- required: [totalBytes, usedBytes, remainingBytes]
- properties:
- totalBytes:
- type: integer
- format: int64
- usedBytes:
- type: integer
- format: int64
- remainingBytes:
- type: integer
- format: int64
- StorageQuotaEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- $ref: "#/components/schemas/StorageQuota"
- QuotaErrorEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- allOf:
- - $ref: "#/components/schemas/StorageQuota"
- - type: object
- required: [requiredBytes]
- properties:
- requiredBytes:
- type: integer
- format: int64
- SyncCheckpointEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- type: object
- required: [syncedAt, message]
- properties:
- syncedAt:
- type: string
- format: date-time
- message:
- type: string
- DeleteEnvelope:
- allOf:
- - $ref: "#/components/schemas/EnvelopeBase"
- - type: object
- required: [data]
- properties:
- data:
- type: object
- required: [deletedId]
- properties:
- deletedId:
- type: string
- security:
- - bearerAuth: []
|