Skip to content

Commit 56b3b86

Browse files
Merge pull request #103 from gleanwork/speakeasy-sdk-regen-1768441819
chore: 🐝 Update SDK - Generate 0.11.27
2 parents d9d47e3 + d019a26 commit 56b3b86

File tree

402 files changed

+9791
-1227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

402 files changed

+9791
-1227
lines changed

.speakeasy/gen.lock

Lines changed: 805 additions & 802 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ generation:
1616
requestResponseComponentNamesFeb2024: true
1717
securityFeb2025: true
1818
sharedErrorComponentsApr2025: true
19+
sharedNestedComponentsJan2026: false
1920
auth:
2021
oAuth2ClientCredentialsEnabled: false
2122
oAuth2PasswordEnabled: false
@@ -31,7 +32,7 @@ generation:
3132
generateNewTests: true
3233
skipResponseBodyAssertions: true
3334
python:
34-
version: 0.11.26
35+
version: 0.11.27
3536
additionalDependencies:
3637
dev: {}
3738
main: {}
@@ -80,3 +81,4 @@ python:
8081
responseFormat: flat
8182
sseFlatResponse: false
8283
templateVersion: v2
84+
useAsyncHooks: false

.speakeasy/glean-merged-spec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.0
22
info:
33
version: 0.9.0
44
title: Glean API
5-
x-source-commit-sha: 80a17b90f735e5c9738cb1cf8fa7025e1d0a9361
5+
x-source-commit-sha: 17a84cfc3e3f0e0a3eec1792cf57a65f444d613e
66
description: |
77
# Introduction
88
In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean.
@@ -22,7 +22,7 @@ info:
2222
These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.
2323
x-logo:
2424
url: https://app.glean.com/images/glean-text2.svg
25-
x-open-api-commit-sha: 76c9a769942823963f9ac3400922e023ccf26826
25+
x-open-api-commit-sha: 3bb1859df9ba2cff7a43d5b1c336bb826a766b4c
2626
x-speakeasy-name: 'Glean API'
2727
servers:
2828
- url: https://{instance}-be.glean.com

.speakeasy/workflow.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.685.0
1+
speakeasyVersion: 1.686.0
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:4318ed871de2369be5d6a437fef673ee1bf14ec8861b1de14ddd845c992caafa
6-
sourceBlobDigest: sha256:f61359558ffde96f01bc7ce952217278ff7413501da30c9554c54709d632ec70
5+
sourceRevisionDigest: sha256:fcb56a3a1b355cdff7e63a0b76385f81472ce01a748f25a409b13b70d89436cc
6+
sourceBlobDigest: sha256:01a8dbd2649712ab871b1799b6c76f92f4edb070c675738cac74685c81879a37
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1765586442
9+
- speakeasy-sdk-regen-1768441819
1010
Glean Client API:
1111
sourceNamespace: glean-client-api
1212
sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2
@@ -17,10 +17,10 @@ targets:
1717
glean:
1818
source: Glean API
1919
sourceNamespace: glean-api-specs
20-
sourceRevisionDigest: sha256:4318ed871de2369be5d6a437fef673ee1bf14ec8861b1de14ddd845c992caafa
21-
sourceBlobDigest: sha256:f61359558ffde96f01bc7ce952217278ff7413501da30c9554c54709d632ec70
20+
sourceRevisionDigest: sha256:fcb56a3a1b355cdff7e63a0b76385f81472ce01a748f25a409b13b70d89436cc
21+
sourceBlobDigest: sha256:01a8dbd2649712ab871b1799b6c76f92f4edb070c675738cac74685c81879a37
2222
codeSamplesNamespace: glean-api-specs-python-code-samples
23-
codeSamplesRevisionDigest: sha256:ed0360d9bd610f85a768b928c8f875d2ccedd748f4c54b0c5d244637a74c3d0a
23+
codeSamplesRevisionDigest: sha256:77edd92d12a6f8e9e87bc2578f8369e25dba1060192ba455304996c267701c6a
2424
workflow:
2525
workflowVersion: 1.0.0
2626
speakeasyVersion: latest

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,4 +488,14 @@ Based on:
488488
### Generated
489489
- [python v0.11.26] .
490490
### Releases
491-
- [PyPI v0.11.26] https://pypi.org/project/glean-api-client/0.11.26 - .
491+
- [PyPI v0.11.26] https://pypi.org/project/glean-api-client/0.11.26 - .
492+
493+
## 2026-01-16 01:51:23
494+
### Changes
495+
Based on:
496+
- OpenAPI Doc
497+
- Speakeasy CLI 1.686.0 (2.796.1) https://github.com/speakeasy-api/speakeasy
498+
### Generated
499+
- [python v0.11.27] .
500+
### Releases
501+
- [PyPI v0.11.27] https://pypi.org/project/glean-api-client/0.11.27 - .

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
[project]
33
name = "glean-api-client"
4-
version = "0.11.26"
4+
version = "0.11.27"
55
description = "Python Client SDK Generated by Speakeasy."
66
authors = [{ name = "Glean Technologies, Inc." },]
77
readme = "README-PYPI.md"

src/glean/api_client/_version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import importlib.metadata
44

