Skip to content

Commit 0ed1eb4

Browse files
matt-bernsteinrobot-ci-heartex
authored andcommitted
chore: FIT-2050: OpenAPI schema: type SerializerMethodField outputs
GitOrigin-RevId: f4a1d04d91285fb99bdac8a041d5fee82a75d91a
1 parent 6787bee commit 0ed1eb4

33 files changed

Lines changed: 181 additions & 68 deletions

src/label_studio_sdk/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
AgreementSelectionRequest,
1616
AgreementV2BackfillCancelResponse,
1717
AgreementV2BackfillJob,
18+
AgreementV2BackfillJobTriggeredByValue,
1819
AgreementV2BackfillTriggerRequestRequest,
1920
AgreementV2BackfillTriggerResponse,
2021
AllRolesProjectList,
@@ -253,6 +254,7 @@
253254
UserSimpleRequest,
254255
ValidateSamlMetadataUrlResponse,
255256
ValueCountsBackfillJob,
257+
ValueCountsBackfillJobTriggeredByValue,
256258
VersionResponse,
257259
View,
258260
Webhook,
@@ -380,6 +382,7 @@
380382
"AgreementSelectionRequest": ".types",
381383
"AgreementV2BackfillCancelResponse": ".types",
382384
"AgreementV2BackfillJob": ".types",
385+
"AgreementV2BackfillJobTriggeredByValue": ".types",
383386
"AgreementV2BackfillTriggerRequestRequest": ".types",
384387
"AgreementV2BackfillTriggerResponse": ".types",
385388
"AllRolesProjectList": ".types",
@@ -694,6 +697,7 @@
694697
"UserSimpleRequest": ".types",
695698
"ValidateSamlMetadataUrlResponse": ".types",
696699
"ValueCountsBackfillJob": ".types",
700+
"ValueCountsBackfillJobTriggeredByValue": ".types",
697701
"VersionResponse": ".types",
698702
"View": ".types",
699703
"Webhook": ".types",
@@ -767,6 +771,7 @@ def __dir__():
767771
"AgreementSelectionRequest",
768772
"AgreementV2BackfillCancelResponse",
769773
"AgreementV2BackfillJob",
774+
"AgreementV2BackfillJobTriggeredByValue",
770775
"AgreementV2BackfillTriggerRequestRequest",
771776
"AgreementV2BackfillTriggerResponse",
772777
"AllRolesProjectList",
@@ -1081,6 +1086,7 @@ def __dir__():
10811086
"UserSimpleRequest",
10821087
"ValidateSamlMetadataUrlResponse",
10831088
"ValueCountsBackfillJob",
1089+
"ValueCountsBackfillJobTriggeredByValue",
10841090
"VersionResponse",
10851091
"View",
10861092
"Webhook",

