From 56ce2ff7e0dfe65dc0d280be925ea1ec36ca3266 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Tue, 3 Jun 2025 17:22:25 -0400 Subject: [PATCH] feat: Add local `.speakeasy/code-samples.yaml` for easier debugging --- .speakeasy/code-samples.yaml | 9090 ++++++++++++++++++++++++++++++++++ .speakeasy/workflow.yaml | 2 + 2 files changed, 9092 insertions(+) create mode 100644 .speakeasy/code-samples.yaml diff --git a/.speakeasy/code-samples.yaml b/.speakeasy/code-samples.yaml new file mode 100644 index 00000000..cdd70bc4 --- /dev/null +++ b/.speakeasy/code-samples.yaml @@ -0,0 +1,9090 @@ +overlay: 1.0.0 +info: + title: CodeSamples overlay for python target + version: 0.0.0 +actions: + - target: $["paths"]["/api/index/v1/adddatasource"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.datasources.add(name="", url_regex="https://example-company.datasource.com/.*", quicklinks=[ + { + "icon_config": { + "color": "#343CED", + "key": "person_icon", + "icon_type": models.IconType.GLYPH, + "name": "user", + }, + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/betausers"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.authorize_beta_users(datasource="", emails=[ + "Neil92@gmail.com", + "Alejandrin_Boyer4@hotmail.com", + "Shyanne_McLaughlin95@hotmail.com", + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/bulkindexdocuments"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.documents.bulk_index(upload_id="", datasource="", documents=[]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/bulkindexemployees"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.people.bulk_index(upload_id="", employees=[ + { + "email": "Robin.Stoltenberg@yahoo.com", + "department": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + ], + }, + { + "email": "Robin.Stoltenberg@yahoo.com", + "department": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + ], + }, + { + "email": "Robin.Stoltenberg@yahoo.com", + "department": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + ], + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/bulkindexgroups"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.bulk_index_groups(upload_id="", datasource="", groups=[ + { + "name": "", + }, + { + "name": "", + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/bulkindexmemberships"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.bulk_index_memberships(upload_id="", datasource="", memberships=[ + {}, + {}, + {}, + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/bulkindexshortcuts"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.shortcuts.bulk_index(upload_id="", shortcuts=[ + { + "input_alias": "", + "destination_url": "https://plump-tune-up.biz/", + "created_by": "", + "intermediate_url": "https://lean-sightseeing.net", + }, + { + "input_alias": "", + "destination_url": "https://plump-tune-up.biz/", + "created_by": "", + "intermediate_url": "https://lean-sightseeing.net", + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/bulkindexteams"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.people.bulk_index_teams(upload_id="", teams=[ + { + "id": "", + "name": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + { + "datasource": "github", + "handle": "", + }, + ], + "members": [], + }, + { + "id": "", + "name": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + { + "datasource": "github", + "handle": "", + }, + ], + "members": [], + }, + { + "id": "", + "name": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + { + "datasource": "github", + "handle": "", + }, + ], + "members": [], + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/bulkindexusers"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.bulk_index_users(upload_id="", datasource="", users=[ + { + "email": "Ivory_Cummerata@hotmail.com", + "name": "", + }, + { + "email": "Ivory_Cummerata@hotmail.com", + "name": "", + }, + { + "email": "Ivory_Cummerata@hotmail.com", + "name": "", + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/checkdocumentaccess"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.indexing.documents.check_access(datasource="", object_type="", doc_id="", user_email="") + + # Handle response + print(res) + - target: $["paths"]["/api/index/v1/debug/{datasource}/document"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.indexing.documents.debug(datasource="", object_type="Article", doc_id="art123") + + # Handle response + print(res) + - target: $["paths"]["/api/index/v1/debug/{datasource}/documents"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.indexing.documents.debug_many(datasource="", debug_documents=[ + { + "object_type": "Article", + "doc_id": "art123", + }, + ]) + + # Handle response + print(res) + - target: $["paths"]["/api/index/v1/debug/{datasource}/status"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.indexing.datasource.status(datasource="") + + # Handle response + print(res) + - target: $["paths"]["/api/index/v1/debug/{datasource}/user"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.indexing.people.debug(datasource="", email="u1@foo.com") + + # Handle response + print(res) + - target: $["paths"]["/api/index/v1/deletedocument"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.documents.delete(datasource="", object_type="", id="") + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/deleteemployee"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.people.delete(employee_email="") + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/deletegroup"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.delete_group(datasource="", group_name="") + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/deletemembership"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.delete_membership(datasource="", membership={ + "group_name": "", + }) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/deleteteam"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.people.delete_team(id="") + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/deleteuser"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.delete_user(datasource="", email="Ed.Johnston@gmail.com") + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/getdatasourceconfig"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.indexing.datasources.retrieve_config(datasource="") + + # Handle response + print(res) + - target: $["paths"]["/api/index/v1/indexdocument"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.documents.add_or_update(document=models.DocumentDefinition( + datasource="", + )) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/indexdocuments"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.documents.index(datasource="", documents=[]) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/indexemployee"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.people.index(employee={ + "email": "Jerrold_Hermann@hotmail.com", + "department": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + ], + }) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/indexgroup"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.index_group(datasource="", group={ + "name": "", + }) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/indexmembership"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.index_membership(datasource="", membership={ + "group_name": "", + }) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/indexteam"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.people.index_team(team={ + "id": "", + "name": "", + "datasource_profiles": [ + { + "datasource": "github", + "handle": "", + }, + { + "datasource": "github", + "handle": "", + }, + { + "datasource": "github", + "handle": "", + }, + ], + "members": [ + { + "email": "Nasir.Hilll73@hotmail.com", + }, + ], + }) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/indexuser"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.index_user(datasource="", user={ + "email": "Art.Schaden@hotmail.com", + "name": "", + }) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/processalldocuments"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.documents.process_all() + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/processallemployeesandteams"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.people.process_all_employees_and_teams() + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/processallmemberships"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.process_memberships() + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/rotatetoken"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.indexing.authentication.rotate_token() + + # Handle response + print(res) + - target: $["paths"]["/api/index/v1/updatepermissions"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.permissions.update_permissions(datasource="", permissions={}) + + # Use the SDK ... + - target: $["paths"]["/api/index/v1/uploadshortcuts"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.indexing.shortcuts.upload(upload_id="", shortcuts=[ + { + "input_alias": "", + "destination_url": "https://majestic-pharmacopoeia.info/", + "created_by": "", + }, + { + "input_alias": "", + "destination_url": "https://majestic-pharmacopoeia.info/", + "created_by": "", + }, + { + "input_alias": "", + "destination_url": "https://majestic-pharmacopoeia.info/", + "created_by": "", + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/activity"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + from glean.utils import parse_datetime + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.activity.report(events=[ + { + "action": models.ActivityEventAction.HISTORICAL_VIEW, + "timestamp": parse_datetime("2000-01-23T04:56:07.000Z"), + "url": "https://example.com/", + }, + { + "action": models.ActivityEventAction.SEARCH, + "params": { + "query": "query", + }, + "timestamp": parse_datetime("2000-01-23T04:56:07.000Z"), + "url": "https://example.com/search?q=query", + }, + { + "action": models.ActivityEventAction.VIEW, + "params": { + "duration": 20, + "referrer": "https://example.com/document", + }, + "timestamp": parse_datetime("2000-01-23T04:56:07.000Z"), + "url": "https://example.com/", + }, + ]) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/addcollectionitems"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.collections.add_items(collection_id=7742.68) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/addverificationreminder"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.verification.add_reminder(document_id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/adminsearch"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + from glean.utils import parse_datetime + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.search.query_as_admin(query="vacation policy", tracking_token="trackingToken", source_document=models.Document( + container_document=models.Document( + parent_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + ), page_size=10, max_snippet_size=400, input_details={ + "has_copy_paste": True, + }, request_options=models.SearchRequestOptions( + facet_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="article", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="document", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + models.FacetFilter( + field_name="department", + values=[ + models.FacetFilterValue( + value="engineering", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + facet_bucket_size=723824, + ), timeout_millis=5000, people=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/agents/runs/stream"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.agents.run_stream(agent_id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/agents/runs/wait"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.agents.run(agent_id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/agents/search"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.agents.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/agents/{agent_id}"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.agents.retrieve(agent_id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/agents/{agent_id}/schemas"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.agents.retrieve_schemas(agent_id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/autocomplete"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.search.autocomplete(request={ + "tracking_token": "trackingToken", + "query": "what is a que", + "datasource": "GDRIVE", + "result_size": 10, + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/chat"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.chat.create(messages=[ + { + "fragments": [ + models.ChatMessageFragment( + text="What are the company holidays this year?", + ), + ], + }, + ], timeout_millis=30000) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/chat#stream"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.chat.create_stream(messages=[ + { + "fragments": [ + models.ChatMessageFragment( + text="What are the company holidays this year?", + ), + ], + }, + ], timeout_millis=30000) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/createannouncement"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + from glean.utils import parse_datetime + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.announcements.create(start_time=parse_datetime("2023-05-01T12:02:10.816Z"), end_time=parse_datetime("2024-03-17T14:19:30.278Z"), title="", body={ + "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + "structured_list": [ + models.StructuredTextItem( + link="https://en.wikipedia.org/wiki/Diffuse_sky_radiation", + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + text="Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", + structured_result=models.StructuredResult( + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + customer=models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + poc=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + merged_customers=[ + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + ], + notes="CIO is interested in trying out the product.", + ), + team=models.Team( + id="", + name="", + members=[ + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + custom_fields=[ + models.CustomFieldData( + label="", + values=[ + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.CustomFieldData( + label="", + values=[ + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.CustomFieldData( + label="", + values=[ + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + datasource_profiles=[ + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + ], + ), + custom_entity=models.CustomEntity( + roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + ), + answer=models.Answer( + id=3, + doc_id="ANSWERS_answer_3", + question="Why is the sky blue?", + body_text="From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + ], + likes=models.AnswerLikes( + liked_by=[ + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + liked_by_user=False, + num_likes=716571, + ), + author=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + verification=models.Verification( + state=models.State.UNVERIFIED, + metadata=models.VerificationMetadata( + last_verifier=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + reminders=[ + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=852101, + ), + ], + last_reminder=models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=829206, + ), + candidate_verifiers=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + ), + ), + board=models.AnswerBoard( + name="", + description="pronoun whether likely likewise negative possession ape furthermore", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=856490, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + collections=[ + models.Collection( + name="", + description="tedious given quixotic", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=590805, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=913703, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.COLLECTION, + ), + ], + children=[ + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.Collection( + name="", + description="tedious given quixotic", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=590805, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=913703, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.COLLECTION, + ), + ], + children=[ + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.Collection( + name="", + description="tedious given quixotic", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=590805, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=913703, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.COLLECTION, + ), + ], + children=[ + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + source_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + extracted_qn_a=models.ExtractedQnA( + question_result=models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ), + meeting=models.Meeting( + attendees=models.CalendarAttendees( + people=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + ), + ), + collection=models.Collection( + name="", + description="fortunate ha gazebo", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=437915, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + answer_board=models.AnswerBoard( + name="", + description="grouper amidst pulse fowl swine that following adolescent yippee celsius", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=751446, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + code=models.Code( + repo_name="scio", + file_name="README.md", + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + query_suggestions=models.QuerySuggestionList( + suggestions=[ + models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + ], + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + related_documents=[ + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + ], + related_question=models.RelatedQuestion( + ranges=[ + models.TextRange( + start_index=913402, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + models.TextRange( + start_index=913402, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + models.TextRange( + start_index=913402, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + ], + ), + ), + ), + models.StructuredTextItem( + link="https://en.wikipedia.org/wiki/Diffuse_sky_radiation", + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + text="Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", + structured_result=models.StructuredResult( + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + customer=models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + poc=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + merged_customers=[ + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + ], + notes="CIO is interested in trying out the product.", + ), + team=models.Team( + id="", + name="", + members=[ + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + custom_fields=[ + models.CustomFieldData( + label="", + values=[ + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.CustomFieldData( + label="", + values=[ + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.CustomFieldData( + label="", + values=[ + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CustomFieldValuePerson( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + datasource_profiles=[ + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + ], + ), + custom_entity=models.CustomEntity( + roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + ), + answer=models.Answer( + id=3, + doc_id="ANSWERS_answer_3", + question="Why is the sky blue?", + body_text="From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + ], + likes=models.AnswerLikes( + liked_by=[ + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + liked_by_user=False, + num_likes=716571, + ), + author=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + verification=models.Verification( + state=models.State.UNVERIFIED, + metadata=models.VerificationMetadata( + last_verifier=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + reminders=[ + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=852101, + ), + ], + last_reminder=models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=829206, + ), + candidate_verifiers=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + ), + ), + board=models.AnswerBoard( + name="", + description="pronoun whether likely likewise negative possession ape furthermore", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=856490, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + collections=[ + models.Collection( + name="", + description="tedious given quixotic", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=590805, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=913703, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.COLLECTION, + ), + ], + children=[ + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.Collection( + name="", + description="tedious given quixotic", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=590805, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=913703, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.COLLECTION, + ), + ], + children=[ + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.Collection( + name="", + description="tedious given quixotic", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=590805, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=913703, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.COLLECTION, + ), + ], + children=[ + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="whoever vice reassuringly boo fess", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=953002, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + source_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + extracted_qn_a=models.ExtractedQnA( + question_result=models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ), + meeting=models.Meeting( + attendees=models.CalendarAttendees( + people=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + ), + ), + collection=models.Collection( + name="", + description="fortunate ha gazebo", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=437915, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + answer_board=models.AnswerBoard( + name="", + description="grouper amidst pulse fowl swine that following adolescent yippee celsius", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=751446, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + code=models.Code( + repo_name="scio", + file_name="README.md", + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + query_suggestions=models.QuerySuggestionList( + suggestions=[ + models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + ], + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + related_documents=[ + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + ], + related_question=models.RelatedQuestion( + ranges=[ + models.TextRange( + start_index=913402, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + models.TextRange( + start_index=913402, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + models.TextRange( + start_index=913402, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + ], + ), + ), + ), + ], + }, audience_filters=[ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/createanswer"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.answers.create(data={ + "question": "Why is the sky blue?", + "body_text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + "audience_filters": [ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], + "added_roles": [ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], + "removed_roles": [ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + "roles": [ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + ], + "combined_answer_text": { + "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + }, + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/createauthtoken"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.authentication.create_token() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/createcollection"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.collections.create(name="", added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + ], audience_filters=[ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/createshortcut"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.shortcuts.create(data={ + "added_roles": [ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VIEWER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VIEWER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VIEWER, + ), + ], + "removed_roles": [ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/deleteallchats"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.chat.delete_all() + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/deleteannouncement"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.announcements.delete(id=458809) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/deleteanswer"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.answers.delete(id=3, doc_id="ANSWERS_answer_3") + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/deletechatfiles"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.chat.delete_files(file_ids=[ + "", + "", + "", + ]) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/deletechats"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.chat.delete(ids=[]) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/deletecollection"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.collections.delete(ids=[ + 930352, + 156719, + 25102, + ]) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/deletecollectionitem"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.collections.delete_item(collection_id=6980.49, item_id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/deleteshortcut"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.shortcuts.delete(id=975862) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/editanswer"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.answers.update(id=3, doc_id="ANSWERS_answer_3", question="Why is the sky blue?", body_text="From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", audience_filters=[ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + ], removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + ], combined_answer_text={ + "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/editcollection"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.collections.update(name="", id=330922, added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + ], removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], audience_filters=[ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/editcollectionitem"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.collections.update_item(collection_id=142375, item_id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/editpin"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.pins.update(request={ + "audience_filters": [ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/feed"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.search.retrieve_feed(request={ + "timeout_millis": 5000, + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/feedback"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.activity.feedback(feedback1={ + "tracking_tokens": [ + "trackingTokens", + ], + "event": models.Event.VIEW, + }) + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/getanswer"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.answers.retrieve(request={ + "id": 3, + "doc_id": "ANSWERS_answer_3", + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getchat"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.chat.retrieve(id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getchatapplication"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.chat.retrieve_application(id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getchatfiles"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.chat.retrieve_files(file_ids=[ + "", + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getcollection"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.collections.retrieve(id=425335) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getdocpermissions"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.documents.retrieve_permissions() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getdocuments"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.documents.retrieve() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getdocumentsbyfacets"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.documents.retrieve_by_facets(request={ + "filter_sets": [ + { + "filters": [ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], + }, + { + "filters": [ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], + }, + ], + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getpin"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.pins.retrieve() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/getshortcut"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.shortcuts.retrieve(request={ + "alias": "", + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/policies"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.policies.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/policies"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.policies.create() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/policies/{id}"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.policies.retrieve(id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/policies/{id}"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.policies.update(id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/policies/{id}/download"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.policies.download(id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/reports"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.reports.create() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/reports/{id}/download"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.reports.download(id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/data/reports/{id}/status"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.data.reports.status(id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/documents/visibilityoverrides"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.documents.visibilityoverrides.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/governance/documents/visibilityoverrides"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.governance.documents.visibilityoverrides.create() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/insights"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.insights.retrieve(categories=[ + models.InsightsRequestCategory.COLLECTIONS, + models.InsightsRequestCategory.SHORTCUTS, + models.InsightsRequestCategory.ANNOUNCEMENTS, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/listanswers"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.answers.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/listchats"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.chat.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/listcollections"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.collections.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/listentities"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.entities.list(request={ + "filter_": [ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], + "page_size": 100, + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/listpins"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.pins.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/listshortcuts"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.shortcuts.list(page_size=10, filters=[ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/listverifications"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.verification.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/messages"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.messages.retrieve(id_type=models.IDType.CONVERSATION_ID, id="") + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/people"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.entities.read_people(request={ + "obfuscated_ids": [ + "abc123", + "abc456", + ], + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/pin"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.pins.create(request={ + "audience_filters": [ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ], + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/recommendations"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + from glean.utils import parse_datetime + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.search.recommendations(request=models.RecommendationsRequest( + source_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + page_size=100, + max_snippet_size=400, + request_options=models.RecommendationsRequestOptions( + facet_filter_sets=[ + models.FacetFilterSet( + filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + ), + ], + context=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + )) + + assert res is not None + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/search"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + from glean.utils import parse_datetime + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.search.query(query="vacation policy", tracking_token="trackingToken", source_document=models.Document( + container_document=models.Document( + parent_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + ), page_size=10, max_snippet_size=400, input_details={ + "has_copy_paste": True, + }, request_options=models.SearchRequestOptions( + facet_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="article", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="document", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + models.FacetFilter( + field_name="department", + values=[ + models.FacetFilterValue( + value="engineering", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + facet_bucket_size=939520, + ), timeout_millis=5000, people=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/summarize"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.documents.summarize(document_specs=[ + {}, + {}, + {}, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/tools/call"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.tools.run(name="", parameters={ + "key": { + "name": "", + "value": "", + }, + }) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/tools/list"]["get"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.tools.list() + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/unpin"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + g_client.client.pins.remove() + + # Use the SDK ... + - target: $["paths"]["/rest/api/v1/updateannouncement"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + from glean.utils import parse_datetime + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.announcements.update(start_time=parse_datetime("2023-10-24T01:53:24.440Z"), end_time=parse_datetime("2024-10-30T07:24:12.087Z"), title="", id=121004, body={ + "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + "structured_list": [ + models.StructuredTextItem( + link="https://en.wikipedia.org/wiki/Diffuse_sky_radiation", + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + text="Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", + structured_result=models.StructuredResult( + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + customer=models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + poc=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + merged_customers=[ + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + ], + notes="CIO is interested in trying out the product.", + ), + team=models.Team( + id="", + name="", + members=[ + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + custom_fields=[ + models.CustomFieldData( + label="", + values=[], + ), + models.CustomFieldData( + label="", + values=[], + ), + ], + datasource_profiles=[ + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + ], + ), + custom_entity=models.CustomEntity( + roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + ), + answer=models.Answer( + id=3, + doc_id="ANSWERS_answer_3", + question="Why is the sky blue?", + body_text="From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + ], + removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], + likes=models.AnswerLikes( + liked_by=[ + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + liked_by_user=True, + num_likes=38608, + ), + author=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + verification=models.Verification( + state=models.State.DEPRECATED, + metadata=models.VerificationMetadata( + last_verifier=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + reminders=[ + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=735135, + ), + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=735135, + ), + ], + last_reminder=models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=528697, + ), + candidate_verifiers=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + ), + ), + board=models.AnswerBoard( + name="", + description="treasure phrase meaty", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=355296, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + collections=[ + models.Collection( + name="", + description="thunderbolt acidly warmly hence zowie", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=416180, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + ], + children=[ + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.Collection( + name="", + description="thunderbolt acidly warmly hence zowie", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=416180, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + ], + children=[ + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + source_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + extracted_qn_a=models.ExtractedQnA( + question_result=models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ), + meeting=models.Meeting( + attendees=models.CalendarAttendees( + people=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + ), + ), + collection=models.Collection( + name="", + description="mismatch noisily jive worth meh following hmph analyse", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=5797, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + answer_board=models.AnswerBoard( + name="", + description="pulse yum shakily notwithstanding faithfully boohoo urgently exterior before um", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=609567, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + code=models.Code( + repo_name="scio", + file_name="README.md", + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + query_suggestions=models.QuerySuggestionList( + suggestions=[ + models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + ], + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + related_documents=[ + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + ], + related_question=models.RelatedQuestion( + ranges=[ + models.TextRange( + start_index=896307, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + models.TextRange( + start_index=896307, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + ], + ), + ), + ), + models.StructuredTextItem( + link="https://en.wikipedia.org/wiki/Diffuse_sky_radiation", + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + text="Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", + structured_result=models.StructuredResult( + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + customer=models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + poc=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + merged_customers=[ + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + ], + notes="CIO is interested in trying out the product.", + ), + team=models.Team( + id="", + name="", + members=[ + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + custom_fields=[ + models.CustomFieldData( + label="", + values=[], + ), + models.CustomFieldData( + label="", + values=[], + ), + ], + datasource_profiles=[ + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + ], + ), + custom_entity=models.CustomEntity( + roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + ), + answer=models.Answer( + id=3, + doc_id="ANSWERS_answer_3", + question="Why is the sky blue?", + body_text="From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + ], + removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], + likes=models.AnswerLikes( + liked_by=[ + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + liked_by_user=True, + num_likes=38608, + ), + author=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + verification=models.Verification( + state=models.State.DEPRECATED, + metadata=models.VerificationMetadata( + last_verifier=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + reminders=[ + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=735135, + ), + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=735135, + ), + ], + last_reminder=models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=528697, + ), + candidate_verifiers=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + ), + ), + board=models.AnswerBoard( + name="", + description="treasure phrase meaty", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=355296, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + collections=[ + models.Collection( + name="", + description="thunderbolt acidly warmly hence zowie", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=416180, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + ], + children=[ + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.Collection( + name="", + description="thunderbolt acidly warmly hence zowie", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=416180, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + ], + children=[ + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + source_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + extracted_qn_a=models.ExtractedQnA( + question_result=models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ), + meeting=models.Meeting( + attendees=models.CalendarAttendees( + people=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + ), + ), + collection=models.Collection( + name="", + description="mismatch noisily jive worth meh following hmph analyse", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=5797, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + answer_board=models.AnswerBoard( + name="", + description="pulse yum shakily notwithstanding faithfully boohoo urgently exterior before um", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=609567, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + code=models.Code( + repo_name="scio", + file_name="README.md", + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + query_suggestions=models.QuerySuggestionList( + suggestions=[ + models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + ], + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + related_documents=[ + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + ], + related_question=models.RelatedQuestion( + ranges=[ + models.TextRange( + start_index=896307, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + models.TextRange( + start_index=896307, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + ], + ), + ), + ), + models.StructuredTextItem( + link="https://en.wikipedia.org/wiki/Diffuse_sky_radiation", + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + text="Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue.", + structured_result=models.StructuredResult( + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + customer=models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + poc=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + merged_customers=[ + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + models.Customer( + id="", + company=models.Company( + name="", + location="New York City", + industry="Finances", + about="Financial, software, data, and media company headquartered in Midtown Manhattan, New York City", + ), + notes="CIO is interested in trying out the product.", + ), + ], + notes="CIO is interested in trying out the product.", + ), + team=models.Team( + id="", + name="", + members=[ + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.PersonToTeamRelationship( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + custom_fields=[ + models.CustomFieldData( + label="", + values=[], + ), + models.CustomFieldData( + label="", + values=[], + ), + ], + datasource_profiles=[ + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + models.DatasourceProfile( + datasource="github", + handle="", + ), + ], + ), + custom_entity=models.CustomEntity( + roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.EDITOR, + ), + ], + ), + answer=models.Answer( + id=3, + doc_id="ANSWERS_answer_3", + question="Why is the sky blue?", + body_text="From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.OWNER, + ), + ], + removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], + likes=models.AnswerLikes( + liked_by=[ + models.AnswerLike( + user=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + liked_by_user=True, + num_likes=38608, + ), + author=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + verification=models.Verification( + state=models.State.DEPRECATED, + metadata=models.VerificationMetadata( + last_verifier=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + reminders=[ + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=735135, + ), + models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=735135, + ), + ], + last_reminder=models.Reminder( + assignee=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + requestor=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + remind_at=528697, + ), + candidate_verifiers=[ + models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ], + ), + ), + board=models.AnswerBoard( + name="", + description="treasure phrase meaty", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=355296, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + collections=[ + models.Collection( + name="", + description="thunderbolt acidly warmly hence zowie", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=416180, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + ], + children=[ + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.Collection( + name="", + description="thunderbolt acidly warmly hence zowie", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=416180, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + items=[ + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + models.CollectionItem( + collection_id=213025, + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + item_type=models.CollectionItemItemType.TEXT, + ), + ], + children=[ + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.Collection( + name="", + description="likewise blindly mooch travel pinion", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=184689, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + source_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + extracted_qn_a=models.ExtractedQnA( + question_result=models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ), + meeting=models.Meeting( + attendees=models.CalendarAttendees( + people=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + group_attendees=[ + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + models.CalendarAttendee( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + ], + ), + ], + ), + ), + collection=models.Collection( + name="", + description="mismatch noisily jive worth meh following hmph analyse", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=5797, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + answer_board=models.AnswerBoard( + name="", + description="pulse yum shakily notwithstanding faithfully boohoo urgently exterior before um", + audience_filters=[ + models.FacetFilter( + field_name="type", + values=[ + models.FacetFilterValue( + value="Spreadsheet", + relation_type=models.RelationType.EQUALS, + ), + models.FacetFilterValue( + value="Presentation", + relation_type=models.RelationType.EQUALS, + ), + ], + ), + ], + id=609567, + creator=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + code=models.Code( + repo_name="scio", + file_name="README.md", + ), + shortcut=models.Shortcut( + input_alias="", + created_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + updated_by=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + destination_document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + query_suggestions=models.QuerySuggestionList( + suggestions=[ + models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + ], + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + ), + related_documents=[ + models.RelatedDocuments( + query_suggestion=models.QuerySuggestion( + query="app:github type:pull author:mortimer", + label="Mortimer's PRs", + datasource="github", + ), + results=[ + models.SearchResult( + title="title", + url="https://example.com/foo/bar", + native_app_url="slack://foo/bar", + snippets=[ + models.SearchResultSnippet( + snippet="snippet", + mime_type="mimeType", + ), + ], + must_include_suggestions=models.QuerySuggestionList(), + ), + ], + ), + ], + related_question=models.RelatedQuestion( + ranges=[ + models.TextRange( + start_index=896307, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + models.TextRange( + start_index=896307, + document=models.Document( + metadata=models.DocumentMetadata( + datasource="datasource", + object_type="Feature Request", + container="container", + parent_id="JIRA_EN-1337", + mime_type="mimeType", + document_id="documentId", + create_time=parse_datetime("2000-01-23T04:56:07.000Z"), + update_time=parse_datetime("2000-01-23T04:56:07.000Z"), + author=models.Person( + name="name", + obfuscated_id="", + ), + components=[ + "Backend", + "Networking", + ], + status="[\"Done\"]", + custom_data={ + "someCustomField": models.CustomDataValue(), + }, + ), + ), + ), + ], + ), + ), + ), + ], + }, audience_filters=[ + { + "field_name": "type", + "values": [ + { + "value": "Spreadsheet", + "relation_type": models.RelationType.EQUALS, + }, + { + "value": "Presentation", + "relation_type": models.RelationType.EQUALS, + }, + ], + }, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/updateshortcut"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean, models + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.shortcuts.update(id=268238, added_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.ANSWER_MODERATOR, + ), + ], removed_roles=[ + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + models.UserRoleSpecification( + person=models.Person( + name="George Clooney", + obfuscated_id="abc123", + ), + role=models.UserRole.VERIFIER, + ), + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/uploadchatfiles"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.chat.upload_files(files=[ + { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + ]) + + # Handle response + print(res) + - target: $["paths"]["/rest/api/v1/verify"]["post"] + update: + x-codeSamples: + - lang: python + label: Python (API Client) + source: |- + from glean import Glean + import os + + + with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), + ) as g_client: + + res = g_client.client.verification.verify(document_id="") + + # Handle response + print(res) diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 7371b060..6044a20b 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -18,6 +18,7 @@ targets: pypi: token: $pypi_token codeSamples: + output: .speakeasy/code-samples.yaml registry: location: registry.speakeasyapi.dev/glean-el2/sdk/glean-api-specs-python-code-samples labelOverride: @@ -29,6 +30,7 @@ targets: target: python source: local-debug codeSamples: + output: .speakeasy/code-samples.yaml labelOverride: fixedValue: Python (API Client) blocking: false