mirror of
https://github.com/langgenius/dify.git
synced 2026-11-11 22:02:23 +08:00
1283 lines
32 KiB
JSON
Generated
1283 lines
32 KiB
JSON
Generated
{
|
|
"openapi": "3.0.3",
|
|
"info": {
|
|
"title": "",
|
|
"version": "0.0.1"
|
|
},
|
|
"x-dify-saas-commit": "2d358b5a0555440b30d8601f5e786a15e28a2345",
|
|
"paths": {
|
|
"/v1/account": {
|
|
"delete": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"description": "删除账户",
|
|
"operationId": "Account_DeleteAccount",
|
|
"parameters": [
|
|
{
|
|
"name": "accountId",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DeleteAccountReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/account/in-freeze": {
|
|
"get": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"description": "检查邮箱是否在冻结期",
|
|
"operationId": "Account_CheckAccountInFreeze",
|
|
"parameters": [
|
|
{
|
|
"name": "email",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CheckAccountInFreezeReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/account/delete-feedback": {
|
|
"post": {
|
|
"tags": [
|
|
"Account"
|
|
],
|
|
"description": "添加删除反馈",
|
|
"operationId": "Account_AddDeleteFeedback",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddDeleteFeedbackRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AddDeleteFeedbackReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/notifications/active": {
|
|
"get": {
|
|
"tags": [
|
|
"SaasNotification"
|
|
],
|
|
"operationId": "SaasNotification_GetAccountNotification",
|
|
"parameters": [
|
|
{
|
|
"name": "accountId",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GetAccountNotificationReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/notifications/{notificationId}/dismiss": {
|
|
"post": {
|
|
"tags": [
|
|
"SaasNotification"
|
|
],
|
|
"operationId": "SaasNotification_DismissNotification",
|
|
"parameters": [
|
|
{
|
|
"name": "notificationId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DismissNotificationReq"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DismissNotificationReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tenant_utms": {
|
|
"post": {
|
|
"tags": [
|
|
"Utm"
|
|
],
|
|
"operationId": "Utm_RecordTenantUtm",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TenantUtmRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TenantUtmReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tenants/{tenantId}/network-access-groups": {
|
|
"get": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"operationId": "SaasNetworkAccessPolicy_ListNetworkAccessGroups",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "actorAccountId",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ListNetworkAccessGroupsReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"operationId": "SaasNetworkAccessPolicy_CreateNetworkAccessGroup",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CreateNetworkAccessGroupRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NetworkAccessGroupReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tenants/{tenantId}/network-access-groups/{groupId}": {
|
|
"get": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"operationId": "SaasNetworkAccessPolicy_GetNetworkAccessGroup",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "actorAccountId",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NetworkAccessGroupReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"operationId": "SaasNetworkAccessPolicy_UpdateNetworkAccessGroup",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/UpdateNetworkAccessGroupRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/NetworkAccessGroupReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"operationId": "SaasNetworkAccessPolicy_DeleteNetworkAccessGroup",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "groupId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "expectedVersion",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "actorAccountId",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DeleteNetworkAccessGroupReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tenants/{tenantId}/apps/{appId}/network-access-group": {
|
|
"get": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"operationId": "SaasNetworkAccessPolicy_GetAppNetworkAccessGroup",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "appId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "actorAccountId",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GetAppNetworkAccessGroupReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"operationId": "SaasNetworkAccessPolicy_PutAppNetworkAccessGroup",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "appId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PutAppNetworkAccessGroupRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PutAppNetworkAccessGroupReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tenants/{tenantId}/apps/{appId}/network-access-group/status": {
|
|
"get": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"description": "Entry status is available to normal members without exposing policy details.",
|
|
"operationId": "SaasNetworkAccessPolicy_GetAppNetworkAccessGroupStatus",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "appId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "actorAccountId",
|
|
"in": "query",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/GetAppNetworkAccessGroupStatusReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tenants/{tenantId}/apps/{appId}/network-access-group-binding": {
|
|
"delete": {
|
|
"tags": [
|
|
"SaasNetworkAccessPolicy"
|
|
],
|
|
"description": "CleanupAppNetworkAccessGroupBinding is an internal App lifecycle hook.\n It deliberately has no actor field: callers are authenticated by the\n internal HTTP secret and this operation must not be exposed as a member\n or account deletion side effect.",
|
|
"operationId": "SaasNetworkAccessPolicy_CleanupAppNetworkAccessGroupBinding",
|
|
"parameters": [
|
|
{
|
|
"name": "tenantId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "appId",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CleanupAppNetworkAccessGroupBindingReply"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"AccountErrorReason": {
|
|
"enum": [
|
|
"",
|
|
"CODEC",
|
|
"VALIDATOR",
|
|
"UNKNOWN",
|
|
"INVALID_SECRET_KEY"
|
|
],
|
|
"type": "string",
|
|
"description": "Reasons returned by the Account service: values of the proto enum dify.saas.api.saas.CommonErrorReason, plus the reasons emitted by Kratos itself: CODEC and VALIDATOR (400), UNKNOWN (500, recovered panic) and an empty string (500, unclassified error).",
|
|
"properties": {}
|
|
},
|
|
"AddDeleteFeedbackReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
]
|
|
},
|
|
"AddDeleteFeedbackRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"feedback": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "AddDeleteFeedback",
|
|
"required": [
|
|
"email",
|
|
"feedback"
|
|
]
|
|
},
|
|
"AppNetworkAccessGroupBinding": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"appId": {
|
|
"type": "string"
|
|
},
|
|
"groupId": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"updatedByAccountId": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"accessPoints": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"tenantId",
|
|
"appId",
|
|
"version",
|
|
"updatedByAccountId",
|
|
"createdAt",
|
|
"updatedAt",
|
|
"enabled",
|
|
"accessPoints"
|
|
]
|
|
},
|
|
"CheckAccountInFreezeReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "boolean",
|
|
"description": "Keep the boolean data field for compatibility with dify-api clients."
|
|
},
|
|
"freezeType": {
|
|
"enum": [
|
|
"",
|
|
"freeze",
|
|
"email_domain_suspended"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"data",
|
|
"freezeType"
|
|
]
|
|
},
|
|
"CleanupAppNetworkAccessGroupBindingReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"deleted"
|
|
]
|
|
},
|
|
"CreateNetworkAccessGroupRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"description": "Deprecated and ignored. Kept only for wire compatibility with clients\n built against the first reusable-group draft."
|
|
},
|
|
"allowedCidrs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"actorAccountId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"tenantId",
|
|
"name",
|
|
"description",
|
|
"mode",
|
|
"allowedCidrs",
|
|
"actorAccountId"
|
|
]
|
|
},
|
|
"DeleteAccountReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"message"
|
|
]
|
|
},
|
|
"DeleteNetworkAccessGroupReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"deleted"
|
|
]
|
|
},
|
|
"DismissNotificationReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"success"
|
|
]
|
|
},
|
|
"DismissNotificationReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationId": {
|
|
"type": "string"
|
|
},
|
|
"accountId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"notificationId",
|
|
"accountId"
|
|
]
|
|
},
|
|
"Error": {
|
|
"required": [
|
|
"code",
|
|
"reason",
|
|
"message",
|
|
"metadata"
|
|
],
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"description": "HTTP status code.",
|
|
"format": "int32"
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"description": "Error reason. The possible values for an operation are listed in the dify.saas.api.saas.<Service>ErrorReason schema of its service, where <Service> is the operationId prefix before the underscore."
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Error body returned with every non-2xx response."
|
|
},
|
|
"GetAccountNotificationReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"shouldShow": {
|
|
"type": "boolean",
|
|
"description": "true when at least one notification is present."
|
|
},
|
|
"notifications": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/NotificationPayload"
|
|
},
|
|
"description": "All eligible notifications for this account, ordered newest first."
|
|
}
|
|
},
|
|
"required": [
|
|
"shouldShow",
|
|
"notifications"
|
|
]
|
|
},
|
|
"GetAppNetworkAccessGroupReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"appId": {
|
|
"type": "string"
|
|
},
|
|
"entitled": {
|
|
"type": "boolean"
|
|
},
|
|
"binding": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AppNetworkAccessGroupBinding"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"effectiveEnabled": {
|
|
"type": "boolean",
|
|
"description": "Effective runtime state; does not replace the saved binding.enabled value."
|
|
}
|
|
},
|
|
"required": [
|
|
"tenantId",
|
|
"appId",
|
|
"entitled",
|
|
"binding",
|
|
"effectiveEnabled"
|
|
]
|
|
},
|
|
"GetAppNetworkAccessGroupStatusReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entitled": {
|
|
"type": "boolean"
|
|
},
|
|
"configured": {
|
|
"type": "boolean"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Preserve the saved switch independently of plan entitlement."
|
|
},
|
|
"accessPoints": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "The Console BFF filters these scopes against the app's current capabilities."
|
|
}
|
|
},
|
|
"required": [
|
|
"entitled",
|
|
"configured",
|
|
"enabled",
|
|
"accessPoints"
|
|
]
|
|
},
|
|
"LangContent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"lang": {
|
|
"type": "string",
|
|
"description": "Language tag: \"zh\" | \"en\" | \"jp\""
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"subtitle": {
|
|
"type": "string"
|
|
},
|
|
"body": {
|
|
"type": "string"
|
|
},
|
|
"titlePicUrl": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"description": "LangContent carries the notification content for a single language.\n The fields here mirror biz.LangContent; both must be kept in sync.",
|
|
"required": [
|
|
"lang",
|
|
"title",
|
|
"subtitle",
|
|
"body",
|
|
"titlePicUrl"
|
|
]
|
|
},
|
|
"ListNetworkAccessGroupsReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"entitled": {
|
|
"type": "boolean"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/NetworkAccessGroup"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"tenantId",
|
|
"entitled",
|
|
"groups"
|
|
]
|
|
},
|
|
"NetworkAccessGroup": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"description": "Deprecated compatibility field. User-managed policies are always enforced;\n rollout shadow/off behavior belongs to Gateway configuration."
|
|
},
|
|
"allowedCidrs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"updatedByAccountId": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"usedByCount": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"usedByAppIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"enforcingCount": {
|
|
"type": "string",
|
|
"description": "Number of saved references which are actively enforcing for an entitled\n tenant. Disabled bindings and bindings without access points remain in\n used_by_count but do not contribute here.",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"tenantId",
|
|
"name",
|
|
"description",
|
|
"mode",
|
|
"allowedCidrs",
|
|
"version",
|
|
"updatedByAccountId",
|
|
"createdAt",
|
|
"updatedAt",
|
|
"usedByCount",
|
|
"usedByAppIds",
|
|
"enforcingCount"
|
|
]
|
|
},
|
|
"NetworkAccessGroupReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"group": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/NetworkAccessGroup"
|
|
}
|
|
],
|
|
"nullable": true
|
|
}
|
|
},
|
|
"required": [
|
|
"group"
|
|
]
|
|
},
|
|
"NotificationPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"notificationId": {
|
|
"type": "string"
|
|
},
|
|
"contents": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/components/schemas/LangContent"
|
|
},
|
|
"description": "All available language variants keyed by lang tag (\"zh\", \"en\", \"jp\").\n Frontend picks the appropriate language from this map."
|
|
},
|
|
"frequency": {
|
|
"enum": [
|
|
"once",
|
|
"every_page_load"
|
|
],
|
|
"type": "string",
|
|
"description": "\"once\" | \"every_page_load\" — frontend uses this to decide re-display logic."
|
|
},
|
|
"isGlobal": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"notificationId",
|
|
"contents",
|
|
"frequency",
|
|
"isGlobal"
|
|
]
|
|
},
|
|
"PutAppNetworkAccessGroupReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"binding": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AppNetworkAccessGroupBinding"
|
|
}
|
|
],
|
|
"nullable": true
|
|
},
|
|
"effectiveEnabled": {
|
|
"type": "boolean",
|
|
"description": "Effective runtime state; does not replace the saved binding.enabled value."
|
|
}
|
|
},
|
|
"required": [
|
|
"binding",
|
|
"effectiveEnabled"
|
|
]
|
|
},
|
|
"PutAppNetworkAccessGroupRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"appId": {
|
|
"type": "string"
|
|
},
|
|
"groupId": {
|
|
"nullable": true,
|
|
"type": "string"
|
|
},
|
|
"expectedVersion": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"actorAccountId": {
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"nullable": true,
|
|
"type": "boolean",
|
|
"description": "Optional distinguishes an explicit disable from a legacy caller that\n predates per-app access-point settings."
|
|
},
|
|
"accessPoints": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"tenantId",
|
|
"appId",
|
|
"expectedVersion",
|
|
"actorAccountId",
|
|
"accessPoints"
|
|
]
|
|
},
|
|
"SaasNetworkAccessPolicyErrorReason": {
|
|
"enum": [
|
|
"",
|
|
"CODEC",
|
|
"VALIDATOR",
|
|
"UNKNOWN",
|
|
"INVALID_SECRET_KEY",
|
|
"INVALID_ARGUMENT",
|
|
"INTERNAL_ERROR",
|
|
"INVALID_NETWORK_ACCESS_INPUT",
|
|
"TENANT_NOT_FOUND",
|
|
"NETWORK_ACCESS_GROUP_NOT_FOUND",
|
|
"APP_NOT_FOUND",
|
|
"NETWORK_ACCESS_APP_STILL_EXISTS",
|
|
"TENANT_ARCHIVED",
|
|
"NETWORK_ACCESS_FORBIDDEN",
|
|
"NETWORK_ACCESS_NOT_ENTITLED",
|
|
"NETWORK_ACCESS_VERSION_CONFLICT",
|
|
"NETWORK_ACCESS_GROUP_NAME_CONFLICT",
|
|
"NETWORK_ACCESS_GROUP_BOUND",
|
|
"NETWORK_ACCESS_CACHE_UNAVAILABLE"
|
|
],
|
|
"type": "string",
|
|
"description": "Reasons returned by the SaasNetworkAccessPolicy service: values of the proto enums dify.saas.api.saas.CommonErrorReason and dify.saas.api.saas.SaasNetworkAccessPolicyErrorReason, plus the reasons emitted by Kratos itself: CODEC and VALIDATOR (400), UNKNOWN (500, recovered panic) and an empty string (500, unclassified error).",
|
|
"properties": {}
|
|
},
|
|
"SaasNotificationErrorReason": {
|
|
"enum": [
|
|
"",
|
|
"CODEC",
|
|
"VALIDATOR",
|
|
"UNKNOWN",
|
|
"INVALID_SECRET_KEY"
|
|
],
|
|
"type": "string",
|
|
"description": "Reasons returned by the SaasNotification service: values of the proto enum dify.saas.api.saas.CommonErrorReason, plus the reasons emitted by Kratos itself: CODEC and VALIDATOR (400), UNKNOWN (500, recovered panic) and an empty string (500, unclassified error).",
|
|
"properties": {}
|
|
},
|
|
"TenantUtmReply": {
|
|
"type": "object",
|
|
"properties": {
|
|
"result": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"result"
|
|
]
|
|
},
|
|
"TenantUtmRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"utmSource": {
|
|
"type": "string"
|
|
},
|
|
"utmMedium": {
|
|
"type": "string"
|
|
},
|
|
"utmCampaign": {
|
|
"type": "string"
|
|
},
|
|
"utmContent": {
|
|
"type": "string"
|
|
},
|
|
"utmTerm": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"tenantId",
|
|
"utmSource",
|
|
"utmMedium",
|
|
"utmCampaign",
|
|
"utmContent",
|
|
"utmTerm"
|
|
]
|
|
},
|
|
"UpdateNetworkAccessGroupRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tenantId": {
|
|
"type": "string"
|
|
},
|
|
"groupId": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"description": "Deprecated and ignored. Kept only for wire compatibility."
|
|
},
|
|
"allowedCidrs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"expectedVersion": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"actorAccountId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"tenantId",
|
|
"groupId",
|
|
"name",
|
|
"description",
|
|
"mode",
|
|
"allowedCidrs",
|
|
"expectedVersion",
|
|
"actorAccountId"
|
|
]
|
|
},
|
|
"UtmErrorReason": {
|
|
"enum": [
|
|
"",
|
|
"CODEC",
|
|
"VALIDATOR",
|
|
"UNKNOWN",
|
|
"INVALID_SECRET_KEY"
|
|
],
|
|
"type": "string",
|
|
"description": "Reasons returned by the Utm service: values of the proto enum dify.saas.api.saas.CommonErrorReason, plus the reasons emitted by Kratos itself: CODEC and VALIDATOR (400), UNKNOWN (500, recovered panic) and an empty string (500, unclassified error).",
|
|
"properties": {}
|
|
}
|
|
}
|
|
}
|
|
}
|