src/label_studio_sdk/types/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from .agreement_selection_request import AgreementSelectionRequest
1515
from .agreement_v2backfill_cancel_response import AgreementV2BackfillCancelResponse
1616
from .agreement_v2backfill_job import AgreementV2BackfillJob
17+
from .agreement_v2backfill_job_triggered_by_value import AgreementV2BackfillJobTriggeredByValue
1718
from .agreement_v2backfill_trigger_request_request import AgreementV2BackfillTriggerRequestRequest
1819
from .agreement_v2backfill_trigger_response import AgreementV2BackfillTriggerResponse
1920
from .all_roles_project_list import AllRolesProjectList
@@ -258,6 +259,7 @@
258259
from .user_simple_request import UserSimpleRequest
259260
from .validate_saml_metadata_url_response import ValidateSamlMetadataUrlResponse
260261
from .value_counts_backfill_job import ValueCountsBackfillJob
262+
from .value_counts_backfill_job_triggered_by_value import ValueCountsBackfillJobTriggeredByValue
261263
from .version_response import VersionResponse
262264
from .view import View
263265
from .webhook import Webhook
@@ -276,6 +278,7 @@
276278
"AgreementSelectionRequest": ".agreement_selection_request",
277279
"AgreementV2BackfillCancelResponse": ".agreement_v2backfill_cancel_response",
278280
"AgreementV2BackfillJob": ".agreement_v2backfill_job",
281+
"AgreementV2BackfillJobTriggeredByValue": ".agreement_v2backfill_job_triggered_by_value",
279282
"AgreementV2BackfillTriggerRequestRequest": ".agreement_v2backfill_trigger_request_request",
280283
"AgreementV2BackfillTriggerResponse": ".agreement_v2backfill_trigger_response",
281284
"AllRolesProjectList": ".all_roles_project_list",
@@ -514,6 +517,7 @@
514517
"UserSimpleRequest": ".user_simple_request",
515518
"ValidateSamlMetadataUrlResponse": ".validate_saml_metadata_url_response",
516519
"ValueCountsBackfillJob": ".value_counts_backfill_job",
520+
"ValueCountsBackfillJobTriggeredByValue": ".value_counts_backfill_job_triggered_by_value",
517521
"VersionResponse": ".version_response",
518522
"View": ".view",
519523
"Webhook": ".webhook",
@@ -556,6 +560,7 @@ def __dir__():
556560
"AgreementSelectionRequest",
557561
"AgreementV2BackfillCancelResponse",
558562
"AgreementV2BackfillJob",
563+
"AgreementV2BackfillJobTriggeredByValue",
559564
"AgreementV2BackfillTriggerRequestRequest",
560565
"AgreementV2BackfillTriggerResponse",
561566
"AllRolesProjectList",
@@ -794,6 +799,7 @@ def __dir__():
794799
"UserSimpleRequest",
795800
"ValidateSamlMetadataUrlResponse",
796801
"ValueCountsBackfillJob",
802+
"ValueCountsBackfillJobTriggeredByValue",
797803
"VersionResponse",
798804
"View",
799805
"Webhook",

src/label_studio_sdk/types/agreement_v2backfill_job.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import pydantic
77
from ..core.pydantic_utilities import IS_PYDANTIC_V2
88
from ..core.unchecked_base_model import UncheckedBaseModel
9+
from .agreement_v2backfill_job_triggered_by_value import AgreementV2BackfillJobTriggeredByValue
910
from .fsm_backfill_job_status_enum import FsmBackfillJobStatusEnum
1011

1112

@@ -54,7 +55,9 @@ class AgreementV2BackfillJob(UncheckedBaseModel):
5455
* `FAILED` - Failed
5556
"""
5657

57-
triggered_by: typing.Optional[str] = pydantic.Field(default=None)
58+
triggered_by: typing.Optional[typing.Dict[str, typing.Optional[AgreementV2BackfillJobTriggeredByValue]]] = (
59+
pydantic.Field(default=None)
60+
)
5861
"""
5962
User who triggered the backfill
6063
"""
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
AgreementV2BackfillJobTriggeredByValue = typing.Union[int, str]

src/label_studio_sdk/types/all_roles_project_list.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class AllRolesProjectList(UncheckedBaseModel):
145145

146146
id: typing.Optional[int] = None
147147
input_schema: typing.Optional[typing.Any] = None
148-
is_dimensions_enabled: typing.Optional[str] = None
148+
is_dimensions_enabled: typing.Optional[bool] = None
149149
is_draft: typing.Optional[bool] = pydantic.Field(default=None)
150150
"""
151151
Whether or not the project is in the middle of being created
@@ -171,7 +171,7 @@ class AllRolesProjectList(UncheckedBaseModel):
171171
Annotations per task
172172
"""
173173

174-
members: typing.Optional[str] = None
174+
members: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None
175175
members_count: typing.Optional[int] = None
176176
min_annotations_to_start_training: typing.Optional[int] = pydantic.Field(default=None)
177177
"""
@@ -206,10 +206,10 @@ class AllRolesProjectList(UncheckedBaseModel):
206206
Pinned date and time
207207
"""
208208

209-
prompts: typing.Optional[str] = None
209+
prompts: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None
210210
queue_done: typing.Optional[int] = None
211211
queue_left: typing.Optional[int] = None
212-
queue_total: typing.Optional[str] = None
212+
queue_total: typing.Optional[int] = None
213213
ready: typing.Optional[bool] = None
214214
rejected: typing.Optional[int] = None
215215
require_comment_on_skip: typing.Optional[bool] = pydantic.Field(default=None)
@@ -263,7 +263,7 @@ class AllRolesProjectList(UncheckedBaseModel):
263263
"""
264264

