Skip to main content
Glama
models.py146 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-07-08T19:42:50+00:00 from __future__ import annotations from datetime import date as date_aliased from datetime import datetime from enum import Enum from typing import Any, Dict, List, Optional from pydantic import AnyUrl, BaseModel, EmailStr, Field, RootModel class AddCustomFieldSettingRequest(BaseModel): custom_field: str = Field( ..., description='The custom field to associate with this container.', examples=['14916'], ) insert_after: Optional[str] = Field( None, description='A gid of a Custom Field Setting on this container, after which the new Custom Field Setting will be added. `insert_before` and `insert_after` parameters cannot both be specified.', examples=['1331'], ) insert_before: Optional[str] = Field( None, description='A gid of a Custom Field Setting on this container, before which the new Custom Field Setting will be added. `insert_before` and `insert_after` parameters cannot both be specified.', examples=['1331'], ) is_important: Optional[bool] = Field( None, description='Whether this field should be considered important to this container (for instance, to display in the list view of items in the container).', examples=[True], ) class AddFollowersRequest(BaseModel): followers: str = Field( ..., description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=['521621,621373'], ) class AddMembersRequest(BaseModel): members: str = Field( ..., description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=['521621,621373'], ) class AsanaResource(BaseModel): gid: Optional[str] = Field( None, description='Globally unique identifier of the resource, as a string.', examples=['12345'], ) resource_type: Optional[str] = Field( None, description='The base type of this resource.', examples=['task'] ) class AttachmentCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the file.', examples=['Screenshot.png'] ) resource_subtype: Optional[str] = Field( None, description='The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `onedrive`, `box`, `vimeo`, and `external`.', examples=['dropbox'], ) class ResourceSubtype(Enum): asana = 'asana' dropbox = 'dropbox' gdrive = 'gdrive' onedrive = 'onedrive' box = 'box' vimeo = 'vimeo' external = 'external' class AttachmentRequest(BaseModel): connect_to_app: Optional[bool] = Field( None, description='*Optional*. Only relevant for external attachments with a parent task. A boolean indicating whether the current app should be connected with the attachment for the purposes of showing an app components widget. Requires the app to have been added to a project the parent task is in.\n', ) file: Optional[bytes] = Field( None, description='Required for `asana` attachments.\n' ) name: Optional[str] = Field( None, description='The name of the external resource being attached. Required for attachments of type `external`.\n', ) parent: Optional[str] = Field( None, description='Required identifier of the parent task, project, or project_brief, as a string.\n', ) resource_subtype: Optional[ResourceSubtype] = Field( None, description='The type of the attachment. Must be one of the given values. If not specified, a file attachment of type `asana` will be assumed. Note that if the value of `resource_subtype` is `external`, a `parent`, `name`, and `url` must also be provided.\n', examples=['external'], ) url: Optional[str] = Field( None, description='The URL of the external resource being attached. Required for attachments of type `external`.\n', ) class ActorType(Enum): user = 'user' asana = 'asana' asana_support = 'asana_support' anonymous = 'anonymous' external_administrator = 'external_administrator' class AuditLogEventActor(BaseModel): actor_type: Optional[ActorType] = Field( None, description='The type of actor.\nCan be one of `user`, `asana`, `asana_support`, `anonymous`, or `external_administrator`.', examples=['user'], ) email: Optional[str] = Field( None, description='The email of the actor, if it is a user.', examples=['gregsanchez@example.com'], ) gid: Optional[str] = Field( None, description='Globally unique identifier of the actor, if it is a user.', examples=['1111'], ) name: Optional[str] = Field( None, description='The name of the actor, if it is a user.', examples=['Greg Sanchez'], ) class ApiAuthenticationMethod(Enum): cookie = 'cookie' oauth = 'oauth' personal_access_token = 'personal_access_token' service_account = 'service_account' class ContextType(Enum): web = 'web' desktop = 'desktop' mobile = 'mobile' asana_support = 'asana_support' asana = 'asana' email = 'email' api = 'api' class AuditLogEventContext(BaseModel): api_authentication_method: Optional[ApiAuthenticationMethod] = Field( None, description='The authentication method used in the context of an API request.\nOnly present if the `context_type` is `api`. Can be one of `cookie`, `oauth`, `personal_access_token`, or `service_account`.', ) client_ip_address: Optional[str] = Field( None, description='The IP address of the client that initiated the event, if applicable.', examples=['1.1.1.1'], ) context_type: Optional[ContextType] = Field( None, description='The type of context.\nCan be one of `web`, `desktop`, `mobile`, `asana_support`, `asana`, `email`, or `api`.', examples=['web'], ) oauth_app_name: Optional[str] = Field( None, description='The name of the OAuth App that initiated the event.\nOnly present if the `api_authentication_method` is `oauth`.', ) user_agent: Optional[str] = Field( None, description='The user agent of the client that initiated the event, if applicable.', examples=[ 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36' ], ) class AuditLogEventDetails(BaseModel): pass class AuditLogEventResource(BaseModel): email: Optional[str] = Field( None, description='The email of the resource, if applicable.' ) gid: Optional[str] = Field( None, description='Globally unique identifier of the resource.', examples=['1111'], ) name: Optional[str] = Field( None, description='The name of the resource.', examples=['Example Task'] ) resource_subtype: Optional[str] = Field( None, description='The subtype of resource. Most resources will not have a subtype.', examples=['milestone'], ) resource_type: Optional[str] = Field( None, description='The type of resource.', examples=['task'] ) class Method(Enum): get = 'get' post = 'post' put = 'put' delete = 'delete' patch = 'patch' head = 'head' class Options(BaseModel): fields: Optional[List[str]] = Field( None, description='The fields to retrieve in the request.', examples=[['name', 'gid', 'notes', 'completed']], ) limit: Optional[int] = Field( None, description='Pagination limit for the request.', examples=[50] ) offset: Optional[int] = Field( None, description='Pagination offset for the request.', examples=['eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9'], ) class BatchRequestAction(BaseModel): data: Optional[Dict[str, Any]] = Field( None, description='For `GET` requests, this should be a map of query parameters you would have normally passed in the URL. Options and pagination are not accepted here; put them in `options` instead. For `POST`, `PATCH`, and `PUT` methods, this should be the content you would have normally put in the data field of the body.', examples=[{'assignee': 'me', 'workspace': '1337'}], ) method: Method = Field( ..., description='The HTTP method you wish to emulate for the action.', examples=['get'], ) options: Optional[Options] = Field( None, description='Pagination (`limit` and `offset`) and output options (`fields` or `expand`) for the action. “Pretty” JSON output is not an available option on individual actions; if you want pretty output, specify that option on the parent request.', examples=[{'fields': ['name', 'notes', 'completed'], 'limit': 3}], ) relative_path: str = Field( ..., description='The path of the desired endpoint relative to the API’s base URL. Query parameters are not accepted here; put them in `data` instead.', examples=['/tasks/123'], ) class BatchResponse(BaseModel): body: Optional[Dict[str, Any]] = Field( None, description='The JSON body that the invoked endpoint returned.', examples=[ { 'data': { 'completed': False, 'gid': '1967', 'name': 'Hello, world!', 'notes': 'How are you today?', } } ], ) headers: Optional[Dict[str, Any]] = Field( None, description='A map of HTTP headers specific to this result. This is primarily used for returning a `Location` header to accompany a `201 Created` result. The parent HTTP response will contain all common headers.', examples=[{'location': '/tasks/1234'}], ) status_code: Optional[int] = Field( None, description='The HTTP status code that the invoked endpoint returned.', examples=[200], ) class AsanaCreatedField(Enum): a_v_requirements = 'a_v_requirements' account_name = 'account_name' actionable = 'actionable' align_shipping_link = 'align_shipping_link' align_status = 'align_status' allotted_time = 'allotted_time' appointment = 'appointment' approval_stage = 'approval_stage' approved = 'approved' article_series = 'article_series' board_committee = 'board_committee' browser = 'browser' campaign_audience = 'campaign_audience' campaign_project_status = 'campaign_project_status' campaign_regions = 'campaign_regions' channel_primary = 'channel_primary' client_topic_type = 'client_topic_type' complete_by = 'complete_by' contact = 'contact' contact_email_address = 'contact_email_address' content_channels = 'content_channels' content_channels_needed = 'content_channels_needed' content_stage = 'content_stage' content_type = 'content_type' contract = 'contract' contract_status = 'contract_status' cost = 'cost' creation_stage = 'creation_stage' creative_channel = 'creative_channel' creative_needed = 'creative_needed' creative_needs = 'creative_needs' data_sensitivity = 'data_sensitivity' deal_size = 'deal_size' delivery_appt = 'delivery_appt' delivery_appt_date = 'delivery_appt_date' department = 'department' department_responsible = 'department_responsible' design_request_needed = 'design_request_needed' design_request_type = 'design_request_type' discussion_category = 'discussion_category' do_this_task = 'do_this_task' editorial_content_status = 'editorial_content_status' editorial_content_tag = 'editorial_content_tag' editorial_content_type = 'editorial_content_type' effort = 'effort' effort_level = 'effort_level' est_completion_date = 'est_completion_date' estimated_time = 'estimated_time' estimated_value = 'estimated_value' expected_cost = 'expected_cost' external_steps_needed = 'external_steps_needed' favorite_idea = 'favorite_idea' feedback_type = 'feedback_type' financial = 'financial' funding_amount = 'funding_amount' grant_application_process = 'grant_application_process' hiring_candidate_status = 'hiring_candidate_status' idea_status = 'idea_status' ids_link = 'ids_link' ids_patient_link = 'ids_patient_link' implementation_stage = 'implementation_stage' insurance = 'insurance' interview_area = 'interview_area' interview_question_score = 'interview_question_score' itero_scan_link = 'itero_scan_link' job_s_applied_to = 'job_s_applied_to' lab = 'lab' launch_status = 'launch_status' lead_status = 'lead_status' localization_language = 'localization_language' localization_market_team = 'localization_market_team' localization_status = 'localization_status' meeting_minutes = 'meeting_minutes' meeting_needed = 'meeting_needed' minutes = 'minutes' mrr = 'mrr' must_localize = 'must_localize' name_of_foundation = 'name_of_foundation' need_to_follow_up = 'need_to_follow_up' next_appointment = 'next_appointment' next_steps_sales = 'next_steps_sales' num_people = 'num_people' number_of_user_reports = 'number_of_user_reports' office_location = 'office_location' onboarding_activity = 'onboarding_activity' owner = 'owner' participants_needed = 'participants_needed' patient_date_of_birth = 'patient_date_of_birth' patient_email = 'patient_email' patient_phone = 'patient_phone' patient_status = 'patient_status' phone_number = 'phone_number' planning_category = 'planning_category' point_of_contact = 'point_of_contact' position = 'position' post_format = 'post_format' prescription = 'prescription' priority = 'priority' priority_level = 'priority_level' product = 'product' product_stage = 'product_stage' progress = 'progress' project_size = 'project_size' project_status = 'project_status' proposed_budget = 'proposed_budget' publish_status = 'publish_status' reason_for_scan = 'reason_for_scan' referral = 'referral' request_type = 'request_type' research_status = 'research_status' responsible_department = 'responsible_department' responsible_team = 'responsible_team' risk_assessment_status = 'risk_assessment_status' room_name = 'room_name' sales_counterpart = 'sales_counterpart' sentiment = 'sentiment' shipping_link = 'shipping_link' social_channels = 'social_channels' stage = 'stage' status = 'status' status_design = 'status_design' status_of_initiative = 'status_of_initiative' system_setup = 'system_setup' task_progress = 'task_progress' team = 'team' team_marketing = 'team_marketing' team_responsible = 'team_responsible' time_it_takes_to_complete_tasks = 'time_it_takes_to_complete_tasks' timeframe = 'timeframe' treatment_type = 'treatment_type' type_work_requests_it = 'type_work_requests_it' use_agency = 'use_agency' user_name = 'user_name' vendor_category = 'vendor_category' vendor_type = 'vendor_type' word_count = 'word_count' class CustomLabelPosition(Enum): prefix = 'prefix' suffix = 'suffix' class Format(Enum): currency = 'currency' identifier = 'identifier' percentage = 'percentage' custom = 'custom' none = 'none' class DateValue(BaseModel): date: Optional[str] = Field( None, description='A string representing the date in YYYY-MM-DD format.', examples=['2024-08-23'], ) date_time: Optional[str] = Field( None, description='A string representing the date in ISO 8601 format. If no time value is selected, the value of `date-time` will be `null`.', examples=['2024-08-23T22:00:00.000Z'], ) class ResourceSubtype1(Enum): text = 'text' enum = 'enum' multi_enum = 'multi_enum' number = 'number' date = 'date' people = 'people' class Type(Enum): text = 'text' enum = 'enum' multi_enum = 'multi_enum' number = 'number' CustomFieldSettingCompact = AsanaResource class DateVariableCompact(BaseModel): description: Optional[str] = Field( None, description='The description of what the date variable is used for when instantiating a project.', examples=['Choose a start date for your project.'], ) gid: Optional[str] = Field( None, description='Globally unique identifier of the date field in the project template. A value of `1` refers to the project start date, while `2` refers to the project due date.', examples=['1'], ) name: Optional[str] = Field( None, description='The name of the date variable.', examples=['Start Date'] ) class DateVariableRequest(BaseModel): gid: Optional[str] = Field( None, description='Globally unique identifier of the date field in the project template. A value of `1` refers to the project start date, while `2` refers to the project due date.', examples=['1'], ) value: Optional[datetime] = Field( None, description='The date with which the date variable should be replaced when instantiating a project. This takes a date with `YYYY-MM-DD` format.', examples=['2022-01-01'], ) class EmptyResponse(BaseModel): pass class EnumOption(AsanaResource): color: Optional[str] = Field( None, description='The color of the enum option. Defaults to ‘none’.', examples=['blue'], ) enabled: Optional[bool] = Field( None, description='Whether or not the enum option is a selectable value for the custom field.', examples=[True], ) name: Optional[str] = Field( None, description='The name of the enum option.', examples=['Low'] ) class EnumOptionBase(RootModel[EnumOption]): root: EnumOption class EnumOptionInsertRequest(BaseModel): after_enum_option: Optional[str] = Field( None, description='An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.', examples=['12345'], ) before_enum_option: Optional[str] = Field( None, description='An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.', examples=['12345'], ) enum_option: str = Field( ..., description='The gid of the enum option to relocate.', examples=['97285'] ) class EnumOptionRequest(BaseModel): insert_after: Optional[str] = Field( None, description='An existing enum option within this custom field after which the new enum option should be inserted. Cannot be provided together with before_enum_option.', examples=['12345'], ) insert_before: Optional[str] = Field( None, description='An existing enum option within this custom field before which the new enum option should be inserted. Cannot be provided together with after_enum_option.', examples=['12345'], ) class Error(BaseModel): help: Optional[str] = Field( None, description='Additional information directing developers to resources on how to address and fix the problem, if available.', examples=[ "For more information on API status codes and how to handle them, read the docs on errors: https://asana.github.io/developer-docs/#errors'" ], ) message: Optional[str] = Field( None, description='Message providing more detail about the error that occurred, if available.', examples=['project: Missing input'], ) phrase: Optional[str] = Field( None, description='*500 errors only*. A unique error phrase which can be used when contacting developer support to help identify the exact occurrence of the problem in Asana’s logs.', examples=['6 sad squid snuggle softly'], ) class ErrorResponse(BaseModel): errors: Optional[List[Error]] = None class Change(BaseModel): action: Optional[str] = Field( None, description='The type of action taken on the **field** which has been changed. This can be one of `changed`, `added`, or `removed` depending on the nature of the change.', examples=['changed'], ) added_value: Optional[Any] = Field( None, description="*Conditional.* This property is only present when the **field's** `action` is `added` _and_ the `added_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/input-output-options)) when using the [Events](/docs/asana-events) endpoint.", examples=[{'gid': '12345', 'resource_type': 'user'}], ) field: Optional[str] = Field( None, description='The name of the field that has changed in the resource.', examples=['assignee'], ) new_value: Optional[Any] = Field( None, description="*Conditional.* This property is only present when the **field's** `action` is `changed` _and_ the `new_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/input-output-options)) when using the [Events](/docs/asana-events) endpoint.", examples=[{'gid': '12345', 'resource_type': 'user'}], ) removed_value: Optional[Any] = Field( None, description="*Conditional.* This property is only present when the **field's** `action` is `removed` _and_ the `removed_value` is an Asana resource. This will be only the `gid` and `resource_type` of the resource when the events come from webhooks; this will be the compact representation (and can have fields expanded with [opt_fields](/docs/input-output-options)) when using the [Events](/docs/asana-events) endpoint.", examples=[{'gid': '12345', 'resource_type': 'user'}], ) class GoalAddSubgoalRequest(BaseModel): insert_after: Optional[str] = Field( None, description='An id of a subgoal of this parent goal. The new subgoal will be added after the one specified here. `insert_before` and `insert_after` parameters cannot both be specified.', examples=['1331'], ) insert_before: Optional[str] = Field( None, description='An id of a subgoal of this parent goal. The new subgoal will be added before the one specified here. `insert_before` and `insert_after` parameters cannot both be specified.', examples=['1331'], ) subgoal: str = Field( ..., description='The goal gid to add as subgoal to a parent goal', examples=['1331'], ) class GoalAddSupportingRelationshipRequest(BaseModel): contribution_weight: Optional[float] = Field( None, description="The weight that the supporting resource's progress will contribute to the supported goal's progress. This can only be 0 or 1.", examples=[1], ) insert_after: Optional[str] = Field( None, description='An id of a subgoal of this parent goal. The new subgoal will be added after the one specified here. `insert_before` and `insert_after` parameters cannot both be specified. Currently only supported when adding a subgoal.', examples=['1331'], ) insert_before: Optional[str] = Field( None, description='An id of a subgoal of this parent goal. The new subgoal will be added before the one specified here. `insert_before` and `insert_after` parameters cannot both be specified. Currently only supported when adding a subgoal.', examples=['1331'], ) supporting_resource: str = Field( ..., description='The gid of the supporting resource to add to the parent goal. Must be the gid of a goal, project, or portfolio.', examples=['12345'], ) class GoalAddSupportingWorkRequest(BaseModel): supporting_work: str = Field( ..., description='The project/portfolio gid to add as supporting work for a goal', examples=['1331'], ) class GoalBase(AsanaResource): due_on: Optional[str] = Field( None, description='The localized day on which this goal is due. This takes a date with format `YYYY-MM-DD`.', examples=['2019-09-15'], ) html_notes: Optional[str] = Field( None, description='The notes of the goal with formatting as HTML.', examples=['<body>Start building brand awareness.</body>'], ) is_workspace_level: Optional[bool] = Field( None, description='*Conditional*. This property is only present when the `workspace` provided is an organization. Whether the goal belongs to the `workspace` (and is listed as part of the workspace’s goals) or not. If it isn’t a workspace-level goal, it is a team-level goal, and is associated with the goal’s team.', examples=[True], ) liked: Optional[bool] = Field( None, description='True if the goal is liked by the authorized user, false if not.', examples=[False], ) name: Optional[str] = Field( None, description='The name of the goal.', examples=['Grow web traffic by 30%'] ) notes: Optional[str] = Field( None, description='Free-form textual information associated with the goal (i.e. its description).', examples=['Start building brand awareness.'], ) start_on: Optional[str] = Field( None, description='The day on which work for this goal begins, or null if the goal has no start date. This takes a date with `YYYY-MM-DD` format, and cannot be set unless there is an accompanying due date.', examples=['2019-09-14'], ) status: Optional[str] = Field( None, description='The current status of this goal. When the goal is open, its status can be `green`, `yellow`, and `red` to reflect "On Track", "At Risk", and "Off Track", respectively. When the goal is closed, the value can be `missed`, `achieved`, `partial`, or `dropped`.\n*Note* you can only write to this property if `metric` is set.', examples=['green'], ) class ProgressSource(Enum): manual = 'manual' subgoal_progress = 'subgoal_progress' project_task_completion = 'project_task_completion' project_milestone_completion = 'project_milestone_completion' external = 'external' class ResourceSubtype2(Enum): number = 'number' class Unit(Enum): none = 'none' currency = 'currency' percentage = 'percentage' class GoalMetricBase(AsanaResource): currency_code: Optional[str] = Field( None, description='ISO 4217 currency code to format this custom field. This will be null if the `unit` is not `currency`.', examples=['EUR'], ) current_display_value: Optional[str] = Field( None, description='This string is the current value of a goal metric of type string.', examples=['8.12'], ) current_number_value: Optional[float] = Field( None, description='This number is the current value of a goal metric of type number.', examples=[8.12], ) initial_number_value: Optional[float] = Field( None, description='This number is the start value of a goal metric of type number.', examples=[5.2], ) precision: Optional[int] = Field( None, description='*Conditional*. Only relevant for goal metrics of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.\nFor percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.', examples=[2], ) progress_source: Optional[ProgressSource] = Field( None, description="This field defines how the progress value of a goal metric is being calculated. A goal's progress can be provided manually by the user, calculated automatically from contributing subgoals or projects, or managed by an integration with an external data source, such as Salesforce.", examples=['manual'], ) resource_subtype: Optional[ResourceSubtype2] = Field( None, description='The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.', examples=['number'], ) target_number_value: Optional[float] = Field( None, description='This number is the end value of a goal metric of type number. This number cannot equal `initial_number_value`.', examples=[10.2], ) unit: Optional[Unit] = Field( None, description='A supported unit of measure for the goal metric, or none.' ) class GoalMetricCurrentValueRequest(AsanaResource): current_number_value: Optional[float] = Field( None, description='*Conditional*. This number is the current value of a goal metric of type number.', examples=[8.12], ) class GoalMetricRequest(RootModel[GoalMetricBase]): root: GoalMetricBase class ResourceSubtype3(Enum): subgoal = 'subgoal' supporting_work = 'supporting_work' class GoalRemoveSubgoalRequest(BaseModel): subgoal: str = Field( ..., description='The goal gid to remove as subgoal from the parent goal', examples=['1331'], ) class GoalRemoveSupportingRelationshipRequest(BaseModel): supporting_resource: str = Field( ..., description='The gid of the supporting resource to remove from the parent goal. Must be the gid of a goal, project, or portfolio.', examples=['12345'], ) class GoalRequest(GoalBase): followers: Optional[List[str]] = Field(None, examples=[['12345']]) owner: Optional[str] = Field( None, description='The `gid` of a user.', examples=['12345'] ) team: Optional[str] = Field( None, description='*Conditional*. This property is only present when the `workspace` provided is an organization.', examples=['12345'], ) time_period: Optional[str] = Field( None, description='The `gid` of a time period.', examples=['12345'] ) workspace: Optional[str] = Field( None, description='The `gid` of a workspace.', examples=['12345'] ) class Metric(GoalMetricBase): can_manage: Optional[bool] = Field( None, description='*Conditional*. Only relevant for `progress_source` of type `external`. This boolean indicates whether the requester has the ability to update the current value of this metric. This returns `true` if the external metric was created by the requester, `false` otherwise.', examples=[True], ) class Status(Enum): not_started = 'not_started' in_progress = 'in_progress' succeeded = 'succeeded' failed = 'failed' class ModifyDependenciesRequest(BaseModel): dependencies: Optional[List[str]] = Field( None, description='An array of task gids that a task depends on.' ) class ModifyDependentsRequest(BaseModel): dependents: Optional[List[str]] = Field( None, description='An array of task gids that are dependents of the given task.' ) class State(Enum): pending = 'pending' started = 'started' finished = 'finished' error = 'error' class OrganizationExportRequest(BaseModel): organization: Optional[str] = Field( None, description='Globally unique identifier for the workspace or organization.', examples=['1331'], ) class PortfolioAddItemRequest(BaseModel): insert_after: Optional[str] = Field( None, description='An id of an item in this portfolio. The new item will be added after the one specified here. `insert_before` and `insert_after` parameters cannot both be specified.', examples=['1331'], ) insert_before: Optional[str] = Field( None, description='An id of an item in this portfolio. The new item will be added before the one specified here. `insert_before` and `insert_after` parameters cannot both be specified.', examples=['1331'], ) item: str = Field( ..., description='The item to add to the portfolio.', examples=['1331'] ) class Color(Enum): dark_pink = 'dark-pink' dark_green = 'dark-green' dark_blue = 'dark-blue' dark_red = 'dark-red' dark_teal = 'dark-teal' dark_brown = 'dark-brown' dark_orange = 'dark-orange' dark_purple = 'dark-purple' dark_warm_gray = 'dark-warm-gray' light_pink = 'light-pink' light_green = 'light-green' light_blue = 'light-blue' light_red = 'light-red' light_teal = 'light-teal' light_brown = 'light-brown' light_orange = 'light-orange' light_purple = 'light-purple' light_warm_gray = 'light-warm-gray' class PortfolioCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the portfolio.', examples=['Bug Portfolio'] ) class PortfolioRemoveItemRequest(BaseModel): item: str = Field( ..., description='The item to remove from the portfolio.', examples=['1331'] ) class Preview(BaseModel): fallback: Optional[str] = Field( None, description='Some fallback text to display if unable to display the full preview.', examples=[ 'Greg: Great! I like this idea.\\n\\nhttps//a_company.slack.com/archives/ABCDEFG/12345678' ], ) footer: Optional[str] = Field( None, description='Text to display in the footer.', examples=['Mar 17, 2019 1:25 PM'], ) header: Optional[str] = Field( None, description='Text to display in the header.', examples=['Asana for Slack'] ) header_link: Optional[str] = Field( None, description='Where the header will link to.', examples=['https://asana.comn/apps/slack'], ) html_text: Optional[str] = Field( None, description='HTML formatted text for the body of the preview.', examples=['<body>Great! I like this idea.</body>'], ) text: Optional[str] = Field( None, description='Text for the body of the preview.', examples=['Great! I like this idea.'], ) title: Optional[str] = Field( None, description='Text to display as the title.', examples=['Greg'] ) title_link: Optional[str] = Field( None, description='Where to title will link to.', examples=['https://asana.slack.com/archives/ABCDEFG/12345678'], ) class DefaultView(Enum): list = 'list' board = 'board' calendar = 'calendar' timeline = 'timeline' ProjectBriefCompact = AsanaResource class ProjectCompact(AsanaResource): name: Optional[str] = Field( None, description='Name of the project. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.', examples=['Stuff to buy'], ) class Include(Enum): members = 'members' notes = 'notes' forms = 'forms' task_notes = 'task_notes' task_assignee = 'task_assignee' task_subtasks = 'task_subtasks' task_attachments = 'task_attachments' task_dates = 'task_dates' task_dependencies = 'task_dependencies' task_followers = 'task_followers' task_tags = 'task_tags' task_projects = 'task_projects' class ScheduleDates(BaseModel): due_on: Optional[str] = Field( None, description='Sets the last due date in the duplicated project to the given date. The rest of the due dates will be offset by the same amount as the due dates in the original project.', examples=['2019-05-21'], ) should_skip_weekends: bool = Field( ..., description='Determines if the auto-shifted dates should skip weekends.', examples=[True], ) start_on: Optional[str] = Field( None, description='Sets the first start date in the duplicated project to the given date. The rest of the start dates will be offset by the same amount as the start dates in the original project.', examples=['2019-05-21'], ) class ProjectDuplicateRequest(BaseModel): include: Optional[Include] = Field( None, description='The elements that will be duplicated to the new project. Tasks are always included.', examples=[['members', 'task_notes']], ) name: str = Field( ..., description='The name of the new project.', examples=['New Project Name'] ) schedule_dates: Optional[ScheduleDates] = Field( None, description='A dictionary of options to auto-shift dates. `task_dates` must be included to use this option. Requires either `start_on` or `due_on`, but not both.', ) team: Optional[str] = Field( None, description='Sets the team of the new project. If team is not defined, the new project will be in the same team as the the original project.', examples=['12345'], ) class WriteAccess(Enum): full_write = 'full_write' comment_only = 'comment_only' class Icon(Enum): list = 'list' board = 'board' timeline = 'timeline' calendar = 'calendar' rocket = 'rocket' people = 'people' graph = 'graph' star = 'star' bug = 'bug' light_bulb = 'light_bulb' globe = 'globe' gear = 'gear' notebook = 'notebook' computer = 'computer' check = 'check' target = 'target' html = 'html' megaphone = 'megaphone' chat_bubbles = 'chat_bubbles' briefcase = 'briefcase' page_layout = 'page_layout' mountain_flag = 'mountain_flag' puzzle = 'puzzle' presentation = 'presentation' line_and_symbols = 'line_and_symbols' speed_dial = 'speed_dial' ribbon = 'ribbon' shoe = 'shoe' shopping_basket = 'shopping_basket' map = 'map' ticket = 'ticket' coins = 'coins' class ProjectSaveAsTemplateRequest(BaseModel): name: str = Field( ..., description='The name of the new project template.', examples=['New Project Template'], ) public: bool = Field( ..., description='Sets the project template to public to its team.', examples=[True], ) team: Optional[str] = Field( None, description='Sets the team of the new project template. If the project exists in an organization, specify team and not workspace.', examples=['12345'], ) workspace: Optional[str] = Field( None, description='Sets the workspace of the new project template. Only specify workspace if the project exists in a workspace.', examples=['12345'], ) class ProjectSectionInsertRequest(BaseModel): after_section: Optional[str] = Field( None, description='Insert the given section immediately after the section specified by this parameter.', examples=['987654'], ) before_section: Optional[str] = Field( None, description='Insert the given section immediately before the section specified by this parameter.', examples=['86420'], ) project: str = Field( ..., description='The project in which to reorder the given section.', examples=['123456'], ) section: str = Field( ..., description='The section to reorder.', examples=['321654'] ) class Color2(Enum): green = 'green' yellow = 'yellow' red = 'red' blue = 'blue' class ProjectStatusCompact(AsanaResource): title: Optional[str] = Field( None, description='The title of the project status update.', examples=['Status Update - Jun 15'], ) class Color3(Enum): dark_pink = 'dark-pink' dark_green = 'dark-green' dark_blue = 'dark-blue' dark_red = 'dark-red' dark_teal = 'dark-teal' dark_brown = 'dark-brown' dark_orange = 'dark-orange' dark_purple = 'dark-purple' dark_warm_gray = 'dark-warm-gray' light_pink = 'light-pink' light_green = 'light-green' light_blue = 'light-blue' light_red = 'light-red' light_teal = 'light-teal' light_brown = 'light-brown' light_orange = 'light-orange' light_purple = 'light-purple' light_warm_gray = 'light-warm-gray' class ProjectTemplateCompact(AsanaResource): name: Optional[str] = Field( None, description='Name of the project template.', examples=['Packing list'] ) class ProjectTemplateInstantiateProjectRequest(BaseModel): is_strict: Optional[bool] = Field( None, description='*Optional*. If set to `true`, the endpoint returns an "Unprocessable Entity" error if you fail to provide a calendar date value for any date variable. If set to `false`, a default date is used for each unfulfilled date variable (e.g., the current date is used as the Start Date of a project).', examples=[True], ) name: str = Field( ..., description='The name of the new project.', examples=['New Project Name'] ) public: bool = Field( ..., description='Sets the project to public to its team.', examples=[True] ) requested_dates: Optional[List[DateVariableRequest]] = Field( None, description='Array of mappings of date variables to calendar dates.' ) team: Optional[str] = Field( None, description='*Conditional*. Sets the team of the new project. If the project template exists in an _organization_, you must specify a value for `team` and not `workspace`.', examples=['12345'], ) workspace: Optional[str] = Field( None, description='*Conditional*. Sets the workspace of the new project. If the project template exists in a _workspace_, you must specify a value for `workspace` and not `team`.', examples=['12345'], ) class RemoveCustomFieldSettingRequest(BaseModel): custom_field: str = Field( ..., description='The custom field to remove from this portfolio.', examples=['14916'], ) class RemoveFollowersRequest(BaseModel): followers: str = Field( ..., description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=['521621,621373'], ) class RemoveMembersRequest(BaseModel): members: str = Field( ..., description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=['521621,621373'], ) class SectionCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the section (i.e. the text displayed as the section header).', examples=['Next Actions'], ) class SectionRequest(BaseModel): insert_after: Optional[str] = Field( None, description='An existing section within this project after which the added section should be inserted. Cannot be provided together with insert_before.', examples=['987654'], ) insert_before: Optional[str] = Field( None, description='An existing section within this project before which the added section should be inserted. Cannot be provided together with insert_after.', examples=['86420'], ) name: str = Field( ..., description='The text to be displayed as the section name. This cannot be an empty string.', examples=['Next Actions'], ) class SectionTaskInsertRequest(BaseModel): insert_after: Optional[str] = Field( None, description='An existing task within this section after which the added task should be inserted. Cannot be provided together with insert_before.', examples=['987654'], ) insert_before: Optional[str] = Field( None, description='An existing task within this section before which the added task should be inserted. Cannot be provided together with insert_after.', examples=['86420'], ) task: str = Field( ..., description='The task to add to this section.', examples=['123456'] ) class StatusType(Enum): on_track = 'on_track' at_risk = 'at_risk' off_track = 'off_track' on_hold = 'on_hold' complete = 'complete' achieved = 'achieved' partial = 'partial' missed = 'missed' dropped = 'dropped' class ResourceSubtype4(Enum): project_status_update = 'project_status_update' portfolio_status_update = 'portfolio_status_update' goal_status_update = 'goal_status_update' class StatusUpdateCompact(AsanaResource): resource_subtype: Optional[ResourceSubtype4] = Field( None, description='The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.\nThe `resource_subtype`s for `status` objects represent the type of their parent.', examples=['project_status_update'], ) title: Optional[str] = Field( None, description='The title of the status update.', examples=['Status Update - Jun 15'], ) class Parent1(BaseModel): pass class StickerName(Enum): green_checkmark = 'green_checkmark' people_dancing = 'people_dancing' dancing_unicorn = 'dancing_unicorn' heart = 'heart' party_popper = 'party_popper' people_waving_flags = 'people_waving_flags' splashing_narwhal = 'splashing_narwhal' trophy = 'trophy' yeti_riding_unicorn = 'yeti_riding_unicorn' celebrating_people = 'celebrating_people' determined_climbers = 'determined_climbers' phoenix_spreading_love = 'phoenix_spreading_love' class StoryBase(AsanaResource): created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) html_text: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). HTML formatted text for a comment. This will not include the name of the creator.', examples=['<body>This is a comment.</body>'], ) is_pinned: Optional[bool] = Field( None, description='*Conditional*. Whether the story should be pinned on the resource.', examples=[False], ) resource_subtype: Optional[str] = Field( None, description='The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.', examples=['comment_added'], ) sticker_name: Optional[StickerName] = Field( None, description='The name of the sticker in this story. `null` if there is no sticker.', examples=['dancing_unicorn'], ) text: Optional[str] = Field( None, description='The plain text of the comment to add. Cannot be used with html_text.', examples=['This is a comment.'], ) class StoryRequest(RootModel[StoryBase]): root: StoryBase class Source(Enum): web = 'web' email = 'email' mobile = 'mobile' api = 'api' unknown = 'unknown' class Type1(Enum): comment = 'comment' system = 'system' class StoryResponseDates(BaseModel): due_at: Optional[datetime] = Field( None, description='The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with `due_on`.', examples=['2019-09-15T02:06:58.158Z'], ) due_on: Optional[date_aliased] = Field( None, description='The localized day on which this goal is due. This takes a date with format `YYYY-MM-DD`.', examples=['2019-09-15'], ) start_on: Optional[date_aliased] = Field( None, description='The day on which work for this goal begins, or null if the goal has no start date. This takes a date with `YYYY-MM-DD` format, and cannot be set unless there is an accompanying due date.', examples=['2019-09-14'], ) class TagCompact(AsanaResource): name: Optional[str] = Field( None, description='Name of the tag. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.', examples=['Stuff to buy'], ) class TaskAddFollowersRequest(BaseModel): followers: List[str] = Field( ..., description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=[['13579', '321654']], ) class TaskAddProjectRequest(BaseModel): insert_after: Optional[str] = Field( None, description='A task in the project to insert the task after, or `null` to insert at the beginning of the list.', examples=['124816'], ) insert_before: Optional[str] = Field( None, description='A task in the project to insert the task before, or `null` to insert at the end of the list.', examples=['432134'], ) project: str = Field( ..., description='The project to add the task to.', examples=['13579'] ) section: Optional[str] = Field( None, description='A section in the project to insert the task into. The task will be inserted at the bottom of the section.', examples=['987654'], ) class TaskAddTagRequest(BaseModel): tag: str = Field(..., description='The tag to add to the task.', examples=['13579']) class ApprovalStatus(Enum): pending = 'pending' approved = 'approved' rejected = 'rejected' changes_requested = 'changes_requested' class AssigneeStatus(Enum): today = 'today' upcoming = 'upcoming' later = 'later' new = 'new' inbox = 'inbox' class External(BaseModel): data: Optional[str] = Field(None, examples=['A blob of information.']) gid: Optional[str] = Field(None, examples=['1234']) class Membership(BaseModel): project: Optional[ProjectCompact] = None section: Optional[SectionCompact] = None class ResourceSubtype5(Enum): default_task = 'default_task' milestone = 'milestone' section = 'section' approval = 'approval' class TaskCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the task.', examples=['Bug Task'] ) resource_subtype: Optional[ResourceSubtype5] = Field( None, description='The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.\nThe resource_subtype `milestone` represent a single moment in time. This means tasks with this subtype cannot have a start_date.', examples=['default_task'], ) class TaskCountResponse(BaseModel): num_completed_milestones: Optional[int] = Field( None, description='The number of completed milestones in a project.', examples=[3], ) num_completed_tasks: Optional[int] = Field( None, description='The number of completed tasks in a project.', examples=[150] ) num_incomplete_milestones: Optional[int] = Field( None, description='The number of incomplete milestones in a project.', examples=[7], ) num_incomplete_tasks: Optional[int] = Field( None, description='The number of incomplete tasks in a project.', examples=[50] ) num_milestones: Optional[int] = Field( None, description='The number of milestones in a project.', examples=[10] ) num_tasks: Optional[int] = Field( None, description='The number of tasks in a project.', examples=[200] ) class Include1(Enum): notes = 'notes' assignee = 'assignee' subtasks = 'subtasks' attachments = 'attachments' tags = 'tags' followers = 'followers' projects = 'projects' dates = 'dates' dependencies = 'dependencies' parent = 'parent' class TaskDuplicateRequest(BaseModel): include: Optional[Include1] = Field( None, description='The fields that will be duplicated to the new task.', examples=[['notes', 'assignee']], ) name: Optional[str] = Field( None, description='The name of the new task.', examples=['New Task Name'] ) class TaskRemoveFollowersRequest(BaseModel): followers: List[str] = Field( ..., description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=[['13579', '321654']], ) class TaskRemoveProjectRequest(BaseModel): project: str = Field( ..., description='The project to remove the task from.', examples=['13579'] ) class TaskRemoveTagRequest(BaseModel): tag: str = Field( ..., description='The tag to remove from the task.', examples=['13579'] ) class TaskSetParentRequest(BaseModel): insert_after: Optional[str] = Field( None, description='A subtask of the parent to insert the task after, or `null` to insert at the beginning of the list.', examples=['null'], ) insert_before: Optional[str] = Field( None, description='A subtask of the parent to insert the task before, or `null` to insert at the end of the list.', examples=['124816'], ) parent: str = Field( ..., description='The new parent of the task, or `null` for no parent.', examples=['987654'], ) class TeamAddUserRequest(BaseModel): user: Optional[str] = Field( None, description='A string identifying a user. This can either be the string "me", an email, or the gid of a user.', examples=['12345'], ) class TeamCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the team.', examples=['Marketing'] ) class TeamRemoveUserRequest(BaseModel): user: Optional[str] = Field( None, description='A string identifying a user. This can either be the string "me", an email, or the gid of a user.', examples=['12345'], ) class Visibility(Enum): secret = 'secret' request_to_join = 'request_to_join' public = 'public' class Period(Enum): FY = 'FY' H1 = 'H1' H2 = 'H2' Q1 = 'Q1' Q2 = 'Q2' Q3 = 'Q3' Q4 = 'Q4' class TimePeriodCompact(AsanaResource): display_name: Optional[str] = Field( None, description='A string representing the cadence code and the fiscal year.', examples=['Q1 FY22'], ) end_on: Optional[str] = Field( None, description='The localized end date of the time period in `YYYY-MM-DD` format.', examples=['2019-09-14'], ) period: Optional[Period] = Field( None, description='The cadence and index of the time period. The value is one of: `FY`, `H1`, `H2`, `Q1`, `Q2`, `Q3`, or `Q4`.', examples=['Q1'], ) start_on: Optional[str] = Field( None, description='The localized start date of the time period in `YYYY-MM-DD` format.', examples=['2019-09-13'], ) class Photo(BaseModel): image_1024x1024: Optional[AnyUrl] = None image_128x128: Optional[AnyUrl] = None image_21x21: Optional[AnyUrl] = None image_27x27: Optional[AnyUrl] = None image_36x36: Optional[AnyUrl] = None image_60x60: Optional[AnyUrl] = None class UserCompact(AsanaResource): name: Optional[str] = Field( None, description='*Read-only except when same user as requester*. The user’s name.', examples=['Greg Sanchez'], ) class WebhookFilter(BaseModel): action: Optional[str] = Field( None, description='The type of change on the **resource** to pass through the filter. For more information refer to `Event.action` in the [Event](/docs/tocS_Event) schema. This can be one of `changed`, `added`, `removed`, `deleted`, and `undeleted` depending on the nature of what has occurred on the resource.', examples=['changed'], ) fields: Optional[List[str]] = Field( None, description='*Conditional.* A whitelist of fields for events which will pass the filter when the resource is changed. These can be any combination of the fields on the resources themselves. This field is only valid for `action` of type `changed`', examples=[['due_at', 'due_on', 'dependencies']], ) resource_subtype: Optional[str] = Field( None, description='The resource subtype of the resource that the filter applies to. This should be set to the same value as is returned on the `resource_subtype` field on the resources themselves.', examples=['milestone'], ) resource_type: Optional[str] = Field( None, description='The type of the resource which created the event when modified; for example, to filter to changes on regular tasks this field should be set to `task`.', examples=['task'], ) class WebhookRequest(BaseModel): filters: Optional[List[WebhookFilter]] = Field( None, description='An array of WebhookFilter objects to specify a whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.', ) resource: str = Field( ..., description='A resource ID to subscribe to. Many Asana resources are valid to create webhooks on, but higher-level resources require filters.', examples=['12345'], ) target: AnyUrl = Field( ..., description='The URL to receive the HTTP POST. The full URL will be used to deliver events from this webhook (including parameters) which allows encoding of application-specific state when the webhook is created.', examples=[ 'https://example.com/receive-webhook/7654?app_specific_param=app_specific_value' ], ) class WebhookUpdateRequest(BaseModel): filters: Optional[List[WebhookFilter]] = Field( None, description='An array of WebhookFilter objects to specify a whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.', ) class WorkspaceAddUserRequest(BaseModel): user: Optional[str] = Field( None, description='A string identifying a user. This can either be the string "me", an email, or the gid of a user.', examples=['12345'], ) class WorkspaceCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the workspace.', examples=['My Company Workspace'], ) class WorkspaceMembershipCompact(AsanaResource): user: Optional[UserCompact] = None workspace: Optional[WorkspaceCompact] = None class VacationDates(BaseModel): end_on: Optional[str] = Field( None, description="The day on which the user's vacation in this workspace ends, or null if there is no end date. This is a date with `YYYY-MM-DD` format.", examples=['2022-11-07'], ) start_on: Optional[str] = Field( None, description="The day on which the user's vacation in this workspace starts. This is a date with `YYYY-MM-DD` format.", examples=['2022-11-05'], ) class WorkspaceRemoveUserRequest(BaseModel): user: Optional[str] = Field( None, description='A string identifying a user. This can either be the string "me", an email, or the gid of a user.', examples=['12345'], ) class AttachmentsGetResponse(BaseModel): data: Optional[List[AttachmentCompact]] = None class OptFields(RootModel[List[str]]): root: List[str] class AttachmentsAttachmentGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class BatchPostResponse(BaseModel): data: Optional[List[BatchResponse]] = None class CustomFieldsCustomFieldGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class CustomFieldsCustomFieldGidEnumOptionsPostRequest(BaseModel): data: Optional[EnumOptionRequest] = None class CustomFieldsCustomFieldGidEnumOptionsPostResponse(BaseModel): data: Optional[EnumOption] = None class CustomFieldsCustomFieldGidEnumOptionsInsertPostRequest(BaseModel): data: Optional[EnumOptionInsertRequest] = None class CustomFieldsCustomFieldGidEnumOptionsInsertPostResponse(BaseModel): data: Optional[EnumOption] = None class EnumOptionsEnumOptionGidPutRequest(BaseModel): data: Optional[EnumOptionRequest] = None class EnumOptionsEnumOptionGidPutResponse(BaseModel): data: Optional[EnumOption] = None class TimePeriods(RootModel[List[str]]): root: List[str] class GoalsPostRequest(BaseModel): data: Optional[GoalRequest] = None class GoalsGoalGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class GoalsGoalGidPutRequest(BaseModel): data: Optional[GoalRequest] = None class GoalsGoalGidAddFollowersPostRequest(BaseModel): data: Optional[TaskAddFollowersRequest] = None class GoalsGoalGidAddSupportingRelationshipPostRequest(BaseModel): data: Optional[GoalAddSupportingRelationshipRequest] = None class GoalsGoalGidRemoveFollowersPostRequest(BaseModel): data: Optional[TaskAddFollowersRequest] = None class GoalsGoalGidRemoveSupportingRelationshipPostRequest(BaseModel): data: Optional[GoalRemoveSupportingRelationshipRequest] = None class GoalsGoalGidRemoveSupportingRelationshipPostResponse(BaseModel): data: Optional[EmptyResponse] = None class GoalsGoalGidSetMetricPostRequest(BaseModel): data: Optional[GoalMetricRequest] = None class GoalsGoalGidSetMetricCurrentValuePostRequest(BaseModel): data: Optional[GoalMetricCurrentValueRequest] = None class OrganizationExportsPostRequest(BaseModel): data: Optional[OrganizationExportRequest] = None class PortfoliosGetResponse(BaseModel): data: Optional[List[PortfolioCompact]] = None class PortfoliosPortfolioGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class PortfoliosPortfolioGidAddCustomFieldSettingPostRequest(BaseModel): data: Optional[AddCustomFieldSettingRequest] = None class PortfoliosPortfolioGidAddItemPostRequest(BaseModel): data: Optional[PortfolioAddItemRequest] = None class PortfoliosPortfolioGidAddItemPostResponse(BaseModel): data: Optional[EmptyResponse] = None class PortfoliosPortfolioGidAddMembersPostRequest(BaseModel): data: Optional[AddMembersRequest] = None class PortfoliosPortfolioGidItemsGetResponse(BaseModel): data: Optional[List[ProjectCompact]] = None class PortfoliosPortfolioGidRemoveCustomFieldSettingPostRequest(BaseModel): data: Optional[RemoveCustomFieldSettingRequest] = None class PortfoliosPortfolioGidRemoveCustomFieldSettingPostResponse(BaseModel): data: Optional[EmptyResponse] = None class PortfoliosPortfolioGidRemoveItemPostRequest(BaseModel): data: Optional[PortfolioRemoveItemRequest] = None class PortfoliosPortfolioGidRemoveItemPostResponse(BaseModel): data: Optional[EmptyResponse] = None class PortfoliosPortfolioGidRemoveMembersPostRequest(BaseModel): data: Optional[RemoveMembersRequest] = None class ProjectBriefsProjectBriefGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class ProjectStatusesProjectStatusGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class ProjectTemplatesGetResponse(BaseModel): data: Optional[List[ProjectTemplateCompact]] = None class ProjectTemplatesProjectTemplateGidInstantiateProjectPostRequest(BaseModel): data: Optional[ProjectTemplateInstantiateProjectRequest] = None class ProjectsGetResponse(BaseModel): data: Optional[List[ProjectCompact]] = None class ProjectsProjectGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class ProjectsProjectGidAddCustomFieldSettingPostRequest(BaseModel): data: Optional[AddCustomFieldSettingRequest] = None class ProjectsProjectGidAddFollowersPostRequest(BaseModel): data: Optional[AddFollowersRequest] = None class ProjectsProjectGidAddMembersPostRequest(BaseModel): data: Optional[AddMembersRequest] = None class ProjectsProjectGidDuplicatePostRequest(BaseModel): data: Optional[ProjectDuplicateRequest] = None class ProjectsProjectGidProjectStatusesGetResponse(BaseModel): data: Optional[List[ProjectStatusCompact]] = None class ProjectsProjectGidRemoveCustomFieldSettingPostRequest(BaseModel): data: Optional[RemoveCustomFieldSettingRequest] = None class ProjectsProjectGidRemoveCustomFieldSettingPostResponse(BaseModel): data: Optional[EmptyResponse] = None class ProjectsProjectGidRemoveFollowersPostRequest(BaseModel): data: Optional[RemoveFollowersRequest] = None class ProjectsProjectGidRemoveMembersPostRequest(BaseModel): data: Optional[RemoveMembersRequest] = None class ProjectsProjectGidSaveAsTemplatePostRequest(BaseModel): data: Optional[ProjectSaveAsTemplateRequest] = None class ProjectsProjectGidSectionsGetResponse(BaseModel): data: Optional[List[SectionCompact]] = None class ProjectsProjectGidSectionsPostRequest(BaseModel): data: Optional[SectionRequest] = None class ProjectsProjectGidSectionsInsertPostRequest(BaseModel): data: Optional[ProjectSectionInsertRequest] = None class ProjectsProjectGidSectionsInsertPostResponse(BaseModel): data: Optional[EmptyResponse] = None class ProjectsProjectGidTaskCountsGetResponse(BaseModel): data: Optional[TaskCountResponse] = None class ProjectsProjectGidTasksGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class SectionsSectionGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class SectionsSectionGidPutRequest(BaseModel): data: Optional[SectionRequest] = None class SectionsSectionGidAddTaskPostRequest(BaseModel): data: Optional[SectionTaskInsertRequest] = None class SectionsSectionGidAddTaskPostResponse(BaseModel): data: Optional[EmptyResponse] = None class SectionsSectionGidTasksGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class StatusUpdatesGetResponse(BaseModel): data: Optional[List[StatusUpdateCompact]] = None class StatusUpdatesStatusGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class StoriesStoryGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class StoriesStoryGidPutRequest(BaseModel): data: Optional[StoryRequest] = None class TagsGetResponse(BaseModel): data: Optional[List[TagCompact]] = None class TagsTagGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class TagsTagGidTasksGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class TasksGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class TasksTaskGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidAddDependenciesPostRequest(BaseModel): data: Optional[ModifyDependenciesRequest] = None class TasksTaskGidAddDependenciesPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidAddDependentsPostRequest(BaseModel): data: Optional[ModifyDependentsRequest] = None class TasksTaskGidAddDependentsPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidAddFollowersPostRequest(BaseModel): data: Optional[TaskAddFollowersRequest] = None class TasksTaskGidAddProjectPostRequest(BaseModel): data: Optional[TaskAddProjectRequest] = None class TasksTaskGidAddProjectPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidAddTagPostRequest(BaseModel): data: Optional[TaskAddTagRequest] = None class TasksTaskGidAddTagPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidDependenciesGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class TasksTaskGidDependentsGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class TasksTaskGidDuplicatePostRequest(BaseModel): data: Optional[TaskDuplicateRequest] = None class TasksTaskGidProjectsGetResponse(BaseModel): data: Optional[List[ProjectCompact]] = None class TasksTaskGidRemoveDependenciesPostRequest(BaseModel): data: Optional[ModifyDependenciesRequest] = None class TasksTaskGidRemoveDependenciesPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidRemoveDependentsPostRequest(BaseModel): data: Optional[ModifyDependentsRequest] = None class TasksTaskGidRemoveDependentsPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidRemoveFollowersPostRequest(BaseModel): data: Optional[TaskRemoveFollowersRequest] = None class TasksTaskGidRemoveProjectPostRequest(BaseModel): data: Optional[TaskRemoveProjectRequest] = None class TasksTaskGidRemoveProjectPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidRemoveTagPostRequest(BaseModel): data: Optional[TaskRemoveTagRequest] = None class TasksTaskGidRemoveTagPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TasksTaskGidSetParentPostRequest(BaseModel): data: Optional[TaskSetParentRequest] = None class TasksTaskGidStoriesPostRequest(BaseModel): data: Optional[StoryRequest] = None class TasksTaskGidSubtasksGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class TasksTaskGidTagsGetResponse(BaseModel): data: Optional[List[TagCompact]] = None class TeamsTeamGidAddUserPostRequest(BaseModel): data: Optional[TeamAddUserRequest] = None class TeamsTeamGidProjectTemplatesGetResponse(BaseModel): data: Optional[List[ProjectTemplateCompact]] = None class TeamsTeamGidProjectsGetResponse(BaseModel): data: Optional[List[ProjectCompact]] = None class TeamsTeamGidRemoveUserPostRequest(BaseModel): data: Optional[TeamRemoveUserRequest] = None class TeamsTeamGidRemoveUserPostResponse(BaseModel): data: Optional[EmptyResponse] = None class TeamsTeamGidUsersGetResponse(BaseModel): data: Optional[List[UserCompact]] = None class TimePeriodsGetResponse(BaseModel): data: Optional[List[TimePeriodCompact]] = None class UserTaskListsUserTaskListGidTasksGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class UsersGetResponse(BaseModel): data: Optional[List[UserCompact]] = None class ResourceType(Enum): portfolio = 'portfolio' project = 'project' tag = 'tag' task = 'task' user = 'user' project_template = 'project_template' class UsersUserGidTeamsGetResponse(BaseModel): data: Optional[List[TeamCompact]] = None class UsersUserGidWorkspaceMembershipsGetResponse(BaseModel): data: Optional[List[WorkspaceMembershipCompact]] = None class WebhooksPostRequest(BaseModel): data: Optional[WebhookRequest] = None class WebhooksWebhookGidDeleteResponse(BaseModel): data: Optional[EmptyResponse] = None class WebhooksWebhookGidPutRequest(BaseModel): data: Optional[WebhookUpdateRequest] = None class WorkspacesGetResponse(BaseModel): data: Optional[List[WorkspaceCompact]] = None class WorkspacesWorkspaceGidAddUserPostRequest(BaseModel): data: Optional[WorkspaceAddUserRequest] = None class WorkspacesWorkspaceGidProjectsGetResponse(BaseModel): data: Optional[List[ProjectCompact]] = None class WorkspacesWorkspaceGidRemoveUserPostRequest(BaseModel): data: Optional[WorkspaceRemoveUserRequest] = None class WorkspacesWorkspaceGidRemoveUserPostResponse(BaseModel): data: Optional[EmptyResponse] = None class WorkspacesWorkspaceGidTagsGetResponse(BaseModel): data: Optional[List[TagCompact]] = None class ResourceSubtype6(Enum): default_task = 'default_task' milestone = 'milestone' class SortBy(Enum): due_date = 'due_date' created_at = 'created_at' completed_at = 'completed_at' likes = 'likes' modified_at = 'modified_at' class WorkspacesWorkspaceGidTasksSearchGetResponse(BaseModel): data: Optional[List[TaskCompact]] = None class WorkspacesWorkspaceGidTeamsGetResponse(BaseModel): data: Optional[List[TeamCompact]] = None class ResourceType2(Enum): custom_field = 'custom_field' project = 'project' project_template = 'project_template' portfolio = 'portfolio' tag = 'tag' task = 'task' user = 'user' class Type2(Enum): custom_field = 'custom_field' portfolio = 'portfolio' project = 'project' tag = 'tag' task = 'task' user = 'user' class WorkspacesWorkspaceGidUsersGetResponse(BaseModel): data: Optional[List[UserCompact]] = None class WorkspacesWorkspaceGidWorkspaceMembershipsGetResponse(BaseModel): data: Optional[List[WorkspaceMembershipCompact]] = None class AsanaNamedResource(AsanaResource): name: Optional[str] = Field( None, description='The name of the object.', examples=['Bug Task'] ) class AttachmentBase(RootModel[AttachmentCompact]): root: AttachmentCompact class Parent(TaskCompact): resource_subtype: Optional[str] = Field( None, description='The resource subtype of the parent resource that the filter applies to.', examples=['default_task'], ) class AttachmentResponse(BaseModel): connected_to_app: Optional[bool] = Field( None, description='Whether the attachment is connected to the app making the request for the purposes of showing an app components widget. Only present when the `resource_subtype` is `external` or `gdrive`.', ) created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) download_url: Optional[AnyUrl] = Field( None, description='The URL containing the content of the attachment.\n*Note:* May be null if the attachment is hosted by [Box](https://www.box.com/) and will be null if the attachment is a Video Message hosted by [Vimeo](https://vimeo.com/). If present, this URL may only be valid for two minutes from the time of retrieval. You should avoid persisting this URL somewhere and just refresh it on demand to ensure you do not keep stale URLs.', examples=['https://s3.amazonaws.com/assets/123/Screenshot.png'], ) host: Optional[str] = Field( None, description='The service hosting the attachment. Valid values are `asana`, `dropbox`, `gdrive`, `box`, and `vimeo`.', examples=['dropbox'], ) parent: Optional[Parent] = None permanent_url: Optional[AnyUrl] = Field( None, description='', examples=['https://s3.amazonaws.com/assets/123/Screenshot.png'], ) size: Optional[int] = Field( None, description='The size of the attachment in bytes. Only present when the `resource_subtype` is `asana`.', examples=[12345], ) view_url: Optional[AnyUrl] = Field( None, description='The URL where the attachment can be viewed, which may be friendlier to users in a browser than just directing them to a raw file. May be null if no view URL exists for the service.', examples=['https://www.dropbox.com/s/123/Screenshot.png'], ) class AuditLogEvent(BaseModel): actor: Optional[AuditLogEventActor] = None context: Optional[AuditLogEventContext] = None created_at: Optional[datetime] = Field( None, description='The time the event was created.', examples=['2021-01-01T00:00:00.000Z'], ) details: Optional[AuditLogEventDetails] = None event_category: Optional[str] = Field( None, description='The category that this `event_type` belongs to.', examples=['deletion'], ) event_type: Optional[str] = Field( None, description='The type of the event.', examples=['task_deleted'] ) gid: Optional[str] = Field( None, description='Globally unique identifier of the `AuditLogEvent`, as a string.', examples=['12345'], ) resource: Optional[AuditLogEventResource] = None class BatchRequest(BaseModel): actions: Optional[List[BatchRequestAction]] = None class CustomFieldCompact(AsanaResource): date_value: Optional[DateValue] = Field( None, description='*Conditional*. Only relevant for custom fields of type `date`. This object reflects the chosen date (and optionally, time) value of a `date` custom field. If no date is selected, the value of `date_value` will be `null`.', ) display_value: Optional[str] = Field( None, description="A string representation for the value of the custom field. Integrations that don't require the underlying type should use this field to read values. Using this field will future-proof an app against new custom field types.", examples=['blue'], ) enabled: Optional[bool] = Field( None, description='*Conditional*. Determines if the custom field is enabled or not.', examples=[True], ) enum_options: Optional[List[EnumOption]] = Field( None, description='*Conditional*. Only relevant for custom fields of type `enum`. This array specifies the possible values which an `enum` custom field can adopt. To modify the enum options, refer to [working with enum options](/docs/create-an-enum-option).', ) enum_value: Optional[EnumOption] = None multi_enum_values: Optional[List[EnumOption]] = Field( None, description='*Conditional*. Only relevant for custom fields of type `multi_enum`. This object is the chosen values of a `multi_enum` custom field.', ) name: Optional[str] = Field( None, description='The name of the custom field.', examples=['Status'] ) number_value: Optional[float] = Field( None, description='*Conditional*. This number is the value of a `number` custom field.', examples=[5.2], ) resource_subtype: Optional[ResourceSubtype1] = Field( None, description='The type of the custom field. Must be one of the given values.\n', examples=['text'], ) text_value: Optional[str] = Field( None, description='*Conditional*. This string is the value of a `text` custom field.', examples=['Some Value'], ) type: Optional[Type] = Field( None, description='*Deprecated: new integrations should prefer the resource_subtype field.* The type of the custom field. Must be one of the given values.\n', ) class CustomFieldSettingBase(RootModel[CustomFieldSettingCompact]): root: CustomFieldSettingCompact class EventResponse(BaseModel): action: Optional[str] = Field( None, description='The type of action taken on the **resource** that triggered the event. This can be one of `changed`, `added`, `removed`, `deleted`, or `undeleted` depending on the nature of the event.', examples=['changed'], ) change: Optional[Change] = Field( None, description='Information about the type of change that has occurred. This field is only present when the value of the property `action`, describing the action taken on the **resource**, is `changed`.', ) created_at: Optional[datetime] = Field( None, description='The timestamp when the event occurred.', examples=['2012-02-22T02:06:58.147Z'], ) parent: Optional[AsanaNamedResource] = None resource: Optional[AsanaNamedResource] = None type: Optional[str] = Field( None, description='*Deprecated: Refer to the resource_type of the resource.* The type of the resource that generated the event.', examples=['task'], ) user: Optional[UserCompact] = None class GoalCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the goal.', examples=['Grow web traffic by 30%'] ) owner: Optional[UserCompact] = None class GoalMembershipCompact(AsanaResource): is_commenter: Optional[bool] = Field( None, description='Describes if the user is comment only in goal.', examples=[False], ) is_editor: Optional[bool] = Field( None, description='Describes if the user is editor in goal.', examples=[False] ) member: Optional[UserCompact] = None class GoalRelationshipCompact(AsanaResource): contribution_weight: Optional[float] = Field( None, description="The weight that the supporting resource's progress contributes to the supported goal's progress. This can only be 0 or 1.", examples=[1], ) resource_subtype: Optional[ResourceSubtype3] = Field( None, description='The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.', examples=['subgoal'], ) supporting_resource: Optional[ProjectCompact] = None class JobCompact(AsanaResource): new_project: Optional[ProjectCompact] = None new_project_template: Optional[ProjectTemplateCompact] = None new_task: Optional[TaskCompact] = None resource_subtype: Optional[str] = Field( None, description='The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.', examples=['duplicate_task'], ) status: Optional[Status] = Field( None, description='The current status of this job. The value is one of: `not_started`, `in_progress`, `succeeded`, or `failed`.', examples=['in_progress'], ) class Like(BaseModel): gid: Optional[str] = Field( None, description='Globally unique identifier of the object, as a string.', examples=['12345'], ) user: Optional[UserCompact] = None class OrganizationExportCompact(AsanaResource): created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) download_url: Optional[AnyUrl] = Field( None, description='Download this URL to retreive the full export of the organization\nin JSON format. It will be compressed in a gzip (.gz) container.\n\n*Note: May be null if the export is still in progress or\nfailed. If present, this URL may only be valid for 1 hour from\nthe time of retrieval. You should avoid persisting this URL\nsomewhere and rather refresh on demand to ensure you do not keep\nstale URLs.*', examples=[ 'https://asana-export.s3.amazonaws.com/export-4632784536274-20170127-43246.json.gz?AWSAccessKeyId=xxxxxxxx' ], ) organization: Optional[WorkspaceCompact] = None state: Optional[State] = Field( None, description='The current state of the export.', examples=['started'] ) class PortfolioBase(PortfolioCompact): color: Optional[Color] = Field( None, description='Color of the portfolio.', examples=['light-green'] ) class PortfolioMembershipCompact(AsanaResource): portfolio: Optional[PortfolioCompact] = Field( None, description='[Opt In](/docs/input-output-options). The portfolio the user is a member of.', ) user: Optional[UserCompact] = None class PortfolioRequest(PortfolioBase): members: Optional[List[str]] = Field( None, description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=[['52164', '15363']], ) public: Optional[bool] = Field( None, description='True if the portfolio is public to its workspace members.', examples=[False], ) workspace: Optional[str] = Field( None, description='Gid of an object.', examples=['167589'] ) class ProjectBriefBase(ProjectBriefCompact): html_text: Optional[str] = Field( None, description='HTML formatted text for the project brief.', examples=['<body>This is a <strong>project brief</strong>.</body>'], ) title: Optional[str] = Field( None, description='The title of the project brief.', examples=['Stuff to buy — Project Brief'], ) class ProjectBriefRequest(ProjectBriefBase): text: Optional[str] = Field( None, description='The plain text of the project brief. When writing to a project brief, you can specify either `html_text` (preferred) or `text`, but not both.', examples=['This is a project brief.'], ) class ProjectBriefResponse(ProjectBriefBase): permalink_url: Optional[str] = Field( None, description='A url that points directly to the object within Asana.', examples=['https://app.asana.com/0/11111111/22222222'], ) project: Optional[ProjectCompact] = None text: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The plain text of the project brief.', examples=['This is a project brief.'], ) class ProjectMembershipCompact(AsanaResource): user: Optional[UserCompact] = None class ProjectStatusBase(ProjectStatusCompact): color: Color2 = Field( ..., description='The color associated with the status update.' ) html_text: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The text content of the status update with formatting as HTML.', examples=[ '<body>The project <strong>is</strong> moving forward according to plan...</body>' ], ) text: str = Field( ..., description='The text content of the status update.', examples=['The project is moving forward according to plan...'], ) class ProjectStatusRequest(RootModel[ProjectStatusBase]): root: ProjectStatusBase class ProjectStatusResponse(ProjectStatusBase): author: Optional[UserCompact] = None created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) created_by: Optional[UserCompact] = None modified_at: Optional[datetime] = Field( None, description='The time at which this project status was last modified.\n*Note: This does not currently reflect any changes in associations such as comments that may have been added or removed from the project status.*', examples=['2012-02-22T02:06:58.147Z'], ) class ProjectTemplateBase(ProjectTemplateCompact): color: Optional[Color3] = Field( None, description='Color of the project template.', examples=['light-green'] ) description: Optional[str] = Field( None, description='Free-form textual information associated with the project template', examples=['These are things we need to pack for a trip.'], ) html_description: Optional[str] = Field( None, description='The description of the project template with formatting as HTML.', examples=['<body>These are things we need to pack for a trip.</body>'], ) owner: Optional[UserCompact] = Field( None, description='The current owner of the project template, may be null.' ) public: Optional[bool] = Field( None, description='True if the project template is public to its team.', examples=[False], ) requested_dates: Optional[List[DateVariableCompact]] = Field( None, description='Array of date variables in this project template. Calendar dates must be provided for these variables when instantiating a project.', ) team: Optional[TeamCompact] = None ProjectTemplateResponse = ProjectTemplateBase class SectionBase(RootModel[SectionCompact]): root: SectionCompact class SectionResponse(BaseModel): created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) project: Optional[ProjectCompact] = None projects: Optional[List[ProjectCompact]] = Field( None, description='*Deprecated - please use project instead*' ) class StatusUpdateBase(StatusUpdateCompact): html_text: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The text content of the status update with formatting as HTML.', examples=[ '<body>The project <strong>is</strong> moving forward according to plan...</body>' ], ) status_type: StatusType = Field( ..., description='The type associated with the status update. This represents the current state of the object this object is on.', ) text: str = Field( ..., description='The text content of the status update.', examples=['The project is moving forward according to plan...'], ) class StatusUpdateRequest(StatusUpdateBase): parent: Parent1 class StatusUpdateResponse(StatusUpdateBase): author: Optional[UserCompact] = None created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) created_by: Optional[UserCompact] = None hearted: Optional[bool] = Field( None, description='*Deprecated - please use liked instead* True if the status is hearted by the authorized user, false if not.', examples=[True], ) hearts: Optional[List[Like]] = Field( None, description='*Deprecated - please use likes instead* Array of likes for users who have hearted this status.', ) liked: Optional[bool] = Field( None, description='True if the status is liked by the authorized user, false if not.', examples=[True], ) likes: Optional[List[Like]] = Field( None, description='Array of likes for users who have liked this status.' ) modified_at: Optional[datetime] = Field( None, description='The time at which this project status was last modified.\n*Note: This does not currently reflect any changes in associations such as comments that may have been added or removed from the status.*', examples=['2012-02-22T02:06:58.147Z'], ) num_hearts: Optional[int] = Field( None, description='*Deprecated - please use likes instead* The number of users who have hearted this status.', examples=[5], ) num_likes: Optional[int] = Field( None, description='The number of users who have liked this status.', examples=[5], ) parent: Optional[ProjectCompact] = None class StoryCompact(AsanaResource): created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) created_by: Optional[UserCompact] = None resource_subtype: Optional[str] = Field( None, description='The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.', examples=['comment_added'], ) text: Optional[str] = Field( None, description='*Create-only*. Human-readable text for the story or comment.\nThis will not include the name of the creator.\n*Note: This is not guaranteed to be stable for a given type of story. For example, text for a reassignment may not always say “assigned to …” as the text for a story can both be edited and change based on the language settings of the user making the request.*\nUse the `resource_subtype` property to discover the action that created the story.', examples=['marked today'], ) class StoryResponse(StoryBase): assignee: Optional[UserCompact] = Field(None, description='*Conditional*') created_by: Optional[UserCompact] = None custom_field: Optional[CustomFieldCompact] = Field( None, description='*Conditional*' ) dependency: Optional[TaskCompact] = Field(None, description='*Conditional*') duplicate_of: Optional[TaskCompact] = Field(None, description='*Conditional*') duplicated_from: Optional[TaskCompact] = Field(None, description='*Conditional*') follower: Optional[UserCompact] = Field(None, description='*Conditional*') hearted: Optional[bool] = Field( None, description='*Deprecated - please use likes instead*\n*Conditional*. True if the story is hearted by the authorized user, false if not.', examples=[False], ) hearts: Optional[List[Like]] = Field( None, description='*Deprecated - please use likes instead*\n\n*Conditional*. Array of likes for users who have hearted this story.', ) is_editable: Optional[bool] = Field( None, description='*Conditional*. Whether the text of the story can be edited after creation.', examples=[False], ) is_edited: Optional[bool] = Field( None, description='*Conditional*. Whether the text of the story has been edited after creation.', examples=[False], ) liked: Optional[bool] = Field( None, description='*Conditional*. True if the story is liked by the authorized user, false if not.', examples=[False], ) likes: Optional[List[Like]] = Field( None, description='*Conditional*. Array of likes for users who have liked this story.', ) new_approval_status: Optional[str] = Field( None, description='*Conditional*. The new value of approval status.', examples=['approved'], ) new_date_value: Optional[StoryResponseDates] = None new_dates: Optional[StoryResponseDates] = None new_enum_value: Optional[EnumOption] = Field(None, description='*Conditional*') new_multi_enum_values: Optional[List[EnumOption]] = Field( None, description='*Conditional*. The new value of a multi-enum custom field story.', ) new_name: Optional[str] = Field( None, description='*Conditional*', examples=['This is the New Name'] ) new_number_value: Optional[int] = Field( None, description='*Conditional*', examples=[2] ) new_people_value: Optional[List[UserCompact]] = Field( None, description='*Conditional*. The new value of a people custom field story.' ) new_resource_subtype: Optional[str] = Field( None, description='*Conditional*', examples=['milestone'] ) new_section: Optional[SectionCompact] = Field(None, description='*Conditional*') new_text_value: Optional[str] = Field( None, description='*Conditional*', examples=['This is the New Text'] ) num_hearts: Optional[int] = Field( None, description='*Deprecated - please use likes instead*\n\n*Conditional*. The number of users who have hearted this story.', examples=[5], ) num_likes: Optional[int] = Field( None, description='*Conditional*. The number of users who have liked this story.', examples=[5], ) old_approval_status: Optional[str] = Field( None, description='*Conditional*. The old value of approval status.', examples=['pending'], ) old_date_value: Optional[StoryResponseDates] = None old_dates: Optional[StoryResponseDates] = None old_enum_value: Optional[EnumOption] = Field(None, description='*Conditional*') old_multi_enum_values: Optional[List[EnumOption]] = Field( None, description='*Conditional*. The old value of a multi-enum custom field story.', ) old_name: Optional[str] = Field( None, description="*Conditional*'", examples=['This was the Old Name'] ) old_number_value: Optional[int] = Field( None, description='*Conditional*', examples=[1] ) old_people_value: Optional[List[UserCompact]] = Field( None, description='*Conditional*. The old value of a people custom field story.' ) old_resource_subtype: Optional[str] = Field( None, description='*Conditional*', examples=['default_task'] ) old_section: Optional[SectionCompact] = Field(None, description='*Conditional*') old_text_value: Optional[str] = Field( None, description='*Conditional*', examples=['This was the Old Text'] ) previews: Optional[List[Preview]] = Field( None, description='*Conditional*. A collection of previews to be displayed in the story.\n\n*Note: This property only exists for comment stories.*', ) project: Optional[ProjectCompact] = Field(None, description='*Conditional*') source: Optional[Source] = Field( None, description='The component of the Asana product the user used to trigger the story.', examples=['web'], ) story: Optional[StoryCompact] = Field(None, description='*Conditional*') tag: Optional[TagCompact] = Field(None, description='*Conditional*') target: Optional[TaskCompact] = None task: Optional[TaskCompact] = Field(None, description='*Conditional*') type: Optional[Type1] = Field(None, examples=['comment']) class TagBase(TagCompact): color: Optional[Color3] = Field( None, description='Color of the tag.', examples=['light-green'] ) notes: Optional[str] = Field( None, description='Free-form textual information associated with the tag (i.e. its description).', examples=['Mittens really likes the stuff from Humboldt.'], ) class TagRequest(TagBase): followers: Optional[List[str]] = Field( None, description='An array of strings identifying users. These can either be the string "me", an email, or the gid of a user.', examples=[['12345', '42563']], ) workspace: Optional[str] = Field( None, description='Gid of an object.', examples=['12345'] ) class TagResponse(TagBase): created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) followers: Optional[List[UserCompact]] = Field( None, description='Array of users following this tag.' ) permalink_url: Optional[str] = Field( None, description='A url that points directly to the object within Asana.', examples=['https://app.asana.com/0/resource/123456789/list'], ) workspace: Optional[WorkspaceCompact] = None class TaskBase(TaskCompact): actual_time_minutes: Optional[float] = Field( None, description='This value represents the sum of all the Time Tracking entries in the Actual Time field on a given Task. It is represented as a nullable long value.', examples=[200], ) approval_status: Optional[ApprovalStatus] = Field( None, description='*Conditional* Reflects the approval status of this task. This field is kept in sync with `completed`, meaning `pending` translates to false while `approved`, `rejected`, and `changes_requested` translate to true. If you set completed to true, this field will be set to `approved`.', examples=['pending'], ) assignee_status: Optional[AssigneeStatus] = Field( None, description='*Deprecated* Scheduling status of this task for the user it is assigned to. This field can only be set if the assignee is non-null. Setting this field to "inbox" or "upcoming" inserts it at the top of the section, while the other options will insert at the bottom.', examples=['upcoming'], ) completed: Optional[bool] = Field( None, description='True if the task is currently marked complete, false if not.', examples=[False], ) completed_at: Optional[datetime] = Field( None, description='The time at which this task was completed, or null if the task is incomplete.', examples=['2012-02-22T02:06:58.147Z'], ) completed_by: Optional[UserCompact] = None created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) dependencies: Optional[List[AsanaResource]] = Field( None, description='[Opt In](/docs/input-output-options). Array of resources referencing tasks that this task depends on. The objects contain only the gid of the dependency.', ) dependents: Optional[List[AsanaResource]] = Field( None, description='[Opt In](/docs/input-output-options). Array of resources referencing tasks that depend on this task. The objects contain only the ID of the dependent.', ) due_at: Optional[date_aliased] = Field( None, description='The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC and should not be used together with `due_on`.', examples=['2019-09-15T02:06:58.147Z'], ) due_on: Optional[date_aliased] = Field( None, description='The localized date on which this task is due, or null if the task has no due date. This takes a date with `YYYY-MM-DD` format and should not be used together with `due_at`.', examples=['2019-09-15'], ) external: Optional[External] = Field( None, description='*OAuth Required*. *Conditional*. This field is returned only if external values are set or included by using [Opt In] (/docs/input-output-options).\nThe external field allows you to store app-specific metadata on tasks, including a gid that can be used to retrieve tasks and a data blob that can store app-specific character strings. Note that you will need to authenticate with Oauth to access or modify this data. Once an external gid is set, you can use the notation `external:custom_gid` to reference your object anywhere in the API where you may use the original object gid. See the page on Custom External Data for more details.', examples=[{'data': 'A blob of information', 'gid': 'my_gid'}], ) hearted: Optional[bool] = Field( None, description='*Deprecated - please use liked instead* True if the task is hearted by the authorized user, false if not.', examples=[True], ) hearts: Optional[List[Like]] = Field( None, description='*Deprecated - please use likes instead* Array of likes for users who have hearted this task.', ) html_notes: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The notes of the text with formatting as HTML.', examples=[ '<body>Mittens <em>really</em> likes the stuff from Humboldt.</body>' ], ) is_rendered_as_separator: Optional[bool] = Field( None, description='[Opt In](/docs/input-output-options). In some contexts tasks can be rendered as a visual separator; for instance, subtasks can appear similar to [sections](/docs/asana-sections) without being true `section` objects. If a `task` object is rendered this way in any context it will have the property `is_rendered_as_separator` set to `true`.', examples=[False], ) liked: Optional[bool] = Field( None, description='True if the task is liked by the authorized user, false if not.', examples=[True], ) likes: Optional[List[Like]] = Field( None, description='Array of likes for users who have liked this task.' ) memberships: Optional[List[Membership]] = Field( None, description='*Create-only*. Array of projects this task is associated with and the section it is in. At task creation time, this array can be used to add the task to specific sections. After task creation, these associations can be modified using the `addProject` and `removeProject` endpoints. Note that over time, more types of memberships may be added to this property.', ) modified_at: Optional[datetime] = Field( None, description='The time at which this task was last modified.\n\n*Note: This does not currently reflect any changes in\nassociations such as projects or comments that may have been\nadded or removed from the task.*', examples=['2012-02-22T02:06:58.147Z'], ) name: Optional[str] = Field( None, description='Name of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer.', examples=['Buy catnip'], ) notes: Optional[str] = Field( None, description='Free-form textual information associated with the task (i.e. its description).', examples=['Mittens really likes the stuff from Humboldt.'], ) num_hearts: Optional[int] = Field( None, description='*Deprecated - please use likes instead* The number of users who have hearted this task.', examples=[5], ) num_likes: Optional[int] = Field( None, description='The number of users who have liked this task.', examples=[5] ) num_subtasks: Optional[int] = Field( None, description='[Opt In](/docs/input-output-options). The number of subtasks on this task.\n', examples=[3], ) start_at: Optional[date_aliased] = Field( None, description='Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC and should not be used together with `start_on`.\n*Note: `due_at` must be present in the request when setting or unsetting the `start_at` parameter.*', examples=['2019-09-14T02:06:58.147Z'], ) start_on: Optional[date_aliased] = Field( None, description='The day on which work begins for the task , or null if the task has no start date. This takes a date with `YYYY-MM-DD` format and should not be used together with `start_at`.\n*Note: `due_on` or `due_at` must be present in the request when setting or unsetting the `start_on` parameter.*', examples=['2019-09-14'], ) class TaskRequest(TaskBase): assignee: Optional[str] = Field( None, description='Gid of a user.', examples=['12345'] ) assignee_section: Optional[str] = Field( None, description='The *assignee section* is a subdivision of a project that groups tasks together in the assignee\'s "My Tasks" list. It can either be a header above a list of tasks in a list view or a column in a board view of "My Tasks."\nThe `assignee_section` property will be returned in the response only if the request was sent by the user who is the assignee of the task. Note that you can only write to `assignee_section` with the gid of an existing section visible in the user\'s "My Tasks" list.', examples=['12345'], ) custom_fields: Optional[Dict[str, str]] = Field( None, description='An object where each key is a Custom Field GID and each value is an enum GID, string, number, object, or array.', examples=[{'4578152156': 'Not Started', '5678904321': 'On Hold'}], ) followers: Optional[List[str]] = Field( None, description='*Create-Only* An array of strings identifying users. These can either be the string "me", an email, or the gid of a user. In order to change followers on an existing task use `addFollowers` and `removeFollowers`.', examples=[['12345']], ) parent: Optional[str] = Field( None, description='Gid of a task.', examples=['12345'] ) projects: Optional[List[str]] = Field( None, description='*Create-Only* Array of project gids. In order to change projects on an existing task use `addProject` and `removeProject`.', examples=[['12345']], ) tags: Optional[List[str]] = Field( None, description='*Create-Only* Array of tag gids. In order to change tags on an existing task use `addTag` and `removeTag`.', examples=[['12345']], ) workspace: Optional[str] = Field( None, description='Gid of a workspace.', examples=['12345'] ) class TeamBase(RootModel[TeamCompact]): root: TeamCompact class TeamMembershipCompact(AsanaResource): is_guest: Optional[bool] = Field( None, description='Describes if the user is a guest in the team.', examples=[False], ) team: Optional[TeamCompact] = None user: Optional[UserCompact] = None class TeamRequest(BaseModel): description: Optional[str] = Field( None, description='The description of the team.\n', examples=['All developers should be members of this team.'], ) html_description: Optional[str] = Field( None, description='The description of the team with formatting as HTML.\n', examples=[ '<body><em>All</em> developers should be members of this team.</body>' ], ) organization: Optional[str] = Field( None, description='The organization/workspace the team belongs to. This must be the same organization you are in and cannot be changed once set.\n', examples=['123456789'], ) visibility: Optional[Visibility] = Field( None, description='The visibility of the team to users in the same organization\n', ) class TeamResponse(BaseModel): description: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The description of the team.\n', examples=['All developers should be members of this team.'], ) html_description: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The description of the team with formatting as HTML.\n', examples=[ '<body><em>All</em> developers should be members of this team.</body>' ], ) organization: Optional[WorkspaceCompact] = None permalink_url: Optional[str] = Field( None, description='A url that points directly to the object within Asana.', examples=['https://app.asana.com/0/resource/123456789/list'], ) visibility: Optional[Visibility] = Field( None, description='The visibility of the team to users in the same organization\n', ) class TimePeriodBase(TimePeriodCompact): parent: Optional[TimePeriodCompact] = None TimePeriodResponse = TimePeriodBase class UserBase(RootModel[UserCompact]): root: UserCompact class UserBaseResponse(BaseModel): email: Optional[EmailStr] = Field( None, description="The user's email address.", examples=['gsanchez@example.com'] ) photo: Optional[Photo] = Field( None, description='A map of the user’s profile photo in various sizes, or null if no photo is set. Sizes provided are 21, 27, 36, 60, 128, and 1024. All images are in PNG format, except for 1024 (which is in JPEG format).', examples=[ { 'image_1024x1024': 'https://...', 'image_128x128': 'https://...', 'image_21x21': 'https://...', 'image_27x27': 'https://...', 'image_36x36': 'https://...', 'image_60x60': 'https://...', } ], ) class UserRequest(RootModel[UserBase]): root: UserBase class UserResponse(UserBaseResponse): workspaces: Optional[List[WorkspaceCompact]] = Field( None, description='Workspaces and organizations this user may access.\nNote\\: The API will only return workspaces and organizations that also contain the authenticated user.', ) class UserTaskListCompact(AsanaResource): name: Optional[str] = Field( None, description='The name of the user task list.', examples=['My Tasks in My Workspace'], ) owner: Optional[UserCompact] = Field( None, description='The owner of the user task list, i.e. the person whose My Tasks is represented by this resource.', ) workspace: Optional[WorkspaceCompact] = Field( None, description='The workspace in which the user task list is located.' ) class WebhookCompact(AsanaResource): active: Optional[bool] = Field( None, description='If true, the webhook will send events - if false it is considered inactive and will not generate events.', examples=[False], ) resource: Optional[AsanaNamedResource] = None target: Optional[AnyUrl] = Field( None, description='The URL to receive the HTTP POST.', examples=['https://example.com/receive-webhook/7654'], ) class WebhookResponse(WebhookCompact): created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) filters: Optional[List[WebhookFilter]] = Field( None, description='Whitelist of filters to apply to events from this webhook. If a webhook event passes any of the filters the event will be delivered; otherwise no event will be sent to the receiving server.', ) last_failure_at: Optional[datetime] = Field( None, description='The timestamp when the webhook last received an error when sending an event to the target.', examples=['2012-02-22T02:06:58.147Z'], ) last_failure_content: Optional[str] = Field( None, description='The contents of the last error response sent to the webhook when attempting to deliver events to the target.', examples=['500 Server Error\\n\\nCould not complete the request'], ) last_success_at: Optional[datetime] = Field( None, description='The timestamp when the webhook last successfully sent an event to the target.', examples=['2012-02-22T02:06:58.147Z'], ) class WorkspaceBase(RootModel[WorkspaceCompact]): root: WorkspaceCompact class WorkspaceMembershipBase(RootModel[WorkspaceMembershipCompact]): root: WorkspaceMembershipCompact class WorkspaceMembershipRequest(RootModel[WorkspaceMembershipBase]): root: WorkspaceMembershipBase class WorkspaceRequest(RootModel[WorkspaceBase]): root: WorkspaceBase class WorkspaceResponse(BaseModel): email_domains: Optional[List[AnyUrl]] = Field( None, description='The email domains that are associated with this workspace.', examples=[['asana.com']], ) is_organization: Optional[bool] = Field( None, description='Whether the workspace is an *organization*.', examples=[False], ) class AttachmentsPostResponse(BaseModel): data: Optional[AttachmentResponse] = None class AttachmentsAttachmentGidGetResponse(BaseModel): data: Optional[AttachmentResponse] = None class BatchPostRequest(BaseModel): data: Optional[BatchRequest] = None class EventsGetResponse(BaseModel): data: Optional[List[EventResponse]] = None has_more: Optional[bool] = Field( None, description='Indicates whether there are more events to pull.', examples=[True], ) sync: Optional[str] = Field( None, description='A sync token to be used with the next call to the /events endpoint.', examples=['de4774f6915eae04714ca93bb2f5ee81'], ) class GoalRelationshipsGetResponse(BaseModel): data: Optional[List[GoalRelationshipCompact]] = None class GoalsGetResponse(BaseModel): data: Optional[List[GoalCompact]] = None class GoalsGoalGidParentGoalsGetResponse(BaseModel): data: Optional[List[GoalCompact]] = None class PortfolioMembershipsGetResponse(BaseModel): data: Optional[List[PortfolioMembershipCompact]] = None class PortfoliosPostRequest(BaseModel): data: Optional[PortfolioRequest] = None class PortfoliosPortfolioGidPutRequest(BaseModel): data: Optional[PortfolioRequest] = None class PortfoliosPortfolioGidPortfolioMembershipsGetResponse(BaseModel): data: Optional[List[PortfolioMembershipCompact]] = None class ProjectBriefsProjectBriefGidGetResponse(BaseModel): data: Optional[ProjectBriefResponse] = None class ProjectBriefsProjectBriefGidPutRequest(BaseModel): data: Optional[ProjectBriefRequest] = None class ProjectBriefsProjectBriefGidPutResponse(BaseModel): data: Optional[ProjectBriefResponse] = None class ProjectStatusesProjectStatusGidGetResponse(BaseModel): data: Optional[ProjectStatusResponse] = None class ProjectTemplatesProjectTemplateGidGetResponse(BaseModel): data: Optional[ProjectTemplateResponse] = None class ProjectsProjectGidProjectBriefsPostRequest(BaseModel): data: Optional[ProjectBriefRequest] = None class ProjectsProjectGidProjectBriefsPostResponse(BaseModel): data: Optional[ProjectBriefResponse] = None class ProjectsProjectGidProjectMembershipsGetResponse(BaseModel): data: Optional[List[ProjectMembershipCompact]] = None class ProjectsProjectGidProjectStatusesPostRequest(BaseModel): data: Optional[ProjectStatusRequest] = None class ProjectsProjectGidProjectStatusesPostResponse(BaseModel): data: Optional[ProjectStatusResponse] = None class ProjectsProjectGidSectionsPostResponse(BaseModel): data: Optional[SectionResponse] = None class SectionsSectionGidGetResponse(BaseModel): data: Optional[SectionResponse] = None class SectionsSectionGidPutResponse(BaseModel): data: Optional[SectionResponse] = None class StatusUpdatesPostRequest(BaseModel): data: Optional[StatusUpdateRequest] = None class StatusUpdatesPostResponse(BaseModel): data: Optional[StatusUpdateResponse] = None class StatusUpdatesStatusGidGetResponse(BaseModel): data: Optional[StatusUpdateResponse] = None class StoriesStoryGidGetResponse(BaseModel): data: Optional[StoryResponse] = None class StoriesStoryGidPutResponse(BaseModel): data: Optional[StoryResponse] = None class TagsPostRequest(BaseModel): data: Optional[TagRequest] = None class TagsPostResponse(BaseModel): data: Optional[TagResponse] = None class TagsTagGidGetResponse(BaseModel): data: Optional[TagResponse] = None class TagsTagGidPutResponse(BaseModel): data: Optional[TagResponse] = None class TasksPostRequest(BaseModel): data: Optional[TaskRequest] = None class TasksTaskGidPutRequest(BaseModel): data: Optional[TaskRequest] = None class TasksTaskGidStoriesGetResponse(BaseModel): data: Optional[List[StoryCompact]] = None class TasksTaskGidStoriesPostResponse(BaseModel): data: Optional[StoryResponse] = None class TasksTaskGidSubtasksPostRequest(BaseModel): data: Optional[TaskRequest] = None class TeamMembershipsGetResponse(BaseModel): data: Optional[List[TeamMembershipCompact]] = None class TeamsPostRequest(BaseModel): data: Optional[TeamRequest] = None class TeamsPostResponse(BaseModel): data: Optional[TeamResponse] = None class TeamsPutRequest(BaseModel): data: Optional[TeamRequest] = None class TeamsPutResponse(BaseModel): data: Optional[TeamResponse] = None class TeamsTeamGidGetResponse(BaseModel): data: Optional[TeamResponse] = None class TeamsTeamGidTeamMembershipsGetResponse(BaseModel): data: Optional[List[TeamMembershipCompact]] = None class TimePeriodsTimePeriodGidGetResponse(BaseModel): data: Optional[TimePeriodResponse] = None class UsersUserGidGetResponse(BaseModel): data: Optional[UserResponse] = None class UsersUserGidFavoritesGetResponse(BaseModel): data: Optional[List[AsanaNamedResource]] = None class UsersUserGidTeamMembershipsGetResponse(BaseModel): data: Optional[List[TeamMembershipCompact]] = None class WebhooksGetResponse(BaseModel): data: Optional[List[WebhookResponse]] = None class WebhooksPostResponse(BaseModel): data: Optional[WebhookResponse] = None class WebhooksWebhookGidGetResponse(BaseModel): data: Optional[WebhookResponse] = None class WebhooksWebhookGidPutResponse(BaseModel): data: Optional[WebhookResponse] = None class WorkspacesWorkspaceGidGetResponse(BaseModel): data: Optional[WorkspaceResponse] = None class WorkspacesWorkspaceGidPutRequest(BaseModel): data: Optional[WorkspaceRequest] = None class WorkspacesWorkspaceGidPutResponse(BaseModel): data: Optional[WorkspaceResponse] = None class WorkspacesWorkspaceGidAddUserPostResponse(BaseModel): data: Optional[UserBaseResponse] = None class WorkspacesWorkspaceGidAuditLogEventsGetResponse(BaseModel): data: Optional[List[AuditLogEvent]] = None class WorkspacesWorkspaceGidTagsPostRequest(BaseModel): data: Optional[TagResponse] = None class WorkspacesWorkspaceGidTagsPostResponse(BaseModel): data: Optional[TagResponse] = None class WorkspacesWorkspaceGidTypeaheadGetResponse(BaseModel): data: Optional[List[AsanaNamedResource]] = None class CustomFieldBase(CustomFieldCompact): asana_created_field: Optional[AsanaCreatedField] = Field( None, description='*Conditional*. A unique identifier to associate this field with the template source of truth.', examples=['priority'], ) currency_code: Optional[str] = Field( None, description='ISO 4217 currency code to format this custom field. This will be null if the `format` is not `currency`.', examples=['EUR'], ) custom_label: Optional[str] = Field( None, description='This is the string that appears next to the custom field value. This will be null if the `format` is not `custom`.', examples=['gold pieces'], ) custom_label_position: Optional[CustomLabelPosition] = Field( None, description='Only relevant for custom fields with `custom` format. This depicts where to place the custom label. This will be null if the `format` is not `custom`.', examples=['suffix'], ) description: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The description of the custom field.', examples=['Development team priority'], ) enum_options: Optional[List[EnumOption]] = Field( None, description='*Conditional*. Only relevant for custom fields of type `enum`. This array specifies the possible values which an `enum` custom field can adopt. To modify the enum options, refer to [working with enum options](/docs/create-an-enum-option).', ) format: Optional[Format] = Field( None, description='The format of this custom field.', examples=['custom'] ) has_notifications_enabled: Optional[bool] = Field( None, description='*Conditional*. This flag describes whether a follower of a task with this field should receive inbox notifications from changes to this field.', examples=[True], ) is_global_to_workspace: Optional[bool] = Field( None, description='This flag describes whether this custom field is available to every container in the workspace. Before project-specific custom fields, this field was always true.', examples=[True], ) precision: Optional[int] = Field( None, description='Only relevant for custom fields of type ‘Number’. This field dictates the number of places after the decimal to round to, i.e. 0 is integer values, 1 rounds to the nearest tenth, and so on. Must be between 0 and 6, inclusive.\nFor percentage format, this may be unintuitive, as a value of 0.25 has a precision of 0, while a value of 0.251 has a precision of 1. This is due to 0.25 being displayed as 25%.\nThe identifier format will always have a precision of 0.', examples=[2], ) class CustomFieldRequest(CustomFieldBase): people_value: Optional[List[str]] = Field( None, description='*Conditional*. Only relevant for custom fields of type `people`. This array of user GIDs reflects the users to be written to a `people` custom field. Note that *write* operations will replace existing users (if any) in the custom field with the users specified in this array.', examples=[['12345']], ) workspace: str = Field( ..., description='*Create-Only* The workspace to create a custom field in.', examples=['1331'], ) class CustomFieldResponse(CustomFieldBase): created_by: Optional[UserCompact] = None people_value: Optional[List[UserCompact]] = Field( None, description='*Conditional*. Only relevant for custom fields of type `people`. This array of [compact user](/docs/user-compact) objects reflects the values of a `people` custom field.', ) class CustomFieldSettingResponse(BaseModel): custom_field: Optional[CustomFieldResponse] = None is_important: Optional[bool] = Field( None, description='`is_important` is used in the Asana web application to determine if this custom field is displayed in the list/grid view of a project or portfolio.', examples=[False], ) parent: Optional[ProjectCompact] = None project: Optional[ProjectCompact] = None class GoalMembershipBase(RootModel[GoalMembershipCompact]): root: GoalMembershipCompact class GoalMembershipResponse(RootModel[GoalMembershipBase]): root: GoalMembershipBase class GoalRelationshipBase(GoalRelationshipCompact): supported_goal: Optional[GoalCompact] = None GoalRelationshipRequest = GoalRelationshipBase GoalRelationshipResponse = GoalRelationshipBase class GoalResponse(GoalBase): current_status_update: Optional[StatusUpdateCompact] = Field( None, description='The latest `status_update` posted to this goal.' ) followers: Optional[List[UserCompact]] = Field( None, description='Array of users who are members of this goal.' ) likes: Optional[List[Like]] = Field( None, description='Array of likes for users who have liked this goal.' ) metric: Optional[Metric] = None num_likes: Optional[int] = Field( None, description='The number of users who have liked this goal.', examples=[5] ) owner: Optional[UserCompact] = None team: Optional[TeamCompact] = Field( None, description='*Conditional*. This property is only present when the `workspace` provided is an organization.', ) time_period: Optional[TimePeriodCompact] = None workspace: Optional[WorkspaceCompact] = None class JobBase(RootModel[JobCompact]): root: JobCompact class JobResponse(RootModel[JobBase]): root: JobBase class OrganizationExportBase(RootModel[OrganizationExportCompact]): root: OrganizationExportCompact class OrganizationExportResponse(RootModel[OrganizationExportBase]): root: OrganizationExportBase class PortfolioMembershipBase(RootModel[PortfolioMembershipCompact]): root: PortfolioMembershipCompact class PortfolioMembershipResponse(RootModel[PortfolioMembershipBase]): root: PortfolioMembershipBase class PortfolioResponse(PortfolioBase): created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) created_by: Optional[UserCompact] = None current_status_update: Optional[StatusUpdateCompact] = Field( None, description='The latest `status_update` posted to this portfolio.' ) custom_field_settings: Optional[List[CustomFieldSettingResponse]] = Field( None, description='Array of custom field settings applied to the portfolio.' ) custom_fields: Optional[List[CustomFieldCompact]] = Field( None, description='Array of Custom Fields.' ) due_on: Optional[datetime] = Field( None, description='The localized day on which this portfolio is due. This takes a date with format YYYY-MM-DD.', examples=['2019-09-15'], ) members: Optional[List[UserCompact]] = None owner: Optional[UserCompact] = None permalink_url: Optional[str] = Field( None, description='A url that points directly to the object within Asana.', examples=['https://app.asana.com/0/resource/123456789/list'], ) public: Optional[bool] = Field( None, description='True if the portfolio is public to its workspace members.', examples=[False], ) start_on: Optional[date_aliased] = Field( None, description='The day on which work for this portfolio begins, or null if the portfolio has no start date. This takes a date with `YYYY-MM-DD` format. *Note: `due_on` must be present in the request when setting or unsetting the `start_on` parameter. Additionally, `start_on` and `due_on` cannot be the same date.*', examples=['2019-09-14'], ) workspace: Optional[WorkspaceCompact] = None class ProjectBase(ProjectCompact): archived: Optional[bool] = Field( None, description='True if the project is archived, false if not. Archived projects do not show in the UI by default and may be treated differently for queries.', examples=[False], ) color: Optional[Color] = Field( None, description='Color of the project.', examples=['light-green'] ) created_at: Optional[datetime] = Field( None, description='The time at which this resource was created.', examples=['2012-02-22T02:06:58.147Z'], ) current_status: Optional[ProjectStatusResponse] = Field( None, description='*Deprecated: new integrations should prefer the `current_status_update` resource.*', ) current_status_update: Optional[StatusUpdateCompact] = Field( None, description='The latest `status_update` posted to this project.' ) custom_field_settings: Optional[List[CustomFieldSettingResponse]] = Field( None, description='Array of Custom Field Settings (in compact form).' ) default_view: Optional[DefaultView] = Field( None, description='The default view (list, board, calendar, or timeline) of a project.', examples=['calendar'], ) due_date: Optional[datetime] = Field( None, description='*Deprecated: new integrations should prefer the `due_on` field.*', examples=['2019-09-15'], ) due_on: Optional[datetime] = Field( None, description='The day on which this project is due. This takes a date with format YYYY-MM-DD.', examples=['2019-09-15'], ) html_notes: Optional[str] = Field( None, description='[Opt In](/docs/input-output-options). The notes of the project with formatting as HTML.', examples=['<body>These are things we need to purchase.</body>'], ) is_template: Optional[bool] = Field( None, description='[Opt In](/docs/input-output-options). *Deprecated - please use a project template endpoint instead (more in [this forum post](https://forum.asana.com/t/a-new-api-for-project-templates/156432)).* Determines if the project is a template.', examples=[False], ) members: Optional[List[UserCompact]] = Field( None, description='Array of users who are members of this project.' ) modified_at: Optional[datetime] = Field( None, description='The time at which this project was last modified.\n*Note: This does not currently reflect any changes in associations such as tasks or comments that may have been added or removed from the project.*', examples=['2012-02-22T02:06:58.147Z'], ) notes: Optional[str] = Field( None, description='Free-form textual information associated with the project (ie., its description).', examples=['These are things we need to purchase.'], ) public: Optional[bool] = Field( None, description='True if the project is public to its team.', examples=[False] ) start_on: Optional[date_aliased] = Field( None, description='The day on which work for this project begins, or null if the project has no start date. This takes a date with `YYYY-MM-DD` format. *Note: `due_on` or `due_at` must be present in the request when setting or unsetting the `start_on` parameter. Additionally, `start_on` and `due_on` cannot be the same date.*', examples=['2019-09-14'], ) workspace: Optional[WorkspaceCompact] = None class ProjectMembershipBase(RootModel[ProjectMembershipCompact]): root: ProjectMembershipCompact class ProjectMembershipResponse(BaseModel): project: Optional[ProjectCompact] = Field( None, description='[Opt In](/docs/input-output-options). The project the user is a member of.', ) write_access: Optional[WriteAccess] = Field( None, description='Whether the user has full access to the project or has comment-only access.', examples=['full_write'], ) class ProjectRequest(ProjectBase): custom_fields: Optional[Dict[str, str]] = Field( None, description='An object where each key is a Custom Field GID and each value is an enum GID, string, number, or object.', examples=[{'4578152156': 'Not Started', '5678904321': 'On Hold'}], ) followers: Optional[str] = Field( None, description='*Create-only*. Comma separated string of users. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project.', examples=['12345,23456'], ) owner: Optional[str] = Field( None, description='The current owner of the project, may be null.', examples=['12345'], ) team: Optional[str] = Field( None, description='The team that this project is shared with.', examples=['12345'], ) class ProjectResponse(ProjectBase): completed: Optional[bool] = Field( None, description='True if the project is currently marked complete, false if not.', examples=[False], ) completed_at: Optional[datetime] = Field( None, description='The time at which this project was completed, or null if the project is not completed.', examples=['2012-02-22T02:06:58.147Z'], ) completed_by: Optional[UserCompact] = Field( None, description='The user that marked this project complete, or null if the project is not completed.', ) created_from_template: Optional[ProjectTemplateCompact] = None custom_fields: Optional[List[CustomFieldCompact]] = Field( None, description='Array of Custom Fields.' ) followers: Optional[List[UserCompact]] = Field( None, description='Array of users following this project. Followers are a subset of members who have opted in to receive "tasks added" notifications for a project.', ) icon: Optional[Icon] = Field( None, description='The icon for a project.', examples=['chat_bubbles'] ) owner: Optional[UserCompact] = Field( None, description='The current owner of the project, may be null.' ) permalink_url: Optional[str] = Field( None, description='A url that points directly to the object within Asana.', examples=['https://app.asana.com/0/resource/123456789/list'], ) project_brief: Optional[ProjectBriefCompact] = None team: Optional[TeamCompact] = None class TaskResponse(TaskBase): assignee: Optional[UserCompact] = None assignee_section: Optional[SectionCompact] = None custom_fields: Optional[List[CustomFieldResponse]] = Field( None, description='Array of custom field values applied to the task. These represent the custom field values recorded on this project for a particular custom field. For example, these custom field values will contain an `enum_value` property for custom fields of type `enum`, a `text_value` property for custom fields of type `text`, and so on. Please note that the `gid` returned on each custom field value *is identical* to the `gid` of the custom field, which allows referencing the custom field metadata through the `/custom_fields/custom_field-gid` endpoint.', ) followers: Optional[List[UserCompact]] = Field( None, description='Array of users following this task.' ) parent: Optional[TaskCompact] = None permalink_url: Optional[str] = Field( None, description='A url that points directly to the object within Asana.', examples=['https://app.asana.com/0/resource/123456789/list'], ) projects: Optional[List[ProjectCompact]] = Field( None, description='*Create-only.* Array of projects this task is associated with. At task creation time, this array can be used to add the task to many projects at once. After task creation, these associations can be modified using the addProject and removeProject endpoints.', ) tags: Optional[List[TagCompact]] = Field( None, description='Array of tags associated with this task. In order to change tags on an existing task use `addTag` and `removeTag`.', examples=[[{'gid': '59746', 'name': 'Grade A'}]], ) workspace: Optional[WorkspaceCompact] = None class TeamMembershipBase(RootModel[TeamMembershipCompact]): root: TeamMembershipCompact class TeamMembershipResponse(RootModel[TeamMembershipBase]): root: TeamMembershipBase class UserTaskListBase(RootModel[UserTaskListCompact]): root: UserTaskListCompact class UserTaskListRequest(RootModel[UserTaskListBase]): root: UserTaskListBase class UserTaskListResponse(RootModel[UserTaskListBase]): root: UserTaskListBase class WorkspaceMembershipResponse(BaseModel): is_active: Optional[bool] = Field( None, description='Reflects if this user still a member of the workspace.' ) is_admin: Optional[bool] = Field( None, description='Reflects if this user is an admin of the workspace.' ) is_guest: Optional[bool] = Field( None, description='Reflects if this user is a guest of the workspace.' ) user_task_list: Optional[UserTaskListResponse] = Field( None, description='The user\'s "My Tasks" in the workspace.' ) vacation_dates: Optional[VacationDates] = Field( None, description='Contains keys `start_on` and `end_on` for the vacation dates for the user in this workspace. If `start_on` is null, the entire `vacation_dates` object will be null. If `end_on` is before today, the entire `vacation_dates` object will be null.', ) class CustomFieldsPostRequest(BaseModel): data: Optional[CustomFieldRequest] = None class CustomFieldsPostResponse(BaseModel): data: Optional[CustomFieldResponse] = None class CustomFieldsCustomFieldGidGetResponse(BaseModel): data: Optional[CustomFieldResponse] = None class CustomFieldsCustomFieldGidPutRequest(BaseModel): data: Optional[CustomFieldRequest] = None class CustomFieldsCustomFieldGidPutResponse(BaseModel): data: Optional[CustomFieldResponse] = None class GoalRelationshipsGoalRelationshipGidGetResponse(BaseModel): data: Optional[GoalRelationshipResponse] = None class GoalRelationshipsGoalRelationshipGidPutRequest(BaseModel): data: Optional[GoalRelationshipRequest] = None class GoalRelationshipsGoalRelationshipGidPutResponse(BaseModel): data: Optional[GoalRelationshipResponse] = None class GoalsPostResponse(BaseModel): data: Optional[GoalResponse] = None class GoalsGoalGidGetResponse(BaseModel): data: Optional[GoalResponse] = None class GoalsGoalGidPutResponse(BaseModel): data: Optional[GoalResponse] = None class GoalsGoalGidAddFollowersPostResponse(BaseModel): data: Optional[GoalResponse] = None class GoalsGoalGidAddSupportingRelationshipPostResponse(BaseModel): data: Optional[GoalRelationshipResponse] = None class GoalsGoalGidRemoveFollowersPostResponse(BaseModel): data: Optional[GoalResponse] = None class GoalsGoalGidSetMetricPostResponse(BaseModel): data: Optional[GoalResponse] = None class GoalsGoalGidSetMetricCurrentValuePostResponse(BaseModel): data: Optional[GoalResponse] = None class JobsJobGidGetResponse(BaseModel): data: Optional[JobResponse] = None class OrganizationExportsPostResponse(BaseModel): data: Optional[OrganizationExportResponse] = None class OrganizationExportsOrganizationExportGidGetResponse(BaseModel): data: Optional[OrganizationExportResponse] = None class PortfolioMembershipsPortfolioMembershipGidGetResponse(BaseModel): data: Optional[PortfolioMembershipResponse] = None class PortfoliosPostResponse(BaseModel): data: Optional[PortfolioResponse] = None class PortfoliosPortfolioGidGetResponse(BaseModel): data: Optional[PortfolioResponse] = None class PortfoliosPortfolioGidPutResponse(BaseModel): data: Optional[PortfolioResponse] = None class PortfoliosPortfolioGidAddCustomFieldSettingPostResponse(BaseModel): data: Optional[CustomFieldSettingResponse] = None class PortfoliosPortfolioGidAddMembersPostResponse(BaseModel): data: Optional[PortfolioResponse] = None class PortfoliosPortfolioGidCustomFieldSettingsGetResponse(BaseModel): data: Optional[List[CustomFieldSettingResponse]] = None class PortfoliosPortfolioGidRemoveMembersPostResponse(BaseModel): data: Optional[PortfolioResponse] = None class ProjectMembershipsProjectMembershipGidGetResponse(BaseModel): data: Optional[ProjectMembershipResponse] = None class ProjectTemplatesProjectTemplateGidInstantiateProjectPostResponse(BaseModel): data: Optional[JobResponse] = None class ProjectsPostRequest(BaseModel): data: Optional[ProjectRequest] = None class ProjectsPostResponse(BaseModel): data: Optional[ProjectResponse] = None class ProjectsProjectGidGetResponse(BaseModel): data: Optional[ProjectResponse] = None class ProjectsProjectGidPutRequest(BaseModel): data: Optional[ProjectRequest] = None class ProjectsProjectGidPutResponse(BaseModel): data: Optional[ProjectResponse] = None class ProjectsProjectGidAddCustomFieldSettingPostResponse(BaseModel): data: Optional[CustomFieldSettingResponse] = None class ProjectsProjectGidAddFollowersPostResponse(BaseModel): data: Optional[ProjectResponse] = None class ProjectsProjectGidAddMembersPostResponse(BaseModel): data: Optional[ProjectResponse] = None class ProjectsProjectGidCustomFieldSettingsGetResponse(BaseModel): data: Optional[List[CustomFieldSettingResponse]] = None class ProjectsProjectGidDuplicatePostResponse(BaseModel): data: Optional[JobResponse] = None class ProjectsProjectGidRemoveFollowersPostResponse(BaseModel): data: Optional[ProjectResponse] = None class ProjectsProjectGidRemoveMembersPostResponse(BaseModel): data: Optional[ProjectResponse] = None class ProjectsProjectGidSaveAsTemplatePostResponse(BaseModel): data: Optional[JobResponse] = None class TasksPostResponse(BaseModel): data: Optional[TaskResponse] = None class TasksTaskGidGetResponse(BaseModel): data: Optional[TaskResponse] = None class TasksTaskGidPutResponse(BaseModel): data: Optional[TaskResponse] = None class TasksTaskGidAddFollowersPostResponse(BaseModel): data: Optional[TaskResponse] = None class TasksTaskGidDuplicatePostResponse(BaseModel): data: Optional[JobResponse] = None class TasksTaskGidRemoveFollowersPostResponse(BaseModel): data: Optional[TaskResponse] = None class TasksTaskGidSetParentPostResponse(BaseModel): data: Optional[TaskResponse] = None class TasksTaskGidSubtasksPostResponse(BaseModel): data: Optional[TaskResponse] = None class TeamMembershipsTeamMembershipGidGetResponse(BaseModel): data: Optional[TeamMembershipResponse] = None class TeamsTeamGidAddUserPostResponse(BaseModel): data: Optional[TeamMembershipResponse] = None class TeamsTeamGidProjectsPostRequest(BaseModel): data: Optional[ProjectRequest] = None class TeamsTeamGidProjectsPostResponse(BaseModel): data: Optional[ProjectResponse] = None class UserTaskListsUserTaskListGidGetResponse(BaseModel): data: Optional[UserTaskListResponse] = None class UsersUserGidUserTaskListGetResponse(BaseModel): data: Optional[UserTaskListResponse] = None class WorkspaceMembershipsWorkspaceMembershipGidGetResponse(BaseModel): data: Optional[WorkspaceMembershipResponse] = None class WorkspacesWorkspaceGidCustomFieldsGetResponse(BaseModel): data: Optional[List[CustomFieldResponse]] = None class WorkspacesWorkspaceGidProjectsPostRequest(BaseModel): data: Optional[ProjectRequest] = None class WorkspacesWorkspaceGidProjectsPostResponse(BaseModel): data: Optional[ProjectResponse] = None

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/allisonwhilden/asana'

If you have feedback or need assistance with the MCP directory API, please join our Discord server