diff --git a/bundled.json b/bundled.json index 10898411..e5c50e43 100644 --- a/bundled.json +++ b/bundled.json @@ -18868,6 +18868,54 @@ "metadata": { "type": "object" }, + "links": { + "type": "array", + "maxItems": 100, + "description": "Array of URL links extracted from content with metadata for link preview rendering", + "items": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "index": { + "type": "number", + "minimum": 0, + "description": "Starting position of the URL in the original text content" + }, + "length": { + "type": "number", + "minimum": 1, + "description": "Length of the URL string in the original text content" + }, + "url": { + "type": "string", + "maximum": 2000, + "description": "The complete URL found in the content" + }, + "renderPreview": { + "type": "boolean", + "default": false, + "description": "Flag indicating whether to render a rich preview for this link" + }, + "domain": { + "type": "string", + "maximum": 2000, + "description": "Domain name extracted from the URL (e.g., 'example.com')" + }, + "title": { + "type": "string", + "maximum": 2000, + "description": "Title of the linked page, typically extracted from Open Graph or meta tags" + }, + "imageUrl": { + "type": "string", + "maximum": 2000, + "description": "URL of the preview image for the link, typically extracted from Open Graph tags" + } + } + } + }, "commentId": { "type": "string", "maxLength": 900 @@ -21046,6 +21094,54 @@ "metadata": { "type": "object" }, + "links": { + "type": "array", + "maxItems": 100, + "description": "Array of URL links extracted from content with metadata for link preview rendering", + "items": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "index": { + "type": "number", + "minimum": 0, + "description": "Starting position of the URL in the original text content" + }, + "length": { + "type": "number", + "minimum": 1, + "description": "Length of the URL string in the original text content" + }, + "url": { + "type": "string", + "maximum": 2000, + "description": "The complete URL found in the content" + }, + "renderPreview": { + "type": "boolean", + "default": false, + "description": "Flag indicating whether to render a rich preview for this link" + }, + "domain": { + "type": "string", + "maximum": 2000, + "description": "Domain name extracted from the URL (e.g., 'example.com')" + }, + "title": { + "type": "string", + "maximum": 2000, + "description": "Title of the linked page, typically extracted from Open Graph or meta tags" + }, + "imageUrl": { + "type": "string", + "maximum": 2000, + "description": "URL of the preview image for the link, typically extracted from Open Graph tags" + } + } + } + }, "mentionees": { "type": "array", "description": "The object of the mentions type and user who get a notification from the post.", @@ -131194,6 +131290,54 @@ "anything": "you want" } }, + "links": { + "type": "array", + "maxItems": 100, + "description": "Array of URL links extracted from content with metadata for link preview rendering", + "items": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "index": { + "type": "number", + "minimum": 0, + "description": "Starting position of the URL in the original text content" + }, + "length": { + "type": "number", + "minimum": 1, + "description": "Length of the URL string in the original text content" + }, + "url": { + "type": "string", + "maximum": 2000, + "description": "The complete URL found in the content" + }, + "renderPreview": { + "type": "boolean", + "default": false, + "description": "Flag indicating whether to render a rich preview for this link" + }, + "domain": { + "type": "string", + "maximum": 2000, + "description": "Domain name extracted from the URL (e.g., 'example.com')" + }, + "title": { + "type": "string", + "maximum": 2000, + "description": "Title of the linked page, typically extracted from Open Graph or meta tags" + }, + "imageUrl": { + "type": "string", + "maximum": 2000, + "description": "URL of the preview image for the link, typically extracted from Open Graph tags" + } + } + } + }, "postId": { "type": "string", "maxLength": 900, @@ -132779,6 +132923,54 @@ "anything": "you want" } }, + "links": { + "type": "array", + "maxItems": 100, + "description": "Array of URL links extracted from content with metadata for link preview rendering", + "items": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "index": { + "type": "number", + "minimum": 0, + "description": "Starting position of the URL in the original text content" + }, + "length": { + "type": "number", + "minimum": 1, + "description": "Length of the URL string in the original text content" + }, + "url": { + "type": "string", + "maximum": 2000, + "description": "The complete URL found in the content" + }, + "renderPreview": { + "type": "boolean", + "default": false, + "description": "Flag indicating whether to render a rich preview for this link" + }, + "domain": { + "type": "string", + "maximum": 2000, + "description": "Domain name extracted from the URL (e.g., 'example.com')" + }, + "title": { + "type": "string", + "maximum": 2000, + "description": "Title of the linked page, typically extracted from Open Graph or meta tags" + }, + "imageUrl": { + "type": "string", + "maximum": 2000, + "description": "URL of the preview image for the link, typically extracted from Open Graph tags" + } + } + } + }, "postId": { "type": "string", "maxLength": 900, @@ -168623,6 +168815,54 @@ "anything": "you want" } }, + "links": { + "type": "array", + "maxItems": 100, + "description": "Array of URL links extracted from content with metadata for link preview rendering", + "items": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "index": { + "type": "number", + "minimum": 0, + "description": "Starting position of the URL in the original text content" + }, + "length": { + "type": "number", + "minimum": 1, + "description": "Length of the URL string in the original text content" + }, + "url": { + "type": "string", + "maximum": 2000, + "description": "The complete URL found in the content" + }, + "renderPreview": { + "type": "boolean", + "default": false, + "description": "Flag indicating whether to render a rich preview for this link" + }, + "domain": { + "type": "string", + "maximum": 2000, + "description": "Domain name extracted from the URL (e.g., 'example.com')" + }, + "title": { + "type": "string", + "maximum": 2000, + "description": "Title of the linked page, typically extracted from Open Graph or meta tags" + }, + "imageUrl": { + "type": "string", + "maximum": 2000, + "description": "URL of the preview image for the link, typically extracted from Open Graph tags" + } + } + } + }, "postId": { "type": "string", "maxLength": 900, @@ -171616,6 +171856,54 @@ "metadata": { "type": "object" }, + "links": { + "type": "array", + "maxItems": 100, + "description": "Array of URL links extracted from content with metadata for link preview rendering", + "items": { + "type": "object", + "required": [ + "url" + ], + "properties": { + "index": { + "type": "number", + "minimum": 0, + "description": "Starting position of the URL in the original text content" + }, + "length": { + "type": "number", + "minimum": 1, + "description": "Length of the URL string in the original text content" + }, + "url": { + "type": "string", + "maximum": 2000, + "description": "The complete URL found in the content" + }, + "renderPreview": { + "type": "boolean", + "default": false, + "description": "Flag indicating whether to render a rich preview for this link" + }, + "domain": { + "type": "string", + "maximum": 2000, + "description": "Domain name extracted from the URL (e.g., 'example.com')" + }, + "title": { + "type": "string", + "maximum": 2000, + "description": "Title of the linked page, typically extracted from Open Graph or meta tags" + }, + "imageUrl": { + "type": "string", + "maximum": 2000, + "description": "URL of the preview image for the link, typically extracted from Open Graph tags" + } + } + } + }, "tags": { "type": "array", "minItems": 0, diff --git a/schema/post.yaml b/schema/post.yaml index 8999ddfc..e4ac27f3 100644 --- a/schema/post.yaml +++ b/schema/post.yaml @@ -1019,6 +1019,8 @@ CreatePost: description: "Additional properties to support custom fields." example: anything: "you want" + links: + $ref: './shared.yaml#/links' postId: type: "string" maxLength: 900 diff --git a/schema/shared.yaml b/schema/shared.yaml new file mode 100644 index 00000000..5c6e8eb1 --- /dev/null +++ b/schema/shared.yaml @@ -0,0 +1,37 @@ +links: + type: "array" + maxItems: 100 + description: "Array of URL links extracted from content with metadata for link preview rendering" + items: + type: "object" + required: + - url + properties: + index: + type: 'number' + minimum: 0 + description: "Starting position of the URL in the original text content" + length: + type: 'number' + minimum: 1 + description: "Length of the URL string in the original text content" + url: + type: 'string' + maximum: 2000 + description: "The complete URL found in the content" + renderPreview: + type: 'boolean' + default: false + description: "Flag indicating whether to render a rich preview for this link" + domain: + type: 'string' + maximum: 2000 + description: "Domain name extracted from the URL (e.g., 'example.com')" + title: + type: 'string' + maximum: 2000 + description: "Title of the linked page, typically extracted from Open Graph or meta tags" + imageUrl: + type: 'string' + maximum: 2000 + description: "URL of the preview image for the link, typically extracted from Open Graph tags" diff --git a/v3/comment/api.yaml b/v3/comment/api.yaml deleted file mode 100644 index 9af3af09..00000000 --- a/v3/comment/api.yaml +++ /dev/null @@ -1,500 +0,0 @@ -query: - summary: query comments. - tags: - - Comment - securityDefinition: - ApiKeyAuth: - type: apiKey - in: header - name: Authorization - description: > - query comments. - parameters: - - name: Authorization - in: header - value: Bearer {{accessToken}} - required: true - schema: - type: string - - name: Content-Type - in: header - value: application/x-www-form-urlencoded - required: true - schema: - type: string - - name: referenceId - required: true - in: query - schema: - type: string - maxLength: 900 - - name: referenceType - in: query - schema: - type: string - enum: - - post - - content - - name: filterByParentId - in: query - schema: - type: boolean - default: true - - name: parentId - in: query - schema: - type: string - maxLength: 900 - - name: hasFlag - in: query - schema: - type: boolean - default: false - - name: isDeleted - in: query - schema: - type: boolean - default: null - - name: sortBy - in: query - schema: - type: string - enum: - - firstCreated - - lastCreated - - lastUpdated - - firstUpdated - default: lastCreated - description: > - type: - * `scrollable(default)` - sort by segment number only. - * `pagination` - can sort by 'lastCreated(default)', 'firstCreated', 'lastUpdated', 'firstUpdated'. - - name: options - in: query - style: deepObject - description: > - type: - * `scrollable(default)` - 'after', 'first', 'before' and 'last' will be set for page size with direction. - * `pagination` - 'skip' and 'limit' will be the number of records to skip and max records size. - - limit/skip: - * support pagination type only - - before/after/first/last: - * support scrollable type only - schema: - type: object - properties: - type: - type: string - enum: - - scrollable - - pagination - default: scrollable - limit: - type: integer - minimum: 1 - maximum: 100 - skip: - type: integer - minimum: 0 - maximum: 100 - after: - type: integer - minimum: 1 - first: - type: integer - minimum: 1 - maximum: 100 - before: - type: integer - minimum: 1 - last: - type: integer - minimum: 1 - maximum: 100 - token: - type: string - maxLength: 1000 - - name: dataTypes - in: query - style: deepObject - description: > - Option to set how the returned comments dataTypes will be contained: - * `values`: the dataTypes values want to be contained in the comment (available values: `text`, `image`) - * `matchType`: how the dataTypes must be contained in the comment - * `any`: the dataTypes could match only partial of the provided field - * `exact`: the dataTypes must contain exactly the same as provided in values - - Example query params: `GET /api/v3/comments?dataTypes[values][]=text&dataTypes[values][]=image&dataTypes[matchType]=any` - schema: - type: object - properties: - values: - type: array - items: - type: string - matchType: - type: string - enum: - - any - - exact - - consumes: - - application/x-www-form-urlencoded - responses: - "200000": - $ref: "./response.yaml#/CommentPaginationApiResponse" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400311": - $ref: "../../global/error.yaml#/RateLimitError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" - -create: - summary: create a comment. - tags: - - Comment - security: - - BearerAuth: [] - consumes: - - application/json - requestBody: - description: > - information of a comment to be created. - required: true - content: - application/json: - schema: - type: object - properties: - referenceId: - type: string - maxLength: 900 - referenceType: - type: string - enum: - - post - - content - default: post - data: - type: object - properties: - text: - type: string - maxLength: 50000 - metadata: - type: object - commentId: - type: string - maxLength: 900 - parentId: - type: string - maxLength: 900 - mentionees: - type: array - description: The object of the mentions type and user who get a notification from the post. - items: - type: object - properties: - type: - type: string - example: user - description: > - type: - * `user` - need to specific userIds and notification mentions individual user - enum: - - user - userIds: - type: array - example: ["userId1", "userId2"] - description: Array of UserId. if the mention type is a channel, doesn't send userIds - items: - type: string - createdAt: - type: string - description: The date/time when a comment is created. - format: date-time - example: "2022-07-07T04:24:20.444Z" - attachments: - type: array - description: The attachments/medias to be included in the comment - items: - $ref: "../../schema/comment.yaml#/CommentAttachment" - - required: - - referenceId - responses: - "200000": - $ref: "./response.yaml#/CommentApiResponse" - "400000": - $ref: "../../global/error.yaml#/BadRequestError" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400311": - $ref: "../../global/error.yaml#/RateLimitError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" -update: - summary: update a comment. - tags: - - Comment - security: - - BearerAuth: [] - parameters: - - name: commentId - in: path - required: true - schema: - type: string - consumes: - - application/json - requestBody: - description: > - comment information. - required: true - content: - application/json: - schema: - type: object - properties: - data: - type: object - properties: - text: - type: string - maxLength: 50000 - metadata: - type: object - mentionees: - type: array - description: The object of the mentions type and user who get a notification from the post. - items: - type: object - properties: - type: - type: string - example: user - description: > - type: - * `user` - need to specific userIds and notification mentions individual user - enum: - - user - userIds: - type: array - example: ["userId1", "userId2"] - description: Array of UserId. if the mention type is a channel, doesn't send userIds - items: - type: string - attachments: - type: array - description: The attachments/medias to be included in the comment - items: - $ref: "../../schema/comment.yaml#/CommentAttachment" - responses: - "200000": - $ref: "./response.yaml#/CommentApiResponse" - "400000": - $ref: "../../global/error.yaml#/BadRequestError" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400311": - $ref: "../../global/error.yaml#/RateLimitError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" -delete: - summary: delete a comment. - tags: - - Comment - security: - - BearerAuth: [] - parameters: - - name: commentId - in: path - required: true - schema: - type: string - consumes: - - application/json - responses: - "200000": - description: comment information - content: - application/json: - schema: - type: object - properties: - status: - type: string - data: - type: object - properties: - success: - type: boolean - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400311": - $ref: "../../global/error.yaml#/RateLimitError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" -flag: - summary: flag a comment. - tags: - - Comment - security: - - BearerAuth: [] - parameters: - - name: commentId - in: path - required: true - schema: - type: string - consumes: - - application/json - requestBody: - description: > - information of a comment to be flagged. - required: true - content: - application/json: - schema: - type: object - properties: - commentId: - type: string - maxLength: 900 - required: - - commentId - responses: - "200000": - $ref: "./response.yaml#/CommentApiResponse" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400300": - $ref: "../../global/error.yaml#/NumberOfFlagExceedError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" -isflagbyme: - summary: Check whether user flag a given comment. - tags: - - Comment - security: - - BearerAuth: [] - parameters: - - name: commentId - in: path - required: true - description: > - commentId to be flagged - schema: - type: string - description: > - Check whether user flag a given comment. - responses: - "200000": - $ref: "../../global/response.yaml#/IsSocialFlagByMeResponse" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" -unflag: - summary: unflag a comment. - tags: - - Comment - security: - - BearerAuth: [] - parameters: - - name: commentId - in: path - required: true - schema: - type: string - consumes: - - application/json - responses: - "200000": - $ref: "./response.yaml#/CommentApiResponse" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" -getList: - summary: get comments by IDs. - tags: - - Comment - security: - - BearerAuth: [] - description: > - get comments by IDs. - parameters: - - name: commentIds - in: query - collectionFormat: multi - required: true - schema: - type: array - minItems: 1 - maxItems: 10 - items: - type: string - maxLength: 50 - consumes: - - application/json - responses: - "200000": - $ref: "./response.yaml#/CommentApiResponse" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400311": - $ref: "../../global/error.yaml#/RateLimitError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" -get: - summary: get a comment. - tags: - - Comment - security: - - BearerAuth: [] - description: > - get a comment. - parameters: - - name: commentId - in: path - required: true - description: > - Get comment by ID. - schema: - type: string - consumes: - - application/json - responses: - "200000": - $ref: "./response.yaml#/CommentApiResponse" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400311": - $ref: "../../global/error.yaml#/RateLimitError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" -clearflag: - summary: clear flags. - tags: - - Comment - security: - - BearerAuth: [] - parameters: - - name: commentId - in: path - required: true - schema: - type: string - consumes: - - application/json - responses: - "200000": - $ref: "./response.yaml#/CommentApiResponse" - "400301": - $ref: "../../global/error.yaml#/PermissionDenidedError" - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" diff --git a/v3/comment/request.yaml b/v3/comment/request.yaml index 3224fdbd..2da55497 100644 --- a/v3/comment/request.yaml +++ b/v3/comment/request.yaml @@ -24,6 +24,8 @@ root-post-request-payload: maxLength: 50000 metadata: type: "object" + links: + $ref: '../../schema/shared.yaml#/links' commentId: type: "string" maxLength: 900 @@ -79,6 +81,8 @@ _commentId-put-request-payload: maxLength: 50000 metadata: type: "object" + links: + $ref: '../../schema/shared.yaml#/links' mentionees: type: "array" description: "The object of the mentions type and user who get a notification from the post." diff --git a/v4/comment/api.yaml b/v4/comment/api.yaml deleted file mode 100644 index dc192085..00000000 --- a/v4/comment/api.yaml +++ /dev/null @@ -1,41 +0,0 @@ -delete: - summary: delete a comment. - tags: - - Comment v4 - security: - - BearerAuth: [] - parameters: - - name: commentId - in: path - required: true - schema: - type: string - - name: permanent - in: query - value: application/json - schema: - type: boolean - description: If permanent data will be hard deleted - consumes: - - application/json - responses: - "200000": - description: comment information - content: - application/json: - schema: - type: object - properties: - status: - type: string - data: - type: object - properties: - success: - type: boolean - "400400": - $ref: "../../global/error.yaml#/NotFoundError" - "400311": - $ref: "../../global/error.yaml#/RateLimitError" - "500000": - $ref: "../../global/error.yaml#/UnexpectedError" diff --git a/v4/post/request.yaml b/v4/post/request.yaml index 6596dd33..b9e23c56 100644 --- a/v4/post/request.yaml +++ b/v4/post/request.yaml @@ -39,6 +39,8 @@ _postId-put-request-payload: description: "Put image file id to update video file thumbnail in video post" metadata: type: "object" + links: + $ref: '../../schema/shared.yaml#/links' tags: type: "array" minItems: 0