265265
skip_queue: typing.Optional[SkipQueueEnum] = None
266-
skipped_annotations_number: typing.Optional[str] = None
266+
skipped_annotations_number: typing.Optional[int] = None
267267
source_interface_id: typing.Optional[int] = None
268268
source_interface_version: typing.Optional[int] = pydantic.Field(default=None)
269269
"""
@@ -291,11 +291,11 @@ class AllRolesProjectList(UncheckedBaseModel):
291291
Project Name
292292
"""
293293

294-
total_annotations_number: typing.Optional[str] = None
294+
total_annotations_number: typing.Optional[int] = None
295295
total_predictions_number: typing.Optional[int] = None
296296
use_custom_interface: typing.Optional[bool] = None
297297
useful_annotation_number: typing.Optional[int] = None
298-
workspace: typing.Optional[str] = None
298+
workspace: typing.Optional[int] = None
299299
workspace_title: typing.Optional[str] = None
300300

301301
if IS_PYDANTIC_V2:

src/label_studio_sdk/types/blueprint_list.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ class BlueprintList(UncheckedBaseModel):
1616
"""
1717

1818
id: typing.Optional[int] = None
19-
share_id: typing.Optional[str] = None
19+
share_id: typing.Optional[str] = pydantic.Field(default=None)
20+
"""
21+
base64 encoded id
22+
"""
23+
2024
short_url: typing.Optional[str] = None
21-
task_count: typing.Optional[str] = None
25+
task_count: typing.Optional[int] = None
2226
title: typing.Optional[str] = pydantic.Field(default=None)
2327
"""
2428
Blueprint name. Must be between 3 and 50 characters long.

src/label_studio_sdk/types/dimension.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Dimension(UncheckedBaseModel):
1616
The project and created_by fields are set automatically from the request context.
1717
"""
1818

19-
allowed_metrics_with_params: typing.Optional[str] = pydantic.Field(default=None)
19+
allowed_metrics_with_params: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
2020
"""
2121
Dictionary mapping metric type names to their parameter schemas.
2222
"""

src/label_studio_sdk/types/dimension_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class DimensionList(UncheckedBaseModel):
1515
Excludes detailed parameters for performance in list views.
1616
"""
1717

18-
allowed_metrics_with_params: typing.Optional[str] = pydantic.Field(default=None)
18+
allowed_metrics_with_params: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
1919
"""
2020
Dictionary mapping metric type names to their parameter schemas.
2121
"""

src/label_studio_sdk/types/lse_fields.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,24 @@
1111

1212

1313
class LseFields(UncheckedBaseModel):
14-
email_notification_settings: typing.Optional[str] = None
14+
email_notification_settings: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
15+
"""
16+
Get email notification settings with organization-level filtering.
17+
18+
Use the model's getter method to ensure all notification types are included
19+
with proper defaults for any missing types. Transform the output to include
20+
both value and label for each notification type.
21+
22+
Filter notifications based on organization's allowed notifications if user
23+
belongs to exactly one organization.
24+
25+
Role-based filtering: not_activated_user_login is only available to users
26+
who are admins or owners in at least one organization.
27+
"""
28+
1529
invite_activated: typing.Optional[bool] = None
16-
invite_expired: typing.Optional[str] = None
17-
invite_expired_at: typing.Optional[str] = None
30+
invite_expired: typing.Optional[bool] = None
31+
invite_expired_at: typing.Optional[dt.datetime] = None
1832
invited_at: typing.Optional[dt.datetime] = None
1933
invited_by: typing.Optional[int] = None
2034
onboarding_state: typing.Optional[OnboardingStateEnum] = pydantic.Field(default=None)

src/label_studio_sdk/types/lse_interface_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class LseInterfaceList(UncheckedBaseModel):
3737
"""
3838

3939
updated_at: typing.Optional[dt.datetime] = None
40-
versions: typing.Optional[str] = None
40+
versions: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None
4141
workspace: typing.Optional[int] = None
4242

4343
if IS_PYDANTIC_V2:

0 commit comments

Comments
 (0)