55
__title__: str = "glean-api-client"
6-
__version__: str = "0.11.26"
6+
__version__: str = "0.11.27"
77
__openapi_doc_version__: str = "0.9.0"
8-
__gen_version__: str = "2.794.1"
9-
__user_agent__: str = "speakeasy-sdk/python 0.11.26 2.794.1 0.9.0 glean-api-client"
8+
__gen_version__: str = "2.796.1"
9+
__user_agent__: str = "speakeasy-sdk/python 0.11.27 2.796.1 0.9.0 glean-api-client"
1010

1111
try:
1212
if __package__ is not None:

src/glean/api_client/basesdk.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
AfterSuccessContext,
88
BeforeRequestContext,
99
)
10-
from glean.api_client.utils import RetryConfig, SerializedRequestBody, get_body_content
10+
from glean.api_client.utils import (
11+
RetryConfig,
12+
SerializedRequestBody,
13+
get_body_content,
14+
run_sync_in_thread,
15+
)
1116
import httpx
1217
from typing import Callable, List, Mapping, Optional, Tuple
1318
from urllib.parse import parse_qs, urlparse
@@ -311,7 +316,10 @@ async def do_request_async(
311316
async def do():
312317
http_res = None
313318
try:
314-
req = hooks.before_request(BeforeRequestContext(hook_ctx), request)
319+
req = await run_sync_in_thread(
320+
hooks.before_request, BeforeRequestContext(hook_ctx), request
321+
)
322+
315323
logger.debug(
316324
"Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s",
317325
req.method,
@@ -325,7 +333,10 @@ async def do():
325333

326334
http_res = await client.send(req, stream=stream)
327335
except Exception as e:
328-
_, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e)
336+
_, e = await run_sync_in_thread(
337+
hooks.after_error, AfterErrorContext(hook_ctx), None, e
338+
)
339+
329340
if e is not None:
330341
logger.debug("Request Exception", exc_info=True)
331342
raise e
@@ -343,9 +354,10 @@ async def do():
343354
)
344355

345356
if utils.match_status_codes(error_status_codes, http_res.status_code):
346-
result, err = hooks.after_error(
347-
AfterErrorContext(hook_ctx), http_res, None
357+
result, err = await run_sync_in_thread(
358+
hooks.after_error, AfterErrorContext(hook_ctx), http_res, None
348359
)
360+
349361
if err is not None:
350362
logger.debug("Request Exception", exc_info=True)
351363
raise err
@@ -365,6 +377,8 @@ async def do():
365377
http_res = await do()
366378

367379
if not utils.match_status_codes(error_status_codes, http_res.status_code):
368-
http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res)
380+
http_res = await run_sync_in_thread(
381+
hooks.after_success, AfterSuccessContext(hook_ctx), http_res
382+
)
369383

370384
return http_res

src/glean/api_client/models/activityevent.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from .activityeventparams import ActivityEventParams, ActivityEventParamsTypedDict
55
from datetime import datetime
66
from enum import Enum
7-
from glean.api_client.types import BaseModel
7+
from glean.api_client.types import BaseModel, UNSET_SENTINEL
8+
from pydantic import model_serializer
89
from typing import Optional
910
from typing_extensions import NotRequired, TypedDict
1011

@@ -54,3 +55,19 @@ class ActivityEvent(BaseModel):
5455
r"""Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored."""
5556

5657
params: Optional[ActivityEventParams] = None
58+
59+
@model_serializer(mode="wrap")
60+
def serialize_model(self, handler):
61+
optional_fields = set(["id", "params"])
62+
serialized = handler(self)
63+
m = {}
64+
65+
for n, f in type(self).model_fields.items():
66+
k = f.alias or n
67+
val = serialized.get(k)
68+
69+
if val != UNSET_SENTINEL:
70+
if val is not None or k not in optional_fields:
71+
m[k] = val
72+
73+
return m

src/glean/api_client/models/activityeventparams.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
22

33
from __future__ import annotations
4-
from glean.api_client.types import BaseModel
4+
from glean.api_client.types import BaseModel, UNSET_SENTINEL
55
import pydantic
6+
from pydantic import model_serializer
67
from typing import Optional
78
from typing_extensions import Annotated, NotRequired, TypedDict
89

@@ -59,3 +60,31 @@ class ActivityEventParams(BaseModel):
5960

6061
truncated: Optional[bool] = None
6162
r"""Indicates that the parameters are incomplete and more parameters may be sent with the same action+timestamp+URL in the future. This is used for sending the duration when a `VIEW` is finished."""
63+
64+
@model_serializer(mode="wrap")
65+
def serialize_model(self, handler):
66+
optional_fields = set(
67+
[
68+
"bodyContent",
69+
"datasourceInstance",
70+
"datasource",
71+
"instanceOnlyName",
72+
"duration",
73+
"query",
74+
"referrer",
75+
"title",
76+
"truncated",
77+
]
78+
)
79+
serialized = handler(self)
80+
m = {}
81+
82+
for n, f in type(self).model_fields.items():
83+
k = f.alias or n
84+
val = serialized.get(k)
85+
86+
if val != UNSET_SENTINEL:
87+
if val is not None or k not in optional_fields:
88+
m[k] = val
89+
90+
return m

0 commit comments

Comments
 (0)