Skip to content

Commit ef48eb2

Browse files
committed
## Python SDK Changes Detected:
* `glean.client.governance.data.policies.retrieve()`: `response.report.config.sensitive_content_options.custom_sensitive_expressions` **Added** * `glean.client.governance.data.policies.update()`: * `request.config.sensitive_content_options.custom_sensitive_expressions` **Added** * `glean.client.governance.data.policies.list()`: `response.reports.[].config.sensitive_content_options.custom_sensitive_expressions` **Added** * `glean.client.governance.data.policies.create()`: * `request.config.sensitive_content_options.custom_sensitive_expressions` **Added** * `response.report.config.sensitive_content_options.custom_sensitive_expressions` **Added** * `glean.client.governance.data.reports.create()`: * `request.config.sensitive_content_options.custom_sensitive_expressions` **Added**
1 parent 873aa21 commit ef48eb2

29 files changed

+610
-64
lines changed

.speakeasy/gen.lock

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
lockVersion: 2.0.0
22
id: 3e3290ca-0ee8-4981-b1bc-14536048fa63
33
management:
4-
docChecksum: f901905eddb4d3e76a54e8da46f5347d
4+
docChecksum: 1e8d820b3832280159711e257d4f90ee
55
docVersion: 0.9.0
66
speakeasyVersion: 1.650.0
77
generationVersion: 2.743.2
8-
releaseVersion: 0.11.22
9-
configChecksum: 15c71f102e245f5606dc6f4f470c2ad8
8+
releaseVersion: 0.12.1
9+
configChecksum: c210c1c04c73ebca6e82bc32c024a8a5
1010
repoURL: https://github.com/gleanwork/api-client-python.git
1111
installationURL: https://github.com/gleanwork/api-client-python.git
1212
published: true
@@ -194,6 +194,10 @@ generatedFiles:
194194
- docs/models/customfieldvalueperson.md
195195
- docs/models/customfieldvaluestr.md
196196
- docs/models/customproperty.md
197+
- docs/models/customsensitiveexpression.md
198+
- docs/models/customsensitiverule.md
199+
- docs/models/customsensitiverulelikelihoodthreshold.md
200+
- docs/models/customsensitiveruletype.md
197201
- docs/models/datasource.md
198202
- docs/models/datasourcebulkmembershipdefinition.md
199203
- docs/models/datasourcecategory.md
@@ -407,7 +411,6 @@ generatedFiles:
407411
- docs/models/knowledgetype.md
408412
- docs/models/labeledcountinfo.md
409413
- docs/models/lastscanstatus.md
410-
- docs/models/likelihoodthreshold.md
411414
- docs/models/listanswersrequest.md
412415
- docs/models/listanswersresponse.md
413416
- docs/models/listchatsrequest.md
@@ -536,6 +539,7 @@ generatedFiles:
536539
- docs/models/sensitivecontentoptions.md
537540
- docs/models/sensitiveexpression.md
538541
- docs/models/sensitiveinfotype.md
542+
- docs/models/sensitiveinfotypelikelihoodthreshold.md
539543
- docs/models/sessioninfo.md
540544
- docs/models/share.md
541545
- docs/models/sharingoptions.md
@@ -822,6 +826,9 @@ generatedFiles:
822826
- src/glean/api_client/models/customfieldvalueperson.py
823827
- src/glean/api_client/models/customfieldvaluestr.py
824828
- src/glean/api_client/models/customproperty.py
829+
- src/glean/api_client/models/customsensitiveexpression.py
830+
- src/glean/api_client/models/customsensitiverule.py
831+
- src/glean/api_client/models/customsensitiveruletype.py
825832
- src/glean/api_client/models/datasourcebulkmembershipdefinition.py
826833
- src/glean/api_client/models/datasourcegroupdefinition.py
827834
- src/glean/api_client/models/datasourcemembershipdefinition.py
@@ -1414,6 +1421,9 @@ generatedFiles:
14141421
- tests/mockserver/internal/sdk/models/components/customfieldvalueperson.go
14151422
- tests/mockserver/internal/sdk/models/components/customfieldvaluestr.go
14161423
- tests/mockserver/internal/sdk/models/components/customproperty.go
1424+
- tests/mockserver/internal/sdk/models/components/customsensitiveexpression.go
1425+
- tests/mockserver/internal/sdk/models/components/customsensitiverule.go
1426+
- tests/mockserver/internal/sdk/models/components/customsensitiveruletype.go
14171427
- tests/mockserver/internal/sdk/models/components/datasourcebulkmembershipdefinition.go
14181428
- tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go
14191429
- tests/mockserver/internal/sdk/models/components/datasourcemembershipdefinition.go
@@ -2741,6 +2751,4 @@ generatedTests:
27412751
editcollection: "2025-06-12T19:13:52-04:00"
27422752
createshortcut: "2025-06-12T19:13:52-04:00"
27432753
updateshortcut: "2025-06-12T19:13:52-04:00"
2744-
releaseNotes: |
2745-
## Python SDK Changes Detected:
2746-
* `glean.client.insights.retrieve()`: `response.agents_response.agents_usage_by_department_insights.[]` **Changed**
2754+
releaseNotes: "## Python SDK Changes Detected:\n* `glean.client.governance.data.policies.retrieve()`: `response.report.config.sensitive_content_options.custom_sensitive_expressions` **Added**\n* `glean.client.governance.data.policies.update()`: \n * `request.config.sensitive_content_options.custom_sensitive_expressions` **Added**\n* `glean.client.governance.data.policies.list()`: `response.reports.[].config.sensitive_content_options.custom_sensitive_expressions` **Added**\n* `glean.client.governance.data.policies.create()`: \n * `request.config.sensitive_content_options.custom_sensitive_expressions` **Added**\n * `response.report.config.sensitive_content_options.custom_sensitive_expressions` **Added**\n* `glean.client.governance.data.reports.create()`: \n * `request.config.sensitive_content_options.custom_sensitive_expressions` **Added**\n"

