diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 7dd5e51a..55195bc3 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 3e3290ca-0ee8-4981-b1bc-14536048fa63
management:
- docChecksum: f901905eddb4d3e76a54e8da46f5347d
+ docChecksum: 077c6362a0efa2eeabfcbaf36c09ccf5
docVersion: 0.9.0
speakeasyVersion: 1.650.0
generationVersion: 2.743.2
- releaseVersion: 0.11.22
- configChecksum: 15c71f102e245f5606dc6f4f470c2ad8
+ releaseVersion: 0.12.1
+ configChecksum: 49b9e5da7f967f599e502dd87a1ffb77
repoURL: https://github.com/gleanwork/api-client-python.git
installationURL: https://github.com/gleanwork/api-client-python.git
published: true
@@ -194,6 +194,10 @@ generatedFiles:
- docs/models/customfieldvalueperson.md
- docs/models/customfieldvaluestr.md
- docs/models/customproperty.md
+ - docs/models/customsensitiveexpression.md
+ - docs/models/customsensitiverule.md
+ - docs/models/customsensitiverulelikelihoodthreshold.md
+ - docs/models/customsensitiveruletype.md
- docs/models/datasource.md
- docs/models/datasourcebulkmembershipdefinition.md
- docs/models/datasourcecategory.md
@@ -407,7 +411,6 @@ generatedFiles:
- docs/models/knowledgetype.md
- docs/models/labeledcountinfo.md
- docs/models/lastscanstatus.md
- - docs/models/likelihoodthreshold.md
- docs/models/listanswersrequest.md
- docs/models/listanswersresponse.md
- docs/models/listchatsrequest.md
@@ -536,6 +539,7 @@ generatedFiles:
- docs/models/sensitivecontentoptions.md
- docs/models/sensitiveexpression.md
- docs/models/sensitiveinfotype.md
+ - docs/models/sensitiveinfotypelikelihoodthreshold.md
- docs/models/sessioninfo.md
- docs/models/share.md
- docs/models/sharingoptions.md
@@ -822,6 +826,9 @@ generatedFiles:
- src/glean/api_client/models/customfieldvalueperson.py
- src/glean/api_client/models/customfieldvaluestr.py
- src/glean/api_client/models/customproperty.py
+ - src/glean/api_client/models/customsensitiveexpression.py
+ - src/glean/api_client/models/customsensitiverule.py
+ - src/glean/api_client/models/customsensitiveruletype.py
- src/glean/api_client/models/datasourcebulkmembershipdefinition.py
- src/glean/api_client/models/datasourcegroupdefinition.py
- src/glean/api_client/models/datasourcemembershipdefinition.py
@@ -1414,6 +1421,9 @@ generatedFiles:
- tests/mockserver/internal/sdk/models/components/customfieldvalueperson.go
- tests/mockserver/internal/sdk/models/components/customfieldvaluestr.go
- tests/mockserver/internal/sdk/models/components/customproperty.go
+ - tests/mockserver/internal/sdk/models/components/customsensitiveexpression.go
+ - tests/mockserver/internal/sdk/models/components/customsensitiverule.go
+ - tests/mockserver/internal/sdk/models/components/customsensitiveruletype.go
- tests/mockserver/internal/sdk/models/components/datasourcebulkmembershipdefinition.go
- tests/mockserver/internal/sdk/models/components/datasourcegroupdefinition.go
- tests/mockserver/internal/sdk/models/components/datasourcemembershipdefinition.go
@@ -2741,6 +2751,4 @@ generatedTests:
editcollection: "2025-06-12T19:13:52-04:00"
createshortcut: "2025-06-12T19:13:52-04:00"
updateshortcut: "2025-06-12T19:13:52-04:00"
-releaseNotes: |
- ## Python SDK Changes Detected:
- * `glean.client.insights.retrieve()`: `response.agents_response.agents_usage_by_department_insights.[]` **Changed**
+releaseNotes: "## Python SDK Changes Detected:\n* `glean.client.announcements.create()`: \n * `request.body.structured_list.[].document.metadata.author.metadata.timezone_iana` **Added**\n * `response.body.structured_list.[].document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.announcements.update()`: \n * `request.body.structured_list.[].document.metadata.author.metadata.timezone_iana` **Added**\n * `response.body.structured_list.[].document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.answers.create()`: \n * `request.data.added_roles.[].person.metadata.timezone_iana` **Added**\n * `response.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.answers.update()`: \n * `request.added_roles.[].person.metadata.timezone_iana` **Added**\n * `response.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.answers.retrieve()`: `response.answer_result.answer.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.answers.list()`: `response.answer_results.[].answer.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.chat.create()`: \n * `request.messages.[].citations.[].source_document.metadata.author.metadata.timezone_iana` **Added**\n * `response.messages.[].citations.[].source_document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.chat.retrieve()`: `response.chat_result.chat.created_by.metadata.timezone_iana` **Added**\n* `glean.client.chat.list()`: `response.chat_results.[].chat.created_by.metadata.timezone_iana` **Added**\n* `glean.client.chat.create_stream()`: \n * `request.messages.[].citations.[].source_document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.collections.add_items()`: `response.collection.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.collections.create()`: \n * `request.added_roles.[].person.metadata.timezone_iana` **Added**\n * `response.[class].collection.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.collections.delete_item()`: `response.collection.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.collections.update()`: \n * `request.added_roles.[].person.metadata.timezone_iana` **Added**\n * `response.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.collections.update_item()`: `response.collection.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.collections.retrieve()`: `response.collection.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.collections.list()`: `response.collections.[].added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.documents.retrieve()`: `response.documents.{}.[document].metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.documents.retrieve_by_facets()`: `response.documents.[].metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.insights.retrieve()`: `response.users.activity_insights.[].user.metadata.timezone_iana` **Added**\n* `glean.client.messages.retrieve()`: `response.search_response.results.[].structured_results.[].document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.pins.update()`: `response.attribution.metadata.timezone_iana` **Added**\n* `glean.client.pins.retrieve()`: `response.pin.attribution.metadata.timezone_iana` **Added**\n* `glean.client.pins.list()`: `response.pins.[].attribution.metadata.timezone_iana` **Added**\n* `glean.client.pins.create()`: `response.attribution.metadata.timezone_iana` **Added**\n* `glean.client.search.query_as_admin()`: \n * `request.source_document.metadata.author.metadata.timezone_iana` **Added**\n * `response.results.[].structured_results.[].document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.search.autocomplete()`: `response.results.[].document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.search.retrieve_feed()`: `response.results.[].primary_entry.created_by.metadata.timezone_iana` **Added**\n* `glean.client.search.recommendations()`: \n * `request.source_document.metadata.author.metadata.timezone_iana` **Added**\n * `response.results.[].structured_results.[].document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.search.query()`: \n * `request.source_document.metadata.author.metadata.timezone_iana` **Added**\n * `response.results.[].structured_results.[].document.metadata.author.metadata.timezone_iana` **Added**\n* `glean.client.entities.list()`: `response.results.[].metadata.timezone_iana` **Added**\n* `glean.client.entities.read_people()`: `response.results.[].metadata.timezone_iana` **Added**\n* `glean.client.shortcuts.create()`: \n * `request.data.added_roles.[].person.metadata.timezone_iana` **Added**\n * `response.shortcut.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.shortcuts.retrieve()`: `response.shortcut.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.shortcuts.list()`: `response.shortcuts.[].added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.shortcuts.update()`: \n * `request.added_roles.[].person.metadata.timezone_iana` **Added**\n * `response.shortcut.added_roles.[].person.metadata.timezone_iana` **Added**\n* `glean.client.verification.add_reminder()`: `response.metadata.last_verifier.metadata.timezone_iana` **Added**\n* `glean.client.verification.list()`: `response.documents.[].metadata.last_verifier.metadata.timezone_iana` **Added**\n* `glean.client.verification.verify()`: `response.metadata.last_verifier.metadata.timezone_iana` **Added**\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"
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index bad83ffd..68b05afe 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -30,7 +30,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: true
python:
- version: 0.11.22
+ version: 0.12.1
additionalDependencies:
dev: {}
main: {}
@@ -61,12 +61,14 @@ python:
operations: ""
shared: ""
webhooks: ""
+ inferUnionDiscriminators: true
inputModelSuffix: input
legacyPyright: true
license: ""
maxMethodParams: 999
methodArguments: infer-optional-args
moduleName: glean.api_client
+ multipartArrayFormat: standard
outputModelSuffix: output
packageManager: poetry
packageName: glean
@@ -75,4 +77,3 @@ python:
responseFormat: flat
sseFlatResponse: false
templateVersion: v2
- multipartArrayFormat: standard
diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml
index 596e5121..72dea437 100644
--- a/.speakeasy/glean-merged-spec.yaml
+++ b/.speakeasy/glean-merged-spec.yaml
@@ -2,7 +2,7 @@ openapi: 3.0.0
info:
version: 0.9.0
title: Glean API
- x-source-commit-sha: 1c30a2e9466bf278374bd82863042433f7fa8a6d
+ x-source-commit-sha: afc48c97130c8266f20ef5b0ae52f1cc33582c8d
description: |
# Introduction
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:
These API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.
x-logo:
url: https://app.glean.com/images/glean-text2.svg
- x-open-api-commit-sha: bfa098a27c3b8f11087766de34606765c946e305
+ x-open-api-commit-sha: 7303041639c4788cae9b7fc26efb38f8c87e5491
x-speakeasy-name: 'Glean API'
servers:
- url: https://{instance}-be.glean.com
@@ -6473,6 +6473,9 @@ components:
type: integer
format: int64
description: The offset of the person's timezone in seconds from UTC.
+ timezoneIANA:
+ type: string
+ description: The IANA timezone identifier, e.g. "America/Los_Angeles".
photoUrl:
type: string
format: url
@@ -8069,6 +8072,7 @@ components:
- VISITORS_COUNT
- RECENT_SHARES
- DOCUMENT_CONTENT
+ - CUSTOM_METADATA
DocumentOrError:
oneOf:
- $ref: "#/components/schemas/Document"
@@ -12092,6 +12096,26 @@ components:
description: List of lifecycle events corresponding to the document
items:
$ref: "#/components/schemas/LifeCycleEvent"
+ SuccessResponse:
+ type: object
+ description: Success response for custom metadata operations
+ properties:
+ success:
+ type: boolean
+ description: Indicates if the operation was successful
+ default: true
+ ErrorInfoResponse:
+ type: object
+ description: Error response for custom metadata operations
+ properties:
+ error:
+ type: string
+ description: Error message describing what went wrong
+ message:
+ type: string
+ description: Additional details about the error
+ required:
+ - error
PropertyDefinition:
properties:
name:
@@ -12537,24 +12561,69 @@ components:
type: array
items:
$ref: "#/components/schemas/Hotword"
+ CustomSensitiveRuleType:
+ type: string
+ description: Type of the custom sensitive rule.
+ enum:
+ - REGEX
+ - TERM
+ - INFO_TYPE
+ CustomSensitiveRule:
+ properties:
+ id:
+ description: Identifier for the custom sensitive expression.
+ type: string
+ value:
+ type: string
+ 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.
+ type:
+ $ref: "#/components/schemas/CustomSensitiveRuleType"
+ likelihoodThreshold:
+ description: Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type.
+ type: string
+ enum:
+ - LIKELY
+ - VERY_LIKELY
+ - POSSIBLE
+ - UNLIKELY
+ - VERY_UNLIKELY
+ CustomSensitiveExpression:
+ properties:
+ id:
+ description: Identifier for the custom sensitive expression.
+ type: string
+ keyword:
+ description: The keyword to match against.
+ $ref: "#/components/schemas/CustomSensitiveRule"
+ evaluationExpression:
+ description: The expression to evaluate the keyword match.
+ type: string
SensitiveContentOptions:
description: Options for defining sensitive content within scanned documents.
properties:
sensitiveInfoTypes:
- description: Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types.
+ deprecated: true
+ description: DEPRECATED - use 'customSensitiveExpressions' instead.
type: array
items:
$ref: "#/components/schemas/SensitiveInfoType"
sensitiveTerms:
- description: list of words and phrases to consider as sensitive content
+ deprecated: true
+ description: DEPRECATED - use 'customSensitiveExpressions' instead.
type: array
items:
$ref: "#/components/schemas/SensitiveExpression"
sensitiveRegexes:
- description: list of regular expressions to consider as sensitive content
+ deprecated: true
+ description: DEPRECATED - use 'customSensitiveExpressions' instead.
type: array
items:
$ref: "#/components/schemas/SensitiveExpression"
+ customSensitiveExpressions:
+ description: list of custom sensitive expressions to consider as sensitive content
+ type: array
+ items:
+ $ref: "#/components/schemas/CustomSensitiveExpression"
DlpPersonMetadata:
properties:
firstName:
@@ -12869,6 +12938,43 @@ components:
description: The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.
schema:
type: integer
+ responses:
+ SuccessResponse:
+ description: OK
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/SuccessResponse"
+ BadRequestError:
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorInfoResponse"
+ UnauthorizedError:
+ description: Not Authorized
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorInfoResponse"
+ NotFoundError:
+ description: Not Found
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorInfoResponse"
+ TooManyRequestsError:
+ description: Too Many Requests
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorInfoResponse"
+ InternalServerError:
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/ErrorInfoResponse"
x-tagGroups:
- name: Search & Generative AI
tags:
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index 568ba9fe..015cb90a 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -2,11 +2,11 @@ speakeasyVersion: 1.650.0
sources:
Glean API:
sourceNamespace: glean-api-specs
- sourceRevisionDigest: sha256:6e09038391ad70d5f9b70c63b3284e81624f1cd18b512456e1ef14583adba00f
- sourceBlobDigest: sha256:62b0b08fedd634cc54f3083a149d42af7b4b534cbe8da080c65eaa8377fdcddd
+ sourceRevisionDigest: sha256:8fb166febe139cb4732d9297be9c66cae8cc93a52eb54f821edb54522b99e203
+ sourceBlobDigest: sha256:e723ddc20998609dc7685b7bf6866676702653f2cd4940086b44836bade7393b
tags:
- latest
- - speakeasy-sdk-regen-1763969825
+ - speakeasy-sdk-regen-1764031800
Glean Client API:
sourceNamespace: glean-client-api
sourceRevisionDigest: sha256:4edc63ad559e4f2c9fb9ebf5edaaaaa9269f1874d271cfd84b441d6dacac43d2
@@ -17,10 +17,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
- sourceRevisionDigest: sha256:6e09038391ad70d5f9b70c63b3284e81624f1cd18b512456e1ef14583adba00f
- sourceBlobDigest: sha256:62b0b08fedd634cc54f3083a149d42af7b4b534cbe8da080c65eaa8377fdcddd
+ sourceRevisionDigest: sha256:8fb166febe139cb4732d9297be9c66cae8cc93a52eb54f821edb54522b99e203
+ sourceBlobDigest: sha256:e723ddc20998609dc7685b7bf6866676702653f2cd4940086b44836bade7393b
codeSamplesNamespace: glean-api-specs-python-code-samples
- codeSamplesRevisionDigest: sha256:380bfe75991017e623736785201d21cac9de54b2bab5d9bfa09699ac73829ad6
+ codeSamplesRevisionDigest: sha256:1fb4ec6b3e117ccf9682d7d804ec949b567672fdcf63d3bcd7125ee6c7cfde53
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
diff --git a/RELEASES.md b/RELEASES.md
index 6a728752..967483d5 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -448,4 +448,14 @@ Based on:
### Generated
- [python v0.11.22] .
### Releases
-- [PyPI v0.11.22] https://pypi.org/project/glean/0.11.22 - .
\ No newline at end of file
+- [PyPI v0.11.22] https://pypi.org/project/glean/0.11.22 - .
+
+## 2025-12-05 01:44:09
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.650.0 (2.743.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v0.12.1] .
+### Releases
+- [PyPI v0.12.1] https://pypi.org/project/glean/0.12.1 - .
\ No newline at end of file
diff --git a/docs/models/customsensitiveexpression.md b/docs/models/customsensitiveexpression.md
new file mode 100644
index 00000000..2ec75dcd
--- /dev/null
+++ b/docs/models/customsensitiveexpression.md
@@ -0,0 +1,10 @@
+# CustomSensitiveExpression
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the custom sensitive expression. |
+| `keyword` | [Optional[models.CustomSensitiveRule]](../models/customsensitiverule.md) | :heavy_minus_sign: | N/A |
+| `evaluation_expression` | *Optional[str]* | :heavy_minus_sign: | The expression to evaluate the keyword match. |
\ No newline at end of file
diff --git a/docs/models/customsensitiverule.md b/docs/models/customsensitiverule.md
new file mode 100644
index 00000000..04ae799b
--- /dev/null
+++ b/docs/models/customsensitiverule.md
@@ -0,0 +1,11 @@
+# CustomSensitiveRule
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `id` | *Optional[str]* | :heavy_minus_sign: | Identifier for the custom sensitive expression. |
+| `value` | *Optional[str]* | :heavy_minus_sign: | 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. |
+| `type` | [Optional[models.CustomSensitiveRuleType]](../models/customsensitiveruletype.md) | :heavy_minus_sign: | Type of the custom sensitive rule. |
+| `likelihood_threshold` | [Optional[models.CustomSensitiveRuleLikelihoodThreshold]](../models/customsensitiverulelikelihoodthreshold.md) | :heavy_minus_sign: | Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type. |
\ No newline at end of file
diff --git a/docs/models/customsensitiverulelikelihoodthreshold.md b/docs/models/customsensitiverulelikelihoodthreshold.md
new file mode 100644
index 00000000..b7676f4d
--- /dev/null
+++ b/docs/models/customsensitiverulelikelihoodthreshold.md
@@ -0,0 +1,14 @@
+# CustomSensitiveRuleLikelihoodThreshold
+
+Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type.
+
+
+## Values
+
+| Name | Value |
+| --------------- | --------------- |
+| `LIKELY` | LIKELY |
+| `VERY_LIKELY` | VERY_LIKELY |
+| `POSSIBLE` | POSSIBLE |
+| `UNLIKELY` | UNLIKELY |
+| `VERY_UNLIKELY` | VERY_UNLIKELY |
\ No newline at end of file
diff --git a/docs/models/customsensitiveruletype.md b/docs/models/customsensitiveruletype.md
new file mode 100644
index 00000000..fe80b6f8
--- /dev/null
+++ b/docs/models/customsensitiveruletype.md
@@ -0,0 +1,12 @@
+# CustomSensitiveRuleType
+
+Type of the custom sensitive rule.
+
+
+## Values
+
+| Name | Value |
+| ----------- | ----------- |
+| `REGEX` | REGEX |
+| `TERM` | TERM |
+| `INFO_TYPE` | INFO_TYPE |
\ No newline at end of file
diff --git a/docs/models/getdocumentsrequestincludefield.md b/docs/models/getdocumentsrequestincludefield.md
index 47e11f89..1db38b74 100644
--- a/docs/models/getdocumentsrequestincludefield.md
+++ b/docs/models/getdocumentsrequestincludefield.md
@@ -8,4 +8,5 @@
| `LAST_VIEWED_AT` | LAST_VIEWED_AT |
| `VISITORS_COUNT` | VISITORS_COUNT |
| `RECENT_SHARES` | RECENT_SHARES |
-| `DOCUMENT_CONTENT` | DOCUMENT_CONTENT |
\ No newline at end of file
+| `DOCUMENT_CONTENT` | DOCUMENT_CONTENT |
+| `CUSTOM_METADATA` | CUSTOM_METADATA |
\ No newline at end of file
diff --git a/docs/models/personmetadata.md b/docs/models/personmetadata.md
index 5591311f..3bf2f124 100644
--- a/docs/models/personmetadata.md
+++ b/docs/models/personmetadata.md
@@ -23,6 +23,7 @@
| `phone` | *Optional[str]* | :heavy_minus_sign: | Phone number as a number string. | |
| `timezone` | *Optional[str]* | :heavy_minus_sign: | The timezone of the person. E.g. "Pacific Daylight Time". | |
| `timezone_offset` | *Optional[int]* | :heavy_minus_sign: | The offset of the person's timezone in seconds from UTC. | |
+| `timezone_iana` | *Optional[str]* | :heavy_minus_sign: | The IANA timezone identifier, e.g. "America/Los_Angeles". | |
| `photo_url` | *Optional[str]* | :heavy_minus_sign: | The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). | |
| `unedited_photo_url` | *Optional[str]* | :heavy_minus_sign: | The original photo URL of the person's avatar before any edits they made are applied | |
| `banner_url` | *Optional[str]* | :heavy_minus_sign: | The URL of the person's banner photo. | |
diff --git a/docs/models/sensitivecontentoptions.md b/docs/models/sensitivecontentoptions.md
index 3df874d1..3f2065d8 100644
--- a/docs/models/sensitivecontentoptions.md
+++ b/docs/models/sensitivecontentoptions.md
@@ -5,8 +5,9 @@ Options for defining sensitive content within scanned documents.
## Fields
-| Field | Type | Required | Description |
-| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
-| `sensitive_info_types` | List[[models.SensitiveInfoType](../models/sensitiveinfotype.md)] | :heavy_minus_sign: | Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types. |
-| `sensitive_terms` | List[[models.SensitiveExpression](../models/sensitiveexpression.md)] | :heavy_minus_sign: | list of words and phrases to consider as sensitive content |
-| `sensitive_regexes` | List[[models.SensitiveExpression](../models/sensitiveexpression.md)] | :heavy_minus_sign: | list of regular expressions to consider as sensitive content |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| ~~`sensitive_info_types`~~ | List[[models.SensitiveInfoType](../models/sensitiveinfotype.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
DEPRECATED - use 'customSensitiveExpressions' instead. |
+| ~~`sensitive_terms`~~ | List[[models.SensitiveExpression](../models/sensitiveexpression.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
DEPRECATED - use 'customSensitiveExpressions' instead. |
+| ~~`sensitive_regexes`~~ | List[[models.SensitiveExpression](../models/sensitiveexpression.md)] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.
DEPRECATED - use 'customSensitiveExpressions' instead. |
+| `custom_sensitive_expressions` | List[[models.CustomSensitiveExpression](../models/customsensitiveexpression.md)] | :heavy_minus_sign: | list of custom sensitive expressions to consider as sensitive content |
\ No newline at end of file
diff --git a/docs/models/sensitiveinfotype.md b/docs/models/sensitiveinfotype.md
index 66f89cb1..aa3f8f6e 100644
--- a/docs/models/sensitiveinfotype.md
+++ b/docs/models/sensitiveinfotype.md
@@ -5,5 +5,5 @@
| Field | Type | Required | Description |
| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
-| ~~`likelihood_threshold`~~ | [Optional[models.LikelihoodThreshold]](../models/likelihoodthreshold.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
+| ~~`likelihood_threshold`~~ | [Optional[models.SensitiveInfoTypeLikelihoodThreshold]](../models/sensitiveinfotypelikelihoodthreshold.md) | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
| `info_type` | *Optional[str]* | :heavy_minus_sign: | Text representation of an info-type to scan for. |
\ No newline at end of file
diff --git a/docs/models/likelihoodthreshold.md b/docs/models/sensitiveinfotypelikelihoodthreshold.md
similarity index 90%
rename from docs/models/likelihoodthreshold.md
rename to docs/models/sensitiveinfotypelikelihoodthreshold.md
index 81a5bd2e..e0f05786 100644
--- a/docs/models/likelihoodthreshold.md
+++ b/docs/models/sensitiveinfotypelikelihoodthreshold.md
@@ -1,4 +1,4 @@
-# ~~LikelihoodThreshold~~
+# ~~SensitiveInfoTypeLikelihoodThreshold~~
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
diff --git a/pyproject.toml b/pyproject.toml
index 68924c61..516033fc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "glean-api-client"
-version = "0.11.22"
+version = "0.12.1"
description = "Python Client SDK Generated by Speakeasy."
authors = [{ name = "Glean Technologies, Inc." }]
license = "MIT"
diff --git a/speakeasyusagegen/.speakeasy/logs/naming.log b/speakeasyusagegen/.speakeasy/logs/naming.log
index 7219a7ad..f561a616 100644
--- a/speakeasyusagegen/.speakeasy/logs/naming.log
+++ b/speakeasyusagegen/.speakeasy/logs/naming.log
@@ -360,6 +360,15 @@ DEBUG discriminated: Renamed to "DebugDatasourceStatusIdentityResponseComponent_
registrationID: "scope:shared refType:Schemas refName:DebugDatasourceStatusIdentityResponseComponent originalName:counts"
DEBUG
+--- Renaming 2 types with name "likelihoodThreshold" ---
+DEBUG discriminated: Renamed to "SensitiveInfoType_likelihoodThreshold"
+ labels: "original_name:likelihoodThreshold scope:shared data_type:enum refName:SensitiveInfoType"
+ registrationID: "scope:shared refType:Schemas refName:SensitiveInfoType originalName:likelihoodThreshold"
+DEBUG discriminated: Renamed to "CustomSensitiveRule_likelihoodThreshold"
+ labels: "original_name:likelihoodThreshold scope:shared data_type:enum refName:CustomSensitiveRule"
+ registrationID: "scope:shared refType:Schemas refName:CustomSensitiveRule originalName:likelihoodThreshold"
+DEBUG
+
--- Renaming 2 types with name "override" ---
DEBUG discriminated: Renamed to "DocumentVisibilityOverride_override"
labels: "original_name:override scope:shared data_type:enum refName:DocumentVisibilityOverride"
@@ -922,17 +931,21 @@ GetpolicyResponse (HttpMeta: HTTPMetadata, GetDlpReportResponse: GetDlpReportRes
DlpReport (id: string, name: string, config: DlpConfig ...)
DlpConfig (version: integer, sensitiveInfoTypes: array, inputOptions: InputOptions ...)
SensitiveInfoType (likelihoodThreshold: enum, infoType: string)
- LikelihoodThreshold (enum: LIKELY, VERY_LIKELY, POSSIBLE ...)
+ SensitiveInfoTypeLikelihoodThreshold (enum: LIKELY, VERY_LIKELY, POSSIBLE ...)
InputOptions (urlGreenlist: array, datasourcesType: enum, datasources: array ...)
DatasourcesType (enum: ALL, CUSTOM)
TimePeriodType (enum: ALL_TIME, PAST_YEAR, PAST_DAY ...)
TimeRange (startTime: date-time, endTime: date-time, lastNDaysValue: integer)
ExternalSharingOptions (enabled: boolean, threshold: integer, thresholdEnabled: boolean ...)
SharingOptions (enabled: boolean, threshold: integer, thresholdEnabled: boolean ...)
- SensitiveContentOptions (sensitiveInfoTypes: array, sensitiveTerms: array, sensitiveRegexes: array)
+ SensitiveContentOptions (sensitiveInfoTypes: array, sensitiveTerms: array, sensitiveRegexes: array ...)
SensitiveExpression (expression: string, hotwords: array)
Hotword (regex: string, proximity: HotwordProximity)
HotwordProximity (windowBefore: integer, windowAfter: integer)
+ CustomSensitiveExpression (id: string, keyword: CustomSensitiveRule, evaluationExpression: string)
+ CustomSensitiveRule (id: string, value: string, type: CustomSensitiveRuleType ...)
+ CustomSensitiveRuleType (enum: REGEX, TERM, INFO_TYPE)
+ CustomSensitiveRuleLikelihoodThreshold (enum: LIKELY, VERY_LIKELY, POSSIBLE ...)
DlpPerson (name: string, obfuscatedId: string, metadata: DlpPersonMetadata)
DlpPersonMetadata (firstName: string, email: string)
AllowlistOptions (terms: array)
diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py
index df578bc6..9af603e0 100644
--- a/src/glean/api_client/_version.py
+++ b/src/glean/api_client/_version.py
@@ -3,10 +3,10 @@
import importlib.metadata
__title__: str = "glean"
-__version__: str = "0.11.22"
+__version__: str = "0.12.1"
__openapi_doc_version__: str = "0.9.0"
__gen_version__: str = "2.743.2"
-__user_agent__: str = "speakeasy-sdk/python 0.11.22 2.743.2 0.9.0 glean"
+__user_agent__: str = "speakeasy-sdk/python 0.12.1 2.743.2 0.9.0 glean"
try:
if __package__ is not None:
diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py
index 0174e068..da6a03b7 100644
--- a/src/glean/api_client/models/__init__.py
+++ b/src/glean/api_client/models/__init__.py
@@ -366,6 +366,16 @@
)
from .customfieldvaluestr import CustomFieldValueStr, CustomFieldValueStrTypedDict
from .customproperty import CustomProperty, CustomPropertyTypedDict
+ from .customsensitiveexpression import (
+ CustomSensitiveExpression,
+ CustomSensitiveExpressionTypedDict,
+ )
+ from .customsensitiverule import (
+ CustomSensitiveRule,
+ CustomSensitiveRuleLikelihoodThreshold,
+ CustomSensitiveRuleTypedDict,
+ )
+ from .customsensitiveruletype import CustomSensitiveRuleType
from .datasourcebulkmembershipdefinition import (
DatasourceBulkMembershipDefinition,
DatasourceBulkMembershipDefinitionTypedDict,
@@ -1051,8 +1061,8 @@
)
from .sensitiveexpression import SensitiveExpression, SensitiveExpressionTypedDict
from .sensitiveinfotype import (
- LikelihoodThreshold,
SensitiveInfoType,
+ SensitiveInfoTypeLikelihoodThreshold,
SensitiveInfoTypeTypedDict,
)
from .sessioninfo import SessionInfo, SessionInfoTypedDict
@@ -1535,6 +1545,12 @@
"CustomFieldValueTypedDict",
"CustomProperty",
"CustomPropertyTypedDict",
+ "CustomSensitiveExpression",
+ "CustomSensitiveExpressionTypedDict",
+ "CustomSensitiveRule",
+ "CustomSensitiveRuleLikelihoodThreshold",
+ "CustomSensitiveRuleType",
+ "CustomSensitiveRuleTypedDict",
"Customer",
"CustomerMetadata",
"CustomerMetadataTypedDict",
@@ -1925,7 +1941,6 @@
"LabeledCountInfo",
"LabeledCountInfoTypedDict",
"LastScanStatus",
- "LikelihoodThreshold",
"ListAnswersRequest",
"ListAnswersRequestTypedDict",
"ListAnswersResponse",
@@ -2151,6 +2166,7 @@
"SensitiveExpression",
"SensitiveExpressionTypedDict",
"SensitiveInfoType",
+ "SensitiveInfoTypeLikelihoodThreshold",
"SensitiveInfoTypeTypedDict",
"SessionInfo",
"SessionInfoTypedDict",
@@ -2561,6 +2577,12 @@
"CustomFieldValueStrTypedDict": ".customfieldvaluestr",
"CustomProperty": ".customproperty",
"CustomPropertyTypedDict": ".customproperty",
+ "CustomSensitiveExpression": ".customsensitiveexpression",
+ "CustomSensitiveExpressionTypedDict": ".customsensitiveexpression",
+ "CustomSensitiveRule": ".customsensitiverule",
+ "CustomSensitiveRuleLikelihoodThreshold": ".customsensitiverule",
+ "CustomSensitiveRuleTypedDict": ".customsensitiverule",
+ "CustomSensitiveRuleType": ".customsensitiveruletype",
"DatasourceBulkMembershipDefinition": ".datasourcebulkmembershipdefinition",
"DatasourceBulkMembershipDefinitionTypedDict": ".datasourcebulkmembershipdefinition",
"DatasourceGroupDefinition": ".datasourcegroupdefinition",
@@ -3111,8 +3133,8 @@
"SensitiveContentOptionsTypedDict": ".sensitivecontentoptions",
"SensitiveExpression": ".sensitiveexpression",
"SensitiveExpressionTypedDict": ".sensitiveexpression",
- "LikelihoodThreshold": ".sensitiveinfotype",
"SensitiveInfoType": ".sensitiveinfotype",
+ "SensitiveInfoTypeLikelihoodThreshold": ".sensitiveinfotype",
"SensitiveInfoTypeTypedDict": ".sensitiveinfotype",
"SessionInfo": ".sessioninfo",
"SessionInfoTypedDict": ".sessioninfo",
diff --git a/src/glean/api_client/models/customsensitiveexpression.py b/src/glean/api_client/models/customsensitiveexpression.py
new file mode 100644
index 00000000..94fc516a
--- /dev/null
+++ b/src/glean/api_client/models/customsensitiveexpression.py
@@ -0,0 +1,28 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .customsensitiverule import CustomSensitiveRule, CustomSensitiveRuleTypedDict
+from glean.api_client.types import BaseModel
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CustomSensitiveExpressionTypedDict(TypedDict):
+ id: NotRequired[str]
+ r"""Identifier for the custom sensitive expression."""
+ keyword: NotRequired[CustomSensitiveRuleTypedDict]
+ evaluation_expression: NotRequired[str]
+ r"""The expression to evaluate the keyword match."""
+
+
+class CustomSensitiveExpression(BaseModel):
+ id: Optional[str] = None
+ r"""Identifier for the custom sensitive expression."""
+
+ keyword: Optional[CustomSensitiveRule] = None
+
+ evaluation_expression: Annotated[
+ Optional[str], pydantic.Field(alias="evaluationExpression")
+ ] = None
+ r"""The expression to evaluate the keyword match."""
diff --git a/src/glean/api_client/models/customsensitiverule.py b/src/glean/api_client/models/customsensitiverule.py
new file mode 100644
index 00000000..de6d3452
--- /dev/null
+++ b/src/glean/api_client/models/customsensitiverule.py
@@ -0,0 +1,47 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from .customsensitiveruletype import CustomSensitiveRuleType
+from enum import Enum
+from glean.api_client.types import BaseModel
+import pydantic
+from typing import Optional
+from typing_extensions import Annotated, NotRequired, TypedDict
+
+
+class CustomSensitiveRuleLikelihoodThreshold(str, Enum):
+ r"""Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type."""
+
+ LIKELY = "LIKELY"
+ VERY_LIKELY = "VERY_LIKELY"
+ POSSIBLE = "POSSIBLE"
+ UNLIKELY = "UNLIKELY"
+ VERY_UNLIKELY = "VERY_UNLIKELY"
+
+
+class CustomSensitiveRuleTypedDict(TypedDict):
+ id: NotRequired[str]
+ r"""Identifier for the custom sensitive expression."""
+ value: NotRequired[str]
+ r"""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."""
+ type: NotRequired[CustomSensitiveRuleType]
+ r"""Type of the custom sensitive rule."""
+ likelihood_threshold: NotRequired[CustomSensitiveRuleLikelihoodThreshold]
+ r"""Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type."""
+
+
+class CustomSensitiveRule(BaseModel):
+ id: Optional[str] = None
+ r"""Identifier for the custom sensitive expression."""
+
+ value: Optional[str] = None
+ r"""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."""
+
+ type: Optional[CustomSensitiveRuleType] = None
+ r"""Type of the custom sensitive rule."""
+
+ likelihood_threshold: Annotated[
+ Optional[CustomSensitiveRuleLikelihoodThreshold],
+ pydantic.Field(alias="likelihoodThreshold"),
+ ] = None
+ r"""Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type."""
diff --git a/src/glean/api_client/models/customsensitiveruletype.py b/src/glean/api_client/models/customsensitiveruletype.py
new file mode 100644
index 00000000..be887e84
--- /dev/null
+++ b/src/glean/api_client/models/customsensitiveruletype.py
@@ -0,0 +1,12 @@
+"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
+
+from __future__ import annotations
+from enum import Enum
+
+
+class CustomSensitiveRuleType(str, Enum):
+ r"""Type of the custom sensitive rule."""
+
+ REGEX = "REGEX"
+ TERM = "TERM"
+ INFO_TYPE = "INFO_TYPE"
diff --git a/src/glean/api_client/models/getdocumentsrequest.py b/src/glean/api_client/models/getdocumentsrequest.py
index fccf9c08..26c94d2a 100644
--- a/src/glean/api_client/models/getdocumentsrequest.py
+++ b/src/glean/api_client/models/getdocumentsrequest.py
@@ -14,6 +14,7 @@ class GetDocumentsRequestIncludeField(str, Enum):
VISITORS_COUNT = "VISITORS_COUNT"
RECENT_SHARES = "RECENT_SHARES"
DOCUMENT_CONTENT = "DOCUMENT_CONTENT"
+ CUSTOM_METADATA = "CUSTOM_METADATA"
class GetDocumentsRequestTypedDict(TypedDict):
diff --git a/src/glean/api_client/models/personmetadata.py b/src/glean/api_client/models/personmetadata.py
index 69b4984a..ac2303cd 100644
--- a/src/glean/api_client/models/personmetadata.py
+++ b/src/glean/api_client/models/personmetadata.py
@@ -69,6 +69,8 @@ class PersonMetadataTypedDict(TypedDict):
r"""The timezone of the person. E.g. \"Pacific Daylight Time\"."""
timezone_offset: NotRequired[int]
r"""The offset of the person's timezone in seconds from UTC."""
+ timezone_iana: NotRequired[str]
+ r"""The IANA timezone identifier, e.g. \"America/Los_Angeles\"."""
photo_url: NotRequired[str]
r"""The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs)."""
unedited_photo_url: NotRequired[str]
@@ -188,6 +190,9 @@ class PersonMetadata(BaseModel):
] = None
r"""The offset of the person's timezone in seconds from UTC."""
+ timezone_iana: Annotated[Optional[str], pydantic.Field(alias="timezoneIANA")] = None
+ r"""The IANA timezone identifier, e.g. \"America/Los_Angeles\"."""
+
photo_url: Annotated[Optional[str], pydantic.Field(alias="photoUrl")] = None
r"""The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs)."""
diff --git a/src/glean/api_client/models/sensitivecontentoptions.py b/src/glean/api_client/models/sensitivecontentoptions.py
index 41619cb7..735c4b7b 100644
--- a/src/glean/api_client/models/sensitivecontentoptions.py
+++ b/src/glean/api_client/models/sensitivecontentoptions.py
@@ -1,6 +1,10 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
+from .customsensitiveexpression import (
+ CustomSensitiveExpression,
+ CustomSensitiveExpressionTypedDict,
+)
from .sensitiveexpression import SensitiveExpression, SensitiveExpressionTypedDict
from .sensitiveinfotype import SensitiveInfoType, SensitiveInfoTypeTypedDict
from glean.api_client.types import BaseModel
@@ -13,27 +17,47 @@ class SensitiveContentOptionsTypedDict(TypedDict):
r"""Options for defining sensitive content within scanned documents."""
sensitive_info_types: NotRequired[List[SensitiveInfoTypeTypedDict]]
- r"""Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types."""
+ r"""DEPRECATED - use 'customSensitiveExpressions' instead."""
sensitive_terms: NotRequired[List[SensitiveExpressionTypedDict]]
- r"""list of words and phrases to consider as sensitive content"""
+ r"""DEPRECATED - use 'customSensitiveExpressions' instead."""
sensitive_regexes: NotRequired[List[SensitiveExpressionTypedDict]]
- r"""list of regular expressions to consider as sensitive content"""
+ r"""DEPRECATED - use 'customSensitiveExpressions' instead."""
+ custom_sensitive_expressions: NotRequired[List[CustomSensitiveExpressionTypedDict]]
+ r"""list of custom sensitive expressions to consider as sensitive content"""
class SensitiveContentOptions(BaseModel):
r"""Options for defining sensitive content within scanned documents."""
sensitive_info_types: Annotated[
- Optional[List[SensitiveInfoType]], pydantic.Field(alias="sensitiveInfoTypes")
+ Optional[List[SensitiveInfoType]],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="sensitiveInfoTypes",
+ ),
] = None
- r"""Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types."""
+ r"""DEPRECATED - use 'customSensitiveExpressions' instead."""
sensitive_terms: Annotated[
- Optional[List[SensitiveExpression]], pydantic.Field(alias="sensitiveTerms")
+ Optional[List[SensitiveExpression]],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="sensitiveTerms",
+ ),
] = None
- r"""list of words and phrases to consider as sensitive content"""
+ r"""DEPRECATED - use 'customSensitiveExpressions' instead."""
sensitive_regexes: Annotated[
- Optional[List[SensitiveExpression]], pydantic.Field(alias="sensitiveRegexes")
+ Optional[List[SensitiveExpression]],
+ pydantic.Field(
+ deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
+ alias="sensitiveRegexes",
+ ),
] = None
- r"""list of regular expressions to consider as sensitive content"""
+ r"""DEPRECATED - use 'customSensitiveExpressions' instead."""
+
+ custom_sensitive_expressions: Annotated[
+ Optional[List[CustomSensitiveExpression]],
+ pydantic.Field(alias="customSensitiveExpressions"),
+ ] = None
+ r"""list of custom sensitive expressions to consider as sensitive content"""
diff --git a/src/glean/api_client/models/sensitiveinfotype.py b/src/glean/api_client/models/sensitiveinfotype.py
index f180f3bf..b1be8d3b 100644
--- a/src/glean/api_client/models/sensitiveinfotype.py
+++ b/src/glean/api_client/models/sensitiveinfotype.py
@@ -11,7 +11,7 @@
@deprecated(
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
)
-class LikelihoodThreshold(str, Enum):
+class SensitiveInfoTypeLikelihoodThreshold(str, Enum):
LIKELY = "LIKELY"
VERY_LIKELY = "VERY_LIKELY"
POSSIBLE = "POSSIBLE"
@@ -20,14 +20,14 @@ class LikelihoodThreshold(str, Enum):
class SensitiveInfoTypeTypedDict(TypedDict):
- likelihood_threshold: NotRequired[LikelihoodThreshold]
+ likelihood_threshold: NotRequired[SensitiveInfoTypeLikelihoodThreshold]
info_type: NotRequired[str]
r"""Text representation of an info-type to scan for."""
class SensitiveInfoType(BaseModel):
likelihood_threshold: Annotated[
- Optional[LikelihoodThreshold],
+ Optional[SensitiveInfoTypeLikelihoodThreshold],
pydantic.Field(
deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible.",
alias="likelihoodThreshold",
diff --git a/tests/mockserver/internal/sdk/models/components/customsensitiveexpression.go b/tests/mockserver/internal/sdk/models/components/customsensitiveexpression.go
new file mode 100644
index 00000000..4dd1f11e
--- /dev/null
+++ b/tests/mockserver/internal/sdk/models/components/customsensitiveexpression.go
@@ -0,0 +1,32 @@
+// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+
+package components
+
+type CustomSensitiveExpression struct {
+ // Identifier for the custom sensitive expression.
+ ID *string `json:"id,omitempty"`
+ Keyword *CustomSensitiveRule `json:"keyword,omitempty"`
+ // The expression to evaluate the keyword match.
+ EvaluationExpression *string `json:"evaluationExpression,omitempty"`
+}
+
+func (o *CustomSensitiveExpression) GetID() *string {
+ if o == nil {
+ return nil
+ }
+ return o.ID
+}
+
+func (o *CustomSensitiveExpression) GetKeyword() *CustomSensitiveRule {
+ if o == nil {
+ return nil
+ }
+ return o.Keyword
+}
+
+func (o *CustomSensitiveExpression) GetEvaluationExpression() *string {
+ if o == nil {
+ return nil
+ }
+ return o.EvaluationExpression
+}
diff --git a/tests/mockserver/internal/sdk/models/components/customsensitiverule.go b/tests/mockserver/internal/sdk/models/components/customsensitiverule.go
new file mode 100644
index 00000000..56e26f15
--- /dev/null
+++ b/tests/mockserver/internal/sdk/models/components/customsensitiverule.go
@@ -0,0 +1,83 @@
+// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+
+package components
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// CustomSensitiveRuleLikelihoodThreshold - Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type.
+type CustomSensitiveRuleLikelihoodThreshold string
+
+const (
+ CustomSensitiveRuleLikelihoodThresholdLikely CustomSensitiveRuleLikelihoodThreshold = "LIKELY"
+ CustomSensitiveRuleLikelihoodThresholdVeryLikely CustomSensitiveRuleLikelihoodThreshold = "VERY_LIKELY"
+ CustomSensitiveRuleLikelihoodThresholdPossible CustomSensitiveRuleLikelihoodThreshold = "POSSIBLE"
+ CustomSensitiveRuleLikelihoodThresholdUnlikely CustomSensitiveRuleLikelihoodThreshold = "UNLIKELY"
+ CustomSensitiveRuleLikelihoodThresholdVeryUnlikely CustomSensitiveRuleLikelihoodThreshold = "VERY_UNLIKELY"
+)
+
+func (e CustomSensitiveRuleLikelihoodThreshold) ToPointer() *CustomSensitiveRuleLikelihoodThreshold {
+ return &e
+}
+func (e *CustomSensitiveRuleLikelihoodThreshold) UnmarshalJSON(data []byte) error {
+ var v string
+ if err := json.Unmarshal(data, &v); err != nil {
+ return err
+ }
+ switch v {
+ case "LIKELY":
+ fallthrough
+ case "VERY_LIKELY":
+ fallthrough
+ case "POSSIBLE":
+ fallthrough
+ case "UNLIKELY":
+ fallthrough
+ case "VERY_UNLIKELY":
+ *e = CustomSensitiveRuleLikelihoodThreshold(v)
+ return nil
+ default:
+ return fmt.Errorf("invalid value for CustomSensitiveRuleLikelihoodThreshold: %v", v)
+ }
+}
+
+type CustomSensitiveRule struct {
+ // Identifier for the custom sensitive expression.
+ ID *string `json:"id,omitempty"`
+ // 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.
+ Value *string `json:"value,omitempty"`
+ // Type of the custom sensitive rule.
+ Type *CustomSensitiveRuleType `json:"type,omitempty"`
+ // Likelihood threshold for BUILT_IN infotypes (e.g., LIKELY, VERY_LIKELY). Only applicable for BUILT_IN type.
+ LikelihoodThreshold *CustomSensitiveRuleLikelihoodThreshold `json:"likelihoodThreshold,omitempty"`
+}
+
+func (o *CustomSensitiveRule) GetID() *string {
+ if o == nil {
+ return nil
+ }
+ return o.ID
+}
+
+func (o *CustomSensitiveRule) GetValue() *string {
+ if o == nil {
+ return nil
+ }
+ return o.Value
+}
+
+func (o *CustomSensitiveRule) GetType() *CustomSensitiveRuleType {
+ if o == nil {
+ return nil
+ }
+ return o.Type
+}
+
+func (o *CustomSensitiveRule) GetLikelihoodThreshold() *CustomSensitiveRuleLikelihoodThreshold {
+ if o == nil {
+ return nil
+ }
+ return o.LikelihoodThreshold
+}
diff --git a/tests/mockserver/internal/sdk/models/components/customsensitiveruletype.go b/tests/mockserver/internal/sdk/models/components/customsensitiveruletype.go
new file mode 100644
index 00000000..12b37ae0
--- /dev/null
+++ b/tests/mockserver/internal/sdk/models/components/customsensitiveruletype.go
@@ -0,0 +1,38 @@
+// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+
+package components
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// CustomSensitiveRuleType - Type of the custom sensitive rule.
+type CustomSensitiveRuleType string
+
+const (
+ CustomSensitiveRuleTypeRegex CustomSensitiveRuleType = "REGEX"
+ CustomSensitiveRuleTypeTerm CustomSensitiveRuleType = "TERM"
+ CustomSensitiveRuleTypeInfoType CustomSensitiveRuleType = "INFO_TYPE"
+)
+
+func (e CustomSensitiveRuleType) ToPointer() *CustomSensitiveRuleType {
+ return &e
+}
+func (e *CustomSensitiveRuleType) UnmarshalJSON(data []byte) error {
+ var v string
+ if err := json.Unmarshal(data, &v); err != nil {
+ return err
+ }
+ switch v {
+ case "REGEX":
+ fallthrough
+ case "TERM":
+ fallthrough
+ case "INFO_TYPE":
+ *e = CustomSensitiveRuleType(v)
+ return nil
+ default:
+ return fmt.Errorf("invalid value for CustomSensitiveRuleType: %v", v)
+ }
+}
diff --git a/tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go b/tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go
index 48c69211..6a2ecf4f 100644
--- a/tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go
+++ b/tests/mockserver/internal/sdk/models/components/getdocumentsrequest.go
@@ -14,6 +14,7 @@ const (
GetDocumentsRequestIncludeFieldVisitorsCount GetDocumentsRequestIncludeField = "VISITORS_COUNT"
GetDocumentsRequestIncludeFieldRecentShares GetDocumentsRequestIncludeField = "RECENT_SHARES"
GetDocumentsRequestIncludeFieldDocumentContent GetDocumentsRequestIncludeField = "DOCUMENT_CONTENT"
+ GetDocumentsRequestIncludeFieldCustomMetadata GetDocumentsRequestIncludeField = "CUSTOM_METADATA"
)
func (e GetDocumentsRequestIncludeField) ToPointer() *GetDocumentsRequestIncludeField {
@@ -32,6 +33,8 @@ func (e *GetDocumentsRequestIncludeField) UnmarshalJSON(data []byte) error {
case "RECENT_SHARES":
fallthrough
case "DOCUMENT_CONTENT":
+ fallthrough
+ case "CUSTOM_METADATA":
*e = GetDocumentsRequestIncludeField(v)
return nil
default:
diff --git a/tests/mockserver/internal/sdk/models/components/personmetadata.go b/tests/mockserver/internal/sdk/models/components/personmetadata.go
index eabd1c7a..da09ade4 100644
--- a/tests/mockserver/internal/sdk/models/components/personmetadata.go
+++ b/tests/mockserver/internal/sdk/models/components/personmetadata.go
@@ -77,6 +77,8 @@ type PersonMetadata struct {
Timezone *string `json:"timezone,omitempty"`
// The offset of the person's timezone in seconds from UTC.
TimezoneOffset *int64 `json:"timezoneOffset,omitempty"`
+ // The IANA timezone identifier, e.g. "America/Los_Angeles".
+ TimezoneIANA *string `json:"timezoneIANA,omitempty"`
// The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs).
PhotoURL *string `json:"photoUrl,omitempty"`
// The original photo URL of the person's avatar before any edits they made are applied
@@ -267,6 +269,13 @@ func (o *PersonMetadata) GetTimezoneOffset() *int64 {
return o.TimezoneOffset
}
+func (o *PersonMetadata) GetTimezoneIANA() *string {
+ if o == nil {
+ return nil
+ }
+ return o.TimezoneIANA
+}
+
func (o *PersonMetadata) GetPhotoURL() *string {
if o == nil {
return nil
diff --git a/tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go b/tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go
index d08baa0c..7e1d25ee 100644
--- a/tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go
+++ b/tests/mockserver/internal/sdk/models/components/sensitivecontentoptions.go
@@ -4,12 +4,20 @@ package components
// SensitiveContentOptions - Options for defining sensitive content within scanned documents.
type SensitiveContentOptions struct {
- // Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types.
+ // DEPRECATED - use 'customSensitiveExpressions' instead.
+ //
+ // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
SensitiveInfoTypes []SensitiveInfoType `json:"sensitiveInfoTypes,omitempty"`
- // list of words and phrases to consider as sensitive content
+ // DEPRECATED - use 'customSensitiveExpressions' instead.
+ //
+ // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
SensitiveTerms []SensitiveExpression `json:"sensitiveTerms,omitempty"`
- // list of regular expressions to consider as sensitive content
+ // DEPRECATED - use 'customSensitiveExpressions' instead.
+ //
+ // Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
SensitiveRegexes []SensitiveExpression `json:"sensitiveRegexes,omitempty"`
+ // list of custom sensitive expressions to consider as sensitive content
+ CustomSensitiveExpressions []CustomSensitiveExpression `json:"customSensitiveExpressions,omitempty"`
}
func (o *SensitiveContentOptions) GetSensitiveInfoTypes() []SensitiveInfoType {
@@ -32,3 +40,10 @@ func (o *SensitiveContentOptions) GetSensitiveRegexes() []SensitiveExpression {
}
return o.SensitiveRegexes
}
+
+func (o *SensitiveContentOptions) GetCustomSensitiveExpressions() []CustomSensitiveExpression {
+ if o == nil {
+ return nil
+ }
+ return o.CustomSensitiveExpressions
+}
diff --git a/tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go b/tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go
index b9b34b49..00e51303 100644
--- a/tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go
+++ b/tests/mockserver/internal/sdk/models/components/sensitiveinfotype.go
@@ -7,23 +7,23 @@ import (
"fmt"
)
-// LikelihoodThreshold
+// SensitiveInfoTypeLikelihoodThreshold
//
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
-type LikelihoodThreshold string
+type SensitiveInfoTypeLikelihoodThreshold string
const (
- LikelihoodThresholdLikely LikelihoodThreshold = "LIKELY"
- LikelihoodThresholdVeryLikely LikelihoodThreshold = "VERY_LIKELY"
- LikelihoodThresholdPossible LikelihoodThreshold = "POSSIBLE"
- LikelihoodThresholdUnlikely LikelihoodThreshold = "UNLIKELY"
- LikelihoodThresholdVeryUnlikely LikelihoodThreshold = "VERY_UNLIKELY"
+ SensitiveInfoTypeLikelihoodThresholdLikely SensitiveInfoTypeLikelihoodThreshold = "LIKELY"
+ SensitiveInfoTypeLikelihoodThresholdVeryLikely SensitiveInfoTypeLikelihoodThreshold = "VERY_LIKELY"
+ SensitiveInfoTypeLikelihoodThresholdPossible SensitiveInfoTypeLikelihoodThreshold = "POSSIBLE"
+ SensitiveInfoTypeLikelihoodThresholdUnlikely SensitiveInfoTypeLikelihoodThreshold = "UNLIKELY"
+ SensitiveInfoTypeLikelihoodThresholdVeryUnlikely SensitiveInfoTypeLikelihoodThreshold = "VERY_UNLIKELY"
)
-func (e LikelihoodThreshold) ToPointer() *LikelihoodThreshold {
+func (e SensitiveInfoTypeLikelihoodThreshold) ToPointer() *SensitiveInfoTypeLikelihoodThreshold {
return &e
}
-func (e *LikelihoodThreshold) UnmarshalJSON(data []byte) error {
+func (e *SensitiveInfoTypeLikelihoodThreshold) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
return err
@@ -38,21 +38,21 @@ func (e *LikelihoodThreshold) UnmarshalJSON(data []byte) error {
case "UNLIKELY":
fallthrough
case "VERY_UNLIKELY":
- *e = LikelihoodThreshold(v)
+ *e = SensitiveInfoTypeLikelihoodThreshold(v)
return nil
default:
- return fmt.Errorf("invalid value for LikelihoodThreshold: %v", v)
+ return fmt.Errorf("invalid value for SensitiveInfoTypeLikelihoodThreshold: %v", v)
}
}
type SensitiveInfoType struct {
// Deprecated: This will be removed in a future release, please migrate away from it as soon as possible.
- LikelihoodThreshold *LikelihoodThreshold `json:"likelihoodThreshold,omitempty"`
+ LikelihoodThreshold *SensitiveInfoTypeLikelihoodThreshold `json:"likelihoodThreshold,omitempty"`
// Text representation of an info-type to scan for.
InfoType *string `json:"infoType,omitempty"`
}
-func (o *SensitiveInfoType) GetLikelihoodThreshold() *LikelihoodThreshold {
+func (o *SensitiveInfoType) GetLikelihoodThreshold() *SensitiveInfoTypeLikelihoodThreshold {
if o == nil {
return nil
}
diff --git a/tests/test_summarize.py b/tests/test_summarize.py
index cac8e978..4752dda1 100644
--- a/tests/test_summarize.py
+++ b/tests/test_summarize.py
@@ -19,11 +19,10 @@ def test_summarize_summarize():
document_specs=[
{
"ugc_type": models.DocumentSpecUgcType1.SHORTCUTS,
- "content_id": 602763,
+ "content_id": 544883,
},
{
- "ugc_type": models.DocumentSpecUgcType1.SHORTCUTS,
- "content_id": 602763,
+ "id": "",
},
]
)