* removed server side

* Updated store layer

* unused import

* Updated autogenerated code template

* Updated tests

* lint fix

* unused translations

* webapp side

* Updated i18n

* lint fix:

* type fix

* Updated snapshots

* Removed insights from API specs

* updated e2e

* Updated e2e tests

* Updated e2e tests

* Removed insights tests

* Removed Insights as possible channel to load in sidebar from test

* Removed more insights tests

* More e2e fixed

* More cleanup

* Lint

* More cleanup in client4 and boards api

* More cleanup

* Fixes

* lint fix

---------

Co-authored-by: maria.nunez <maria.nunez@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Harshil Sharma
2023-07-25 12:34:38 +05:30
коммит произвёл GitHub
родитель e37459cd00
Коммит 26617fcbdc
192 изменённых файлов: 47 добавлений и 19885 удалений

Просмотреть файл

@@ -11,7 +11,6 @@ build-v4: node_modules playbooks
@echo Building mattermost openapi yaml for v4
@if [ -r $(PLAYBOOKS_SRC)/merged-tags.yaml ]; then cat $(PLAYBOOKS_SRC)/merged-tags.yaml > $(V4_YAML); else cat $(V4_SRC)/introduction.yaml > $(V4_YAML); fi
@cat $(V4_SRC)/insights.yaml >> $(V4_YAML)
@cat $(V4_SRC)/users.yaml >> $(V4_YAML)
@cat $(V4_SRC)/status.yaml >> $(V4_YAML)
@cat $(V4_SRC)/teams.yaml >> $(V4_YAML)

Просмотреть файл

@@ -797,16 +797,6 @@ components:
description: The time in milliseconds this reaction was made
type: integer
format: int64
TopReaction:
type: object
properties:
emoji_name:
description: The name of the emoji used for this reaction.
type: string
count:
description: The number of the times this emoji has been used.
type: integer
format: int64
NewTeamMember:
type: object
properties:
@@ -827,17 +817,6 @@ components:
create_at:
description: The creation timestamp of the team member record.
type: integer
TopReactionList:
type: object
properties:
has_next:
description: Indicates if there is another page of reactions that can be fetched.
type: boolean
items:
description: List of reactions.
type: array
items:
$ref: "#/components/schemas/TopReaction"
NewTeamMembersList:
type: object
properties:
@@ -852,109 +831,6 @@ components:
total_count:
description: The total count of new team members for the given time range.
type: integer
TopChannel:
type: object
properties:
id:
type: string
type:
type: string
display_name:
type: string
name:
type: string
team_id:
type: string
message_count:
description: The number of messages posted in the channel by users over the given time period (not including messages posted by bots).
type: string
TopChannelList:
type: object
properties:
has_next:
description: Indicates if there is another page of channels that can be fetched.
type: boolean
items:
description: List of channels.
type: array
items:
$ref: "#/components/schemas/TopChannel"
InsightUserInformation:
type: object
properties:
id:
type: string
first_name:
type: string
last_name:
type: string
nickname:
type: string
username:
type: string
last_picture_update:
type: string
create_at:
type: integer
format: int64
TopThread:
type: object
properties:
post:
$ref: "#/components/schemas/Post"
channel_id:
type: string
channel_display_name:
type: string
channel_name:
type: string
Participants:
type: array
items:
type: string
user_information:
description: User who created the post
$ref: "#/components/schemas/InsightUserInformation"
TopThreadList:
type: object
properties:
has_next:
description: Indicates if there is another page of top threads that can be fetched.
type: boolean
items:
description: List of top threads.
type: array
items:
$ref: "#/components/schemas/TopThread"
TopDMInsightUserInformation:
allOf:
- $ref: "#/components/schemas/InsightUserInformation"
- type: object
properties:
position:
type: string
TopDM:
type: object
properties:
post_count:
type: integer
format: int64
outgoing_message_count:
type: integer
format: int64
second_participant:
$ref: "#/components/schemas/TopDMInsightUserInformation"
TopDMList:
type: object
properties:
has_next:
description: Indicates if there is another page of top DMs that can be fetched.
type: boolean
items:
description: List of top DMs.
type: array
items:
$ref: "#/components/schemas/TopDM"
Emoji:
type: object
properties:

Просмотреть файл