.speakeasy/gen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ generation:
3030
generateNewTests: true
3131
skipResponseBodyAssertions: true
3232
python:
33-
version: 0.11.22
33+
version: 0.12.1
3434
additionalDependencies:
3535
dev: {}
3636
main: {}
@@ -61,12 +61,14 @@ python:
6161
operations: ""
6262
shared: ""
6363
webhooks: ""
64+
inferUnionDiscriminators: true
6465
inputModelSuffix: input
6566
legacyPyright: true
6667
license: ""
6768
maxMethodParams: 999
6869
methodArguments: infer-optional-args
6970
moduleName: glean.api_client
71+
multipartArrayFormat: legacy
7072
outputModelSuffix: output
7173
packageManager: poetry
7274
packageName: glean

.speakeasy/glean-merged-spec.yaml

Lines changed: 164 additions & 5 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: 1c30a2e9466bf278374bd82863042433f7fa8a6d
5+
x-source-commit-sha: 53c23dee5a94c2ab7af13da78379a4566fe9676a
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: bfa098a27c3b8f11087766de34606765c946e305
25+
x-open-api-commit-sha: c01414373169584a02c8e03a00b6dc80cdef73f8
2626
x-speakeasy-name: 'Glean API'
2727
servers:
2828
- url: https://{instance}-be.glean.com
@@ -3200,6 +3200,40 @@ paths:
32003200
description: Conflict
32013201
x-speakeasy-name-override: upload
32023202
x-speakeasy-group: indexing.shortcuts
3203+
/api/index/v1/document/{docId}/custom-metadata/{groupName}:
3204+
servers:
3205+
- url: https://{domain}-be.glean.com/rest/api/index
3206+
variables:
3207+
domain:
3208+
default: domain
3209+
description: Email domain (without extension) that determines the deployment backend.
3210+
parameters:
3211+
- name: docId
3212+
in: path
3213+
description: Unique Glean identifier of the document
3214+
required: true
3215+
schema:
3216+
type: string
3217+
- name: groupName
3218+
in: path
3219+
description: Name of the metadata group as specified while adding schema
3220+
required: true
3221+
schema:
3222+
type: string
3223+
/api/index/v1/custom-metadata/schema/{groupName}:
3224+
servers:
3225+
- url: https://{domain}-be.glean.com/rest/api/index
3226+
variables:
3227+
domain:
3228+
default: domain
3229+
description: Email domain (without extension) that determines the deployment backend.
3230+
parameters:
3231+
- name: groupName
3232+
in: path
3233+
description: Name of the metadata group schema
3234+
required: true
3235+
schema:
3236+
type: string
32033237
/rest/api/v1/governance/data/policies/{id}:
32043238
get:
32053239
description: Fetches the specified policy version, or the latest if no version is provided.
@@ -8069,6 +8103,7 @@ components:
80698103
- VISITORS_COUNT
80708104
- RECENT_SHARES
80718105
- DOCUMENT_CONTENT
8106+
- CUSTOM_METADATA
80728107
DocumentOrError:
80738108
oneOf:
80748109
- $ref: "#/components/schemas/Document"
@@ -12092,6 +12127,48 @@ components:
1209212127
description: List of lifecycle events corresponding to the document
1209312128
items:
1209412129
$ref: "#/components/schemas/LifeCycleEvent"
12130+
CustomMetadataPutRequest:
12131+
type: object
12132+
description: Request body for adding or updating custom metadata on a document
12133+
properties:
12134+
customMetadata:
12135+
type: array
12136+
description: Array of custom metadata key-value pairs
12137+
items:
12138+
$ref: "#/components/schemas/CustomProperty"
12139+
required:
12140+
- customMetadata
12141+
CustomMetadataSchema:
12142+
type: object
12143+
description: Schema for custom metadata containing metadata key definitions
12144+
properties:
12145+
metadataKeys:
12146+
type: array
12147+
description: Array of metadata key definitions
12148+
items:
12149+
$ref: "#/components/schemas/PropertyDefinition"
12150+
required:
12151+
- metadataKeys
12152+
SuccessResponse:
12153+
type: object
12154+
description: Success response for custom metadata operations
12155+
properties:
12156+
success:
12157+
type: boolean
12158+
description: Indicates if the operation was successful
12159+
default: true
12160+
ErrorInfoResponse:
12161+
type: object
12162+
description: Error response for custom metadata operations
12163+
properties:
12164+
error:
12165+
type: string
12166+
description: Error message describing what went wrong
12167+
message:
12168+
type: string
12169+
description: Additional details about the error
12170+
required:
12171+
- error
1209512172
PropertyDefinition:
1209612173
properties:
1209712174
name:
@@ -12537,24 +12614,69 @@ components:
1253712614
type: array
1253812615
items:
1253912616
$ref: "#/components/schemas/Hotword"
12617+
CustomSensitiveRuleType:
12618+
type: string
12619+
description: Type of the custom sensitive rule.
12620+
enum:
12621+
- REGEX
12622+
- TERM
12623+
- INFO_TYPE
12624+
CustomSensitiveRule:
12625+
properties:
12626+
id:
12627+
description: Identifier for the custom sensitive expression.
12628+
type: string
12629+
value:
12630+
type: string
12631+
description: The value of the custom sensitive rule. For REGEX type, this is the regex pattern; for TERM type, it is the term to match; and for INFO_TYPE type, it refers to predefined categories of sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available options.
12632+
type:
12633+
$ref: "#/components/schemas/CustomSensitiveRuleType"
12634+
likelihoodThreshold:
12635+
description: Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type.
12636+
type: string
12637+
enum:
12638+
- LIKELY
12639+
- VERY_LIKELY
12640+
- POSSIBLE
12641+
- UNLIKELY
12642+
- VERY_UNLIKELY
12643+
CustomSensitiveExpression:
12644+
properties:
12645+
id:
12646+
description: Identifier for the custom sensitive expression.
12647+
type: string
12648+
keyword:
12649+
description: The keyword to match against.
12650+
$ref: "#/components/schemas/CustomSensitiveRule"
12651+
evaluationExpression:
12652+
description: The expression to evaluate the keyword match.
12653+
type: string
1254012654
SensitiveContentOptions:
1254112655
description: Options for defining sensitive content within scanned documents.
1254212656
properties:
1254312657
sensitiveInfoTypes:
12544-
description: Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types.
12658+
deprecated: true
12659+
description: DEPRECATED - use 'customSensitiveExpressions' instead.
1254512660
type: array
1254612661
items:
1254712662
$ref: "#/components/schemas/SensitiveInfoType"
1254812663
sensitiveTerms:
12549-
description: list of words and phrases to consider as sensitive content
12664+
deprecated: true
12665+
description: DEPRECATED - use 'customSensitiveExpressions' instead.
1255012666
type: array
1255112667
items:
1255212668
$ref: "#/components/schemas/SensitiveExpression"
1255312669
sensitiveRegexes:
12554-
description: list of regular expressions to consider as sensitive content
12670+
deprecated: true
12671+
description: DEPRECATED - use 'customSensitiveExpressions' instead.
1255512672
type: array
1255612673
items:
1255712674
$ref: "#/components/schemas/SensitiveExpression"
12675+
customSensitiveExpressions:
12676+
description: list of custom sensitive expressions to consider as sensitive content
12677+
type: array
12678+
items:
12679+
$ref: "#/components/schemas/CustomSensitiveExpression"
1255812680
DlpPersonMetadata:
1255912681
properties:
1256012682
firstName:
@@ -12869,6 +12991,43 @@ components:
1286912991
description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.
1287012992
schema:
1287112993
type: integer
12994+
responses:
12995+
SuccessResponse:
12996+
description: OK
12997+
content:
12998+
application/json:
12999+
schema:
13000+
$ref: "#/components/schemas/SuccessResponse"
13001+
BadRequestError:
13002+
description: Bad Request
13003+
content:
13004+
application/json:
13005+
schema:
13006+
$ref: "#/components/schemas/ErrorInfoResponse"
13007+
UnauthorizedError:
13008+
description: Not Authorized
13009+
content:
13010+
application/json:
13011+
schema:
13012+
$ref: "#/components/schemas/ErrorInfoResponse"
13013+
NotFoundError:
13014+
description: Not Found
13015+
content:
13016+
application/json:
13017+
schema:
13018+
$ref: "#/components/schemas/ErrorInfoResponse"
13019+
TooManyRequestsError:
13020+
description: Too Many Requests
13021+
content:
13022+
application/json:
13023+
schema:
13024+
$ref: "#/components/schemas/ErrorInfoResponse"
13025+
InternalServerError:
13026+
description: Internal Server Error
13027+
content:
13028+
application/json:
13029+
schema:
13030+
$ref: "#/components/schemas/ErrorInfoResponse"
1287213031
x-tagGroups:
1287313032
- name: Search & Generative AI
1287413033
tags:

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ speakeasyVersion: 1.650.0
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:6e09038391ad70d5f9b70c63b3284e81624f1cd18b512456e1ef14583adba00f
6-
sourceBlobDigest: sha256:62b0b08fedd634cc54f3083a149d42af7b4b534cbe8da080c65eaa8377fdcddd
5+
sourceRevisionDigest: sha256:40667e97cffdaef347cfcb0c3acb5b2493ee349d333151819a362ac280ef9223
6+
sourceBlobDigest: sha256:6a479e7b96b2f3c772f2eb82ed202cd8058841ea680fe0b01519440bfa8059b8
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1763969825
9+
- speakeasy-sdk-regen-1764031800
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:6e09038391ad70d5f9b70c63b3284e81624f1cd18b512456e1ef14583adba00f
21-
sourceBlobDigest: sha256:62b0b08fedd634cc54f3083a149d42af7b4b534cbe8da080c65eaa8377fdcddd
20+
sourceRevisionDigest: sha256:40667e97cffdaef347cfcb0c3acb5b2493ee349d333151819a362ac280ef9223
21+
sourceBlobDigest: sha256:6a479e7b96b2f3c772f2eb82ed202cd8058841ea680fe0b01519440bfa8059b8
2222
codeSamplesNamespace: glean-api-specs-python-code-samples
23-
codeSamplesRevisionDigest: sha256:380bfe75991017e623736785201d21cac9de54b2bab5d9bfa09699ac73829ad6
23+
codeSamplesRevisionDigest: sha256:033a68cc40961c0b135c179b10d08089776676c4b3c64aec1712b78bdac43746
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
@@ -448,4 +448,14 @@ Based on:
448448
### Generated
449449
- [python v0.11.22] .
450450
### Releases
451-
- [PyPI v0.11.22] https://pypi.org/project/glean/0.11.22 - .
451+
- [PyPI v0.11.22] https://pypi.org/project/glean/0.11.22 - .
452+
453+
## 2025-12-02 06:43:24
454+
### Changes
455+
Based on:
456+
- OpenAPI Doc
457+
- Speakeasy CLI 1.650.0 (2.743.2) https://github.com/speakeasy-api/speakeasy
458+
### Generated
459+
- [python v0.12.1] .
460+
### Releases
461+
- [PyPI v0.12.1] https://pypi.org/project/glean/0.12.1 - .
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CustomSensitiveExpression
2+
3+
4+
## Fields
5+
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
8+
| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the custom sensitive expression. |
9+
| `keyword` | [Optional[models.CustomSensitiveRule]](../models/customsensitiverule.md) | :heavy_minus_sign: | N/A |
10+
| `evaluation_expression` | *Optional[str]* | :heavy_minus_sign: | The expression to evaluate the keyword match. |

0 commit comments

Comments
 (0)