diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index b0742359d..564a546cb 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -5151,6 +5151,14 @@ types: type: list> source: openapi: openapi/openapi.yaml + LseUserActiveOrganizationMeta: + docs: Active organization metadata + properties: + email: string + title: string + source: + openapi: openapi/openapi.yaml + inline: true LseUser: docs: |- A ModelSerializer that takes additional arguments for @@ -5159,7 +5167,9 @@ types: values with complex, nested serializations properties: active_organization: optional - active_organization_meta: string + active_organization_meta: + type: LseUserActiveOrganizationMeta + docs: Active organization metadata allow_newsletters: type: optional docs: Allow sending newsletters to user @@ -5197,6 +5207,14 @@ types: maxLength: 256 source: openapi: openapi/openapi.yaml + LseUserApiActiveOrganizationMeta: + docs: Active organization metadata + properties: + email: string + title: string + source: + openapi: openapi/openapi.yaml + inline: true LseUserApi: docs: |- A ModelSerializer that takes additional arguments for @@ -5205,7 +5223,9 @@ types: values with complex, nested serializations properties: active_organization: optional - active_organization_meta: string + active_organization_meta: + type: LseUserApiActiveOrganizationMeta + docs: Active organization metadata allow_newsletters: type: optional docs: Allow sending newsletters to user @@ -5824,6 +5844,14 @@ types: results: list source: openapi: openapi/openapi.yaml + PaginatedProjectMemberActiveOrganizationMeta: + docs: Active organization metadata + properties: + email: string + title: string + source: + openapi: openapi/openapi.yaml + inline: true PaginatedProjectMember: docs: |- A ModelSerializer that takes additional arguments for @@ -5832,7 +5860,9 @@ types: values with complex, nested serializations properties: active_organization: optional - active_organization_meta: string + active_organization_meta: + type: PaginatedProjectMemberActiveOrganizationMeta + docs: Active organization metadata allow_newsletters: type: optional docs: Allow sending newsletters to user @@ -7890,6 +7920,14 @@ types: trial_role: optional source: openapi: openapi/openapi.yaml + WhoAmIUserActiveOrganizationMeta: + docs: Active organization metadata + properties: + email: string + title: string + source: + openapi: openapi/openapi.yaml + inline: true WhoAmIUser: docs: |- A ModelSerializer that takes additional arguments for @@ -7898,7 +7936,9 @@ types: values with complex, nested serializations properties: active_organization: optional - active_organization_meta: string + active_organization_meta: + type: WhoAmIUserActiveOrganizationMeta + docs: Active organization metadata allow_newsletters: type: optional docs: Allow sending newsletters to user diff --git a/.mock/definition/projects/members.yml b/.mock/definition/projects/members.yml index 18cf1eb9b..bfbcae79b 100644 --- a/.mock/definition/projects/members.yml +++ b/.mock/definition/projects/members.yml @@ -33,7 +33,9 @@ service: response: body: - active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: diff --git a/.mock/definition/projects/members/paginated.yml b/.mock/definition/projects/members/paginated.yml index 0e94dad81..24bcebe5f 100644 --- a/.mock/definition/projects/members/paginated.yml +++ b/.mock/definition/projects/members/paginated.yml @@ -56,7 +56,9 @@ service: previous: http://api.example.org/accounts/?page=2 results: - active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: diff --git a/.mock/definition/users.yml b/.mock/definition/users.yml index d73ae86d2..648bf983a 100644 --- a/.mock/definition/users.yml +++ b/.mock/definition/users.yml @@ -19,7 +19,9 @@ service: - response: body: active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: @@ -93,7 +95,9 @@ service: response: body: active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: @@ -194,10 +198,12 @@ service: path: /api/current-user/whoami method: GET auth: true - docs: Retrieve details of the account that you are using to access the API. + docs: >- + Make the whoami call on behalf of the user you are using to access the + API. source: openapi: openapi/openapi.yaml - display-name: Retrieve my user + display-name: Whoami for current user response: docs: '' type: root.WhoAmIUser @@ -205,7 +211,9 @@ service: - response: body: active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: @@ -262,7 +270,9 @@ service: - response: body: - active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: @@ -330,7 +340,9 @@ service: response: body: active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: @@ -386,7 +398,9 @@ service: response: body: active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: @@ -503,7 +517,9 @@ service: response: body: active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: diff --git a/.mock/definition/workspaces/members.yml b/.mock/definition/workspaces/members.yml index f48b32497..a79f3be63 100644 --- a/.mock/definition/workspaces/members.yml +++ b/.mock/definition/workspaces/members.yml @@ -24,7 +24,9 @@ service: body: - user: active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: diff --git a/.mock/definition/workspaces/members/paginated.yml b/.mock/definition/workspaces/members/paginated.yml index a1b4e8da2..6dec1e526 100644 --- a/.mock/definition/workspaces/members/paginated.yml +++ b/.mock/definition/workspaces/members/paginated.yml @@ -45,7 +45,9 @@ service: previous: http://api.example.org/accounts/?page=2 results: - active_organization: 1 - active_organization_meta: active_organization_meta + active_organization_meta: + email: email + title: title allow_newsletters: true avatar: avatar custom_hotkeys: diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index 497910b4c..b8e4f26f5 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -1343,7 +1343,7 @@ paths: x-fern-sdk-method-name: get_token /api/current-user/whoami: get: - description: Retrieve details of the account that you are using to access the API. + description: Make the whoami call on behalf of the user you are using to access the API. operationId: api_current_user_whoami_retrieve responses: '200': @@ -1354,7 +1354,7 @@ paths: description: '' security: - Token: [] - summary: Retrieve my user + summary: Whoami for current user tags: - Users x-fern-audiences: @@ -23795,8 +23795,17 @@ components: nullable: true type: integer active_organization_meta: + description: Active organization metadata + properties: + email: + type: string + title: + type: string readOnly: true - type: string + required: + - email + - title + type: object allow_newsletters: description: Allow sending newsletters to user nullable: true @@ -23872,8 +23881,17 @@ components: nullable: true type: integer active_organization_meta: + description: Active organization metadata + properties: + email: + type: string + title: + type: string readOnly: true - type: string + required: + - email + - title + type: object allow_newsletters: description: Allow sending newsletters to user nullable: true @@ -24907,8 +24925,17 @@ components: nullable: true type: integer active_organization_meta: + description: Active organization metadata + properties: + email: + type: string + title: + type: string readOnly: true - type: string + required: + - email + - title + type: object allow_newsletters: description: Allow sending newsletters to user nullable: true @@ -29738,8 +29765,17 @@ components: nullable: true type: integer active_organization_meta: + description: Active organization metadata + properties: + email: + type: string + title: + type: string readOnly: true - type: string + required: + - email + - title + type: object allow_newsletters: description: Allow sending newsletters to user nullable: true diff --git a/pyproject.toml b/pyproject.toml index 5ef7bf271..cac499fce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "label-studio-sdk" [tool.poetry] name = "label-studio-sdk" -version = "2.0.8.dev" +version = "2.0.8" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index b12d0fd82..94ab6b7d9 100644 --- a/reference.md +++ b/reference.md @@ -2841,7 +2841,7 @@ client.users.get_token()
-Retrieve details of the account that you are using to access the API. +Make the whoami call on behalf of the user you are using to access the API.
diff --git a/src/label_studio_sdk/__init__.py b/src/label_studio_sdk/__init__.py index d6ac4c687..670903509 100644 --- a/src/label_studio_sdk/__init__.py +++ b/src/label_studio_sdk/__init__.py @@ -113,7 +113,9 @@ LseTaskSerializerForReviewersDraftsItem, LseTaskSerializerForReviewersPredictionsItem, LseUser, + LseUserActiveOrganizationMeta, LseUserApi, + LseUserApiActiveOrganizationMeta, LseUserOrganizationMemberList, LseapiTokenCreate, LseapiTokenList, @@ -143,6 +145,7 @@ PaginatedLseUserList, PaginatedPaginatedProjectMemberList, PaginatedProjectMember, + PaginatedProjectMemberActiveOrganizationMeta, PaginatedRoleBasedTaskList, Pause, PauseRequest, @@ -216,6 +219,7 @@ WhoAmILseFieldsOnboardingState, WhoAmILseFieldsTrialRole, WhoAmIUser, + WhoAmIUserActiveOrganizationMeta, Workspace, WorkspaceMemberCreate, WorkspaceMemberList, @@ -475,7 +479,9 @@ "LseTaskSerializerForReviewersDraftsItem", "LseTaskSerializerForReviewersPredictionsItem", "LseUser", + "LseUserActiveOrganizationMeta", "LseUserApi", + "LseUserApiActiveOrganizationMeta", "LseUserOrganizationMemberList", "LseapiTokenCreate", "LseapiTokenList", @@ -511,6 +517,7 @@ "PaginatedLseUserList", "PaginatedPaginatedProjectMemberList", "PaginatedProjectMember", + "PaginatedProjectMemberActiveOrganizationMeta", "PaginatedRoleBasedTaskList", "PatchedDefaultRoleRequestCustomScriptsEditableBy", "PatchedLseProjectUpdateRequestSampling", @@ -627,6 +634,7 @@ "WhoAmILseFieldsOnboardingState", "WhoAmILseFieldsTrialRole", "WhoAmIUser", + "WhoAmIUserActiveOrganizationMeta", "Workspace", "WorkspaceMemberCreate", "WorkspaceMemberList", diff --git a/src/label_studio_sdk/types/__init__.py b/src/label_studio_sdk/types/__init__.py index e63feb006..81ca3720b 100644 --- a/src/label_studio_sdk/types/__init__.py +++ b/src/label_studio_sdk/types/__init__.py @@ -114,7 +114,9 @@ from .lse_task_serializer_for_reviewers_drafts_item import LseTaskSerializerForReviewersDraftsItem from .lse_task_serializer_for_reviewers_predictions_item import LseTaskSerializerForReviewersPredictionsItem from .lse_user import LseUser +from .lse_user_active_organization_meta import LseUserActiveOrganizationMeta from .lse_user_api import LseUserApi +from .lse_user_api_active_organization_meta import LseUserApiActiveOrganizationMeta from .lse_user_organization_member_list import LseUserOrganizationMemberList from .lseapi_token_create import LseapiTokenCreate from .lseapi_token_list import LseapiTokenList @@ -144,6 +146,7 @@ from .paginated_lse_user_list import PaginatedLseUserList from .paginated_paginated_project_member_list import PaginatedPaginatedProjectMemberList from .paginated_project_member import PaginatedProjectMember +from .paginated_project_member_active_organization_meta import PaginatedProjectMemberActiveOrganizationMeta from .paginated_role_based_task_list import PaginatedRoleBasedTaskList from .pause import Pause from .pause_request import PauseRequest @@ -217,6 +220,7 @@ from .who_am_i_lse_fields_onboarding_state import WhoAmILseFieldsOnboardingState from .who_am_i_lse_fields_trial_role import WhoAmILseFieldsTrialRole from .who_am_i_user import WhoAmIUser +from .who_am_i_user_active_organization_meta import WhoAmIUserActiveOrganizationMeta from .workspace import Workspace from .workspace_member_create import WorkspaceMemberCreate from .workspace_member_list import WorkspaceMemberList @@ -334,7 +338,9 @@ "LseTaskSerializerForReviewersDraftsItem", "LseTaskSerializerForReviewersPredictionsItem", "LseUser", + "LseUserActiveOrganizationMeta", "LseUserApi", + "LseUserApiActiveOrganizationMeta", "LseUserOrganizationMemberList", "LseapiTokenCreate", "LseapiTokenList", @@ -364,6 +370,7 @@ "PaginatedLseUserList", "PaginatedPaginatedProjectMemberList", "PaginatedProjectMember", + "PaginatedProjectMemberActiveOrganizationMeta", "PaginatedRoleBasedTaskList", "Pause", "PauseRequest", @@ -437,6 +444,7 @@ "WhoAmILseFieldsOnboardingState", "WhoAmILseFieldsTrialRole", "WhoAmIUser", + "WhoAmIUserActiveOrganizationMeta", "Workspace", "WorkspaceMemberCreate", "WorkspaceMemberList", diff --git a/src/label_studio_sdk/types/lse_user.py b/src/label_studio_sdk/types/lse_user.py index 5f146708c..5175328f8 100644 --- a/src/label_studio_sdk/types/lse_user.py +++ b/src/label_studio_sdk/types/lse_user.py @@ -2,6 +2,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .lse_user_active_organization_meta import LseUserActiveOrganizationMeta import pydantic import datetime as dt from .lse_fields import LseFields @@ -18,7 +19,11 @@ class LseUser(UncheckedBaseModel): """ active_organization: typing.Optional[int] = None - active_organization_meta: str + active_organization_meta: LseUserActiveOrganizationMeta = pydantic.Field() + """ + Active organization metadata + """ + allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None) """ Allow sending newsletters to user diff --git a/src/label_studio_sdk/types/lse_user_active_organization_meta.py b/src/label_studio_sdk/types/lse_user_active_organization_meta.py new file mode 100644 index 000000000..19566772b --- /dev/null +++ b/src/label_studio_sdk/types/lse_user_active_organization_meta.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.unchecked_base_model import UncheckedBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LseUserActiveOrganizationMeta(UncheckedBaseModel): + """ + Active organization metadata + """ + + email: str + title: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/label_studio_sdk/types/lse_user_api.py b/src/label_studio_sdk/types/lse_user_api.py index b7ca5dd85..bf7ef2b97 100644 --- a/src/label_studio_sdk/types/lse_user_api.py +++ b/src/label_studio_sdk/types/lse_user_api.py @@ -2,6 +2,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .lse_user_api_active_organization_meta import LseUserApiActiveOrganizationMeta import pydantic import datetime as dt from .organization_membership import OrganizationMembership @@ -17,7 +18,11 @@ class LseUserApi(UncheckedBaseModel): """ active_organization: typing.Optional[int] = None - active_organization_meta: str + active_organization_meta: LseUserApiActiveOrganizationMeta = pydantic.Field() + """ + Active organization metadata + """ + allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None) """ Allow sending newsletters to user diff --git a/src/label_studio_sdk/types/lse_user_api_active_organization_meta.py b/src/label_studio_sdk/types/lse_user_api_active_organization_meta.py new file mode 100644 index 000000000..15f5d6432 --- /dev/null +++ b/src/label_studio_sdk/types/lse_user_api_active_organization_meta.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.unchecked_base_model import UncheckedBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class LseUserApiActiveOrganizationMeta(UncheckedBaseModel): + """ + Active organization metadata + """ + + email: str + title: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/label_studio_sdk/types/paginated_project_member.py b/src/label_studio_sdk/types/paginated_project_member.py index aaa72a4ed..b87e35572 100644 --- a/src/label_studio_sdk/types/paginated_project_member.py +++ b/src/label_studio_sdk/types/paginated_project_member.py @@ -2,6 +2,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .paginated_project_member_active_organization_meta import PaginatedProjectMemberActiveOrganizationMeta import pydantic import datetime as dt from .lse_fields import LseFields @@ -18,7 +19,11 @@ class PaginatedProjectMember(UncheckedBaseModel): """ active_organization: typing.Optional[int] = None - active_organization_meta: str + active_organization_meta: PaginatedProjectMemberActiveOrganizationMeta = pydantic.Field() + """ + Active organization metadata + """ + allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None) """ Allow sending newsletters to user diff --git a/src/label_studio_sdk/types/paginated_project_member_active_organization_meta.py b/src/label_studio_sdk/types/paginated_project_member_active_organization_meta.py new file mode 100644 index 000000000..85dbf06fe --- /dev/null +++ b/src/label_studio_sdk/types/paginated_project_member_active_organization_meta.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.unchecked_base_model import UncheckedBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class PaginatedProjectMemberActiveOrganizationMeta(UncheckedBaseModel): + """ + Active organization metadata + """ + + email: str + title: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/label_studio_sdk/types/who_am_i_user.py b/src/label_studio_sdk/types/who_am_i_user.py index ac7418cbc..8696a673c 100644 --- a/src/label_studio_sdk/types/who_am_i_user.py +++ b/src/label_studio_sdk/types/who_am_i_user.py @@ -2,6 +2,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel import typing +from .who_am_i_user_active_organization_meta import WhoAmIUserActiveOrganizationMeta import pydantic import datetime as dt from .who_am_i_lse_fields import WhoAmILseFields @@ -18,7 +19,11 @@ class WhoAmIUser(UncheckedBaseModel): """ active_organization: typing.Optional[int] = None - active_organization_meta: str + active_organization_meta: WhoAmIUserActiveOrganizationMeta = pydantic.Field() + """ + Active organization metadata + """ + allow_newsletters: typing.Optional[bool] = pydantic.Field(default=None) """ Allow sending newsletters to user diff --git a/src/label_studio_sdk/types/who_am_i_user_active_organization_meta.py b/src/label_studio_sdk/types/who_am_i_user_active_organization_meta.py new file mode 100644 index 000000000..5c98df683 --- /dev/null +++ b/src/label_studio_sdk/types/who_am_i_user_active_organization_meta.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.unchecked_base_model import UncheckedBaseModel +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class WhoAmIUserActiveOrganizationMeta(UncheckedBaseModel): + """ + Active organization metadata + """ + + email: str + title: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/label_studio_sdk/users/client.py b/src/label_studio_sdk/users/client.py index fbd446a6f..24e7d174f 100644 --- a/src/label_studio_sdk/users/client.py +++ b/src/label_studio_sdk/users/client.py @@ -351,7 +351,7 @@ def get_token(self, *, request_options: typing.Optional[RequestOptions] = None) def whoami(self, *, request_options: typing.Optional[RequestOptions] = None) -> WhoAmIUser: """ - Retrieve details of the account that you are using to access the API. + Make the whoami call on behalf of the user you are using to access the API. Parameters ---------- @@ -1112,7 +1112,7 @@ async def main() -> None: async def whoami(self, *, request_options: typing.Optional[RequestOptions] = None) -> WhoAmIUser: """ - Retrieve details of the account that you are using to access the API. + Make the whoami call on behalf of the user you are using to access the API. Parameters ---------- diff --git a/tests/projects/test_members.py b/tests/projects/test_members.py index 330af2695..b81f35261 100644 --- a/tests/projects/test_members.py +++ b/tests/projects/test_members.py @@ -10,7 +10,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = [ { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -47,7 +47,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: { 0: { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, diff --git a/tests/test_users.py b/tests/test_users.py index 2c1ba3a18..b24c6a1bc 100644 --- a/tests/test_users.py +++ b/tests/test_users.py @@ -9,7 +9,7 @@ async def test_get_current_user(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -26,7 +26,7 @@ async def test_get_current_user(client: LabelStudio, async_client: AsyncLabelStu } expected_types: typing.Any = { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, @@ -51,7 +51,7 @@ async def test_get_current_user(client: LabelStudio, async_client: AsyncLabelStu async def test_update_current_user(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -68,7 +68,7 @@ async def test_update_current_user(client: LabelStudio, async_client: AsyncLabel } expected_types: typing.Any = { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, @@ -133,7 +133,7 @@ async def test_get_token(client: LabelStudio, async_client: AsyncLabelStudio) -> async def test_whoami(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -167,7 +167,7 @@ async def test_whoami(client: LabelStudio, async_client: AsyncLabelStudio) -> No } expected_types: typing.Any = { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, @@ -210,7 +210,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non expected_response: typing.Any = [ { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -231,7 +231,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non { 0: { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, @@ -258,7 +258,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -291,7 +291,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No } expected_types: typing.Any = { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, @@ -332,7 +332,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -365,7 +365,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: } expected_types: typing.Any = { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, @@ -419,7 +419,7 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> None: expected_response: typing.Any = { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -452,7 +452,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No } expected_types: typing.Any = { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None, diff --git a/tests/workspaces/test_members.py b/tests/workspaces/test_members.py index e20d22bfc..97403ecf2 100644 --- a/tests/workspaces/test_members.py +++ b/tests/workspaces/test_members.py @@ -11,7 +11,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non { "user": { "active_organization": 1, - "active_organization_meta": "active_organization_meta", + "active_organization_meta": {"email": "email", "title": "title"}, "allow_newsletters": True, "avatar": "avatar", "custom_hotkeys": {"key": "value"}, @@ -41,7 +41,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non 0: { "user": { "active_organization": "integer", - "active_organization_meta": None, + "active_organization_meta": {"email": None, "title": None}, "allow_newsletters": None, "avatar": None, "custom_hotkeys": None,