diff --git a/api-docs/openapi/v3_0/aggregated.json b/api-docs/openapi/v3_0/aggregated.json index d07c4b85c..3296993b1 100644 --- a/api-docs/openapi/v3_0/aggregated.json +++ b/api-docs/openapi/v3_0/aggregated.json @@ -6559,7 +6559,7 @@ } }, "tags": [ - "api.notification.halo.run/v1alpha1/Subscription" + "NotificationV1alpha1Public" ] } }, @@ -15679,6 +15679,31 @@ "AttachmentV1alpha1Uc" ] } + }, + "/system/setup": { + "get": { + "description": "Jump to setup page", + "operationId": "JumpToSetupPage", + "responses": { + "default": { + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "SystemV1alpha1Public" + ] + }, + "post": { + "operationId": "SetNoCacheForSetUpPage", + "responses": {} + } } }, "components": { diff --git a/api-docs/openapi/v3_0/apis_extension.api_v1alpha1.json b/api-docs/openapi/v3_0/apis_extension.api_v1alpha1.json index 84340604d..0652eb77d 100644 --- a/api-docs/openapi/v3_0/apis_extension.api_v1alpha1.json +++ b/api-docs/openapi/v3_0/apis_extension.api_v1alpha1.json @@ -4757,6 +4757,1428 @@ ] } }, + "/apis/notification.halo.run/v1alpha1/notifications": { + "get": { + "description": "List Notification", + "operationId": "listNotification", + "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" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationList" + } + } + }, + "description": "Response notifications" + } + }, + "tags": [ + "NotificationV1alpha1" + ] + }, + "post": { + "description": "Create Notification", + "operationId": "createNotification", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "Fresh notification" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "Response notifications created just now" + } + }, + "tags": [ + "NotificationV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/notifications/{name}": { + "delete": { + "description": "Delete Notification", + "operationId": "deleteNotification", + "parameters": [ + { + "description": "Name of notification", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response notification deleted just now" + } + }, + "tags": [ + "NotificationV1alpha1" + ] + }, + "get": { + "description": "Get Notification", + "operationId": "getNotification", + "parameters": [ + { + "description": "Name of notification", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "Response single notification" + } + }, + "tags": [ + "NotificationV1alpha1" + ] + }, + "patch": { + "description": "Patch Notification", + "operationId": "patchNotification", + "parameters": [ + { + "description": "Name of notification", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "Response notification patched just now" + } + }, + "tags": [ + "NotificationV1alpha1" + ] + }, + "put": { + "description": "Update Notification", + "operationId": "updateNotification", + "parameters": [ + { + "description": "Name of notification", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "Updated notification" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "Response notifications updated just now" + } + }, + "tags": [ + "NotificationV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/notificationtemplates": { + "get": { + "description": "List NotificationTemplate", + "operationId": "listNotificationTemplate", + "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" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplateList" + } + } + }, + "description": "Response notificationtemplates" + } + }, + "tags": [ + "NotificationTemplateV1alpha1" + ] + }, + "post": { + "description": "Create NotificationTemplate", + "operationId": "createNotificationTemplate", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + }, + "description": "Fresh notificationtemplate" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + }, + "description": "Response notificationtemplates created just now" + } + }, + "tags": [ + "NotificationTemplateV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/notificationtemplates/{name}": { + "delete": { + "description": "Delete NotificationTemplate", + "operationId": "deleteNotificationTemplate", + "parameters": [ + { + "description": "Name of notificationtemplate", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response notificationtemplate deleted just now" + } + }, + "tags": [ + "NotificationTemplateV1alpha1" + ] + }, + "get": { + "description": "Get NotificationTemplate", + "operationId": "getNotificationTemplate", + "parameters": [ + { + "description": "Name of notificationtemplate", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + }, + "description": "Response single notificationtemplate" + } + }, + "tags": [ + "NotificationTemplateV1alpha1" + ] + }, + "patch": { + "description": "Patch NotificationTemplate", + "operationId": "patchNotificationTemplate", + "parameters": [ + { + "description": "Name of notificationtemplate", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + }, + "description": "Response notificationtemplate patched just now" + } + }, + "tags": [ + "NotificationTemplateV1alpha1" + ] + }, + "put": { + "description": "Update NotificationTemplate", + "operationId": "updateNotificationTemplate", + "parameters": [ + { + "description": "Name of notificationtemplate", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + }, + "description": "Updated notificationtemplate" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + }, + "description": "Response notificationtemplates updated just now" + } + }, + "tags": [ + "NotificationTemplateV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/notifierDescriptors": { + "get": { + "description": "List NotifierDescriptor", + "operationId": "listNotifierDescriptor", + "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" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotifierDescriptorList" + } + } + }, + "description": "Response notifierDescriptors" + } + }, + "tags": [ + "NotifierDescriptorV1alpha1" + ] + }, + "post": { + "description": "Create NotifierDescriptor", + "operationId": "createNotifierDescriptor", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotifierDescriptor" + } + } + }, + "description": "Fresh notifierDescriptor" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotifierDescriptor" + } + } + }, + "description": "Response notifierDescriptors created just now" + } + }, + "tags": [ + "NotifierDescriptorV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/notifierDescriptors/{name}": { + "delete": { + "description": "Delete NotifierDescriptor", + "operationId": "deleteNotifierDescriptor", + "parameters": [ + { + "description": "Name of notifierDescriptor", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response notifierDescriptor deleted just now" + } + }, + "tags": [ + "NotifierDescriptorV1alpha1" + ] + }, + "get": { + "description": "Get NotifierDescriptor", + "operationId": "getNotifierDescriptor", + "parameters": [ + { + "description": "Name of notifierDescriptor", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotifierDescriptor" + } + } + }, + "description": "Response single notifierDescriptor" + } + }, + "tags": [ + "NotifierDescriptorV1alpha1" + ] + }, + "patch": { + "description": "Patch NotifierDescriptor", + "operationId": "patchNotifierDescriptor", + "parameters": [ + { + "description": "Name of notifierDescriptor", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotifierDescriptor" + } + } + }, + "description": "Response notifierDescriptor patched just now" + } + }, + "tags": [ + "NotifierDescriptorV1alpha1" + ] + }, + "put": { + "description": "Update NotifierDescriptor", + "operationId": "updateNotifierDescriptor", + "parameters": [ + { + "description": "Name of notifierDescriptor", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotifierDescriptor" + } + } + }, + "description": "Updated notifierDescriptor" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotifierDescriptor" + } + } + }, + "description": "Response notifierDescriptors updated just now" + } + }, + "tags": [ + "NotifierDescriptorV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/reasons": { + "get": { + "description": "List Reason", + "operationId": "listReason", + "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" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonList" + } + } + }, + "description": "Response reasons" + } + }, + "tags": [ + "ReasonV1alpha1" + ] + }, + "post": { + "description": "Create Reason", + "operationId": "createReason", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Reason" + } + } + }, + "description": "Fresh reason" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Reason" + } + } + }, + "description": "Response reasons created just now" + } + }, + "tags": [ + "ReasonV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/reasons/{name}": { + "delete": { + "description": "Delete Reason", + "operationId": "deleteReason", + "parameters": [ + { + "description": "Name of reason", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response reason deleted just now" + } + }, + "tags": [ + "ReasonV1alpha1" + ] + }, + "get": { + "description": "Get Reason", + "operationId": "getReason", + "parameters": [ + { + "description": "Name of reason", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Reason" + } + } + }, + "description": "Response single reason" + } + }, + "tags": [ + "ReasonV1alpha1" + ] + }, + "patch": { + "description": "Patch Reason", + "operationId": "patchReason", + "parameters": [ + { + "description": "Name of reason", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Reason" + } + } + }, + "description": "Response reason patched just now" + } + }, + "tags": [ + "ReasonV1alpha1" + ] + }, + "put": { + "description": "Update Reason", + "operationId": "updateReason", + "parameters": [ + { + "description": "Name of reason", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Reason" + } + } + }, + "description": "Updated reason" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Reason" + } + } + }, + "description": "Response reasons updated just now" + } + }, + "tags": [ + "ReasonV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/reasontypes": { + "get": { + "description": "List ReasonType", + "operationId": "listReasonType", + "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" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonTypeList" + } + } + }, + "description": "Response reasontypes" + } + }, + "tags": [ + "ReasonTypeV1alpha1" + ] + }, + "post": { + "description": "Create ReasonType", + "operationId": "createReasonType", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonType" + } + } + }, + "description": "Fresh reasontype" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonType" + } + } + }, + "description": "Response reasontypes created just now" + } + }, + "tags": [ + "ReasonTypeV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/reasontypes/{name}": { + "delete": { + "description": "Delete ReasonType", + "operationId": "deleteReasonType", + "parameters": [ + { + "description": "Name of reasontype", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response reasontype deleted just now" + } + }, + "tags": [ + "ReasonTypeV1alpha1" + ] + }, + "get": { + "description": "Get ReasonType", + "operationId": "getReasonType", + "parameters": [ + { + "description": "Name of reasontype", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonType" + } + } + }, + "description": "Response single reasontype" + } + }, + "tags": [ + "ReasonTypeV1alpha1" + ] + }, + "patch": { + "description": "Patch ReasonType", + "operationId": "patchReasonType", + "parameters": [ + { + "description": "Name of reasontype", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonType" + } + } + }, + "description": "Response reasontype patched just now" + } + }, + "tags": [ + "ReasonTypeV1alpha1" + ] + }, + "put": { + "description": "Update ReasonType", + "operationId": "updateReasonType", + "parameters": [ + { + "description": "Name of reasontype", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonType" + } + } + }, + "description": "Updated reasontype" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonType" + } + } + }, + "description": "Response reasontypes updated just now" + } + }, + "tags": [ + "ReasonTypeV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/subscriptions": { + "get": { + "description": "List Subscription", + "operationId": "listSubscription", + "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" + } + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/SubscriptionList" + } + } + }, + "description": "Response subscriptions" + } + }, + "tags": [ + "SubscriptionV1alpha1" + ] + }, + "post": { + "description": "Create Subscription", + "operationId": "createSubscription", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Fresh subscription" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Response subscriptions created just now" + } + }, + "tags": [ + "SubscriptionV1alpha1" + ] + } + }, + "/apis/notification.halo.run/v1alpha1/subscriptions/{name}": { + "delete": { + "description": "Delete Subscription", + "operationId": "deleteSubscription", + "parameters": [ + { + "description": "Name of subscription", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response subscription deleted just now" + } + }, + "tags": [ + "SubscriptionV1alpha1" + ] + }, + "get": { + "description": "Get Subscription", + "operationId": "getSubscription", + "parameters": [ + { + "description": "Name of subscription", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Response single subscription" + } + }, + "tags": [ + "SubscriptionV1alpha1" + ] + }, + "patch": { + "description": "Patch Subscription", + "operationId": "patchSubscription", + "parameters": [ + { + "description": "Name of subscription", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + } + } + } + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Response subscription patched just now" + } + }, + "tags": [ + "SubscriptionV1alpha1" + ] + }, + "put": { + "description": "Update Subscription", + "operationId": "updateSubscription", + "parameters": [ + { + "description": "Name of subscription", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Updated subscription" + }, + "responses": { + "200": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Subscription" + } + } + }, + "description": "Response subscriptions updated just now" + } + }, + "tags": [ + "SubscriptionV1alpha1" + ] + } + }, "/apis/plugin.halo.run/v1alpha1/extensiondefinitions": { "get": { "description": "List ExtensionDefinition", @@ -10007,6 +11429,49 @@ } } }, + "InterestReason": { + "required": [ + "reasonType", + "subject" + ], + "type": "object", + "properties": { + "expression": { + "type": "string", + "description": "The expression to be interested in" + }, + "reasonType": { + "type": "string", + "description": "The name of the reason definition to be interested in" + }, + "subject": { + "$ref": "#/components/schemas/InterestReasonSubject" + } + }, + "description": "The reason to be interested in" + }, + "InterestReasonSubject": { + "required": [ + "apiVersion", + "kind" + ], + "type": "object", + "properties": { + "apiVersion": { + "minLength": 1, + "type": "string" + }, + "kind": { + "minLength": 1, + "type": "string" + }, + "name": { + "type": "string", + "description": "if name is not specified, it presents all subjects of the specified reason type and custom resources" + } + }, + "description": "The subject name of reason type to be interested in" + }, "JsonPatch": { "minItems": 1, "uniqueItems": true, @@ -10536,6 +12001,340 @@ } } }, + "Notification": { + "required": [ + "apiVersion", + "kind", + "metadata" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "$ref": "#/components/schemas/NotificationSpec" + } + } + }, + "NotificationList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/Notification" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "NotificationSpec": { + "required": [ + "htmlContent", + "rawContent", + "reason", + "recipient", + "title" + ], + "type": "object", + "properties": { + "htmlContent": { + "type": "string" + }, + "lastReadAt": { + "type": "string", + "format": "date-time" + }, + "rawContent": { + "type": "string" + }, + "reason": { + "minLength": 1, + "type": "string", + "description": "The name of reason" + }, + "recipient": { + "minLength": 1, + "type": "string", + "description": "The name of user" + }, + "title": { + "minLength": 1, + "type": "string" + }, + "unread": { + "type": "boolean" + } + } + }, + "NotificationTemplate": { + "required": [ + "apiVersion", + "kind", + "metadata" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "$ref": "#/components/schemas/NotificationTemplateSpec" + } + } + }, + "NotificationTemplateList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/NotificationTemplate" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "NotificationTemplateSpec": { + "type": "object", + "properties": { + "reasonSelector": { + "$ref": "#/components/schemas/ReasonSelector" + }, + "template": { + "$ref": "#/components/schemas/TemplateContent" + } + } + }, + "NotifierDescriptor": { + "required": [ + "apiVersion", + "kind", + "metadata" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "$ref": "#/components/schemas/NotifierDescriptorSpec" + } + } + }, + "NotifierDescriptorList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/NotifierDescriptor" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "NotifierDescriptorSpec": { + "required": [ + "displayName", + "notifierExtName" + ], + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "displayName": { + "minLength": 1, + "type": "string" + }, + "notifierExtName": { + "minLength": 1, + "type": "string" + }, + "receiverSettingRef": { + "$ref": "#/components/schemas/NotifierSettingRef" + }, + "senderSettingRef": { + "$ref": "#/components/schemas/NotifierSettingRef" + } + } + }, + "NotifierSettingRef": { + "required": [ + "group", + "name" + ], + "type": "object", + "properties": { + "group": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, "PatSpec": { "required": [ "name", @@ -11355,6 +13154,290 @@ } } }, + "Reason": { + "required": [ + "apiVersion", + "kind", + "metadata" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "$ref": "#/components/schemas/ReasonSpec" + } + } + }, + "ReasonAttributes": { + "type": "object", + "properties": { + "empty": { + "type": "boolean" + } + }, + "description": "Attributes used to transfer data" + }, + "ReasonList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/Reason" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "ReasonProperty": { + "required": [ + "name", + "type" + ], + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "optional": { + "type": "boolean", + "default": false + }, + "type": { + "minLength": 1, + "type": "string" + } + } + }, + "ReasonSelector": { + "required": [ + "language", + "reasonType" + ], + "type": "object", + "properties": { + "language": { + "minLength": 1, + "type": "string", + "default": "default" + }, + "reasonType": { + "minLength": 1, + "type": "string" + } + } + }, + "ReasonSpec": { + "required": [ + "author", + "reasonType", + "subject" + ], + "type": "object", + "properties": { + "attributes": { + "$ref": "#/components/schemas/ReasonAttributes" + }, + "author": { + "type": "string" + }, + "reasonType": { + "type": "string" + }, + "subject": { + "$ref": "#/components/schemas/ReasonSubject" + } + } + }, + "ReasonSubject": { + "required": [ + "apiVersion", + "kind", + "name", + "title" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "ReasonType": { + "required": [ + "apiVersion", + "kind", + "metadata" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "$ref": "#/components/schemas/ReasonTypeSpec" + } + } + }, + "ReasonTypeList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/ReasonType" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "ReasonTypeSpec": { + "required": [ + "description", + "displayName" + ], + "type": "object", + "properties": { + "description": { + "minLength": 1, + "type": "string" + }, + "displayName": { + "minLength": 1, + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReasonProperty" + } + } + } + }, "Ref": { "required": [ "name" @@ -12677,6 +14760,124 @@ } } }, + "Subscription": { + "required": [ + "apiVersion", + "kind", + "metadata" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "$ref": "#/components/schemas/SubscriptionSpec" + } + } + }, + "SubscriptionList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/Subscription" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "SubscriptionSpec": { + "required": [ + "reason", + "subscriber", + "unsubscribeToken" + ], + "type": "object", + "properties": { + "disabled": { + "type": "boolean", + "description": "Perhaps users need to unsubscribe and interact without receiving notifications again" + }, + "reason": { + "$ref": "#/components/schemas/InterestReason" + }, + "subscriber": { + "$ref": "#/components/schemas/SubscriptionSubscriber" + }, + "unsubscribeToken": { + "type": "string", + "description": "The token to unsubscribe" + } + } + }, + "SubscriptionSubscriber": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "minLength": 1, + "type": "string" + } + }, + "description": "The subscriber to be notified" + }, "Tag": { "required": [ "apiVersion", @@ -12806,6 +15007,24 @@ } } }, + "TemplateContent": { + "required": [ + "title" + ], + "type": "object", + "properties": { + "htmlBody": { + "type": "string" + }, + "rawBody": { + "type": "string" + }, + "title": { + "minLength": 1, + "type": "string" + } + } + }, "TemplateDescriptor": { "required": [ "file", diff --git a/api-docs/openapi/v3_0/apis_public.api_v1alpha1.json b/api-docs/openapi/v3_0/apis_public.api_v1alpha1.json index 2572b1c21..672c4c35c 100644 --- a/api-docs/openapi/v3_0/apis_public.api_v1alpha1.json +++ b/api-docs/openapi/v3_0/apis_public.api_v1alpha1.json @@ -17,6 +17,628 @@ } ], "paths": { + "/apis/api.content.halo.run/v1alpha1/categories": { + "get": { + "description": "Lists categories.", + "operationId": "queryCategories", + "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" + } + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CategoryVoList" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "CategoryV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/categories/{name}": { + "get": { + "description": "Gets category by name.", + "operationId": "queryCategoryByName", + "parameters": [ + { + "description": "Category name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/CategoryVo" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "CategoryV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/categories/{name}/posts": { + "get": { + "description": "Lists posts by category name.", + "operationId": "queryPostsByCategoryName", + "parameters": [ + { + "description": "Category name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ListedPostVoList" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "CategoryV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/posts": { + "get": { + "description": "Lists posts.", + "operationId": "queryPosts", + "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" + } + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ListedPostVoList" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "PostV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/posts/{name}": { + "get": { + "description": "Gets a post by name.", + "operationId": "queryPostByName", + "parameters": [ + { + "description": "Post name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/PostVo" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "PostV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/posts/{name}/navigation": { + "get": { + "description": "Gets a post navigation by name.", + "operationId": "queryPostNavigationByName", + "parameters": [ + { + "description": "Post name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NavigationPostVo" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "PostV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/singlepages": { + "get": { + "description": "Lists single pages", + "operationId": "querySinglePages", + "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" + } + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ListedSinglePageVoList" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "SinglePageV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/singlepages/{name}": { + "get": { + "description": "Gets single page by name", + "operationId": "querySinglePageByName", + "parameters": [ + { + "description": "SinglePage name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/SinglePageVo" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "SinglePageV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/tags": { + "get": { + "description": "Lists tags", + "operationId": "queryTags", + "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" + } + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/TagVoList" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "TagV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/tags/{name}": { + "get": { + "description": "Gets tag by name", + "operationId": "queryTagByName", + "parameters": [ + { + "description": "Tag name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/TagVo" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "TagV1alpha1Public" + ] + } + }, + "/apis/api.content.halo.run/v1alpha1/tags/{name}/posts": { + "get": { + "description": "Lists posts by tag name", + "operationId": "queryPostsByTagName", + "parameters": [ + { + "description": "Tag name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ListedPostVo" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "TagV1alpha1Public" + ] + } + }, "/apis/api.halo.run/v1alpha1/comments": { "get": { "description": "List comments.", @@ -506,6 +1128,121 @@ "MetricsV1alpha1Public" ] } + }, + "/apis/api.notification.halo.run/v1alpha1/subscriptions/{name}/unsubscribe": { + "get": { + "description": "Unsubscribe a subscription", + "operationId": "Unsubscribe", + "parameters": [ + { + "description": "Subscription name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Unsubscribe token", + "in": "query", + "name": "token", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotificationV1alpha1Public" + ] + } + }, + "/apis/api.plugin.halo.run/v1alpha1/plugins/{name}/available": { + "get": { + "description": "Gets plugin available by name.", + "operationId": "queryPluginAvailableByName", + "parameters": [ + { + "description": "Plugin name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "type": "boolean" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "PluginV1alpha1Public" + ] + } + }, + "/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri": { + "get": { + "description": "Get thumbnail by URI", + "operationId": "GetThumbnailByUri", + "parameters": [ + { + "description": "The URI of the image", + "in": "query", + "name": "uri", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The size of the thumbnail,available values are s,m,l,xl", + "in": "query", + "name": "size", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "ThumbnailV1alpha1Public" + ] + } } }, "components": { @@ -535,6 +1272,151 @@ } } }, + "CategorySpec": { + "required": [ + "displayName", + "priority", + "slug" + ], + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "type": "string" + } + }, + "cover": { + "type": "string" + }, + "description": { + "type": "string" + }, + "displayName": { + "minLength": 1, + "type": "string" + }, + "hideFromList": { + "type": "boolean" + }, + "postTemplate": { + "maxLength": 255, + "type": "string" + }, + "preventParentPostCascadeQuery": { + "type": "boolean" + }, + "priority": { + "type": "integer", + "format": "int32", + "default": 0 + }, + "slug": { + "minLength": 1, + "type": "string" + }, + "template": { + "maxLength": 255, + "type": "string" + } + } + }, + "CategoryStatus": { + "type": "object", + "properties": { + "permalink": { + "type": "string" + }, + "postCount": { + "type": "integer", + "format": "int32" + }, + "visiblePostCount": { + "type": "integer", + "format": "int32" + } + } + }, + "CategoryVo": { + "required": [ + "metadata" + ], + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "postCount": { + "type": "integer", + "format": "int32" + }, + "spec": { + "$ref": "#/components/schemas/CategorySpec" + }, + "status": { + "$ref": "#/components/schemas/CategoryStatus" + } + } + }, + "CategoryVoList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/CategoryVo" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, "Comment": { "required": [ "apiVersion", @@ -913,6 +1795,79 @@ } } }, + "Condition": { + "required": [ + "lastTransitionTime", + "status", + "type" + ], + "type": "object", + "properties": { + "lastTransitionTime": { + "type": "string", + "format": "date-time" + }, + "message": { + "maxLength": 32768, + "type": "string" + }, + "reason": { + "maxLength": 1024, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "TRUE", + "FALSE", + "UNKNOWN" + ] + }, + "type": { + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + } + }, + "ContentVo": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "raw": { + "type": "string" + } + } + }, + "ContributorVo": { + "required": [ + "metadata" + ], + "type": "object", + "properties": { + "avatar": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "name": { + "type": "string" + }, + "permalink": { + "type": "string" + } + } + }, "CopyOperation": { "required": [ "op", @@ -967,6 +1922,21 @@ } } }, + "Excerpt": { + "required": [ + "autoGenerate" + ], + "type": "object", + "properties": { + "autoGenerate": { + "type": "boolean", + "default": true + }, + "raw": { + "type": "string" + } + } + }, "HaloDocument": { "required": [ "content", @@ -1127,6 +2097,195 @@ } } }, + "ListedPostVo": { + "required": [ + "metadata" + ], + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CategoryVo" + } + }, + "contributors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContributorVo" + } + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "owner": { + "$ref": "#/components/schemas/ContributorVo" + }, + "spec": { + "$ref": "#/components/schemas/PostSpec" + }, + "stats": { + "$ref": "#/components/schemas/StatsVo" + }, + "status": { + "$ref": "#/components/schemas/PostStatus" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TagVo" + } + } + } + }, + "ListedPostVoList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/ListedPostVo" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "ListedSinglePageVo": { + "required": [ + "metadata" + ], + "type": "object", + "properties": { + "contributors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContributorVo" + } + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "owner": { + "$ref": "#/components/schemas/ContributorVo" + }, + "spec": { + "$ref": "#/components/schemas/SinglePageSpec" + }, + "stats": { + "$ref": "#/components/schemas/StatsVo" + }, + "status": { + "$ref": "#/components/schemas/SinglePageStatus" + } + }, + "description": "A chunk of items." + }, + "ListedSinglePageVoList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/ListedSinglePageVo" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, "MenuItemSpec": { "type": "object", "properties": { @@ -1324,6 +2483,20 @@ } } }, + "NavigationPostVo": { + "type": "object", + "properties": { + "current": { + "$ref": "#/components/schemas/PostVo" + }, + "next": { + "$ref": "#/components/schemas/PostVo" + }, + "previous": { + "$ref": "#/components/schemas/PostVo" + } + } + }, "OwnerInfo": { "type": "object", "properties": { @@ -1344,6 +2517,199 @@ } } }, + "PostSpec": { + "required": [ + "allowComment", + "deleted", + "excerpt", + "pinned", + "priority", + "publish", + "slug", + "title", + "visible" + ], + "type": "object", + "properties": { + "allowComment": { + "type": "boolean", + "default": true + }, + "baseSnapshot": { + "type": "string" + }, + "categories": { + "type": "array", + "items": { + "type": "string" + } + }, + "cover": { + "type": "string" + }, + "deleted": { + "type": "boolean", + "default": false + }, + "excerpt": { + "$ref": "#/components/schemas/Excerpt" + }, + "headSnapshot": { + "type": "string" + }, + "htmlMetas": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "owner": { + "type": "string" + }, + "pinned": { + "type": "boolean", + "default": false + }, + "priority": { + "type": "integer", + "format": "int32", + "default": 0 + }, + "publish": { + "type": "boolean", + "default": false + }, + "publishTime": { + "type": "string", + "format": "date-time" + }, + "releaseSnapshot": { + "type": "string" + }, + "slug": { + "minLength": 1, + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "template": { + "type": "string" + }, + "title": { + "minLength": 1, + "type": "string" + }, + "visible": { + "type": "string", + "default": "PUBLIC", + "enum": [ + "PUBLIC", + "INTERNAL", + "PRIVATE" + ] + } + } + }, + "PostStatus": { + "type": "object", + "properties": { + "commentsCount": { + "type": "integer", + "format": "int32" + }, + "conditions": { + "type": "array", + "properties": { + "empty": { + "type": "boolean" + } + }, + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "contributors": { + "type": "array", + "items": { + "type": "string" + } + }, + "excerpt": { + "type": "string" + }, + "hideFromList": { + "type": "boolean" + }, + "inProgress": { + "type": "boolean" + }, + "lastModifyTime": { + "type": "string", + "format": "date-time" + }, + "observedVersion": { + "type": "integer", + "format": "int64" + }, + "permalink": { + "type": "string" + }, + "phase": { + "type": "string" + } + } + }, + "PostVo": { + "required": [ + "metadata" + ], + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CategoryVo" + } + }, + "content": { + "$ref": "#/components/schemas/ContentVo" + }, + "contributors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContributorVo" + } + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "owner": { + "$ref": "#/components/schemas/ContributorVo" + }, + "spec": { + "$ref": "#/components/schemas/PostSpec" + }, + "stats": { + "$ref": "#/components/schemas/StatsVo" + }, + "status": { + "$ref": "#/components/schemas/PostStatus" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TagVo" + } + } + } + }, "Ref": { "required": [ "name" @@ -1718,6 +3084,175 @@ } } }, + "SinglePageSpec": { + "required": [ + "allowComment", + "deleted", + "excerpt", + "pinned", + "priority", + "publish", + "slug", + "title", + "visible" + ], + "type": "object", + "properties": { + "allowComment": { + "type": "boolean", + "default": true + }, + "baseSnapshot": { + "type": "string" + }, + "cover": { + "type": "string" + }, + "deleted": { + "type": "boolean", + "default": false + }, + "excerpt": { + "$ref": "#/components/schemas/Excerpt" + }, + "headSnapshot": { + "type": "string" + }, + "htmlMetas": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "owner": { + "type": "string" + }, + "pinned": { + "type": "boolean", + "default": false + }, + "priority": { + "type": "integer", + "format": "int32", + "default": 0 + }, + "publish": { + "type": "boolean", + "default": false + }, + "publishTime": { + "type": "string", + "format": "date-time" + }, + "releaseSnapshot": { + "type": "string" + }, + "slug": { + "minLength": 1, + "type": "string" + }, + "template": { + "type": "string" + }, + "title": { + "minLength": 1, + "type": "string" + }, + "visible": { + "type": "string", + "default": "PUBLIC", + "enum": [ + "PUBLIC", + "INTERNAL", + "PRIVATE" + ] + } + } + }, + "SinglePageStatus": { + "type": "object", + "properties": { + "commentsCount": { + "type": "integer", + "format": "int32" + }, + "conditions": { + "type": "array", + "properties": { + "empty": { + "type": "boolean" + } + }, + "items": { + "$ref": "#/components/schemas/Condition" + } + }, + "contributors": { + "type": "array", + "items": { + "type": "string" + } + }, + "excerpt": { + "type": "string" + }, + "hideFromList": { + "type": "boolean" + }, + "inProgress": { + "type": "boolean" + }, + "lastModifyTime": { + "type": "string", + "format": "date-time" + }, + "observedVersion": { + "type": "integer", + "format": "int64" + }, + "permalink": { + "type": "string" + }, + "phase": { + "type": "string" + } + } + }, + "SinglePageVo": { + "required": [ + "metadata" + ], + "type": "object", + "properties": { + "content": { + "$ref": "#/components/schemas/ContentVo" + }, + "contributors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContributorVo" + } + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "owner": { + "$ref": "#/components/schemas/ContributorVo" + }, + "spec": { + "$ref": "#/components/schemas/SinglePageSpec" + }, + "stats": { + "$ref": "#/components/schemas/StatsVo" + }, + "status": { + "$ref": "#/components/schemas/SinglePageStatus" + } + } + }, "SiteStatsVo": { "type": "object", "properties": { @@ -1743,6 +3278,147 @@ } } }, + "StatsVo": { + "type": "object", + "properties": { + "comment": { + "type": "integer", + "format": "int32" + }, + "upvote": { + "type": "integer", + "format": "int32" + }, + "visit": { + "type": "integer", + "format": "int32" + } + } + }, + "TagSpec": { + "required": [ + "displayName", + "slug" + ], + "type": "object", + "properties": { + "color": { + "pattern": "^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$", + "type": "string" + }, + "cover": { + "type": "string" + }, + "displayName": { + "minLength": 1, + "type": "string" + }, + "slug": { + "minLength": 1, + "type": "string" + } + } + }, + "TagStatus": { + "type": "object", + "properties": { + "observedVersion": { + "type": "integer", + "format": "int64" + }, + "permalink": { + "type": "string" + }, + "postCount": { + "type": "integer", + "format": "int32" + }, + "visiblePostCount": { + "type": "integer", + "format": "int32" + } + } + }, + "TagVo": { + "required": [ + "metadata" + ], + "type": "object", + "properties": { + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "postCount": { + "type": "integer", + "format": "int32" + }, + "spec": { + "$ref": "#/components/schemas/TagSpec" + }, + "status": { + "$ref": "#/components/schemas/TagStatus" + } + } + }, + "TagVoList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/TagVo" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, "TestOperation": { "required": [ "op", diff --git a/api-docs/openapi/v3_0/apis_uc.api_v1alpha1.json b/api-docs/openapi/v3_0/apis_uc.api_v1alpha1.json index b804cb96a..a65865fb9 100644 --- a/api-docs/openapi/v3_0/apis_uc.api_v1alpha1.json +++ b/api-docs/openapi/v3_0/apis_uc.api_v1alpha1.json @@ -17,6 +17,353 @@ } ], "paths": { + "/apis/api.notification.halo.run/v1alpha1/notifiers/{name}/receiver-config": { + "get": { + "description": "Fetch receiver config of notifier", + "operationId": "FetchReceiverConfig", + "parameters": [ + { + "description": "Notifier name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "type": "object" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotifierV1alpha1Uc" + ] + }, + "post": { + "description": "Save receiver config of notifier", + "operationId": "SaveReceiverConfig", + "parameters": [ + { + "description": "Notifier name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "default": { + "content": {}, + "description": "default response" + } + }, + "tags": [ + "NotifierV1alpha1Uc" + ] + } + }, + "/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notification-preferences": { + "get": { + "description": "List notification preferences for the authenticated user.", + "operationId": "ListUserNotificationPreferences", + "parameters": [ + { + "description": "Username", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonTypeNotifierMatrix" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotificationV1alpha1Uc" + ] + }, + "post": { + "description": "Save notification preferences for the authenticated user.", + "operationId": "SaveUserNotificationPreferences", + "parameters": [ + { + "description": "Username", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonTypeNotifierCollectionRequest" + } + } + } + }, + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ReasonTypeNotifierMatrix" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotificationV1alpha1Uc" + ] + } + }, + "/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notifications": { + "get": { + "description": "List notifications for the authenticated user.", + "operationId": "ListUserNotifications", + "parameters": [ + { + "description": "Username", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/NotificationList" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotificationV1alpha1Uc" + ] + } + }, + "/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notifications/-/mark-specified-as-read": { + "put": { + "description": "Mark the specified notifications as read.", + "operationId": "MarkNotificationsAsRead", + "parameters": [ + { + "description": "Username", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MarkSpecifiedRequest" + } + } + }, + "required": true + }, + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotificationV1alpha1Uc" + ] + } + }, + "/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notifications/{name}": { + "delete": { + "description": "Delete the specified notification.", + "operationId": "DeleteSpecifiedNotification", + "parameters": [ + { + "description": "Username", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Notification name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotificationV1alpha1Uc" + ] + } + }, + "/apis/api.notification.halo.run/v1alpha1/userspaces/{username}/notifications/{name}/mark-as-read": { + "put": { + "description": "Mark the specified notification as read.", + "operationId": "MarkNotificationAsRead", + "parameters": [ + { + "description": "Username", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Notification name", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "default": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/Notification" + } + } + }, + "description": "default response" + } + }, + "tags": [ + "NotificationV1alpha1Uc" + ] + } + }, "/apis/uc.api.auth.halo.run/v1alpha1/user-connections/{registerId}/disconnect": { "put": { "description": "Disconnect my connection from a third-party platform.", @@ -1586,6 +1933,17 @@ } } }, + "MarkSpecifiedRequest": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "Metadata": { "required": [ "name" @@ -1666,6 +2024,140 @@ } } }, + "Notification": { + "required": [ + "apiVersion", + "kind", + "metadata" + ], + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "spec": { + "$ref": "#/components/schemas/NotificationSpec" + } + } + }, + "NotificationList": { + "required": [ + "first", + "hasNext", + "hasPrevious", + "items", + "last", + "page", + "size", + "total", + "totalPages" + ], + "type": "object", + "properties": { + "first": { + "type": "boolean", + "description": "Indicates whether current page is the first page." + }, + "hasNext": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates whether current page has previous page." + }, + "items": { + "type": "array", + "description": "A chunk of items.", + "items": { + "$ref": "#/components/schemas/Notification" + } + }, + "last": { + "type": "boolean", + "description": "Indicates whether current page is the last page." + }, + "page": { + "type": "integer", + "description": "Page number, starts from 1. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "size": { + "type": "integer", + "description": "Size of each page. If not set or equal to 0, it means no pagination.", + "format": "int32" + }, + "total": { + "type": "integer", + "description": "Total elements.", + "format": "int64" + }, + "totalPages": { + "type": "integer", + "description": "Indicates total pages.", + "format": "int64" + } + } + }, + "NotificationSpec": { + "required": [ + "htmlContent", + "rawContent", + "reason", + "recipient", + "title" + ], + "type": "object", + "properties": { + "htmlContent": { + "type": "string" + }, + "lastReadAt": { + "type": "string", + "format": "date-time" + }, + "rawContent": { + "type": "string" + }, + "reason": { + "minLength": 1, + "type": "string", + "description": "The name of reason" + }, + "recipient": { + "minLength": 1, + "type": "string", + "description": "The name of user" + }, + "title": { + "minLength": 1, + "type": "string" + }, + "unread": { + "type": "boolean" + } + } + }, + "NotifierInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, "Part": { "type": "object" }, @@ -1946,6 +2438,81 @@ } } }, + "ReasonTypeInfo": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uiPermissions": { + "uniqueItems": true, + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReasonTypeNotifierCollectionRequest": { + "required": [ + "reasonTypeNotifiers" + ], + "type": "object", + "properties": { + "reasonTypeNotifiers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReasonTypeNotifierRequest" + } + } + } + }, + "ReasonTypeNotifierMatrix": { + "type": "object", + "properties": { + "notifiers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotifierInfo" + } + }, + "reasonTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReasonTypeInfo" + } + }, + "stateMatrix": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "boolean" + } + } + } + } + }, + "ReasonTypeNotifierRequest": { + "type": "object", + "properties": { + "notifiers": { + "type": "array", + "items": { + "type": "string" + } + }, + "reasonType": { + "type": "string" + } + } + }, "Ref": { "required": [ "name" diff --git a/application/src/main/java/run/halo/app/infra/config/SwaggerConfig.java b/application/src/main/java/run/halo/app/infra/config/SwaggerConfig.java index 00337a47c..e930901fa 100644 --- a/application/src/main/java/run/halo/app/infra/config/SwaggerConfig.java +++ b/application/src/main/java/run/halo/app/infra/config/SwaggerConfig.java @@ -72,19 +72,25 @@ public class SwaggerConfig { .pathsToMatch( "/apis/*/v1alpha1/**", "/api/v1alpha1/**", - "/login/**" + "/login/**", + "/system/setup" ) .build(); } - @Bean GroupedOpenApi publicV1alpha1Api() { return GroupedOpenApi.builder() .group("apis_public.api_v1alpha1") .displayName("Public API V1alpha1") .pathsToMatch( - "/apis/api.halo.run/**" + "/apis/api.*/**" + ) + .pathsToExclude( + "/apis/api.console.*/v1alpha1/**", + // compatible with legacy issues + "/apis/api.notification.halo.run/v1alpha1/userspaces/**", + "/apis/api.notification.halo.run/v1alpha1/notifiers/**" ) .build(); } @@ -108,7 +114,10 @@ public class SwaggerConfig { .group("apis_uc.api_v1alpha1") .displayName("User-center API V1alpha1") .pathsToMatch( - "/apis/uc.api.*/v1alpha1/**" + "/apis/uc.api.*/v1alpha1/**", + // compatible with legacy issues + "/apis/api.notification.halo.run/v1alpha1/userspaces/**", + "/apis/api.notification.halo.run/v1alpha1/notifiers/**" ) .build(); } @@ -128,7 +137,9 @@ public class SwaggerConfig { "/apis/auth.halo.run/v1alpha1/**", "/apis/metrics.halo.run/v1alpha1/**", "/apis/storage.halo.run/v1alpha1/**", - "/apis/plugin.halo.run/v1alpha1/**" + "/apis/plugin.halo.run/v1alpha1/**", + "/apis/notification.halo.run/**", + "/apis/migration.halo.run/**" ) .build(); } diff --git a/application/src/main/java/run/halo/app/notification/endpoint/SubscriptionRouter.java b/application/src/main/java/run/halo/app/notification/endpoint/SubscriptionRouter.java index 7344613ab..e577cfac6 100644 --- a/application/src/main/java/run/halo/app/notification/endpoint/SubscriptionRouter.java +++ b/application/src/main/java/run/halo/app/notification/endpoint/SubscriptionRouter.java @@ -39,10 +39,11 @@ public class SubscriptionRouter { @Bean RouterFunction notificationSubscriptionRouter() { + final var tag = "NotificationV1alpha1Public"; return SpringdocRouteBuilder.route() .GET(UNSUBSCRIBE_PATTERN, this::unsubscribe, builder -> { builder.operationId("Unsubscribe") - .tag("api.notification.halo.run/v1alpha1/Subscription") + .tag(tag) .description("Unsubscribe a subscription") .parameter(parameterBuilder() .in(ParameterIn.PATH) diff --git a/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java b/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java index d622b4479..cbf2d8f36 100644 --- a/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java +++ b/application/src/main/java/run/halo/app/security/preauth/SystemSetupEndpoint.java @@ -3,7 +3,9 @@ package run.halo.app.security.preauth; import static io.r2dbc.spi.ConnectionFactoryOptions.DRIVER; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; import static org.springdoc.core.fn.builders.apiresponse.Builder.responseBuilder; +import static org.springdoc.core.fn.builders.content.Builder.contentBuilder; import static org.springdoc.core.fn.builders.requestbody.Builder.requestBodyBuilder; +import static org.springdoc.core.fn.builders.schema.Builder.schemaBuilder; import static org.springframework.web.reactive.function.server.RequestPredicates.accept; import static org.springframework.web.reactive.function.server.RequestPredicates.contentType; import static org.springframework.web.reactive.function.server.RequestPredicates.path; @@ -85,7 +87,7 @@ public class SystemSetupEndpoint { @Bean RouterFunction setupPageRouter() { - final var tag = "System"; + final var tag = "SystemV1alpha1Public"; return SpringdocRouteBuilder.route() .GET(path("/system/setup").and(accept(MediaType.TEXT_HTML)), this::setupPage, builder -> builder.operationId("JumpToSetupPage") @@ -103,9 +105,11 @@ public class SystemSetupEndpoint { .description("Setup system") .tag(tag) .requestBody(requestBodyBuilder() - .implementation(SetupRequest.class) - .content(Builder.contentBuilder() - .mediaType(MediaType.APPLICATION_FORM_URLENCODED_VALUE) + .required(true) + .content(contentBuilder() + .mediaType(MediaType.APPLICATION_JSON_VALUE) + .schema(schemaBuilder() + .implementation(SetupRequest.class)) ) ) .response(responseBuilder() diff --git a/ui/packages/api-client/entry/api-client.ts b/ui/packages/api-client/entry/api-client.ts index 4cae6d043..abfb44573 100644 --- a/ui/packages/api-client/entry/api-client.ts +++ b/ui/packages/api-client/entry/api-client.ts @@ -26,6 +26,7 @@ import { MigrationV1alpha1ConsoleApi, NotificationTemplateV1alpha1Api, NotificationV1alpha1Api, + NotificationV1alpha1PublicApi, NotificationV1alpha1UcApi, NotifierDescriptorV1alpha1Api, NotifierV1alpha1ConsoleApi, @@ -435,6 +436,11 @@ function createPublicApiClient(axiosInstance: AxiosInstance) { metrics: { metrics: new MetricsV1alpha1PublicApi(undefined, baseURL, axiosInstance), }, + notification: new NotificationV1alpha1PublicApi( + undefined, + baseURL, + axiosInstance + ), }; } diff --git a/ui/packages/api-client/src/.openapi-generator/FILES b/ui/packages/api-client/src/.openapi-generator/FILES index 90d1b4d59..cc42c1c80 100644 --- a/ui/packages/api-client/src/.openapi-generator/FILES +++ b/ui/packages/api-client/src/.openapi-generator/FILES @@ -3,7 +3,6 @@ .openapi-generator-ignore api.ts api/annotation-setting-v1alpha1-api.ts -api/api-notification-halo-run-v1alpha1-subscription-api.ts api/attachment-v1alpha1-api.ts api/attachment-v1alpha1-console-api.ts api/attachment-v1alpha1-uc-api.ts @@ -17,6 +16,7 @@ api/comment-v1alpha1-console-api.ts api/comment-v1alpha1-public-api.ts api/config-map-v1alpha1-api.ts api/counter-v1alpha1-api.ts +api/default-api.ts api/device-v1alpha1-api.ts api/device-v1alpha1-uc-api.ts api/extension-definition-v1alpha1-api.ts @@ -32,6 +32,7 @@ api/metrics-v1alpha1-public-api.ts api/migration-v1alpha1-console-api.ts api/notification-template-v1alpha1-api.ts api/notification-v1alpha1-api.ts +api/notification-v1alpha1-public-api.ts api/notification-v1alpha1-uc-api.ts api/notifier-descriptor-v1alpha1-api.ts api/notifier-v1alpha1-console-api.ts diff --git a/ui/packages/api-client/src/api.ts b/ui/packages/api-client/src/api.ts index 3a4af9afb..a2b1159d2 100644 --- a/ui/packages/api-client/src/api.ts +++ b/ui/packages/api-client/src/api.ts @@ -15,7 +15,6 @@ export * from './api/annotation-setting-v1alpha1-api'; -export * from './api/api-notification-halo-run-v1alpha1-subscription-api'; export * from './api/attachment-v1alpha1-api'; export * from './api/attachment-v1alpha1-console-api'; export * from './api/attachment-v1alpha1-uc-api'; @@ -29,6 +28,7 @@ export * from './api/comment-v1alpha1-console-api'; export * from './api/comment-v1alpha1-public-api'; export * from './api/config-map-v1alpha1-api'; export * from './api/counter-v1alpha1-api'; +export * from './api/default-api'; export * from './api/device-v1alpha1-api'; export * from './api/device-v1alpha1-uc-api'; export * from './api/extension-definition-v1alpha1-api'; @@ -44,6 +44,7 @@ export * from './api/metrics-v1alpha1-public-api'; export * from './api/migration-v1alpha1-console-api'; export * from './api/notification-template-v1alpha1-api'; export * from './api/notification-v1alpha1-api'; +export * from './api/notification-v1alpha1-public-api'; export * from './api/notification-v1alpha1-uc-api'; export * from './api/notifier-descriptor-v1alpha1-api'; export * from './api/notifier-v1alpha1-console-api'; diff --git a/ui/packages/api-client/src/api/default-api.ts b/ui/packages/api-client/src/api/default-api.ts new file mode 100644 index 000000000..0c7914d1d --- /dev/null +++ b/ui/packages/api-client/src/api/default-api.ts @@ -0,0 +1,126 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Halo + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.20.0-SNAPSHOT + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +/** + * DefaultApi - axios parameter creator + * @export + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setNoCacheForSetUpPage: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/system/setup`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async setNoCacheForSetUpPage(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.setNoCacheForSetUpPage(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.setNoCacheForSetUpPage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + setNoCacheForSetUpPage(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.setNoCacheForSetUpPage(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI { + /** + * + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public setNoCacheForSetUpPage(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).setNoCacheForSetUpPage(options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/ui/packages/api-client/src/api/api-notification-halo-run-v1alpha1-subscription-api.ts b/ui/packages/api-client/src/api/notification-v1alpha1-public-api.ts similarity index 67% rename from ui/packages/api-client/src/api/api-notification-halo-run-v1alpha1-subscription-api.ts rename to ui/packages/api-client/src/api/notification-v1alpha1-public-api.ts index 5b1612ed7..18830ddfa 100644 --- a/ui/packages/api-client/src/api/api-notification-halo-run-v1alpha1-subscription-api.ts +++ b/ui/packages/api-client/src/api/notification-v1alpha1-public-api.ts @@ -22,10 +22,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; /** - * ApiNotificationHaloRunV1alpha1SubscriptionApi - axios parameter creator + * NotificationV1alpha1PublicApi - axios parameter creator * @export */ -export const ApiNotificationHaloRunV1alpha1SubscriptionApiAxiosParamCreator = function (configuration?: Configuration) { +export const NotificationV1alpha1PublicApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Unsubscribe a subscription @@ -79,11 +79,11 @@ export const ApiNotificationHaloRunV1alpha1SubscriptionApiAxiosParamCreator = fu }; /** - * ApiNotificationHaloRunV1alpha1SubscriptionApi - functional programming interface + * NotificationV1alpha1PublicApi - functional programming interface * @export */ -export const ApiNotificationHaloRunV1alpha1SubscriptionApiFp = function(configuration?: Configuration) { - const localVarAxiosParamCreator = ApiNotificationHaloRunV1alpha1SubscriptionApiAxiosParamCreator(configuration) +export const NotificationV1alpha1PublicApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NotificationV1alpha1PublicApiAxiosParamCreator(configuration) return { /** * Unsubscribe a subscription @@ -95,68 +95,68 @@ export const ApiNotificationHaloRunV1alpha1SubscriptionApiFp = function(configur async unsubscribe(name: string, token: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.unsubscribe(name, token, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['ApiNotificationHaloRunV1alpha1SubscriptionApi.unsubscribe']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['NotificationV1alpha1PublicApi.unsubscribe']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** - * ApiNotificationHaloRunV1alpha1SubscriptionApi - factory interface + * NotificationV1alpha1PublicApi - factory interface * @export */ -export const ApiNotificationHaloRunV1alpha1SubscriptionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { - const localVarFp = ApiNotificationHaloRunV1alpha1SubscriptionApiFp(configuration) +export const NotificationV1alpha1PublicApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotificationV1alpha1PublicApiFp(configuration) return { /** * Unsubscribe a subscription - * @param {ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest} requestParameters Request parameters. + * @param {NotificationV1alpha1PublicApiUnsubscribeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - unsubscribe(requestParameters: ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest, options?: RawAxiosRequestConfig): AxiosPromise { + unsubscribe(requestParameters: NotificationV1alpha1PublicApiUnsubscribeRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.unsubscribe(requestParameters.name, requestParameters.token, options).then((request) => request(axios, basePath)); }, }; }; /** - * Request parameters for unsubscribe operation in ApiNotificationHaloRunV1alpha1SubscriptionApi. + * Request parameters for unsubscribe operation in NotificationV1alpha1PublicApi. * @export - * @interface ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest + * @interface NotificationV1alpha1PublicApiUnsubscribeRequest */ -export interface ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest { +export interface NotificationV1alpha1PublicApiUnsubscribeRequest { /** * Subscription name * @type {string} - * @memberof ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribe + * @memberof NotificationV1alpha1PublicApiUnsubscribe */ readonly name: string /** * Unsubscribe token * @type {string} - * @memberof ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribe + * @memberof NotificationV1alpha1PublicApiUnsubscribe */ readonly token: string } /** - * ApiNotificationHaloRunV1alpha1SubscriptionApi - object-oriented interface + * NotificationV1alpha1PublicApi - object-oriented interface * @export - * @class ApiNotificationHaloRunV1alpha1SubscriptionApi + * @class NotificationV1alpha1PublicApi * @extends {BaseAPI} */ -export class ApiNotificationHaloRunV1alpha1SubscriptionApi extends BaseAPI { +export class NotificationV1alpha1PublicApi extends BaseAPI { /** * Unsubscribe a subscription - * @param {ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest} requestParameters Request parameters. + * @param {NotificationV1alpha1PublicApiUnsubscribeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} - * @memberof ApiNotificationHaloRunV1alpha1SubscriptionApi + * @memberof NotificationV1alpha1PublicApi */ - public unsubscribe(requestParameters: ApiNotificationHaloRunV1alpha1SubscriptionApiUnsubscribeRequest, options?: RawAxiosRequestConfig) { - return ApiNotificationHaloRunV1alpha1SubscriptionApiFp(this.configuration).unsubscribe(requestParameters.name, requestParameters.token, options).then((request) => request(this.axios, this.basePath)); + public unsubscribe(requestParameters: NotificationV1alpha1PublicApiUnsubscribeRequest, options?: RawAxiosRequestConfig) { + return NotificationV1alpha1PublicApiFp(this.configuration).unsubscribe(requestParameters.name, requestParameters.token, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/ui/packages/api-client/src/api/system-v1alpha1-public-api.ts b/ui/packages/api-client/src/api/system-v1alpha1-public-api.ts index f6367f2c5..88b47ab9c 100644 --- a/ui/packages/api-client/src/api/system-v1alpha1-public-api.ts +++ b/ui/packages/api-client/src/api/system-v1alpha1-public-api.ts @@ -29,6 +29,43 @@ import { SiteStatsVo } from '../models'; */ export const SystemV1alpha1PublicApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * Jump to setup page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + jumpToSetupPage: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/system/setup`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + // http basic authentication required + setBasicAuthToObject(localVarRequestOptions, configuration) + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Gets site stats * @param {*} [options] Override http request option. @@ -76,6 +113,17 @@ export const SystemV1alpha1PublicApiAxiosParamCreator = function (configuration? export const SystemV1alpha1PublicApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = SystemV1alpha1PublicApiAxiosParamCreator(configuration) return { + /** + * Jump to setup page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async jumpToSetupPage(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.jumpToSetupPage(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SystemV1alpha1PublicApi.jumpToSetupPage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, /** * Gets site stats * @param {*} [options] Override http request option. @@ -97,6 +145,14 @@ export const SystemV1alpha1PublicApiFp = function(configuration?: Configuration) export const SystemV1alpha1PublicApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = SystemV1alpha1PublicApiFp(configuration) return { + /** + * Jump to setup page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + jumpToSetupPage(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.jumpToSetupPage(options).then((request) => request(axios, basePath)); + }, /** * Gets site stats * @param {*} [options] Override http request option. @@ -115,6 +171,16 @@ export const SystemV1alpha1PublicApiFactory = function (configuration?: Configur * @extends {BaseAPI} */ export class SystemV1alpha1PublicApi extends BaseAPI { + /** + * Jump to setup page + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SystemV1alpha1PublicApi + */ + public jumpToSetupPage(options?: RawAxiosRequestConfig) { + return SystemV1alpha1PublicApiFp(this.configuration).jumpToSetupPage(options).then((request) => request(this.axios, this.basePath)); + } + /** * Gets site stats * @param {*} [options] Override http request option.