@@ -1,439 +0,0 @@
/api/v4/teams/{team_id}/top/reactions:
get:
tags:
- insights
summary: Get a list of the top reactions for a team.
description: |
Get a list of the top reactions across all public and private channels (the user is a member of) for a given team.
##### Permissions
Must have `view_team` permission for the team.
operationId: GetTopReactionsForTeam
parameters:
- name: team_id
in: path
description: Team GUID
required: true
schema:
type: string
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: reactions posted on the current day.
- `7_day`: reactions posted in the last 7 days.
- `28_day`: reactions posted in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page, up to a maximum of 200.
schema:
type: integer
default: 60
responses:
"200":
description: Top reactions retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/TopReactionList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v4/users/me/top/reactions:
get:
tags:
- insights
summary: Get a list of the top reactions for a user.
description: |
Get a list of the top reactions across all public and private channels (the user is a member of) for a given user.
If no `team_id` is provided, this will also include reactions posted by the given user in direct and group messages.
##### Permissions
Must be logged in as the user.
operationId: GetTopReactionsForUser
parameters:
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: reactions posted on the current day.
- `7_day`: reactions posted in the last 7 days.
- `28_day`: reactions posted in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page, up to a maximum of 200.
schema:
type: integer
default: 60
- name: team_id
in: query
description: >
Team ID will scope the response to a given team and exclude direct and group messages.
##### Permissions
Must have `view_team` permission for the team.
schema:
type: string
responses:
"200":
description: Top reactions retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/TopReactionList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v4/teams/{team_id}/top/channels:
get:
tags:
- insights
summary: Get a list of the top channels for a team.
description: |
Get a list of the top public and private channels (the user is a member of) for a given team.
##### Permissions
Must have `view_team` permission for the team.
operationId: GetTopChannelsForTeam
parameters:
- name: team_id
in: path
description: Team GUID
required: true
schema:
type: string
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: channels with posts on the current day.
- `7_day`: channels with posts in the last 7 days.
- `28_day`: channels with posts in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page, up to a maximum of 200.
schema:
type: integer
default: 60
responses:
"200":
description: Top channels retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/TopChannelList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v4/users/me/top/channels:
get:
tags:
- insights
summary: Get a list of the top channels for a user.
description: |
Get a list of the top public and private channels (the user is a member of) for a given user.
##### Permissions
Must be logged in as the user.
operationId: GetTopChannelsForUser
parameters:
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: channels with posts on the current day.
- `7_day`: channels with posts in the last 7 days.
- `28_day`: channels with posts in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page, up to a maximum of 200.
schema:
type: integer
default: 60
- name: team_id
in: query
description: >
Team ID will scope the response to a given team.
##### Permissions
Must have `view_team` permission for the team.
schema:
type: string
responses:
"200":
description: Top channels retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/TopChannelList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v4/teams/{team_id}/top/team_members:
get:
tags:
- insights
summary: Get a list of new team members.
description: |
Get a list of all of the new team members that have joined the given team during the given time period.
##### Permissions
Must have `view_team` permission for the team.
operationId: GetNewTeamMembers
parameters:
- name: team_id
in: path
description: Team GUID
required: true
schema:
type: string
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: team members who joined during the current day.
- `7_day`: team members who joined in the last 7 days.
- `28_day`: team members who joined in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page.
schema:
type: integer
default: 60
responses:
"200":
description: New team members retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/NewTeamMembersList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v4/teams/{team_id}/top/threads:
get:
tags:
- insights
summary: Get a list of the top threads for a team.
description: |
Get a list of the top threads from public and private channels (the user is a member of) for a given team.
##### Permissions
Must have `view_team` permission for the team.
operationId: GetTopThreadsForTeam
parameters:
- name: team_id
in: path
description: Team GUID
required: true
schema:
type: string
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: threads with activity on the current day.
- `7_day`: threads with activity in the last 7 days.
- `28_day`: threads with activity in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page, up to a maximum of 200.
schema:
type: integer
default: 60
responses:
"200":
description: Top threads retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/TopThreadList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v4/users/me/top/threads:
get:
tags:
- insights
summary: Get a list of the top threads for a user.
description: |
Get a list of the top threads from public and private channels (the user is a member of and participating in the thread) for a given user.
##### Permissions
Must be logged in as the user.
operationId: GetTopThreadsForUser
parameters:
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: threads with activity on the current day.
- `7_day`: threads with activity in the last 7 days.
- `28_day`: threads with activity in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page, up to a maximum of 200.
schema:
type: integer
default: 60
- name: team_id
in: query
description: >
Team ID will scope the response to a given team.
##### Permissions
Must have `view_team` permission for the team.
schema:
type: string
responses:
"200":
description: Top threads retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/TopThreadList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"
/api/v4/users/me/top/dms:
get:
tags:
- insights
summary: Get a list of the top dms for a user.
description: |
Get a list of the top dms for a given user.
##### Permissions
Must be logged in as the user.
operationId: GetTopDMsForUser
parameters:
- name: time_range
in: query
description: >
Time range can be "today", "7_day", or "28_day".
- `today`: threads with activity on the current day.
- `7_day`: threads with activity in the last 7 days.
- `28_day`: threads with activity in the last 28 days.
required: true
schema:
type: string
- name: page
in: query
description: The page to select.
schema:
type: integer
default: 0
- name: per_page
in: query
description: The number of items per page, up to a maximum of 200.
schema:
type: integer
default: 60
responses:
"200":
description: Top dms retrieved successfully.
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/TopDMList"
"400":
$ref: "#/components/responses/BadRequest"
"403":
$ref: "#/components/responses/Forbidden"

Просмотреть файл

@@ -579,8 +579,6 @@ tags:
description: Endpoints for interactive actions for use by integrations.
- name: shared channels
description: Endpoints for getting information about shared channels.
- name: insights
description: Endpoints for getting insights into teams and users.
- name: terms of service
description: Endpoints for getting and updating custom terms of service.
- name: imports
@@ -635,7 +633,6 @@ x-tagGroups:
- schemes
- integration_actions
- shared channels
- insights
- terms of service
- imports
- permissions