feat: implement TASK-WP6-02 private content access
Dada P0-A isolated Windows CI / validate-and-package (push) Successful in 10m0s
Dada P0-A isolated Windows CI / validate-and-package (push) Successful in 10m0s
This commit is contained in:
@@ -300,6 +300,241 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AdminGenerationListResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"generated_at": {
|
||||
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/AdminGenerationRecord"
|
||||
},
|
||||
"maxItems": 100,
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"generated_at",
|
||||
"items"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AdminGenerationRecord": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"completed_at": {
|
||||
"anyOf": [
|
||||
{
|
||||
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"confirmed_credit_cost": {
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"created_at": {
|
||||
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
|
||||
"type": "string"
|
||||
},
|
||||
"duration_ms": {
|
||||
"anyOf": [
|
||||
{
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"error_category": {
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": [
|
||||
"upstream_timeout"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"upstream_failed"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"safety_rejected"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"model_disabled"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"gateway_balance_insufficient"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"gateway_contract_invalid"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"reference_invalid"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"unknown_retryable"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"unknown_non_retryable"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"final_credit_state": {
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": [
|
||||
"committed"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"released"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"generation_id": {
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
|
||||
"type": "string"
|
||||
},
|
||||
"model_id": {
|
||||
"maxLength": 80,
|
||||
"pattern": "^[a-z0-9][a-z0-9.-]+$",
|
||||
"type": "string"
|
||||
},
|
||||
"owner_ref": {
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
|
||||
"type": "string"
|
||||
},
|
||||
"project_id": {
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
|
||||
"type": "string"
|
||||
},
|
||||
"ratio": {
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": [
|
||||
"3:4"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"1:1"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"4:3"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"9:16"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"reserved_credits": {
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": [
|
||||
"queued"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"running"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"succeeded"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"failed"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"rejected"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"generation_id",
|
||||
"owner_ref",
|
||||
"project_id",
|
||||
"model_id",
|
||||
"ratio",
|
||||
"status",
|
||||
"created_at",
|
||||
"completed_at",
|
||||
"duration_ms",
|
||||
"confirmed_credit_cost",
|
||||
"reserved_credits",
|
||||
"final_credit_state",
|
||||
"error_category"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"AdminLoginCompleteRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -730,6 +965,11 @@
|
||||
"pattern": "^[A-Za-z0-9_-]+$",
|
||||
"type": "string"
|
||||
},
|
||||
"current_private_content_notice_message_key": {
|
||||
"maxLength": 120,
|
||||
"pattern": "^[A-Za-z0-9_.-]+$",
|
||||
"type": "string"
|
||||
},
|
||||
"current_private_content_notice_version": {
|
||||
"anyOf": [
|
||||
{
|
||||
@@ -3625,6 +3865,87 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PrivateContentGenerationParams": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"generationId": {
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"generationId"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PrivateContentNoticeAckRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"expected_notice_version": {
|
||||
"maxLength": 80,
|
||||
"minLength": 1,
|
||||
"pattern": "^[A-Za-z0-9_.:-]+$",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"expected_notice_version"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PrivateContentNoticeAckResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"acknowledged_at": {
|
||||
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{3})?Z$",
|
||||
"type": "string"
|
||||
},
|
||||
"notice_version": {
|
||||
"maxLength": 80,
|
||||
"minLength": 1,
|
||||
"pattern": "^[A-Za-z0-9_.:-]+$",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"acknowledged"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"notice_version",
|
||||
"acknowledged_at",
|
||||
"status"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"PrivateContentPromptResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"content_type": {
|
||||
"enum": [
|
||||
"prompt"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"generation_id": {
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
|
||||
"type": "string"
|
||||
},
|
||||
"prompt": {
|
||||
"maxLength": 4000,
|
||||
"minLength": 1,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"generation_id",
|
||||
"content_type",
|
||||
"prompt"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ProjectDetailResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -5287,6 +5608,56 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/generations": {
|
||||
"get": {
|
||||
"operationId": "listAdminGenerations",
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AdminGenerationListResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"428": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"503": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Admin Private Content"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/models/configuration": {
|
||||
"put": {
|
||||
"operationId": "replaceModelConfiguration",
|
||||
@@ -8331,6 +8702,239 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/private-content-notice/ack": {
|
||||
"post": {
|
||||
"operationId": "ackPrivateContentNotice",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "header",
|
||||
"name": "x-csrf-token",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"maxLength": 64,
|
||||
"minLength": 43,
|
||||
"pattern": "^[A-Za-z0-9_-]+$",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "header",
|
||||
"name": "idempotency-key",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"maxLength": 200,
|
||||
"minLength": 32,
|
||||
"pattern": "^[A-Za-z0-9_-]+$",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PrivateContentNoticeAckRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PrivateContentNoticeAckResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"400": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"403": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"428": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"503": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Admin Private Content"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/private-content/generations/{generationId}/image": {
|
||||
"get": {
|
||||
"operationId": "openAdminGenerationImage",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "generationId",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/octet-stream": {
|
||||
"schema": {
|
||||
"format": "binary",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/octet-stream": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"404": {
|
||||
"description": "Default Response"
|
||||
},
|
||||
"428": {
|
||||
"content": {
|
||||
"application/octet-stream": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"503": {
|
||||
"content": {
|
||||
"application/octet-stream": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Admin Private Content"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/private-content/generations/{generationId}/prompt": {
|
||||
"get": {
|
||||
"operationId": "openAdminGenerationPrompt",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "generationId",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/PrivateContentPromptResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"401": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"404": {
|
||||
"description": "Default Response"
|
||||
},
|
||||
"428": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
},
|
||||
"503": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Default Response"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Admin Private Content"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/users/{userId}/credit-adjustments": {
|
||||
"post": {
|
||||
"operationId": "adjustAdminUserCredits",
|
||||
|
||||
Reference in New Issue
Block a user