Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 139 additions & 99 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ generation:
generateNewTests: true
skipResponseBodyAssertions: true
typescript:
version: 0.15.0
version: 0.16.0
acceptHeaderEnum: true
additionalDependencies:
dependencies: {}
Expand Down Expand Up @@ -74,6 +74,7 @@ typescript:
./hooks/*.js: ./src/hooks/*.ts
additionalScripts: {}
alwaysIncludeInboundAndOutbound: false
apiPromiseHelpers: false
author: Speakeasy
baseErrorName: GleanBaseError
clientServerStatusCodesAsErrors: true
Expand All @@ -84,6 +85,7 @@ typescript:
enableReactQuery: true
enumFormat: union
envVarPrefix: GLEAN
eventStreamClassName: EventStream
exportZodModelNamespace: false
fixEnumNameSanitization: false
flatAdditionalProperties: false
Expand Down Expand Up @@ -116,6 +118,7 @@ typescript:
preApplyUnionDiscriminators: true
preserveModelFieldNames: false
privateIdentifierPrefix: '#'
requestExtras: false
responseFormat: flat
sseFlatResponse: false
templateVersion: v2
Expand Down
197 changes: 133 additions & 64 deletions .speakeasy/glean-merged-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
version: 0.9.0
title: Glean API
x-source-commit-sha: 8041c7f73ed7b1a8bb52c21b4736355b3d3ac705
x-source-commit-sha: a866a67699083ca67b6ffb2126427320df4ae258
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.
Expand All @@ -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: bcfb45a263878a9d08bcb4117a44e970b498dc10
x-open-api-commit-sha: 3e86f2c31fb63c32c8dbcea560c555a74b5db989
x-speakeasy-name: 'Glean API'
servers:
- url: https://{instance}-be.glean.com
Expand Down Expand Up @@ -910,6 +910,40 @@ paths:
description: Internal server error.
security:
- APIToken: []
/rest/api/v1/agents:
post:
tags:
- Agents
summary: Create an agent
description: Create an agent.
operationId: createAgent
x-visibility: Preview
parameters:
- $ref: "#/components/parameters/locale"
- $ref: "#/components/parameters/timezoneOffset"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateWorkflowRequest"
responses:
"200":
description: Success
content:
application/json:
schema:
$ref: "#/components/schemas/CreateWorkflowResponse"
"400":
description: Bad request
"401":
description: Not Authorized
"403":
description: Forbidden
"500":
description: Internal server error
security:
- APIToken: []
/rest/api/v1/agents/{agent_id}:
get:
tags:
Expand Down Expand Up @@ -1107,7 +1141,7 @@ paths:
text/event-stream:
schema:
type: string
description: The server will send a stream of events in server-sent events (SSE) format.
description: The server will send a stream of events in server-sent events (SSE) format. If execution fails after the stream has started, the stream may terminate with an error message in a normal `message` event.
example: |
id: 1
event: message
Expand Down Expand Up @@ -4675,6 +4709,8 @@ components:
APIToken:
scheme: bearer
type: http
description: >-
HTTP bearer token. Accepts a Glean-issued API token, an OAuth access token from the Glean OAuth Authorization Server (including Dynamic Client Registration clients), or an OAuth access token issued by an external identity provider. External-IdP OAuth tokens must also include the `X-Glean-Auth-Type: OAUTH` request header. OAuth is supported on the Client API only; the Indexing API requires a Glean-issued token.
schemas:
ActivityEventParams:
properties:
Expand Down Expand Up @@ -6019,6 +6055,8 @@ components:
GroupType:
type: string
description: The type of user group
x-enumDescriptions:
COLLECTION_AUDIENCE: Refers to any viewers of the Collection.
enum:
- DEPARTMENT
- ALL
Expand All @@ -6028,6 +6066,9 @@ components:
- LOCATION
- REGION
- EXTERNAL_GROUP
- COLLECTION_AUDIENCE
x-speakeasy-enum-descriptions:
COLLECTION_AUDIENCE: Refers to any viewers of the Collection.
Group:
required:
- type
Expand Down Expand Up @@ -8990,6 +9031,80 @@ components:
items:
type: string
description: IDs of files to delete.
WorkflowDraftableProperties:
properties:
name:
type: string
description: The name of the workflow.
WorkflowMutableProperties:
type: object
allOf:
- $ref: "#/components/schemas/WorkflowDraftableProperties"
- type: object
CreateWorkflowRequest:
allOf:
- $ref: "#/components/schemas/WorkflowMutableProperties"
- type: object
properties:
transient:
type: boolean
description: Used to create a transient workflow.
parentWorkflowId:
type: string
description: id of the parent workflow for transient workflows
WorkflowMetadata:
allOf:
- type: object
properties:
author:
$ref: "#/components/schemas/Person"
createTimestamp:
type: integer
description: Server Unix timestamp of the creation time.
lastUpdateTimestamp:
type: integer
description: Server Unix timestamp of the last update time.
lastDraftSavedAt:
type: integer
description: Server Unix timestamp of the last time the draft was saved.
lastDraftSavedBy:
description: The person who last saved the draft.
$ref: "#/components/schemas/Person"
lastDraftGitAuthorId:
type: string
description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API.
lastUpdatedBy:
$ref: "#/components/schemas/Person"
AttributionProperties: {}
Workflow:
allOf:
- $ref: "#/components/schemas/PermissionedObject"
- $ref: "#/components/schemas/WorkflowMutableProperties"
- $ref: "#/components/schemas/WorkflowMetadata"
- $ref: "#/components/schemas/AttributionProperties"
- type: object
properties:
id:
type: string
description: The ID of the workflow.
verified:
type: boolean
readOnly: true
description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits.
showOrganizationAsAuthor:
type: boolean
readOnly: true
description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits.
WorkflowResult:
type: object
required:
- workflow
properties:
workflow:
$ref: "#/components/schemas/Workflow"
CreateWorkflowResponse:
allOf:
- $ref: "#/components/schemas/WorkflowResult"
Agent:
title: Agent
type: object
Expand Down Expand Up @@ -9042,16 +9157,6 @@ components:
message:
type: string
description: Client-facing error message describing what went wrong
WorkflowDraftableProperties:
properties:
name:
type: string
description: The name of the workflow.
WorkflowMutableProperties:
type: object
allOf:
- $ref: "#/components/schemas/WorkflowDraftableProperties"
- type: object
EditWorkflowRequest:
allOf:
- $ref: "#/components/schemas/WorkflowMutableProperties"
Expand Down Expand Up @@ -11002,6 +11107,7 @@ components:
- MID_DAY_CATCH_UP
- QUERY_SUGGESTION
- COWORK_CUJ_PROMO
- CARD_STACK_PROMO
- WEEKLY_MEETINGS
- FOLLOW_UP
- MILESTONE_TIMELINE_CHECK
Expand Down Expand Up @@ -11310,7 +11416,6 @@ components:
description: A list of removed user roles for the Workflow.
items:
$ref: "#/components/schemas/UserRoleSpecification"
AttributionProperties: {}
PromptTemplate:
allOf:
- $ref: "#/components/schemas/PromptTemplateMutableProperties"
Expand Down Expand Up @@ -11386,55 +11491,6 @@ components:
runCount:
$ref: "#/components/schemas/CountInfo"
description: This tracks how many times this prompt template was run. If user runs a prompt template after modifying the original one, it still counts as a run for the original template.
WorkflowMetadata:
allOf:
- type: object
properties:
author:
$ref: "#/components/schemas/Person"
createTimestamp:
type: integer
description: Server Unix timestamp of the creation time.
lastUpdateTimestamp:
type: integer
description: Server Unix timestamp of the last update time.
lastDraftSavedAt:
type: integer
description: Server Unix timestamp of the last time the draft was saved.
lastDraftSavedBy:
description: The person who last saved the draft.
$ref: "#/components/schemas/Person"
lastDraftGitAuthorId:
type: string
description: ID of the VCS user (e.g. GitHub username) who last saved the draft. Set only by the draft save path via the external Git integration API.
lastUpdatedBy:
$ref: "#/components/schemas/Person"
Workflow:
allOf:
- $ref: "#/components/schemas/PermissionedObject"
- $ref: "#/components/schemas/WorkflowMutableProperties"
- $ref: "#/components/schemas/WorkflowMetadata"
- $ref: "#/components/schemas/AttributionProperties"
- type: object
properties:
id:
type: string
description: The ID of the workflow.
verified:
type: boolean
readOnly: true
description: When present, indicates this workflow is admin-verified. Set via the dedicated admin settings endpoint, not by regular edits.
showOrganizationAsAuthor:
type: boolean
readOnly: true
description: When true, displays organization name instead of author name in agent card. Set via the dedicated admin settings endpoint, not by regular edits.
WorkflowResult:
type: object
required:
- workflow
properties:
workflow:
$ref: "#/components/schemas/Workflow"
UserActivity:
properties:
actor:
Expand Down Expand Up @@ -11531,6 +11587,7 @@ components:
- MID_DAY_CATCH_UP
- QUERY_SUGGESTION
- COWORK_CUJ_PROMO
- CARD_STACK_PROMO
- WEEKLY_MEETINGS
- FOLLOW_UP
- MILESTONE_TIMELINE_CHECK
Expand Down Expand Up @@ -11619,6 +11676,7 @@ components:
- MID_DAY_CATCH_UP
- QUERY_SUGGESTION
- COWORK_CUJ_PROMO
- CARD_STACK_PROMO
- WEEKLY_MEETINGS
- FOLLOW_UP
- MILESTONE_TIMELINE_CHECK
Expand All @@ -11639,6 +11697,12 @@ components:
rank:
type: integer
description: Rank of the result. Rank is suggested by server. Client side rank may differ.
placementReason:
type: string
enum:
- ORGANIC
- PROMO
description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework.
FeedResponse:
required:
- serverTimestamp
Expand Down Expand Up @@ -14289,7 +14353,12 @@ components:
items:
type: string
description: list of words and phrases to consider as whitelisted content
description: Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation.
regexes:
type: array
items:
type: string
description: list of regular expressions whose matches are considered whitelisted content
description: Terms and regexes that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term, or matches a regex, in the allow-list, it will not be counted as a violation.
DlpConfig:
properties:
version:
Expand Down
16 changes: 16 additions & 0 deletions .speakeasy/tests.arazzo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164589,3 +164589,19 @@ workflows:
type: simple
x-speakeasy-test-group: Datasources
x-speakeasy-test-rebuild: true
- workflowId: createAgent
steps:
- stepId: test
operationId: createAgent
requestBody:
contentType: application/json
payload: {}
successCriteria:
- condition: $statusCode == 200
- condition: $response.header.Content-Type == application/json
- context: $response.body
condition: |
{"workflow":{"author":{"name":"George Clooney","obfuscatedId":"abc123"},"lastDraftSavedBy":{"name":"George Clooney","obfuscatedId":"abc123"},"lastUpdatedBy":{"name":"George Clooney","obfuscatedId":"abc123"}}}
type: simple
x-speakeasy-test-group: Agents
x-speakeasy-test-rebuild: true
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
speakeasyVersion: 1.771.0
speakeasyVersion: 1.784.0
sources:
Glean API:
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:847b1f126f78c86bb63c1c27b6053ba6a9afe8855aab3e82d1f7f71501a5e840
sourceBlobDigest: sha256:b685acc261c79f1c7579b236eaff1ea63982eb1f4be4c318bd6c9a24998c6132
sourceRevisionDigest: sha256:d1e4b518e938a62717199ea927a61b365d1922235453cafefdd8e50db2f0844f
sourceBlobDigest: sha256:89f0ec3a08efdbde4df3dbb2437d8467413a32d7962ed12232f77e8a24cdc2b0
tags:
- latest
Glean Client API:
Expand All @@ -17,10 +17,10 @@ targets:
glean:
source: Glean API
sourceNamespace: glean-api-specs
sourceRevisionDigest: sha256:847b1f126f78c86bb63c1c27b6053ba6a9afe8855aab3e82d1f7f71501a5e840
sourceBlobDigest: sha256:b685acc261c79f1c7579b236eaff1ea63982eb1f4be4c318bd6c9a24998c6132
sourceRevisionDigest: sha256:d1e4b518e938a62717199ea927a61b365d1922235453cafefdd8e50db2f0844f
sourceBlobDigest: sha256:89f0ec3a08efdbde4df3dbb2437d8467413a32d7962ed12232f77e8a24cdc2b0
codeSamplesNamespace: glean-api-specs-typescript-code-samples
codeSamplesRevisionDigest: sha256:b5791cfb1d37e9b90281cd3010643044add839fc460327b5789a1e216e4c5538
codeSamplesRevisionDigest: sha256:02a92d9a9841dfb2b044ff55dda34078d6ca1a9b0dd6db833fb9c084b04dfa8b
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
Loading
Loading