diff --git a/bundled.json b/bundled.json index ea09366b..2cc82724 100644 --- a/bundled.json +++ b/bundled.json @@ -104519,6 +104519,355 @@ } } }, + "/api/v1/analytics/users-social-score": { + "get": { + "summary": "query users social score", + "description": "Query users' social scores including contributions (posts, comments, reactions) and content quality metrics. This endpoint provides comprehensive social engagement analytics for users within a network based on configurable time intervals.", + "tags": [ + "Analytic" + ], + "security": [ + { + "BearerAuth": [] + } + ], + "parameters": [ + { + "name": "interval", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "7d", + "30d", + "90d" + ], + "description": "Time interval for social score analysis", + "example": "30d" + } + }, + { + "name": "userIds", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[a-f\\d]{24}$" + }, + "minItems": 1, + "maxItems": 20, + "description": "Optional list of specific user IDs to query", + "example": [ + "60e4b1b4b3b2b5c4c4b3b2b5", + "60e4b1b4b3b2b5c4c4b3b2b6" + ] + } + }, + { + "name": "sortBy", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "contributions-score", + "contents-quality-score" + ], + "description": "Field to sort results by", + "example": "contributions-score" + } + }, + { + "name": "sortOrder", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "description": "Sort order for results", + "example": "desc" + } + }, + { + "name": "contributionsLevel", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "none", + "low", + "medium", + "high", + "very_high" + ] + }, + "minItems": 1, + "maxItems": 5, + "description": "Filter by contribution levels", + "example": [ + "high", + "very_high" + ] + } + }, + { + "name": "contentsQualityLevel", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "broken", + "weak", + "fair", + "good", + "excellent" + ] + }, + "minItems": 1, + "maxItems": 5, + "description": "Filter by content quality levels", + "example": [ + "good", + "excellent" + ] + } + }, + { + "name": "options[token]", + "in": "query", + "description": "Pagination token for getting next/previous pages", + "schema": { + "type": "string", + "maxLength": 1000, + "description": "Pagination token for retrieving next/previous page", + "example": "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" + } + }, + { + "name": "options[limit]", + "in": "query", + "description": "Number of results per page (1-100)", + "schema": { + "type": "number", + "minimum": 1, + "maximum": 20, + "default": 10, + "description": "Number of users to return per page", + "example": 10 + } + } + ], + "responses": { + "200": { + "description": "List of users with their social scores including contributions and content quality metrics", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "pattern": "^[a-f\\d]{24}$", + "description": "Unique identifier of the user", + "example": "60e4b1b4b3b2b5c4c4b3b2b5" + }, + "contributions": { + "type": "object", + "properties": { + "posts": { + "type": "number", + "description": "Number of posts created by the user", + "example": 15 + }, + "comments": { + "type": "number", + "description": "Number of comments made by the user", + "example": 42 + }, + "reactions": { + "type": "number", + "description": "Number of reactions given by the user", + "example": 87 + }, + "score": { + "type": "number", + "description": "Calculated contribution score based on weighted activities", + "example": 156.5 + }, + "level": { + "type": "string", + "enum": [ + "none", + "low", + "medium", + "high", + "very_high" + ], + "description": "Contribution level based on score thresholds", + "example": "high" + } + } + }, + "contentsQuality": { + "type": "object", + "properties": { + "score": { + "type": "number", + "description": "Average content quality score", + "example": 4.2 + }, + "count": { + "type": "number", + "description": "Number of content pieces analyzed for quality", + "example": 12 + }, + "level": { + "type": "string", + "enum": [ + "broken", + "weak", + "fair", + "good", + "excellent" + ], + "description": "Content quality level based on average score", + "example": "good" + } + } + } + } + } + }, + "paging": { + "type": "object", + "properties": { + "next": { + "type": "string", + "nullable": true, + "description": "Token for retrieving the next page of results", + "example": "eyJmcm9tIjoyMCwibGltaXQiOjEwfQ==" + }, + "previous": { + "type": "string", + "nullable": true, + "description": "Token for retrieving the previous page of results", + "example": "eyJmcm9tIjowLCJsaW1pdCI6MTB9" + }, + "limit": { + "type": "number", + "description": "Number of items per page", + "example": 10 + } + } + } + } + } + } + } + }, + "403": { + "description": "No permission to access this resource.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "number" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "detail": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object" + } + ] + } + } + } + } + }, + "example": { + "status": "error", + "code": 400300, + "message": "Forbidden error." + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "number" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "detail": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object" + } + ] + } + } + } + } + }, + "example": { + "status": "error", + "code": 500000, + "message": "Unexpected error" + } + } + } + } + } + } + }, "/api/v3/network-settings/chat": { "put": { "summary": "Update chat network setting configuration.", @@ -107540,14 +107889,281 @@ }, "responses": { "200": { - "description": "Webhook configuration", + "description": "Webhook configuration", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + } + }, + "400": { + "description": "Bad Request error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "number" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "detail": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object" + } + ] + } + } + } + } + }, + "example": { + "status": "error", + "code": 400000, + "message": "Bad Request." + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "number" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "detail": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object" + } + ] + } + } + } + } + }, + "example": { + "status": "error", + "code": 500000, + "message": "Unexpected error" + } + } + } + } + } + }, + "get": { + "summary": "Get webhook configuration.", + "tags": [ + "Network Setting" + ], + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Get webhook configuration.\n", + "responses": { + "200": { + "description": "Webhook configuration", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + } + }, + "400": { + "description": "Bad Request error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "number" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "detail": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object" + } + ] + } + } + } + } + }, + "example": { + "status": "error", + "code": 400000, + "message": "Bad Request." + } + } + } + }, + "500": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "code": { + "type": "number" + }, + "message": { + "type": "string" + }, + "data": { + "type": "object", + "properties": { + "detail": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object" + } + ] + } + } + } + } + }, + "example": { + "status": "error", + "code": 500000, + "message": "Unexpected error" + } + } + } + } + } + } + }, + "/api/v3/network-settings/uikit": { + "get": { + "summary": "Get UIKit config", + "tags": [ + "Network Setting" + ], + "security": [ + { + "BearerAuth": [] + } + ], + "description": "Get UIKit config in json format, will return empty config (`{}`) if we have not set the config yet.\n", + "responses": { + "200": { + "description": "UIKit configuration", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" + "description": "UIKit config json", + "type": "object" + }, + "example": { + "config": { + "preferred_theme": "default", + "theme": { + "light": { + "primary_color": "#1054DF", + "secondary_color": "#292B32", + "base_color": "#292B32", + "base_shade1_color": "#636878", + "base_shade2_color": "#898E9E", + "base_shade3_color": "#A5A9b5", + "base_shade4_color": "#EBECEF", + "alert_color": "#FA4D30", + "background_color": "#FFFFFF", + "base_inverse_color": "#000000", + "background_shade1_color": "#F6F7F8", + "highlight_color": "#1054DE" + }, + "dark": { + "primary_color": "#1054DE", + "secondary_color": "#292B32", + "base_color": "#EBECEF", + "base_shade1_color": "#A5A9B5", + "base_shade2_color": "#6E7487", + "base_shade3_color": "#40434E", + "base_shade4_color": "#292B32", + "alert_color": "#FA4D30", + "background_color": "#191919", + "base_inverse_color": "#FFFFFF", + "background_shade1_color": "#40434E", + "highlight_color": "#1054DE" + } } } } @@ -107644,8 +108260,8 @@ } } }, - "get": { - "summary": "Get webhook configuration.", + "put": { + "summary": "Update UIKit config", "tags": [ "Network Setting" ], @@ -107654,17 +108270,94 @@ "BearerAuth": [] } ], - "description": "Get webhook configuration.\n", + "description": "Update or create a UIKit config for a network.\nOnly admin is allowed to call this.\n", + "requestBody": { + "description": "UIKit config in json", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "config": { + "preferred_theme": "default", + "theme": { + "light": { + "primary_color": "#1054DF", + "secondary_color": "#292B32", + "base_color": "#292B32", + "base_shade1_color": "#636878", + "base_shade2_color": "#898E9E", + "base_shade3_color": "#A5A9b5", + "base_shade4_color": "#EBECEF", + "alert_color": "#FA4D30", + "background_color": "#FFFFFF", + "base_inverse_color": "#000000", + "background_shade1_color": "#F6F7F8", + "highlight_color": "#1054DE" + }, + "dark": { + "primary_color": "#1054DE", + "secondary_color": "#292B32", + "base_color": "#EBECEF", + "base_shade1_color": "#A5A9B5", + "base_shade2_color": "#6E7487", + "base_shade3_color": "#40434E", + "base_shade4_color": "#292B32", + "alert_color": "#FA4D30", + "background_color": "#191919", + "base_inverse_color": "#FFFFFF", + "background_shade1_color": "#40434E", + "highlight_color": "#1054DE" + } + } + } + } + } + } + }, "responses": { "200": { - "description": "Webhook configuration", + "description": "UIKit configuration", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" + "description": "UIKit config json", + "type": "object" + }, + "example": { + "config": { + "preferred_theme": "default", + "theme": { + "light": { + "primary_color": "#1054DF", + "secondary_color": "#292B32", + "base_color": "#292B32", + "base_shade1_color": "#636878", + "base_shade2_color": "#898E9E", + "base_shade3_color": "#A5A9b5", + "base_shade4_color": "#EBECEF", + "alert_color": "#FA4D30", + "background_color": "#FFFFFF", + "base_inverse_color": "#000000", + "background_shade1_color": "#F6F7F8", + "highlight_color": "#1054DE" + }, + "dark": { + "primary_color": "#1054DE", + "secondary_color": "#292B32", + "base_color": "#EBECEF", + "base_shade1_color": "#A5A9B5", + "base_shade2_color": "#6E7487", + "base_shade3_color": "#40434E", + "base_shade4_color": "#292B32", + "alert_color": "#FA4D30", + "background_color": "#191919", + "base_inverse_color": "#FFFFFF", + "background_shade1_color": "#40434E", + "highlight_color": "#1054DE" + } } } } @@ -107762,9 +108455,9 @@ } } }, - "/api/v3/network-settings/uikit": { - "get": { - "summary": "Get UIKit config", + "/api/v3/network-settings/shareable-deep-links": { + "put": { + "summary": "Create shareable deep links configuration", "tags": [ "Network Setting" ], @@ -107773,47 +108466,104 @@ "BearerAuth": [] } ], - "description": "Get UIKit config in json format, will return empty config (`{}`) if we have not set the config yet.\n", + "description": "Create or update shareable deep links configuration with domain and path patterns.\n", + "requestBody": { + "description": "Configuration for shareable deep links", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "domain", + "patterns" + ], + "properties": { + "domain": { + "type": "string", + "maxLength": 100, + "description": "The domain for the shareable deep links", + "example": "myapp.com" + }, + "patterns": { + "type": "object", + "properties": { + "posts": { + "type": "string", + "maxLength": 100, + "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", + "example": "/posts/{postId}" + }, + "communities": { + "type": "string", + "maxLength": 100, + "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", + "example": "/communities/{communityId}" + }, + "users": { + "type": "string", + "maxLength": 100, + "description": "URL path for users, {userId} is required (e.g., /users/{userId})", + "example": "/users/{userId}" + }, + "livestreams": { + "type": "string", + "maxLength": 100, + "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", + "example": "/livestreams/{livestreamId}" + } + } + } + } + } + } + } + }, "responses": { "200": { - "description": "UIKit configuration", + "description": "Shareable deep links configuration", "content": { "application/json": { "schema": { - "description": "UIKit config json", - "type": "object" - }, - "example": { - "config": { - "preferred_theme": "default", - "theme": { - "light": { - "primary_color": "#1054DF", - "secondary_color": "#292B32", - "base_color": "#292B32", - "base_shade1_color": "#636878", - "base_shade2_color": "#898E9E", - "base_shade3_color": "#A5A9b5", - "base_shade4_color": "#EBECEF", - "alert_color": "#FA4D30", - "background_color": "#FFFFFF", - "base_inverse_color": "#000000", - "background_shade1_color": "#F6F7F8", - "highlight_color": "#1054DE" - }, - "dark": { - "primary_color": "#1054DE", - "secondary_color": "#292B32", - "base_color": "#EBECEF", - "base_shade1_color": "#A5A9B5", - "base_shade2_color": "#6E7487", - "base_shade3_color": "#40434E", - "base_shade4_color": "#292B32", - "alert_color": "#FA4D30", - "background_color": "#191919", - "base_inverse_color": "#FFFFFF", - "background_shade1_color": "#40434E", - "highlight_color": "#1054DE" + "type": "object", + "required": [ + "domain", + "patterns" + ], + "properties": { + "domain": { + "type": "string", + "maxLength": 100, + "description": "The domain for the shareable deep links", + "example": "myapp.com" + }, + "patterns": { + "type": "object", + "properties": { + "posts": { + "type": "string", + "maxLength": 100, + "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", + "example": "/posts/{postId}" + }, + "communities": { + "type": "string", + "maxLength": 100, + "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", + "example": "/communities/{communityId}" + }, + "users": { + "type": "string", + "maxLength": 100, + "description": "URL path for users, {userId} is required (e.g., /users/{userId})", + "example": "/users/{userId}" + }, + "livestreams": { + "type": "string", + "maxLength": 100, + "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", + "example": "/livestreams/{livestreamId}" + } } } } @@ -107911,8 +108661,8 @@ } } }, - "put": { - "summary": "Update UIKit config", + "get": { + "summary": "Get shareable deep links configuration", "tags": [ "Network Setting" ], @@ -107921,93 +108671,52 @@ "BearerAuth": [] } ], - "description": "Update or create a UIKit config for a network.\nOnly admin is allowed to call this.\n", - "requestBody": { - "description": "UIKit config in json", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object" - }, - "example": { - "config": { - "preferred_theme": "default", - "theme": { - "light": { - "primary_color": "#1054DF", - "secondary_color": "#292B32", - "base_color": "#292B32", - "base_shade1_color": "#636878", - "base_shade2_color": "#898E9E", - "base_shade3_color": "#A5A9b5", - "base_shade4_color": "#EBECEF", - "alert_color": "#FA4D30", - "background_color": "#FFFFFF", - "base_inverse_color": "#000000", - "background_shade1_color": "#F6F7F8", - "highlight_color": "#1054DE" - }, - "dark": { - "primary_color": "#1054DE", - "secondary_color": "#292B32", - "base_color": "#EBECEF", - "base_shade1_color": "#A5A9B5", - "base_shade2_color": "#6E7487", - "base_shade3_color": "#40434E", - "base_shade4_color": "#292B32", - "alert_color": "#FA4D30", - "background_color": "#191919", - "base_inverse_color": "#FFFFFF", - "background_shade1_color": "#40434E", - "highlight_color": "#1054DE" - } - } - } - } - } - } - }, + "description": "Get shareable deep links configuration.\n", "responses": { "200": { - "description": "UIKit configuration", + "description": "Shareable deep links configuration", "content": { "application/json": { "schema": { - "description": "UIKit config json", - "type": "object" - }, - "example": { - "config": { - "preferred_theme": "default", - "theme": { - "light": { - "primary_color": "#1054DF", - "secondary_color": "#292B32", - "base_color": "#292B32", - "base_shade1_color": "#636878", - "base_shade2_color": "#898E9E", - "base_shade3_color": "#A5A9b5", - "base_shade4_color": "#EBECEF", - "alert_color": "#FA4D30", - "background_color": "#FFFFFF", - "base_inverse_color": "#000000", - "background_shade1_color": "#F6F7F8", - "highlight_color": "#1054DE" - }, - "dark": { - "primary_color": "#1054DE", - "secondary_color": "#292B32", - "base_color": "#EBECEF", - "base_shade1_color": "#A5A9B5", - "base_shade2_color": "#6E7487", - "base_shade3_color": "#40434E", - "base_shade4_color": "#292B32", - "alert_color": "#FA4D30", - "background_color": "#191919", - "base_inverse_color": "#FFFFFF", - "background_shade1_color": "#40434E", - "highlight_color": "#1054DE" + "type": "object", + "required": [ + "domain", + "patterns" + ], + "properties": { + "domain": { + "type": "string", + "maxLength": 100, + "description": "The domain for the shareable deep links", + "example": "myapp.com" + }, + "patterns": { + "type": "object", + "properties": { + "posts": { + "type": "string", + "maxLength": 100, + "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", + "example": "/posts/{postId}" + }, + "communities": { + "type": "string", + "maxLength": 100, + "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", + "example": "/communities/{communityId}" + }, + "users": { + "type": "string", + "maxLength": 100, + "description": "URL path for users, {userId} is required (e.g., /users/{userId})", + "example": "/users/{userId}" + }, + "livestreams": { + "type": "string", + "maxLength": 100, + "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", + "example": "/livestreams/{livestreamId}" + } } } } @@ -108106,9 +108815,9 @@ } } }, - "/api/v3/network-settings/shareable-deep-links": { + "/api/v3/network-settings/security-configs": { "put": { - "summary": "Create shareable deep links configuration", + "summary": "Update network security configuration", "tags": [ "Network Setting" ], @@ -108117,106 +108826,107 @@ "BearerAuth": [] } ], - "description": "Create or update shareable deep links configuration with domain and path patterns.\n", + "description": "Create or update security configuration for server key and admin token settings.\n", "requestBody": { - "description": "Configuration for shareable deep links", + "description": "Configuration for security settings", "required": true, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "domain", - "patterns" - ], "properties": { - "domain": { - "type": "string", - "maxLength": 100, - "description": "The domain for the shareable deep links", - "example": "myapp.com" - }, - "patterns": { + "serverKey": { "type": "object", "properties": { - "posts": { - "type": "string", - "maxLength": 100, - "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", - "example": "/posts/{postId}" - }, - "communities": { - "type": "string", - "maxLength": 100, - "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", - "example": "/communities/{communityId}" - }, - "users": { - "type": "string", - "maxLength": 100, - "description": "URL path for users, {userId} is required (e.g., /users/{userId})", - "example": "/users/{userId}" + "expiresInHours": { + "type": "number", + "minimum": 1, + "maximum": 1000, + "description": "Server key expiration time in hours" }, - "livestreams": { - "type": "string", - "maxLength": 100, - "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", - "example": "/livestreams/{livestreamId}" + "apiScopeEnabled": { + "type": "boolean", + "description": "Enable API scope for server key" + } + }, + "required": [ + "apiScopeEnabled" + ] + }, + "adminToken": { + "type": "object", + "properties": { + "expiresInHours": { + "type": "number", + "minimum": 1, + "maximum": 1000, + "description": "Admin token expiration time in hours" } } } - } + }, + "anyOf": [ + { + "required": [ + "serverKey" + ] + }, + { + "required": [ + "adminToken" + ] + } + ] } } } }, "responses": { "200": { - "description": "Shareable deep links configuration", + "description": "Security configuration", "content": { "application/json": { "schema": { "type": "object", - "required": [ - "domain", - "patterns" - ], "properties": { - "domain": { - "type": "string", - "maxLength": 100, - "description": "The domain for the shareable deep links", - "example": "myapp.com" - }, - "patterns": { + "securityConfigs": { "type": "object", "properties": { - "posts": { - "type": "string", - "maxLength": 100, - "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", - "example": "/posts/{postId}" - }, - "communities": { - "type": "string", - "maxLength": 100, - "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", - "example": "/communities/{communityId}" - }, - "users": { - "type": "string", - "maxLength": 100, - "description": "URL path for users, {userId} is required (e.g., /users/{userId})", - "example": "/users/{userId}" + "serverKey": { + "type": "object", + "properties": { + "expiresInHours": { + "type": "number", + "description": "Server key expiration time in hours" + }, + "apiScopeEnabled": { + "type": "boolean", + "description": "Whether API scope is enabled for server key" + } + } }, - "livestreams": { - "type": "string", - "maxLength": 100, - "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", - "example": "/livestreams/{livestreamId}" + "adminToken": { + "type": "object", + "properties": { + "expiresInHours": { + "type": "number", + "description": "Admin token expiration time in hours" + } + } } } } + }, + "example": { + "securityConfigs": { + "serverKey": { + "expiresInHours": 168, + "apiScopeEnabled": true + }, + "adminToken": { + "expiresInHours": 24 + } + } } } } @@ -108313,7 +109023,7 @@ } }, "get": { - "summary": "Get shareable deep links configuration", + "summary": "Get network security configuration", "tags": [ "Network Setting" ], @@ -108322,54 +109032,53 @@ "BearerAuth": [] } ], - "description": "Get shareable deep links configuration.\n", + "description": "Get security configuration for server key and admin token settings.\n", "responses": { "200": { - "description": "Shareable deep links configuration", + "description": "Security configuration", "content": { "application/json": { "schema": { "type": "object", - "required": [ - "domain", - "patterns" - ], "properties": { - "domain": { - "type": "string", - "maxLength": 100, - "description": "The domain for the shareable deep links", - "example": "myapp.com" - }, - "patterns": { + "securityConfigs": { "type": "object", "properties": { - "posts": { - "type": "string", - "maxLength": 100, - "description": "URL path for posts, {postId} is required (e.g., /posts/{postId})", - "example": "/posts/{postId}" - }, - "communities": { - "type": "string", - "maxLength": 100, - "description": "URL path for communities, {communityId} is required (e.g., /communities/{communityId})", - "example": "/communities/{communityId}" - }, - "users": { - "type": "string", - "maxLength": 100, - "description": "URL path for users, {userId} is required (e.g., /users/{userId})", - "example": "/users/{userId}" + "serverKey": { + "type": "object", + "properties": { + "expiresInHours": { + "type": "number", + "description": "Server key expiration time in hours" + }, + "apiScopeEnabled": { + "type": "boolean", + "description": "Whether API scope is enabled for server key" + } + } }, - "livestreams": { - "type": "string", - "maxLength": 100, - "description": "URL path for livestreams, {livestreamId} is required (e.g., /livestreams/{livestreamId})", - "example": "/livestreams/{livestreamId}" + "adminToken": { + "type": "object", + "properties": { + "expiresInHours": { + "type": "number", + "description": "Admin token expiration time in hours" + } + } } } } + }, + "example": { + "securityConfigs": { + "serverKey": { + "expiresInHours": 168, + "apiScopeEnabled": true + }, + "adminToken": { + "expiresInHours": 24 + } + } } } } @@ -108466,9 +109175,9 @@ } } }, - "/api/v3/network-settings/security-configs": { + "/api/v3/network-settings/analytic-configs": { "put": { - "summary": "Update network security configuration", + "summary": "Update network analytic configuration", "tags": [ "Network Setting" ], @@ -108477,91 +109186,158 @@ "BearerAuth": [] } ], - "description": "Create or update security configuration for server key and admin token settings.\n", + "description": "Update analytic configuration including contributions scoring and content quality settings for social score analytics.\n", "requestBody": { - "description": "Configuration for security settings", + "description": "Analytic configuration for social score and content quality settings\n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { - "serverKey": { + "contributionsSetting": { "type": "object", + "description": "Configuration for user contributions scoring", "properties": { - "expiresInHours": { - "type": "number", - "minimum": 1, - "maximum": 1000, - "description": "Server key expiration time in hours" + "scoreWeight": { + "type": "object", + "description": "Weight values for different contribution types", + "properties": { + "post": { + "type": "number", + "description": "Weight for posts in contribution score calculation", + "example": 10 + }, + "comment": { + "type": "number", + "description": "Weight for comments in contribution score calculation", + "example": 3 + }, + "reaction": { + "type": "number", + "description": "Weight for reactions in contribution score calculation", + "example": 1 + } + } }, - "apiScopeEnabled": { - "type": "boolean", - "description": "Enable API scope for server key" + "threshold": { + "type": "object", + "description": "Threshold values for contribution levels", + "properties": { + "none": { + "type": "number", + "description": "Minimum score for 'none' level", + "example": 0 + }, + "low": { + "type": "number", + "description": "Minimum score for 'low' level", + "example": 10 + }, + "medium": { + "type": "number", + "description": "Minimum score for 'medium' level", + "example": 50 + }, + "high": { + "type": "number", + "description": "Minimum score for 'high' level", + "example": 100 + }, + "veryHigh": { + "type": "number", + "description": "Minimum score for 'very_high' level", + "example": 200 + } + } } - }, - "required": [ - "apiScopeEnabled" - ] + } }, - "adminToken": { + "contentsQualitySetting": { "type": "object", + "description": "Configuration for content quality assessment", "properties": { - "expiresInHours": { - "type": "number", - "minimum": 1, - "maximum": 1000, - "description": "Admin token expiration time in hours" + "qualityDefinition": { + "type": "string", + "description": "Definition or criteria for content quality assessment", + "example": "Content quality is assessed based on engagement metrics, community guidelines compliance, and user feedback" } } } - }, - "anyOf": [ - { - "required": [ - "serverKey" - ] - }, - { - "required": [ - "adminToken" - ] - } - ] + } } } } }, "responses": { "200": { - "description": "Security configuration", + "description": "Analytic configuration for social score and content quality", "content": { "application/json": { "schema": { "type": "object", "properties": { - "securityConfigs": { + "analyticConfigs": { "type": "object", + "description": "Analytic configuration settings", "properties": { - "serverKey": { + "contributionsSetting": { "type": "object", + "description": "Configuration for user contributions scoring", "properties": { - "expiresInHours": { - "type": "number", - "description": "Server key expiration time in hours" + "scoreWeight": { + "type": "object", + "description": "Weight values for different contribution types", + "properties": { + "post": { + "type": "number", + "description": "Weight for posts in contribution score calculation" + }, + "comment": { + "type": "number", + "description": "Weight for comments in contribution score calculation" + }, + "reaction": { + "type": "number", + "description": "Weight for reactions in contribution score calculation" + } + } }, - "apiScopeEnabled": { - "type": "boolean", - "description": "Whether API scope is enabled for server key" + "threshold": { + "type": "object", + "description": "Threshold values for contribution levels", + "properties": { + "none": { + "type": "number", + "description": "Minimum score for 'none' level" + }, + "low": { + "type": "number", + "description": "Minimum score for 'low' level" + }, + "medium": { + "type": "number", + "description": "Minimum score for 'medium' level" + }, + "high": { + "type": "number", + "description": "Minimum score for 'high' level" + }, + "veryHigh": { + "type": "number", + "description": "Minimum score for 'very_high' level" + } + } } } }, - "adminToken": { + "contentsQualitySetting": { "type": "object", + "description": "Configuration for content quality assessment", "properties": { - "expiresInHours": { - "type": "number", - "description": "Admin token expiration time in hours" + "qualityDefinition": { + "type": "string", + "description": "Definition or criteria for content quality assessment" } } } @@ -108569,13 +109345,23 @@ } }, "example": { - "securityConfigs": { - "serverKey": { - "expiresInHours": 168, - "apiScopeEnabled": true + "analyticConfigs": { + "contributionsSetting": { + "scoreWeight": { + "post": 10, + "comment": 3, + "reaction": 1 + }, + "threshold": { + "none": 0, + "low": 10, + "medium": 50, + "high": 100, + "veryHigh": 200 + } }, - "adminToken": { - "expiresInHours": 24 + "contentsQualitySetting": { + "qualityDefinition": "Content quality is assessed based on engagement metrics, community guidelines compliance, and user feedback" } } } @@ -108674,7 +109460,7 @@ } }, "get": { - "summary": "Get network security configuration", + "summary": "Get network analytic configuration", "tags": [ "Network Setting" ], @@ -108683,37 +109469,76 @@ "BearerAuth": [] } ], - "description": "Get security configuration for server key and admin token settings.\n", + "description": "Get analytic configuration including contributions scoring and content quality settings for social score analytics.\n", "responses": { "200": { - "description": "Security configuration", + "description": "Analytic configuration for social score and content quality", "content": { "application/json": { "schema": { "type": "object", "properties": { - "securityConfigs": { + "analyticConfigs": { "type": "object", + "description": "Analytic configuration settings", "properties": { - "serverKey": { + "contributionsSetting": { "type": "object", + "description": "Configuration for user contributions scoring", "properties": { - "expiresInHours": { - "type": "number", - "description": "Server key expiration time in hours" + "scoreWeight": { + "type": "object", + "description": "Weight values for different contribution types", + "properties": { + "post": { + "type": "number", + "description": "Weight for posts in contribution score calculation" + }, + "comment": { + "type": "number", + "description": "Weight for comments in contribution score calculation" + }, + "reaction": { + "type": "number", + "description": "Weight for reactions in contribution score calculation" + } + } }, - "apiScopeEnabled": { - "type": "boolean", - "description": "Whether API scope is enabled for server key" + "threshold": { + "type": "object", + "description": "Threshold values for contribution levels", + "properties": { + "none": { + "type": "number", + "description": "Minimum score for 'none' level" + }, + "low": { + "type": "number", + "description": "Minimum score for 'low' level" + }, + "medium": { + "type": "number", + "description": "Minimum score for 'medium' level" + }, + "high": { + "type": "number", + "description": "Minimum score for 'high' level" + }, + "veryHigh": { + "type": "number", + "description": "Minimum score for 'very_high' level" + } + } } } }, - "adminToken": { + "contentsQualitySetting": { "type": "object", + "description": "Configuration for content quality assessment", "properties": { - "expiresInHours": { - "type": "number", - "description": "Admin token expiration time in hours" + "qualityDefinition": { + "type": "string", + "description": "Definition or criteria for content quality assessment" } } } @@ -108721,13 +109546,23 @@ } }, "example": { - "securityConfigs": { - "serverKey": { - "expiresInHours": 168, - "apiScopeEnabled": true + "analyticConfigs": { + "contributionsSetting": { + "scoreWeight": { + "post": 10, + "comment": 3, + "reaction": 1 + }, + "threshold": { + "none": 0, + "low": 10, + "medium": 50, + "high": 100, + "veryHigh": 200 + } }, - "adminToken": { - "expiresInHours": 24 + "contentsQualitySetting": { + "qualityDefinition": "Content quality is assessed based on engagement metrics, community guidelines compliance, and user feedback" } } } diff --git a/swagger.yaml b/swagger.yaml index 0675e328..cc3cbf7d 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -295,6 +295,8 @@ paths: $ref: "./v1/analytics/community-metrics/index.yaml#/_communityId-most-active-day" /api/v1/analytics/community-metrics/{communityId}/most-active-time: $ref: "./v1/analytics/community-metrics/index.yaml#/_communityId-most-active-time" + /api/v1/analytics/users-social-score: + $ref: "./v1/analytics/index.yaml#/users-social-score" /api/v3/network-settings/chat: $ref: "./v3/network-setting/index.yaml#/chat" /api/v3/network-settings/feed-setting: @@ -319,6 +321,8 @@ paths: $ref: "./v3/network-setting/index.yaml#/shareable-deep-links" /api/v3/network-settings/security-configs: $ref: "./v3/network-setting/index.yaml#/security-configs" + /api/v3/network-settings/analytic-configs: + $ref: "./v3/network-setting/index.yaml#/analytic-configs" /v1/notification: $ref: "./v1/notification/index.yaml#/root" /api/v1/notification-tray: diff --git a/v1/analytics/index.yaml b/v1/analytics/index.yaml index 7f128dd5..97e4db8c 100644 --- a/v1/analytics/index.yaml +++ b/v1/analytics/index.yaml @@ -74,3 +74,30 @@ views-stories_storyId-users: $ref: "../../global/error.yaml#/UnProcessableError" 500: $ref: "../../global/error.yaml#/UnexpectedError" + +users-social-score: + get: + summary: query users social score + description: + "Query users' social scores including contributions (posts, comments, reactions) and content quality metrics. + This endpoint provides comprehensive social engagement analytics for users within a network based on configurable time intervals." + tags: + - Analytic + security: + - BearerAuth: [] + parameters: + - $ref: "./parameter.yaml#/socialScoreInterval" + - $ref: "./parameter.yaml#/userIds" + - $ref: "./parameter.yaml#/sortBy" + - $ref: "./parameter.yaml#/sortOrder" + - $ref: "./parameter.yaml#/contributionsLevel" + - $ref: "./parameter.yaml#/contentsQualityLevel" + - $ref: "./parameter.yaml#/options.token" + - $ref: "./parameter.yaml#/options.limit" + responses: + 200: + $ref: "./response.yaml#/users-social-score-response-payload-200" + 403: + $ref: "../../global/error.yaml#/ForbiddenError" + 500: + $ref: "../../global/error.yaml#/UnexpectedError" diff --git a/v1/analytics/parameter.yaml b/v1/analytics/parameter.yaml index f27530f1..f30ac58f 100644 --- a/v1/analytics/parameter.yaml +++ b/v1/analytics/parameter.yaml @@ -32,3 +32,92 @@ limit: type: number default: 10 description: number of user in a page + +socialScoreInterval: + name: interval + in: query + required: true + schema: + type: string + enum: ["7d", "30d", "90d"] + description: Time interval for social score analysis + example: "30d" + +userIds: + name: userIds + in: query + schema: + type: array + items: + type: string + pattern: '^[a-f\d]{24}$' + minItems: 1 + maxItems: 20 + description: Optional list of specific user IDs to query + example: ["60e4b1b4b3b2b5c4c4b3b2b5", "60e4b1b4b3b2b5c4c4b3b2b6"] + +sortBy: + name: sortBy + in: query + schema: + type: string + enum: ["contributions-score", "contents-quality-score"] + description: Field to sort results by + example: "contributions-score" + +sortOrder: + name: sortOrder + in: query + schema: + type: string + enum: ["desc", "asc"] + description: Sort order for results + example: "desc" + +contributionsLevel: + name: contributionsLevel + in: query + schema: + type: array + items: + type: string + enum: ["none", "low", "medium", "high", "very_high"] + minItems: 1 + maxItems: 5 + description: Filter by contribution levels + example: ["high", "very_high"] + +contentsQualityLevel: + name: contentsQualityLevel + in: query + schema: + type: array + items: + type: string + enum: ["broken", "weak", "fair", "good", "excellent"] + minItems: 1 + maxItems: 5 + description: Filter by content quality levels + example: ["good", "excellent"] + +options.limit: + name: options[limit] + in: query + description: Number of results per page (1-100) + schema: + type: number + minimum: 1 + maximum: 20 + default: 10 + description: Number of users to return per page + example: 10 + +options.token: + name: options[token] + in: query + description: Pagination token for getting next/previous pages + schema: + type: string + maxLength: 1000 + description: Pagination token for retrieving next/previous page + example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" diff --git a/v1/analytics/response.yaml b/v1/analytics/response.yaml index 85eb2ae5..6343605a 100644 --- a/v1/analytics/response.yaml +++ b/v1/analytics/response.yaml @@ -47,3 +47,78 @@ views-stories_storyId-users-response-payload-200: previous: type: string example: "eyJhZnRlciI6eyJfaWQiOnsicG9zdElkIjoiNjUxNjZlZTNlOTVlZTQ4YjkzZWVkMjQ1IiwidXNlcklkIjoiNjUxNjZlZTRlOTVlZTQzZjgzZWVkMjViIn0sIm5ldHdvcmtJZCI6IjYwNmYzN2EzYWU2MDFlZjM3NGViYWEwMSIsInJlYWNoZWRBdCI6IjIwMjMtMDktMjlUMDY6Mjk6NTQuOTQ4WiJ9fQ==" + +users-social-score-response-payload-200: + description: List of users with their social scores including contributions and content quality metrics + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + type: object + properties: + userId: + type: string + pattern: '^[a-f\d]{24}$' + description: Unique identifier of the user + example: "60e4b1b4b3b2b5c4c4b3b2b5" + contributions: + type: object + properties: + posts: + type: number + description: Number of posts created by the user + example: 15 + comments: + type: number + description: Number of comments made by the user + example: 42 + reactions: + type: number + description: Number of reactions given by the user + example: 87 + score: + type: number + description: Calculated contribution score based on weighted activities + example: 156.5 + level: + type: string + enum: ["none", "low", "medium", "high", "very_high"] + description: Contribution level based on score thresholds + example: "high" + contentsQuality: + type: object + properties: + score: + type: number + description: Average content quality score + example: 4.2 + count: + type: number + description: Number of content pieces analyzed for quality + example: 12 + level: + type: string + enum: ["broken", "weak", "fair", "good", "excellent"] + description: Content quality level based on average score + example: "good" + paging: + type: object + properties: + next: + type: string + nullable: true + description: Token for retrieving the next page of results + example: "eyJmcm9tIjoyMCwibGltaXQiOjEwfQ==" + previous: + type: string + nullable: true + description: Token for retrieving the previous page of results + example: "eyJmcm9tIjowLCJsaW1pdCI6MTB9" + limit: + type: number + description: Number of items per page + example: 10 diff --git a/v3/network-setting/index.yaml b/v3/network-setting/index.yaml index f3cb60f8..0fc83fc0 100644 --- a/v3/network-setting/index.yaml +++ b/v3/network-setting/index.yaml @@ -415,3 +415,35 @@ security-configs: $ref: "../../global/error.yaml#/BadRequestError" 500: $ref: "../../global/error.yaml#/UnexpectedError" + +analytic-configs: + put: + summary: "Update network analytic configuration" + tags: + - "Network Setting" + security: + - BearerAuth: [] + description: "Update analytic configuration including contributions scoring and content quality settings for social score analytics.\n" + requestBody: + $ref: "./request.yaml#/analytic-configs-put-request-payload" + responses: + 200: + $ref: "./response.yaml#/analytic-configs-response-200" + 400: + $ref: "../../global/error.yaml#/BadRequestError" + 500: + $ref: "../../global/error.yaml#/UnexpectedError" + get: + summary: "Get network analytic configuration" + tags: + - "Network Setting" + security: + - BearerAuth: [] + description: "Get analytic configuration including contributions scoring and content quality settings for social score analytics.\n" + responses: + 200: + $ref: "./response.yaml#/analytic-configs-response-200" + 400: + $ref: "../../global/error.yaml#/BadRequestError" + 500: + $ref: "../../global/error.yaml#/UnexpectedError" diff --git a/v3/network-setting/request.yaml b/v3/network-setting/request.yaml index 2790d07c..68825bfd 100644 --- a/v3/network-setting/request.yaml +++ b/v3/network-setting/request.yaml @@ -297,3 +297,64 @@ security-configs-put-request-payload: - required: ["serverKey"] - required: ["adminToken"] +analytic-configs-put-request-payload: + description: "Analytic configuration for social score and content quality settings\n" + required: true + content: + application/json: + schema: + type: "object" + properties: + contributionsSetting: + type: "object" + description: "Configuration for user contributions scoring" + properties: + scoreWeight: + type: "object" + description: "Weight values for different contribution types" + properties: + post: + type: "number" + description: "Weight for posts in contribution score calculation" + example: 10 + comment: + type: "number" + description: "Weight for comments in contribution score calculation" + example: 3 + reaction: + type: "number" + description: "Weight for reactions in contribution score calculation" + example: 1 + threshold: + type: "object" + description: "Threshold values for contribution levels" + properties: + none: + type: "number" + description: "Minimum score for 'none' level" + example: 0 + low: + type: "number" + description: "Minimum score for 'low' level" + example: 10 + medium: + type: "number" + description: "Minimum score for 'medium' level" + example: 50 + high: + type: "number" + description: "Minimum score for 'high' level" + example: 100 + veryHigh: + type: "number" + description: "Minimum score for 'very_high' level" + example: 200 + contentsQualitySetting: + type: "object" + description: "Configuration for content quality assessment" + properties: + qualityDefinition: + type: "string" + description: "Definition or criteria for content quality assessment" + example: "Content quality is assessed based on engagement metrics, community guidelines compliance, and user feedback" + diff --git a/v3/network-setting/response.yaml b/v3/network-setting/response.yaml index d475b438..c57e2e06 100644 --- a/v3/network-setting/response.yaml +++ b/v3/network-setting/response.yaml @@ -251,3 +251,73 @@ security-configs-response-200: adminToken: expiresInHours: 24 +analytic-configs-response-200: + description: Analytic configuration for social score and content quality + content: + application/json: + schema: + type: "object" + properties: + analyticConfigs: + type: "object" + description: "Analytic configuration settings" + properties: + contributionsSetting: + type: "object" + description: "Configuration for user contributions scoring" + properties: + scoreWeight: + type: "object" + description: "Weight values for different contribution types" + properties: + post: + type: "number" + description: "Weight for posts in contribution score calculation" + comment: + type: "number" + description: "Weight for comments in contribution score calculation" + reaction: + type: "number" + description: "Weight for reactions in contribution score calculation" + threshold: + type: "object" + description: "Threshold values for contribution levels" + properties: + none: + type: "number" + description: "Minimum score for 'none' level" + low: + type: "number" + description: "Minimum score for 'low' level" + medium: + type: "number" + description: "Minimum score for 'medium' level" + high: + type: "number" + description: "Minimum score for 'high' level" + veryHigh: + type: "number" + description: "Minimum score for 'very_high' level" + contentsQualitySetting: + type: "object" + description: "Configuration for content quality assessment" + properties: + qualityDefinition: + type: "string" + description: "Definition or criteria for content quality assessment" + example: + analyticConfigs: + contributionsSetting: + scoreWeight: + post: 10 + comment: 3 + reaction: 1 + threshold: + none: 0 + low: 10 + medium: 50 + high: 100 + veryHigh: 200 + contentsQualitySetting: + qualityDefinition: "Content quality is assessed based on engagement metrics, community guidelines compliance, and user feedback" +