Skip to content

Commit 7716876

Browse files
robot-ci-heartexfern-api[bot]mcanu
authored
feat: FIT-479: Paginated workspace endpoint (#558)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Marcel Canu <[email protected]>
1 parent 471544b commit 7716876

File tree

18 files changed

+1056
-165
lines changed

18 files changed

+1056
-165
lines changed

.mock/definition/projects.yml

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,78 +1015,6 @@ service:
10151015
examples:
10161016
- path-parameters:
10171017
id: 1
1018-
api_projects_members_paginated_list:
1019-
path: /api/projects/{id}/members/paginated/
1020-
method: GET
1021-
auth: true
1022-
docs: Retrieve the members for a specific project.
1023-
source:
1024-
openapi: openapi/openapi.yaml
1025-
path-parameters:
1026-
id: integer
1027-
display-name: Get project members paginated
1028-
request:
1029-
name: ApiProjectsMembersPaginatedListRequest
1030-
query-parameters:
1031-
ids:
1032-
type: optional<string>
1033-
docs: Comma-separated list of user IDs to filter by
1034-
implicit:
1035-
type: optional<boolean>
1036-
docs: >-
1037-
Include/Exclude implicit project members in the results. If not
1038-
provided, explicit + implicit members are returned.
1039-
no_annotators:
1040-
type: optional<boolean>
1041-
docs: Exclude annotators from the results
1042-
page:
1043-
type: optional<integer>
1044-
docs: A page number within the paginated result set.
1045-
page_size:
1046-
type: optional<integer>
1047-
docs: Number of results to return per page.
1048-
search:
1049-
type: optional<string>
1050-
docs: Search term for filtering members by name, email, or username
1051-
with_deleted:
1052-
type: optional<boolean>
1053-
docs: Include deleted members in the results
1054-
response:
1055-
docs: ''
1056-
type: root.PaginatedLseUserList
1057-
examples:
1058-
- path-parameters:
1059-
id: 1
1060-
response:
1061-
body:
1062-
count: 123
1063-
next: http://api.example.org/accounts/?page=4
1064-
previous: http://api.example.org/accounts/?page=2
1065-
results:
1066-
- active_organization: 1
1067-
active_organization_meta: active_organization_meta
1068-
allow_newsletters: true
1069-
avatar: avatar
1070-
custom_hotkeys:
1071-
key: value
1072-
date_joined: '2024-01-15T09:30:00Z'
1073-
email: email
1074-
first_name: first_name
1075-
id: 1
1076-
initials: initials
1077-
last_activity: '2024-01-15T09:30:00Z'
1078-
last_name: last_name
1079-
lse_fields:
1080-
email_notification_settings: email_notification_settings
1081-
invite_expired: invite_expired
1082-
invite_expired_at: invite_expired_at
1083-
org_membership:
1084-
- active: active
1085-
organization_id: 1
1086-
role: role
1087-
pause: pause
1088-
phone: phone
1089-
username: username
10901018
api_projects_project_extra_params_retrieve:
10911019
path: /api/projects/{id}/project-extra-params/
10921020
method: GET
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
imports:
2+
root: ../../__package__.yml
3+
service:
4+
auth: false
5+
base-path: ''
6+
endpoints:
7+
list:
8+
path: /api/projects/{id}/members/paginated/
9+
method: GET
10+
auth: true
11+
docs: Retrieve the members for a specific project.
12+
pagination:
13+
offset: $request.page
14+
results: $response.results
15+
source:
16+
openapi: openapi/openapi.yaml
17+
path-parameters:
18+
id: integer
19+
display-name: Get project members paginated
20+
request:
21+
name: PaginatedListRequest
22+
query-parameters:
23+
ids:
24+
type: optional<string>
25+
docs: Comma-separated list of user IDs to filter by
26+
implicit:
27+
type: optional<boolean>
28+
docs: >-
29+
Include/Exclude implicit project members in the results. If not
30+
provided, explicit + implicit members are returned.
31+
no_annotators:
32+
type: optional<boolean>
33+
docs: Exclude annotators from the results
34+
page:
35+
type: optional<integer>
36+
docs: A page number within the paginated result set.
37+
page_size:
38+
type: optional<integer>
39+
docs: Number of results to return per page.
40+
search:
41+
type: optional<string>
42+
docs: Search term for filtering members by name, email, or username
43+
with_deleted:
44+
type: optional<boolean>
45+
docs: Include deleted members in the results
46+
response:
47+
docs: ''
48+
type: root.PaginatedLseUserList
49+
examples:
50+
- path-parameters:
51+
id: 1
52+
response:
53+
body:
54+
count: 123
55+
next: http://api.example.org/accounts/?page=4
56+
previous: http://api.example.org/accounts/?page=2
57+
results:
58+
- active_organization: 1
59+
active_organization_meta: active_organization_meta
60+
allow_newsletters: true
61+
avatar: avatar
62+
custom_hotkeys:
63+
key: value
64+
date_joined: '2024-01-15T09:30:00Z'
65+
email: email
66+
first_name: first_name
67+
id: 1
68+
initials: initials
69+
last_activity: '2024-01-15T09:30:00Z'
70+
last_name: last_name
71+
lse_fields:
72+
email_notification_settings: email_notification_settings
73+
invite_expired: invite_expired
74+
invite_expired_at: invite_expired_at
75+
org_membership:
76+
- active: active
77+
organization_id: 1
78+
role: role
79+
pause: pause
80+
phone: phone
81+
username: username
82+
audiences:
83+
- public
84+
source:
85+
openapi: openapi/openapi.yaml
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
imports:
2+
root: ../../__package__.yml
3+
service:
4+
auth: false
5+
base-path: ''
6+
endpoints:
7+
list:
8+
path: /api/workspaces/{id}/memberships/paginated/
9+
method: GET
10+
auth: true
11+
docs: Retrieve the members for a specific workspace.
12+
pagination:
13+
offset: $request.page
14+
results: $response.results
15+
source:
16+
openapi: openapi/openapi.yaml
17+
path-parameters:
18+
id: integer
19+
display-name: Get workspace members paginated
20+
request:
21+
name: PaginatedListRequest
22+
query-parameters:
23+
ids:
24+
type: optional<string>
25+
docs: Comma-separated list of user IDs to filter by
26+
page:
27+
type: optional<integer>
28+
docs: A page number within the paginated result set.
29+
page_size:
30+
type: optional<integer>
31+
docs: Number of results to return per page.
32+
search:
33+
type: optional<string>
34+
docs: A search term.
35+
response:
36+
docs: ''
37+
type: root.PaginatedLseUserList
38+
examples:
39+
- path-parameters:
40+
id: 1
41+
response:
42+
body:
43+
count: 123
44+
next: http://api.example.org/accounts/?page=4
45+
previous: http://api.example.org/accounts/?page=2
46+
results:
47+
- active_organization: 1
48+
active_organization_meta: active_organization_meta
49+
allow_newsletters: true
50+
avatar: avatar
51+
custom_hotkeys:
52+
key: value
53+
date_joined: '2024-01-15T09:30:00Z'
54+
email: email
55+
first_name: first_name
56+
id: 1
57+
initials: initials
58+
last_activity: '2024-01-15T09:30:00Z'
59+
last_name: last_name
60+
lse_fields:
61+
email_notification_settings: email_notification_settings
62+
invite_expired: invite_expired
63+
invite_expired_at: invite_expired_at
64+
org_membership:
65+
- active: active
66+
organization_id: 1
67+
role: role
68+
pause: pause
69+
phone: phone
70+
username: username
71+
audiences:
72+
- public
73+
source:
74+
openapi: openapi/openapi.yaml

.mock/openapi/openapi.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7430,6 +7430,16 @@ paths:
74307430
summary: Get project members paginated
74317431
tags:
74327432
- Projects
7433+
x-fern-audiences:
7434+
- public
7435+
x-fern-pagination:
7436+
offset: $request.page
7437+
results: $response.results
7438+
x-fern-sdk-group-name:
7439+
- projects
7440+
- members
7441+
- paginated
7442+
x-fern-sdk-method-name: list
74337443
/api/projects/{id}/metricparam/:
74347444
get:
74357445
description: Get the current metrics configuration for a project.
@@ -15782,6 +15792,61 @@ paths:
1578215792
- members
1578315793
- bulk
1578415794
x-fern-sdk-method-name: post
15795+
/api/workspaces/{id}/memberships/paginated/:
15796+
get:
15797+
description: Retrieve the members for a specific workspace.
15798+
operationId: api_workspaces_memberships_paginated_list
15799+
parameters:
15800+
- in: path
15801+
name: id
15802+
required: true
15803+
schema:
15804+
type: integer
15805+
- description: Comma-separated list of user IDs to filter by
15806+
in: query
15807+
name: ids
15808+
schema:
15809+
type: string
15810+
- description: A page number within the paginated result set.
15811+
in: query
15812+
name: page
15813+
required: false
15814+
schema:
15815+
type: integer
15816+
- description: Number of results to return per page.
15817+
in: query
15818+
name: page_size
15819+
required: false
15820+
schema:
15821+
type: integer
15822+
- description: A search term.
15823+
in: query
15824+
name: search
15825+
required: false
15826+
schema:
15827+
type: string
15828+
responses:
15829+
'200':
15830+
content:
15831+
application/json:
15832+
schema:
15833+
$ref: '#/components/schemas/PaginatedLseUserList'
15834+
description: ''
15835+
security:
15836+
- Token: []
15837+
summary: Get workspace members paginated
15838+
tags:
15839+
- Workspaces
15840+
x-fern-audiences:
15841+
- public
15842+
x-fern-pagination:
15843+
offset: $request.page
15844+
results: $response.results
15845+
x-fern-sdk-group-name:
15846+
- workspaces
15847+
- members
15848+
- paginated
15849+
x-fern-sdk-method-name: list
1578515850
/api/workspaces/{id}/projects/:
1578615851
delete:
1578715852
description: Delete projects from a specific workspace.

0 commit comments

Comments
 (0)