From 9ab686225bd6edfe0c5fddec8ce5226969d50d8c Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 3 Dec 2026 21:53:19 +0000 Subject: [PATCH] ## Typescript SDK Changes: * `glean.agents.listRuns()`: **Added** * `glean.agents.listVersions()`: **Added** * `glean.agents.createVersion()`: **Added** * `glean.agents.getVersion()`: **Added** * `glean.agents.deleteVersion()`: **Added** * `glean.agents.create()`: * `request.draft` **Added** * `response.agent.isDraft` **Added** * `glean.agents.search()`: * `request` **Changed** * `response` **Changed** * `glean.agents.get()`: `response.agent.isDraft` **Added** * `glean.agents.update()`: * `request.platformAgentUpdateRequest.draft` **Added** * `response.agent.isDraft` **Added** * `glean.admin.agents.list()`: `response.results[].isDraft` **Added** * `glean.triggers.searchEvents()`: `response.results[].reason` **Changed** * `glean.triggers.searchPresetEvents()`: `response.results[].reason` **Changed** * `glean.client.activity.feedback()`: * `request.feedback1.manualFeedbackInfo.source.enum(needToKnow)` **Added** --- .speakeasy/gen.lock | 652 +++++++++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/glean-merged-spec.yaml | 610 +++++++++++++++- .speakeasy/tests.arazzo.yaml | 89 ++- .speakeasy/workflow.lock | 12 +- README.md | 15 + RELEASES.md | 12 +- .../components/manualfeedbackinfosource.md | 2 +- docs/models/components/platformagent.md | 1 + .../components/platformagentcreaterequest.md | 3 +- .../components/platformagentrunsummary.md | 27 + .../components/platformagentruntrigger.md | 20 + .../components/platformagentssearchrequest.md | 4 +- .../platformagentssearchresponse.md | 11 +- .../components/platformagentupdaterequest.md | 3 +- .../models/components/platformagentversion.md | 23 + .../platformagentversioncreaterequest.md | 24 + .../platformagentversiongetresponse.md | 35 + .../platformagentversionslistresponse.md | 30 + .../platformagentversionwithdefinition.md | 34 + .../platformlistadminagentsresponse.md | 12 +- .../platformlistagentrunsresponse.md | 24 + .../platformlistdepartmentsresponse.md | 12 +- .../platformlistidpgroupsresponse.md | 12 +- .../platformlistoauthclientsresponse.md | 12 +- .../components/platformlistusersresponse.md | 12 +- .../components/platformtriggereventreason.md | 2 +- .../platformagentscreateversionrequest.md | 25 + .../platformagentsdeleteversionrequest.md | 19 + .../platformagentsgetversionrequest.md | 19 + .../platformagentslistrunsrequest.md | 19 + .../platformagentslistversionsrequest.md | 19 + docs/sdks/adminagents/README.md | 2 +- docs/sdks/agents/README.md | 508 +++++++++++++- docs/sdks/clients/README.md | 2 +- docs/sdks/departments/README.md | 2 +- docs/sdks/idpgroups/README.md | 2 +- docs/sdks/users/README.md | 2 +- examples/package-lock.json | 2 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 2 +- src/__tests__/agents.test.ts | 58 ++ .../internal/handler/generated_handlers.go | 4 + .../handler/pathgetapiagentsagentidruns.go | 75 ++ .../pathgetapiagentsagentidversions.go | 67 ++ ...athgetapiagentsagentidversionsversionid.go | 81 +++ .../pathpostapiagentsagentidversions.go | 86 +++ .../handler/pathpostapiagentssearch.go | 1 + .../models/components/manualfeedbackinfo.go | 3 + .../sdk/models/components/platformagent.go | 10 + .../components/platformagentcreaterequest.go | 25 + .../components/platformagentrunsummary.go | 79 +++ .../components/platformagentruntrigger.go | 42 ++ .../components/platformagentssearchrequest.go | 34 + .../platformagentssearchresponse.go | 24 +- .../components/platformagentupdaterequest.go | 10 + .../models/components/platformagentversion.go | 52 ++ .../platformagentversioncreaterequest.go | 26 + .../platformagentversiongetresponse.go | 26 + .../platformagentversionslistresponse.go | 48 ++ .../platformagentversionwithdefinition.go | 61 ++ .../platformlistadminagentsresponse.go | 3 +- .../platformlistagentrunsresponse.go | 48 ++ .../platformlistdepartmentsresponse.go | 2 +- .../platformlistidpgroupsresponse.go | 2 +- .../platformlistoauthclientsresponse.go | 3 +- .../components/platformlistusersresponse.go | 3 +- .../components/platformtriggereventreason.go | 6 + .../models/operations/platformagentscreate.go | 2 +- .../operations/platformagentscreateversion.go | 48 ++ .../operations/platformagentsdeleteversion.go | 40 ++ .../operations/platformagentsgetversion.go | 49 ++ .../operations/platformagentslistruns.go | 71 ++ .../operations/platformagentslistversions.go | 70 ++ .../models/operations/platformagentsupdate.go | 2 +- src/__tests__/summarize.test.ts | 2 +- src/funcs/adminAgentsList.ts | 2 +- src/funcs/adminIdpgroupsList.ts | 2 +- src/funcs/adminOauthClientsList.ts | 2 +- src/funcs/agentsCreate.ts | 2 +- src/funcs/agentsCreateVersion.ts | 202 ++++++ src/funcs/agentsDeleteVersion.ts | 204 ++++++ src/funcs/agentsGetVersion.ts | 204 ++++++ src/funcs/agentsListRuns.ts | 207 ++++++ src/funcs/agentsListVersions.ts | 207 ++++++ src/funcs/agentsSearch.ts | 2 +- src/funcs/agentsUpdate.ts | 2 +- src/funcs/departmentsList.ts | 2 +- src/funcs/usersList.ts | 2 +- src/lib/config.ts | 6 +- src/models/components/index.ts | 8 + src/models/components/manualfeedbackinfo.ts | 1 + src/models/components/platformagent.ts | 7 + .../components/platformagentcreaterequest.ts | 8 + .../components/platformagentrunsummary.ts | 78 +++ .../components/platformagentruntrigger.ts | 36 + .../components/platformagentssearchrequest.ts | 14 + .../platformagentssearchresponse.ts | 12 +- .../components/platformagentupdaterequest.ts | 8 + src/models/components/platformagentversion.ts | 54 ++ .../platformagentversioncreaterequest.ts | 54 ++ .../platformagentversiongetresponse.ts | 49 ++ .../platformagentversionslistresponse.ts | 59 ++ .../platformagentversionwithdefinition.ts | 61 ++ .../platformlistadminagentsresponse.ts | 4 +- .../platformlistagentrunsresponse.ts | 59 ++ .../platformlistdepartmentsresponse.ts | 2 +- .../platformlistidpgroupsresponse.ts | 2 +- .../platformlistoauthclientsresponse.ts | 4 +- .../components/platformlistusersresponse.ts | 4 +- .../components/platformtriggereventreason.ts | 8 + src/models/operations/index.ts | 5 + .../operations/platformagentscreateversion.ts | 52 ++ .../operations/platformagentsdeleteversion.ts | 46 ++ .../operations/platformagentsgetversion.ts | 46 ++ .../operations/platformagentslistruns.ts | 54 ++ .../operations/platformagentslistversions.ts | 52 ++ src/react-query/adminAgentsList.ts | 4 +- src/react-query/adminIdpgroupsList.ts | 4 +- src/react-query/adminOauthClientsList.ts | 4 +- src/react-query/agentsCreate.ts | 2 +- src/react-query/agentsCreateVersion.ts | 116 ++++ src/react-query/agentsDeleteVersion.ts | 113 +++ src/react-query/agentsGetVersion.core.ts | 79 +++ src/react-query/agentsGetVersion.ts | 144 ++++ src/react-query/agentsListRuns.core.ts | 80 +++ src/react-query/agentsListRuns.ts | 148 ++++ src/react-query/agentsListVersions.core.ts | 89 +++ src/react-query/agentsListVersions.ts | 159 +++++ src/react-query/agentsSearch.ts | 2 +- src/react-query/agentsUpdate.ts | 2 +- src/react-query/departmentsList.ts | 4 +- src/react-query/index.ts | 5 + src/react-query/usersList.ts | 4 +- src/sdk/adminagents.lazy.ts | 2 +- src/sdk/adminagents.ts | 2 +- src/sdk/agents.lazy.ts | 193 +++++- src/sdk/agents.ts | 111 ++- src/sdk/clients.lazy.ts | 2 +- src/sdk/clients.ts | 2 +- src/sdk/departments.lazy.ts | 2 +- src/sdk/departments.ts | 2 +- src/sdk/idpgroups.lazy.ts | 2 +- src/sdk/idpgroups.ts | 2 +- src/sdk/users.lazy.ts | 2 +- src/sdk/users.ts | 2 +- 147 files changed, 6270 insertions(+), 333 deletions(-) create mode 100644 docs/models/components/platformagentrunsummary.md create mode 100644 docs/models/components/platformagentruntrigger.md create mode 100644 docs/models/components/platformagentversion.md create mode 100644 docs/models/components/platformagentversioncreaterequest.md create mode 100644 docs/models/components/platformagentversiongetresponse.md create mode 100644 docs/models/components/platformagentversionslistresponse.md create mode 100644 docs/models/components/platformagentversionwithdefinition.md create mode 100644 docs/models/components/platformlistagentrunsresponse.md create mode 100644 docs/models/operations/platformagentscreateversionrequest.md create mode 100644 docs/models/operations/platformagentsdeleteversionrequest.md create mode 100644 docs/models/operations/platformagentsgetversionrequest.md create mode 100644 docs/models/operations/platformagentslistrunsrequest.md create mode 100644 docs/models/operations/platformagentslistversionsrequest.md create mode 100644 src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidruns.go create mode 100644 src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversions.go create mode 100644 src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversionsversionid.go create mode 100644 src/__tests__/mockserver/internal/handler/pathpostapiagentsagentidversions.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentrunsummary.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentruntrigger.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentversion.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentversioncreaterequest.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentversiongetresponse.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentversionslistresponse.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformagentversionwithdefinition.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/components/platformlistagentrunsresponse.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreateversion.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformagentsdeleteversion.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformagentsgetversion.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistruns.go create mode 100644 src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistversions.go create mode 100644 src/funcs/agentsCreateVersion.ts create mode 100644 src/funcs/agentsDeleteVersion.ts create mode 100644 src/funcs/agentsGetVersion.ts create mode 100644 src/funcs/agentsListRuns.ts create mode 100644 src/funcs/agentsListVersions.ts create mode 100644 src/models/components/platformagentrunsummary.ts create mode 100644 src/models/components/platformagentruntrigger.ts create mode 100644 src/models/components/platformagentversion.ts create mode 100644 src/models/components/platformagentversioncreaterequest.ts create mode 100644 src/models/components/platformagentversiongetresponse.ts create mode 100644 src/models/components/platformagentversionslistresponse.ts create mode 100644 src/models/components/platformagentversionwithdefinition.ts create mode 100644 src/models/components/platformlistagentrunsresponse.ts create mode 100644 src/models/operations/platformagentscreateversion.ts create mode 100644 src/models/operations/platformagentsdeleteversion.ts create mode 100644 src/models/operations/platformagentsgetversion.ts create mode 100644 src/models/operations/platformagentslistruns.ts create mode 100644 src/models/operations/platformagentslistversions.ts create mode 100644 src/react-query/agentsCreateVersion.ts create mode 100644 src/react-query/agentsDeleteVersion.ts create mode 100644 src/react-query/agentsGetVersion.core.ts create mode 100644 src/react-query/agentsGetVersion.ts create mode 100644 src/react-query/agentsListRuns.core.ts create mode 100644 src/react-query/agentsListRuns.ts create mode 100644 src/react-query/agentsListVersions.core.ts create mode 100644 src/react-query/agentsListVersions.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8f544bb82..251e8af3b 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 664aaca5-a41f-4434-8f2a-642dba92fe68 management: - docChecksum: e404575285afab94491c593bded9d1e7 + docChecksum: 049b7ff7cc13d84a4641e00acf768922 docVersion: 0.9.0 - speakeasyVersion: 1.813.1 - generationVersion: 2.969.4 - releaseVersion: 0.21.2 - configChecksum: a9d0e236e775fe44306a1ad4c3216390 + speakeasyVersion: 1.813.4 + generationVersion: 2.969.7 + releaseVersion: 0.21.3 + configChecksum: 738605210e4c3876dc45133dfe0f91b5 repoURL: https://github.com/gleanwork/api-client-typescript.git installationURL: https://github.com/gleanwork/api-client-typescript published: true persistentEdits: - generation_id: 4e39be06-9c6a-494c-8236-7d938da8965f - pristine_commit_hash: 33659f91f4bbd23bd65121c9a6526075976baadd - pristine_tree_hash: 537ecf2e03ab9ae8777362fe0a762f3bac55dd61 + generation_id: 60a90b89-cf9f-4272-96bc-cdd6f07188a7 + pristine_commit_hash: bcbd510b94c97015b769a68824015d089edc470a + pristine_tree_hash: daed1524a4935bcbc9f72244bed05e022e1ea8cb features: typescript: acceptHeaders: 2.81.2 @@ -1775,8 +1775,8 @@ trackedFiles: pristine_git_object: 40b50a258c3328de1d1620b1ebeb681aa0575e71 docs/models/components/manualfeedbackinfosource.md: id: 32d28fd5676e - last_write_checksum: sha1:09080dfabc749ba61cb502e5195ffa318307660a - pristine_git_object: 270ce9411af45fedfcd87878a485c3615767a740 + last_write_checksum: sha1:bc413c73c3322d19edd4660928ce9e17abec42d7 + pristine_git_object: fb0aff08c138c9dff24c6c4b7e9e84084b9c4fd7 docs/models/components/manualfeedbackinfovote.md: id: fd471727894c last_write_checksum: sha1:e10a091eff1b6380f6910f02c7d1402f6d8f889c @@ -1991,8 +1991,8 @@ trackedFiles: pristine_git_object: 45e29825f1b0f85f0902abccffd1bee8668638b6 docs/models/components/platformagent.md: id: cfc6f19bfa42 - last_write_checksum: sha1:fc85d19ddedc07545a33f9684643cd1238582e56 - pristine_git_object: 9a2dd99f46a2bdf04a9f15a1880500a9bbebf40c + last_write_checksum: sha1:b6dc2408a97274d0df167e5e6f8e01fa434ad9b9 + pristine_git_object: b4cf3759e5d5296c2d12ecfccf5e40eea55d28b5 docs/models/components/platformagentcapabilities.md: id: 5589f386e676 last_write_checksum: sha1:04ce7870aa870604f625cb507bb120bf09220fe9 @@ -2015,8 +2015,8 @@ trackedFiles: pristine_git_object: 29cf76a9c9b5018c364cc61f6e166aff47c1928e docs/models/components/platformagentcreaterequest.md: id: 3cc79c909f53 - last_write_checksum: sha1:a23b8f99796424b93a9f4b42fbc505d2b24417ec - pristine_git_object: 3011940bcf3a0c10723d9a43fc89b6106fe97722 + last_write_checksum: sha1:2066f52be3a65daf274e9bf43cc85bcb4d67da96 + pristine_git_object: c41001a01a61c5a2f084929a1cf273283e8aa37e docs/models/components/platformagentdependency.md: id: 4dd8582bc040 last_write_checksum: sha1:006bfcfb9b4966473f5915602149db278994b27f @@ -2113,6 +2113,10 @@ trackedFiles: id: 8d4e5c03a9d3 last_write_checksum: sha1:804b5a5cec5f2175870e538b757a9b35917bb949 pristine_git_object: a74aec23e65fd3da8a69f88371e532e5031b70ba + docs/models/components/platformagentrunsummary.md: + id: 55106912e6c1 + last_write_checksum: sha1:33914648febf1291ea70e0d38545a13673d2610d + pristine_git_object: d360b0ac49a11ef45c14c0ce7983903f34f6608f docs/models/components/platformagentruntoolapproval.md: id: 83826de1dc3c last_write_checksum: sha1:a0cd714803dc1c8dfcac667cff06c8cd89dc6e4e @@ -2121,6 +2125,10 @@ trackedFiles: id: edcbfd54e97f last_write_checksum: sha1:7c6ea2d2782353f1810219081b61a40e537d725f pristine_git_object: 6d8b1a2d7b2f147f55c77512b751f79d74f2ca30 + docs/models/components/platformagentruntrigger.md: + id: 39e514af2e7e + last_write_checksum: sha1:b56da2c40e7421371feca4b513d48226a0915a54 + pristine_git_object: e83e00875400fa49f6a72e657ae572c19b56f5cc docs/models/components/platformagentrunwaitresponse.md: id: 5a1e78680e6a last_write_checksum: sha1:1e06fbea33a12fa4c471d42869c6d3d14c83caad @@ -2155,12 +2163,12 @@ trackedFiles: pristine_git_object: 226dc173c44ea49a1bb1be1a5974db7915c9c669 docs/models/components/platformagentssearchrequest.md: id: 8be0757e3290 - last_write_checksum: sha1:b6361198a8d77ca846bd8bbecbc1e6251db5d8a7 - pristine_git_object: b8680f14cc985ad70b4163593a5f521b0c015596 + last_write_checksum: sha1:10c99e3c1bacf9c9579da2ea36ff69f9d6c429ae + pristine_git_object: 753906dc1a4713d8213bc56c35507b24cfdfc184 docs/models/components/platformagentssearchresponse.md: id: 80dc362d4880 - last_write_checksum: sha1:ac9de6625eb35cda5665ae4fb4714e51541d3ecb - pristine_git_object: bdb37b0b0e8a2f00a9fc1456d236bdcfdd4ee12f + last_write_checksum: sha1:0b3071d934b05fe43ebdb3c45a6b7b9d8bec5e02 + pristine_git_object: 43e541e8a8d844d9381c55b3dfe735be06a67029 docs/models/components/platformagenttoolset.md: id: ccbd00960c90 last_write_checksum: sha1:90f7ffa6cc9b6a2b8d8da59b411d344ce8bb4a29 @@ -2175,8 +2183,28 @@ trackedFiles: pristine_git_object: 96ec93c9d09e4d40919310560ccac7f32448c2f1 docs/models/components/platformagentupdaterequest.md: id: ebee1ed1f085 - last_write_checksum: sha1:1da431b2415384784cda914c9776364159877b83 - pristine_git_object: 969f8f62c4a5264dacd8cceedcc59db0c5f69b71 + last_write_checksum: sha1:168eefe08781b7a6c50d45186b9c3b7439cb55ba + pristine_git_object: 5a60e4ffe5000c1bba45ecd4ee9622cdf13a7dc6 + docs/models/components/platformagentversion.md: + id: 86aa91c961a9 + last_write_checksum: sha1:4b194e0faff85dfe8662c3c2f32015f342680a5b + pristine_git_object: 41306ab0aaa9989cd890e1d3478aee1fbdb591f7 + docs/models/components/platformagentversioncreaterequest.md: + id: dab8fd4067fe + last_write_checksum: sha1:cb01bf993150b7eb1ec8f3002d898bcc47bdc48f + pristine_git_object: f743d24d6449d59d384013af55431ae5b3f8c240 + docs/models/components/platformagentversiongetresponse.md: + id: 395cfc25dae9 + last_write_checksum: sha1:1d218eb72a6772a594504a091f1c43a64fa75bfe + pristine_git_object: 27881d66cfab06f7225d80130bc5dee24db3ed6b + docs/models/components/platformagentversionslistresponse.md: + id: d685001f08b5 + last_write_checksum: sha1:f530adb7e467a1b8d07aad386557e733aaa0f65f + pristine_git_object: 4a54cb6b003664b65cffcf55af4d5fb1c141fad6 + docs/models/components/platformagentversionwithdefinition.md: + id: 79919b8e28d2 + last_write_checksum: sha1:d035ced3413bb1dfecccebf199855590504f8079 + pristine_git_object: 369e6973b808b4395f1c0996e059d23565600cac docs/models/components/platformanonymousauthtoken.md: id: ea808299ccd4 last_write_checksum: sha1:68a5778eba930ef9b407892a7484877178c6a45d @@ -2507,24 +2535,28 @@ trackedFiles: pristine_git_object: 9e0f8026fcddc05b9334be2e0c54bb17bf2b0042 docs/models/components/platformlistadminagentsresponse.md: id: 4be45e1b869b - last_write_checksum: sha1:e035802c451692b7e55592ceee6d549b3d78377a - pristine_git_object: 614b3da87d5822d9f6552fbe218e748b3bd7e692 + last_write_checksum: sha1:be7521fef65a60ffaab0d209aa401e6f88c26dd9 + pristine_git_object: 2beee2e8466c306bff23acda9e3039bd82323a13 + docs/models/components/platformlistagentrunsresponse.md: + id: 8cf0c4e0d5a0 + last_write_checksum: sha1:9b7cb3424cbfbaab588ee1d967423be3461b292c + pristine_git_object: 9085521d35fc428b6f37cadd61e7fa84b7673a5e docs/models/components/platformlistdepartmentsresponse.md: id: 66b99e1c4244 - last_write_checksum: sha1:1483af072fce0d9db7f2d84f533f7aeffdf78f4e - pristine_git_object: 110dcf3d1c39ad9142a8fd92fcd15eaa94a124f7 + last_write_checksum: sha1:921d3ba7b72a79cfbc15e82724cfa972e6be5d63 + pristine_git_object: b5a9ba34ad3ddd07a090e755ce84750a49e9fec9 docs/models/components/platformlistidpgroupsresponse.md: id: 268b091d5db5 - last_write_checksum: sha1:32ee103914c0184c4f0584685ae3838d7b2fcacf - pristine_git_object: 20ab52ff7c2e27caf58fd4fe5eba62690422b394 + last_write_checksum: sha1:dabd3c83a59cc9d1650e57cad696c1091c314159 + pristine_git_object: 7cfc34e5cad42264fccbc2346327b5154c4fc81a docs/models/components/platformlistoauthclientsresponse.md: id: 4704b8cae2ca - last_write_checksum: sha1:0ba0c8e108cbd35edffb52675bff87fe03025d82 - pristine_git_object: ffa95e0155ad332de078e3f689bb1041c1d6424f + last_write_checksum: sha1:7b9cb60c7aa1350c5b21ddf91b518e6d7f6116b3 + pristine_git_object: 8320d11bcd421301fcfdb65286d230ea0a16d9e0 docs/models/components/platformlistusersresponse.md: id: 0302db753399 - last_write_checksum: sha1:48508ccd31ccb0cb100b3e65a4d30a3afe324099 - pristine_git_object: 18be20b758f0eb42e81f1773cb3f89cd9a56c753 + last_write_checksum: sha1:c78c6c9d081df0891a7669222da1af1eccbce1bf + pristine_git_object: 79b1f9eaa9914c3adb0ce169c098e03949b708e7 docs/models/components/platformmessage.md: id: bc7ba681e94f last_write_checksum: sha1:3fe0a3148363e29e26fad4a954c76c616c767b3e @@ -2875,8 +2907,8 @@ trackedFiles: pristine_git_object: 354c5c272838099805c06d1e76c33dee94484100 docs/models/components/platformtriggereventreason.md: id: 09d9f792a0e5 - last_write_checksum: sha1:fbe91bcda5959869ed315703f8630de76af61ff5 - pristine_git_object: 06e8ce5b28f8c328eeada27af3b077a0f7977885 + last_write_checksum: sha1:2c84341aeef4b2ff994060ebcee9b319bde41304 + pristine_git_object: a2cbf00068536a9e8d2ad2081efc0be51a8136b8 docs/models/components/platformtriggereventsearchrequest.md: id: 61f9e0c276a4 last_write_checksum: sha1:6c2f08d7817fc6c21f572745b0c63812afe2c974 @@ -4069,10 +4101,18 @@ trackedFiles: id: b32c7ab41221 last_write_checksum: sha1:c7e9da651c1510d06071e84484b17ae03a8a9fcb pristine_git_object: 82217dc10d87bf3557dc48d3e1de2d8fdc6ad336 + docs/models/operations/platformagentscreateversionrequest.md: + id: e7ea62274de3 + last_write_checksum: sha1:f3bcd9b00abc9b9f9dbfa92794636105644defbf + pristine_git_object: 4824195d468f2beef9038ae40451b6bea1f54057 docs/models/operations/platformagentsdeleterequest.md: id: bfde804e7a64 last_write_checksum: sha1:ce9b4a36418c7a0c72525b47cb49a27970851bdc pristine_git_object: ce06a80b2ab0725efe266cbda24b25d5439e5935 + docs/models/operations/platformagentsdeleteversionrequest.md: + id: 3da5fab09d6f + last_write_checksum: sha1:cb18d823dc5cfc329e2d0f02ba62646dd52094d2 + pristine_git_object: 84b59ca27db1a43c06b988ac8063c222cd6511e0 docs/models/operations/platformagentsgetrequest.md: id: 706ad4a6bd32 last_write_checksum: sha1:72db0892e6d0df09575a56a7e3d5471cf4d5e023 @@ -4085,6 +4125,18 @@ trackedFiles: id: 58d615b7c78f last_write_checksum: sha1:fb7d9247173ad2c3f07def425cb55ad447f31006 pristine_git_object: 8afdfa5959f9d40e6bfae72293d9485fdd5f143a + docs/models/operations/platformagentsgetversionrequest.md: + id: a6de30252aa6 + last_write_checksum: sha1:7ec4cf45d5cc19898c05188f67f5ecee44a536a6 + pristine_git_object: de3605c14448803d873e05ae29774a742afd416d + docs/models/operations/platformagentslistrunsrequest.md: + id: 01cdb3ca8a3f + last_write_checksum: sha1:1ae192f068a29ad851d420e274559fa40387dda8 + pristine_git_object: b111e42c4e0db8ff7df7eeb978ed26c52a0accba + docs/models/operations/platformagentslistversionsrequest.md: + id: 82c74f793417 + last_write_checksum: sha1:16859c97a0fac1c7b21a03966e76674546f1cf60 + pristine_git_object: 675d205c2b223cba0b62ab68c7819c5e75d4d24a docs/models/operations/platformagentsupdaterequest.md: id: 15522c4d5c93 last_write_checksum: sha1:597cf0741ada99991b3dc3eaa1c477e3987e73ae @@ -4339,12 +4391,12 @@ trackedFiles: pristine_git_object: d660077d81220a7f0b093725c504fc9ed2db65ac docs/sdks/adminagents/README.md: id: 665e1b8d841f - last_write_checksum: sha1:e2a3bb396a1ae0c8dc513653d18ed9630fd1a5e2 - pristine_git_object: fc114cc93a25923267d4042d1c3b45b4d73062f4 + last_write_checksum: sha1:fad09121b51449fc72ef0f44cd652f040b6cbe51 + pristine_git_object: cff93f16dc3a1088125ba53b2a295e82b9f5b679 docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:fd127439db2f964637549f5bc6d3094c42a781fe - pristine_git_object: 84ac9e372afedb79d5ce5f8cce284c58e2e05bbd + last_write_checksum: sha1:b3d5eff92b3831457ac6016932de653efda10540 + pristine_git_object: b2d856a96ae11f98be7b3f468ca9a84f18bcad90 docs/sdks/announcements/README.md: id: 3d2e130a217c last_write_checksum: sha1:9955e9b871a2deaa2c17cd1c92fb4d34f7e05138 @@ -4383,8 +4435,8 @@ trackedFiles: pristine_git_object: ca78b86573ad7c6547207fa186cc0985a09619f6 docs/sdks/clients/README.md: id: ba883fd0c1cf - last_write_checksum: sha1:89073b033fa1b88b51a5001b9666a78cc4449080 - pristine_git_object: ac3541ab367ede8b64b28d12ab7893725885dd95 + last_write_checksum: sha1:f6077ca52c73c147604cb6caa8a77552f9b6bc01 + pristine_git_object: 09d1996f0db92164c081d8fc77248ba16c0baecd docs/sdks/clientsearch/README.md: id: 0a2a3cf68489 last_write_checksum: sha1:d4444ffa436b2f0a81e24b4fbe7ff2fbb1e9e1ab @@ -4407,8 +4459,8 @@ trackedFiles: pristine_git_object: 596acd050bd9bf726287815f570f84a949963459 docs/sdks/departments/README.md: id: 12342c54f2cb - last_write_checksum: sha1:98b87e00184901750cc69615b81704b3c73c2934 - pristine_git_object: bafcf8e1c7533539d1038c417b825401690b9ef6 + last_write_checksum: sha1:eeb03439c7a35890dc3d857b291b734030bdbe9f + pristine_git_object: dcc69ac167d6d1ce6871f00404f0530805680d54 docs/sdks/documents/README.md: id: 9758e88a0a9d last_write_checksum: sha1:112a7ded947df9d5126ea57f6fb09a45bdba3132 @@ -4423,8 +4475,8 @@ trackedFiles: pristine_git_object: 383ea27acd379ca6e26f5de0a465a73138c92931 docs/sdks/idpgroups/README.md: id: bede275e1a0d - last_write_checksum: sha1:d177a1e5b5365a900ae24c5824e696b8da1dd31b - pristine_git_object: 5d5df83a01ef5b1392bca026c112f64ba693034b + last_write_checksum: sha1:6efcc7df576b70f02a99c280a998ae62ac593775 + pristine_git_object: 0d494cc4f92841619a4ddba8800cf28ba22df0b4 docs/sdks/indexingauthentication/README.md: id: 3d8b5fccff24 last_write_checksum: sha1:755c43bdddec9ab2253d89070c130dc39b389966 @@ -4491,8 +4543,8 @@ trackedFiles: pristine_git_object: beec0c847ccbf1d0aee096321cac51ebc01d3548 docs/sdks/users/README.md: id: 5d80027045fe - last_write_checksum: sha1:e6b219ab96e9c0346d3c1b9917bbe91f31beb478 - pristine_git_object: fbccfedbb3ada70f0e7765b7bb37a8d336ee28f5 + last_write_checksum: sha1:f8ddb899fee90be3894a35e5d6b2f61129018d9a + pristine_git_object: 4f6ea40bd777795c15d968e978fc6ee9b0cc1e3c docs/sdks/verification/README.md: id: 8148670b64d3 last_write_checksum: sha1:5dae6116a97c546dd5d203beddd266ded05cdeec @@ -4527,12 +4579,12 @@ trackedFiles: pristine_git_object: 5a2797590d4be351d62915017d5b2a0f853537c8 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:ec56612e63300269bf3ef9c7739bee2000f978b8 - pristine_git_object: 748a047aafbe59832115342de75ef295a7af1e29 + last_write_checksum: sha1:171ce56bc64889d2fae3606096c1bc018e670ee1 + pristine_git_object: 8961522c49c73bbd6752cf34371d91dc41cd81a4 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:a4f6900da88c0d51b5a7059e67ce8f0a22b56b27 - pristine_git_object: ff1e3ce88bd22d607fff74f557c6b3b6da81bb31 + last_write_checksum: sha1:9e31b4fee48223185cb7adc816948addb325e569 + pristine_git_object: 760816eeda1be8d90f4ef80a0d7e5e8fcbbb23e2 src/__tests__/activities.test.ts: id: 65fa859b8f59 last_write_checksum: sha1:756bc40095f4495bbf62739b8218bb4a559a24f2 @@ -4543,8 +4595,8 @@ trackedFiles: pristine_git_object: d80e0dddcf6ff4dbb7b90ab1c64a352c84d89917 src/__tests__/agents.test.ts: id: 3cec9af43334 - last_write_checksum: sha1:d4a31c8cc42ae21770accd2d8fc52508b8c081e6 - pristine_git_object: 435c5372e8924bdf79ade89a2f05609f71dae47a + last_write_checksum: sha1:93ea68c3b83f79ef2edf3bbc1025caeee2f89542 + pristine_git_object: 37e4ff9a40bdf4f5d96f899329ca29b116b9e620 src/__tests__/announcements.test.ts: id: 1fbbe739ff78 last_write_checksum: sha1:775233d320d0d015e40c78c7b6634e45c634d033 @@ -4727,8 +4779,8 @@ trackedFiles: pristine_git_object: af3a6d136d837850b34ed893a8faf800ea114721 src/__tests__/mockserver/internal/handler/generated_handlers.go: id: e6f590a8ce11 - last_write_checksum: sha1:cb1f9f344520a66f5c73e81bf136aae8d802f7e8 - pristine_git_object: e2c7723bbcf25fcd8afcd0fb2180c5614645bbc6 + last_write_checksum: sha1:8ec2c3b7fb54823dfc7eeb7bc26e84ddc992510e + pristine_git_object: 961f3d20e364f4f895fb2804635b49db5acb78a2 src/__tests__/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: ef047f0e0f32 last_write_checksum: sha1:187ff16d05efa1c937632f61dd3f49e49691d5ff @@ -4761,6 +4813,10 @@ trackedFiles: id: cb3e9dff49b4 last_write_checksum: sha1:0354fa223ed664b493be385e9a4656b50c434768 pristine_git_object: bc7488be179fbe0a36fd192475e508158ec1f362 + src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidruns.go: + id: 3c110fe85305 + last_write_checksum: sha1:5b633fb3593ebee5fb0c67fa10828521b2824a6c + pristine_git_object: 33221bfcbee7d64147f724e4a13bf307a6cfdbe2 src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidrunsrunid.go: id: b6f113ba98ea last_write_checksum: sha1:684058e2116df6d2711f6d91b1f552757747cf9a @@ -4769,6 +4825,14 @@ trackedFiles: id: e095cf890e73 last_write_checksum: sha1:dec4b7dbf683ac9ab16c749e9e2bf7d1f29b0046 pristine_git_object: 4acc6c497e6435bb7c095577f9a0db82043ac61f + src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversions.go: + id: 4fcd61a17857 + last_write_checksum: sha1:e7b915155fd206ecfd1eee91e56f7a6b6af71742 + pristine_git_object: bb6725bd067b41226b56edbebd8605b784526ba1 + src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversionsversionid.go: + id: 375da58fa5db + last_write_checksum: sha1:daa331573f0d597d162f2c14dd5cc44b017a17df + pristine_git_object: 62a64631cee8a76b72904f14b133b9e850c6d773 src/__tests__/mockserver/internal/handler/pathgetapidepartments.go: id: ca9ffa1b29af last_write_checksum: sha1:51d9aeb74fcbd86d6cf93eebd426d516e081fcd6 @@ -4941,10 +5005,14 @@ trackedFiles: id: 5bebaf9b24ce last_write_checksum: sha1:97bd63e1d219e07708545f6fff012917f1129722 pristine_git_object: b1364f57bdc769e90a547b2b2b267560042adee9 + src/__tests__/mockserver/internal/handler/pathpostapiagentsagentidversions.go: + id: ec81c6b4099d + last_write_checksum: sha1:f6c386406ed3ca471fa48b09a9ade0f3ea1415b9 + pristine_git_object: 3e7c5b863ee5afef607907c6b8a871c052b12ff1 src/__tests__/mockserver/internal/handler/pathpostapiagentssearch.go: id: a8776f04225b - last_write_checksum: sha1:f5858a05fa6390d53e2faef56ec9290ae63f6c63 - pristine_git_object: a0cc4a107feef818866b485579146232ae5b455a + last_write_checksum: sha1:51aab63e39432c6ba3d542e70d1d1e84895e05d2 + pristine_git_object: 88f4b40ec7cb0f0d0caf2321c6569a8dc9c4ff3b src/__tests__/mockserver/internal/handler/pathpostapianonymousauthtokens.go: id: 60aa1f0a5ac3 last_write_checksum: sha1:a1c71dfe481190c11a51d637015a67cf92abf5a0 @@ -6711,8 +6779,8 @@ trackedFiles: pristine_git_object: 00271c9c5c6f76a25f1cad9e4c39f4d5b476a770 src/__tests__/mockserver/internal/sdk/models/components/manualfeedbackinfo.go: id: 078dfc16661a - last_write_checksum: sha1:f01e2073d3403658504cb485c31f9fac85dba783 - pristine_git_object: fc8ed6d79b7e648e1ddfe3af80531d2d4d99c64e + last_write_checksum: sha1:3c335dbbe63138fa9554cbb89640e2206e0fe03e + pristine_git_object: bd16f7e6bf9b4100a445d1b45c7c2fc0c0d39b64 src/__tests__/mockserver/internal/sdk/models/components/manualfeedbacksidebysideinfo.go: id: 72a4d9370d85 last_write_checksum: sha1:8a4ddceafd722ec773251e16e41e127dc8ae711a @@ -6863,8 +6931,8 @@ trackedFiles: pristine_git_object: 03fe42473560691814b7897de483b1bf4e053b0b src/__tests__/mockserver/internal/sdk/models/components/platformagent.go: id: 295e6fdc8185 - last_write_checksum: sha1:febb835176179597dde557ec93114d6bb7521803 - pristine_git_object: ea2339fc379ccfed2e0fd6f50222ca7800f92123 + last_write_checksum: sha1:a94f6b8b101c5b865594f97a4eb07b57adf8da3c + pristine_git_object: 7a7ee8093aeb27209234048d005629ca9213f2fc src/__tests__/mockserver/internal/sdk/models/components/platformagentcapabilities.go: id: d7953f8005cd last_write_checksum: sha1:cacb5a3e7ff63c8b3068cbd641122271b1f02272 @@ -6887,8 +6955,8 @@ trackedFiles: pristine_git_object: 75bf076b47b5ec5c740447cc170a205a731560a0 src/__tests__/mockserver/internal/sdk/models/components/platformagentcreaterequest.go: id: 731042496d4b - last_write_checksum: sha1:8d68a8121f4fd2d38bfe513efe35923e80b0ae8c - pristine_git_object: 932b81d011e5f4f7bc6c2ddc1b4b01c51da91ba6 + last_write_checksum: sha1:dbbbbc10c9416d8b4cde1a775a5b47903ed8fe9d + pristine_git_object: 03a3fa9a56dbd0411566e620dadd2bc11c1e9c08 src/__tests__/mockserver/internal/sdk/models/components/platformagentdependency.go: id: 0f1c0846aee2 last_write_checksum: sha1:e1df96b28f3c073dfeecf7d54f63bb0aa0f37ac6 @@ -6973,10 +7041,18 @@ trackedFiles: id: b112a0ac05d6 last_write_checksum: sha1:bd428c710e5247f231c95d14de08b4303029090e pristine_git_object: fdb2308a3e586f8ad6e90beb6e18d91e031f1452 + src/__tests__/mockserver/internal/sdk/models/components/platformagentrunsummary.go: + id: 88fc9ea97896 + last_write_checksum: sha1:6e21c5019757dbd844d0092fdd81db7e3cd99521 + pristine_git_object: 3ce609873f2ab432442424813c0bb622997809f9 src/__tests__/mockserver/internal/sdk/models/components/platformagentruntoolapproval.go: id: 20134105d6ce last_write_checksum: sha1:7b5dd0b728fded3369a5a19e803d698f4afb6bb7 pristine_git_object: 3b1437b418436202b1b1a256dff77bc2c297341b + src/__tests__/mockserver/internal/sdk/models/components/platformagentruntrigger.go: + id: 613267a6fe3e + last_write_checksum: sha1:062f5321ed884d803a1470413b331f60daae20ba + pristine_git_object: a39fb83a2c8901738a6a08fe828eb6f9c54b9897 src/__tests__/mockserver/internal/sdk/models/components/platformagentrunwaitresponse.go: id: 949626f75f93 last_write_checksum: sha1:239b3f36488b7d9f367cc23a149bd723bebec529 @@ -7011,12 +7087,12 @@ trackedFiles: pristine_git_object: f80575bf970f15122a6646372ad5a3338be5e2d1 src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchrequest.go: id: 2ce2663e75bc - last_write_checksum: sha1:ecbd66b2931482e539758a95f7e708b1e4f2bc59 - pristine_git_object: dcb71156c21848940b78e84946b1b96cd8de65cc + last_write_checksum: sha1:97023b9820121b9eb60909803f360424900de128 + pristine_git_object: 8b57cdff6fb2ae73b6c081f3e7b69a160e509068 src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchresponse.go: id: 9c7f20c6f3c5 - last_write_checksum: sha1:f9597b52061dd4a7974523162383b14c6b14610e - pristine_git_object: 233e621c689eef6d95a9dfd06f6c0c2ee05a8adf + last_write_checksum: sha1:37d9685bc977bc66da2e6d8af1af6a2ac34cd561 + pristine_git_object: 12ce1544f43051a05f2e7e460e2e24f119b00d63 src/__tests__/mockserver/internal/sdk/models/components/platformagenttoolset.go: id: 0473b35a380a last_write_checksum: sha1:a380d0bc22b4361348014a3c8305a94768d35b31 @@ -7027,8 +7103,28 @@ trackedFiles: pristine_git_object: 18d9ba2e73fbdc6f97945acbb5d59c7e917a6ddd src/__tests__/mockserver/internal/sdk/models/components/platformagentupdaterequest.go: id: 4ce37edbab8c - last_write_checksum: sha1:a32065eacd2851344106c13db60e5e7f0812db47 - pristine_git_object: 4c85fa2de7e8f03dc7347d3e86b16ed4ef60cfd3 + last_write_checksum: sha1:931229a072ce115a66cfb21c47fb96a8dc458e69 + pristine_git_object: 6b74e93ffdaa19368738c62cd9e189ec394370af + src/__tests__/mockserver/internal/sdk/models/components/platformagentversion.go: + id: 97828e26bcb2 + last_write_checksum: sha1:c67ef7a170eee46e1318923d69c675f6a17c5d4a + pristine_git_object: f0f2e56185497575dc56c65d913d95f388939ee9 + src/__tests__/mockserver/internal/sdk/models/components/platformagentversioncreaterequest.go: + id: 42c5db81ad52 + last_write_checksum: sha1:19b5bf8e4163031ac0ba621cebd107da4dca8336 + pristine_git_object: b35c48dfd2204d941569cdf3692e9c83b30c5f19 + src/__tests__/mockserver/internal/sdk/models/components/platformagentversiongetresponse.go: + id: fb1b1825c185 + last_write_checksum: sha1:705e20b1ceaaa4518ae4cbeac773b5fa823b0e91 + pristine_git_object: 7ac405496ca232f7207c32c464eb64377267cf71 + src/__tests__/mockserver/internal/sdk/models/components/platformagentversionslistresponse.go: + id: e1fc5a5ec06a + last_write_checksum: sha1:5db072819cd3e1862791a9e5100b747e46fcb0d2 + pristine_git_object: 2082a2fdf70fc433245f78e103c017c1c51e5a9b + src/__tests__/mockserver/internal/sdk/models/components/platformagentversionwithdefinition.go: + id: c4de629b0aea + last_write_checksum: sha1:f1bf950ad10aa2e30daef3c238dbc78ee036b8a4 + pristine_git_object: 8cdab60528017dffa0b4e6002edf5af3977b4377 src/__tests__/mockserver/internal/sdk/models/components/platformanonymousauthtoken.go: id: 7de9d64d48d0 last_write_checksum: sha1:db23664e334dd09a75e6195967f8facdcb80237e @@ -7271,24 +7367,28 @@ trackedFiles: pristine_git_object: 926597e8f7b729d71a987d61957f417cb543b652 src/__tests__/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go: id: 700228be7eb2 - last_write_checksum: sha1:e75f1bdb5c2e123f1560120f768c9f7884e75069 - pristine_git_object: ea3848147de42cc55e08227fa27745ec495af05f + last_write_checksum: sha1:658c7c0b2556164c4499682ea4eae6e9bcc56687 + pristine_git_object: abb2271cf168ed56cfce717eb9f8b4892e2058a1 + src/__tests__/mockserver/internal/sdk/models/components/platformlistagentrunsresponse.go: + id: feb60ba59226 + last_write_checksum: sha1:fe9c7d056cc2f2a6824d4da6cc78da4cca1d4574 + pristine_git_object: f45e06ba7fb14ef898282a0c67ac4c2401de7a3b src/__tests__/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go: id: 63618714a84b - last_write_checksum: sha1:20ae98541575fde159185aab1fa2daef5aac20b2 - pristine_git_object: 1ebd1cdda698a9031f99790a77754e2c4fffd31b + last_write_checksum: sha1:4bc9853a5228750da86f92e5f6e94aada15de35b + pristine_git_object: 8c1aaffc9d433004f3896d05226f928a2afe0794 src/__tests__/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go: id: b5eb1fe1a5e5 - last_write_checksum: sha1:6cab9f8893a759f433105699945ac25657c84e57 - pristine_git_object: 000ab9b7b26459a388cb7cea886e2a112faa4aff + last_write_checksum: sha1:763be8f31289241dd61bac8720d27341943e6bf0 + pristine_git_object: 13d43d861de32f070282c7d2e500be065da6f92b src/__tests__/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go: id: ec1f303c5d49 - last_write_checksum: sha1:d66a4b296017674ad5590c961bb5088536da5324 - pristine_git_object: 872eb2b3f89c967cdbde2b3c38d4d9202c20ed41 + last_write_checksum: sha1:37172786ccc48272225040df617b5e6521626b70 + pristine_git_object: bf962356a48a9bec4858df595511b6c66878340c src/__tests__/mockserver/internal/sdk/models/components/platformlistusersresponse.go: id: d390bc4f5ca6 - last_write_checksum: sha1:969fda7cd0aa1bc1cdbb67d04cf92f858df82d2d - pristine_git_object: 939be344b716b4939fd434d80e09f60fa518ac69 + last_write_checksum: sha1:75e074fe08687135146b13552fc98e1ad0cd2bf9 + pristine_git_object: e45828bdbc59b741f57c7c67d66bf06eca41fca3 src/__tests__/mockserver/internal/sdk/models/components/platformmessage.go: id: 392f31bb47af last_write_checksum: sha1:563ad3602c9f7ec84b0776ab8743c12fdc966fc5 @@ -7595,8 +7695,8 @@ trackedFiles: pristine_git_object: a756a2969f141ad0b949df030be2216d211bb47e src/__tests__/mockserver/internal/sdk/models/components/platformtriggereventreason.go: id: 405ea0e78cf3 - last_write_checksum: sha1:2269ee129e8ddcf39158cf3a4d6cf51b4e200cc5 - pristine_git_object: 9bd9dd7a438698f85755e74f9577e76a2a8f67de + last_write_checksum: sha1:5eded060385a0561eca483dda9d903d3a86d3c1f + pristine_git_object: 1f116c0bd4003f9d08f196a9fe78ccb994405480 src/__tests__/mockserver/internal/sdk/models/components/platformtriggereventsearchrequest.go: id: d25ba9f345f0 last_write_checksum: sha1:584fc0abba8bcff84af699600b634312fbb45ec3 @@ -8579,8 +8679,8 @@ trackedFiles: pristine_git_object: 51ea72f9e07a81ca3ab685617205f36c34957581 src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreate.go: id: 9511ae3d02fd - last_write_checksum: sha1:e5134c9e7f21cdcbfd32ead5a5721b0294e51050 - pristine_git_object: f64accddf8f5b0b41a95091dbd412e32c00e4dd3 + last_write_checksum: sha1:6652ee01da8f20872c942e697a05529f1b06b2e1 + pristine_git_object: ffaa0a0df076c14174e6fc160de74c84650e7bd9 src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreaterun.go: id: cfdbe175ae56 last_write_checksum: sha1:2e8f6c403a06ca4a62cf7b9b35c9950caa2272de @@ -8593,10 +8693,18 @@ trackedFiles: id: 089e8bae15c2 last_write_checksum: sha1:35f737042c39b842ea0424bc8213342182b12bc7 pristine_git_object: 0435641a80351394bb154ad9bb1ec129eb9e24ff + src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreateversion.go: + id: 712774508b6e + last_write_checksum: sha1:ca76fd8f6474c8a3ca4ae2b407bbb605e37046e8 + pristine_git_object: a0db2be351a3adb399215659b504f31e75cd9214 src/__tests__/mockserver/internal/sdk/models/operations/platformagentsdelete.go: id: ca9fb65b0c93 last_write_checksum: sha1:d91c1c4fb5bb93e724589ceaae24a377bb60518c pristine_git_object: afb68cee54bb3b4fb00992285de447684efc2339 + src/__tests__/mockserver/internal/sdk/models/operations/platformagentsdeleteversion.go: + id: 8a8cbb88cffd + last_write_checksum: sha1:914e77fca7046d5bb66cc221e26545170ccb4829 + pristine_git_object: 1782fe58a042fbc2acef8b7780cf331c4b7fc0a8 src/__tests__/mockserver/internal/sdk/models/operations/platformagentsget.go: id: 76aa63b8cbba last_write_checksum: sha1:1825260fda21a35299c430fcac6b04dfc8799fee @@ -8609,14 +8717,26 @@ trackedFiles: id: d8573939e7a1 last_write_checksum: sha1:c695ec1872fe32f41ef7d7e8d28c2012d4632770 pristine_git_object: 9adf5c6798d27597a022794337d0af144d4c0bb6 + src/__tests__/mockserver/internal/sdk/models/operations/platformagentsgetversion.go: + id: cb8a0642f3ff + last_write_checksum: sha1:1c641601aab6cce218a8658a82f1647a18831211 + pristine_git_object: 0bc93182464bc6516dd24cf65c64d80bb7280577 + src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistruns.go: + id: 2980f2938c5b + last_write_checksum: sha1:8176c964ec6be5ddbf4b8fc01ec8d5f547866df2 + pristine_git_object: 9accae202681e9ffd2c243a6218ba920bc493ed4 + src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistversions.go: + id: e1a45063a6e7 + last_write_checksum: sha1:aa4800cb8cd776376bdda5b3be33b058427d6cff + pristine_git_object: 71721fa8d1c147c4258446413946cacbe248756f src/__tests__/mockserver/internal/sdk/models/operations/platformagentssearch.go: id: 3cec32b020d0 last_write_checksum: sha1:5dd2525c208620f34ff07f429d70c4e6f56cda89 pristine_git_object: 400797ac0ae0d3518c1e2fd0e75fad70ad0e9373 src/__tests__/mockserver/internal/sdk/models/operations/platformagentsupdate.go: id: 2c1ed0996673 - last_write_checksum: sha1:30f767e4e6a31026835308004667478641f582ef - pristine_git_object: 3cb30bb7a1cc56daac97b913b8a8a4614cdb431d + last_write_checksum: sha1:62cb67d548d3d36f3be109219dca285264b4e874 + pristine_git_object: 1f5f5a357538acdef8286d482abaefe01383bc08 src/__tests__/mockserver/internal/sdk/models/operations/platformanonymousauthtokenscreate.go: id: 797123b6d5b9 last_write_checksum: sha1:b293964b7ac0fa5810d6d98efa4925657c3db68c @@ -9151,8 +9271,8 @@ trackedFiles: pristine_git_object: 80853fce6d86d20766336fb2fd27c8669cd12ca8 src/__tests__/summarize.test.ts: id: 3105d6ebc7eb - last_write_checksum: sha1:bb2dba46f1d4304d8236c52e0355a53081ab6119 - pristine_git_object: bb5e2b02fd92c4bc218d0a791e8786a14448f109 + last_write_checksum: sha1:593e8da8d5044fbed5e0cdfab94c31f093739241 + pristine_git_object: 3dfcfe72a4ddce9bca60341ef3fe67881b9e12dc src/__tests__/testclient.ts: id: f142c080bff8 last_write_checksum: sha1:3a38647391f52221c009a9273eebf90793b3d430 @@ -9187,32 +9307,32 @@ trackedFiles: pristine_git_object: 98cadc8fe5496bfbf22b46cf0c81ff4daad6f2c9 src/funcs/adminAgentsList.ts: id: cbdf5d149f30 - last_write_checksum: sha1:be1c05f17e64b7b72edd9daa77f9730ed3f93103 - pristine_git_object: 5b75b590377bd2b7f49395a42d6a4a454d0d755e + last_write_checksum: sha1:8dec4f4c62cd85c64c94d9effe5d70d1b4219ad7 + pristine_git_object: a31ebc9c38d3ebc73d911cf09da8666760225bb5 src/funcs/adminIdpgroupsGet.ts: id: 6c0b58b25c79 last_write_checksum: sha1:f5c38bf950323e42c34af5d28a46d18f628029bc pristine_git_object: 7cb43fd6ae6ce42bf48e6b8a608abf07329ad3d1 src/funcs/adminIdpgroupsList.ts: id: d62ab11955f3 - last_write_checksum: sha1:fc831339052ba4266eede9131b4f12cc36655a6b - pristine_git_object: 37b38f8966fd67efcfadb38b4b143c9bb722dd02 + last_write_checksum: sha1:983e06e90ec48dcb59c97f39da818cbbd4c22dcf + pristine_git_object: ad9ccd0eaae180363754170fab8bf7558369cc16 src/funcs/adminOauthClientsGet.ts: id: 3ff78981852f last_write_checksum: sha1:07f652a12e73cfada240fa83c124dd296577459b pristine_git_object: 0bf64f7cc906f2edf9fe2a58ee37c08cb76411dc src/funcs/adminOauthClientsList.ts: id: e1f46a088bbb - last_write_checksum: sha1:b0bee8d48dcb72c5ddf95247779e4f1a7ee7490d - pristine_git_object: 2780d2bae44a528982cd7da74d19a4375071d0d3 + last_write_checksum: sha1:8f365a461907aa21c29a33d4dd732aafea71f99c + pristine_git_object: 66b3d617f9dfd05549abd07d42bcb4132549b590 src/funcs/agentsCancelRun.ts: id: ac56b4eede4e last_write_checksum: sha1:48972475c8c3a03da837d176775f033ac82e6cee pristine_git_object: 366d0a5c063ad1c9dd11bb7f59c4b3b15f357c79 src/funcs/agentsCreate.ts: id: 562f3edd069d - last_write_checksum: sha1:92c444901ad070bac4c0417f6dc457c17e388739 - pristine_git_object: 6e864668ad552806900f743856c8b1df949bbc67 + last_write_checksum: sha1:a32c8c30f1781498e6b44a6b7f6d5c0fd4b752b5 + pristine_git_object: 27a3f23b1d48bea3e1ff443457916764d3e37394 src/funcs/agentsCreateRun.ts: id: 806c3e535dd1 last_write_checksum: sha1:9c16c72c69eb71471632762a364e8f2f466c53dd @@ -9221,10 +9341,18 @@ trackedFiles: id: c81a7f6203d7 last_write_checksum: sha1:1093647f2c0dfd915b1ac3701f04b2e58a757f20 pristine_git_object: 204a66b14c514daf0a34ef5c47a5aea8d594fbbc + src/funcs/agentsCreateVersion.ts: + id: 9efd04f01ec9 + last_write_checksum: sha1:3b933cf40d1f38f7c0fed7e05fa80f30706c38d4 + pristine_git_object: c23024ed1f0eab4eeb9569140ad4315ba7218880 src/funcs/agentsDelete.ts: id: a32c90c2b1e6 last_write_checksum: sha1:8b9124f6656b81dce766954b00269536c30e1ee7 pristine_git_object: 261bb24d0c4366492a057839bc11ba8852394e36 + src/funcs/agentsDeleteVersion.ts: + id: 33c90b6f83d1 + last_write_checksum: sha1:fb3c9c07b0d66b1eacb1f7635097f552a8b58806 + pristine_git_object: 796180ba99325364ed5842d525f90bab8db86b15 src/funcs/agentsGet.ts: id: ee72478b2e87 last_write_checksum: sha1:d80e21f95ec799e25c8345edf35fc66c99f5c0a2 @@ -9237,18 +9365,30 @@ trackedFiles: id: edd2ff0bf57f last_write_checksum: sha1:e7411fa056256494312165f583c97c959e9d1b0c pristine_git_object: a8257d2f5b9316b75984c37dbfe379d8671c02fc + src/funcs/agentsGetVersion.ts: + id: 01612d24c20d + last_write_checksum: sha1:ce7a10406a86bf58eb6fbdc861e4f5e47eb3054a + pristine_git_object: 7ab978327ec27c2420473e2b652e0ed9e406af41 + src/funcs/agentsListRuns.ts: + id: 9b994e0f5173 + last_write_checksum: sha1:6e9e4a5eb874f664ff33390a25e1cc93a308ec05 + pristine_git_object: 798538f6f34ffb8e0646d714dfa4e59f1c60e744 + src/funcs/agentsListVersions.ts: + id: 70bd9b6819a0 + last_write_checksum: sha1:d20f31df939766bb4d807dbf076ca50cf9203575 + pristine_git_object: 077b0bffc6058dada89809e89d7ee09b1cfb073b src/funcs/agentsRespondToRun.ts: id: d277ef43c764 last_write_checksum: sha1:f0599df2e9132d9c2b6ffda893eccf9ef5483d5d pristine_git_object: ff22f6e14233d4bcd27693003e782310f46f82b4 src/funcs/agentsSearch.ts: id: 9728cd0dc835 - last_write_checksum: sha1:116430a845a252f012afa02713962aa62fc2ecba - pristine_git_object: 9579ddb624b166a6ef46dac758be8e94b79eaa07 + last_write_checksum: sha1:09963aa4090d6cb12569a7ecca8d714df935fe55 + pristine_git_object: 8494e450609175e5af89b44ea979ef0818a0e7a0 src/funcs/agentsUpdate.ts: id: 17940b385bc3 - last_write_checksum: sha1:d39c90b4a7b49c9a8436b3bd6e1dbeddede5cc6a - pristine_git_object: 75f11669b8bc8e435463f55a239e57c7db0229ff + last_write_checksum: sha1:2e3f2a29bb60ea7d902183150d9dd20f4a875dc8 + pristine_git_object: a1a834137ac62e9d98543f9bbf14e2fabea39f18 src/funcs/anonymousauthtokensCreate.ts: id: 0a25779034e3 last_write_checksum: sha1:ee4845fdb2efd4c84094d6b189f44e06d979e0b4 @@ -9647,8 +9787,8 @@ trackedFiles: pristine_git_object: bcb4e180f2062aa5f4acf7aec1c3fe8d830ecb70 src/funcs/departmentsList.ts: id: e96024c92f05 - last_write_checksum: sha1:cf1d4fe6b972e9175ecdcaada6cc6c9cec89a91a - pristine_git_object: 3df0ff0ad44e735ea75dfcf54bf022610c1d3f19 + last_write_checksum: sha1:ce1bf5a7d27db69554c7d775459e680aad55d286 + pristine_git_object: 919f4ef094a6e758b292a0a055e5b22f6e1b1f2d src/funcs/documentsBatch.ts: id: 2661a818099a last_write_checksum: sha1:6fbf812f2004f618490053f6f42e32559e6dcf04 @@ -9955,8 +10095,8 @@ trackedFiles: pristine_git_object: fdb60f8e8dd5de74e4502eb2d0c302d083e14442 src/funcs/usersList.ts: id: 1c6cb4635879 - last_write_checksum: sha1:ef2112972c21a17a3989370c49bf60d02e093b39 - pristine_git_object: ce6b56b2c58b6ac3a3b2f34d240df64009f91c4e + last_write_checksum: sha1:958686b9dd15bf473f6cd3c4415a9fe7ef354f54 + pristine_git_object: e90eb94e711b1e98421fcc22a05ba9c9a4515866 src/hooks/hooks.ts: id: a2463fc6f69b last_write_checksum: sha1:6e42a763f6217572cc59f8799af55dd21d961be9 @@ -9979,8 +10119,8 @@ trackedFiles: pristine_git_object: 42d9739ab67c2fec0689f83777ffa5e1f875e5d5 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:b40666e6e6c46dae3d12ae227780e0e98c5a45a1 - pristine_git_object: 03cbd522f8f193a88e9492cfa3c25b3e860c2e74 + last_write_checksum: sha1:3f60f1c4c2f6833d92ef0ec1cf959975368fb290 + pristine_git_object: 3d4c888d4fd9fb6b79c4171fcf4bb7df4847a3b4 src/lib/encodings.ts: id: 3bd8ead98afd last_write_checksum: sha1:9f7ceed155e986b115a171e9ff645533307619c6 @@ -11207,8 +11347,8 @@ trackedFiles: pristine_git_object: 8e838e195d51e9974e698b5576786bf2b07503ec src/models/components/index.ts: id: 0aa842dce54d - last_write_checksum: sha1:e55e991dd4ae24bf1a0291f1df0607e5a46788e4 - pristine_git_object: 700297cab757aff93a5bc7cf11c5575bf3ab4f5e + last_write_checksum: sha1:33d1631b15d002c1261639482cdec1bda63d6784 + pristine_git_object: ba02dd7afda22153100bf741a8fa91745fc9a71c src/models/components/indexdocumentrequest.ts: id: deb13e2cdc65 last_write_checksum: sha1:7c53c25e699c13bb8d6a0810b63d8c8694c47b86 @@ -11343,8 +11483,8 @@ trackedFiles: pristine_git_object: 36d79589af4cdba09fb04f8dee33d2ae7ec85141 src/models/components/manualfeedbackinfo.ts: id: 340b625c04fe - last_write_checksum: sha1:1fbb689d07e242d18136dc20a2694784dc23dbcb - pristine_git_object: 9c57c7656d01a39449f170c12cc46321fc2232b8 + last_write_checksum: sha1:374e2c2ad4a18e9e432d5f954644bc7781fcef24 + pristine_git_object: 0c6a54befeaa53d3482481edf1da3cf0df14db9f src/models/components/manualfeedbacksidebysideinfo.ts: id: 2a79e8af3399 last_write_checksum: sha1:ba1eadea32c9f0fb29d1d5b0465f4df7a87cad96 @@ -11495,8 +11635,8 @@ trackedFiles: pristine_git_object: e72f74dd795bc5a659ad2e98ba62cc15e212b53e src/models/components/platformagent.ts: id: 0573787fcf08 - last_write_checksum: sha1:b46ff0ab8d56f67ef1176310a1067cf8a06eae77 - pristine_git_object: 7d22afbb86de5c0980aca4dd0a808bf3a67ab1a6 + last_write_checksum: sha1:522db2560c25ca18a12a38cfd0234b199b761e68 + pristine_git_object: dbd8e4dc03b93c9acd103586579f616a0ead65e6 src/models/components/platformagentcapabilities.ts: id: daefec738f28 last_write_checksum: sha1:ce450832b5c2fa7f56f1e00427bdc6d8d63d694b @@ -11519,8 +11659,8 @@ trackedFiles: pristine_git_object: f85ec6c9a27418f8f5487ada1aba3fead6a56d41 src/models/components/platformagentcreaterequest.ts: id: 352cba8dabe9 - last_write_checksum: sha1:7ef9182534280ee8387da96b501890f0d207ffff - pristine_git_object: 039cba313a94091e29cd628107efbac4c14d044d + last_write_checksum: sha1:c12854243c9cd0f63dac10c65d7c3e55177987e1 + pristine_git_object: 3fed99bc53e30e70a6a89e4071612b76018e4acc src/models/components/platformagentdependency.ts: id: 189680202ecb last_write_checksum: sha1:c2523308bf5d78b8a8976b860733e43228446d02 @@ -11605,10 +11745,18 @@ trackedFiles: id: c4f90b817749 last_write_checksum: sha1:e662546a99ce7029eb81708e827e25bc7d2b0ca2 pristine_git_object: be661bb3a09ad72357efbd9f3f4ba7993577486f + src/models/components/platformagentrunsummary.ts: + id: 1c276144359f + last_write_checksum: sha1:5034ff51f17d37c23abbeeb5fcde5dde190481e6 + pristine_git_object: 584536a2ec6db6fefc60d8965d3755cfdff8b5d3 src/models/components/platformagentruntoolapproval.ts: id: 95f98723f5af last_write_checksum: sha1:ab3c2ec540df21bad21b87dda946fe1f74072e5c pristine_git_object: bc060477f9ad49a531fa833146069e5a084dc5d4 + src/models/components/platformagentruntrigger.ts: + id: f43d2d08cbf2 + last_write_checksum: sha1:c38920b33ccc06f45a4a840079d0c5335e05b87d + pristine_git_object: a903f51f73b385166e4cb59f2e2e89b684965143 src/models/components/platformagentrunwaitresponse.ts: id: 123f244b0399 last_write_checksum: sha1:811851e1b3759b2099e1adf86702f8d5f11dd2bf @@ -11643,12 +11791,12 @@ trackedFiles: pristine_git_object: d740bfceac8519726a49109d9b20ba4c49334ef3 src/models/components/platformagentssearchrequest.ts: id: b1d63f2468c7 - last_write_checksum: sha1:98df271816472afdaefdbab8dba6c57fab14cc95 - pristine_git_object: 551ac58c63e3fe43af990d6075aeaafb9804a933 + last_write_checksum: sha1:fb2581559060637725bb98a13302a7c28a362dbc + pristine_git_object: 7a3ca87dc30249692dfcd5c4dc0c2872d99bb2d3 src/models/components/platformagentssearchresponse.ts: id: ce95b592315d - last_write_checksum: sha1:adab2b8b0db86608b09c1dea91be85a3f4e3b205 - pristine_git_object: 56c69577fb9849b49d0df7208f38b50b0b260fb6 + last_write_checksum: sha1:d6155f65bd5ac157b7932b152e28d2a9fe168275 + pristine_git_object: a9da917230288114724379c9f54dbec57dc625a9 src/models/components/platformagenttoolset.ts: id: 795c11ac05f1 last_write_checksum: sha1:dae935f9cd5493c131c780610f06955895cf20b3 @@ -11659,8 +11807,28 @@ trackedFiles: pristine_git_object: aff627727862491f24608799bd06797eb1f016d3 src/models/components/platformagentupdaterequest.ts: id: f1ba24d57028 - last_write_checksum: sha1:6a0605dab25725c482e45c99707e4d8641ba0ab9 - pristine_git_object: 89d8decadf48bb71e5a9314db0b821d186699d07 + last_write_checksum: sha1:961bdf2d3176168f85823ac2ede9c01931311fcc + pristine_git_object: 0ee97619d09d2e54639085db8082a3a82090b10e + src/models/components/platformagentversion.ts: + id: 8eb4744ccf79 + last_write_checksum: sha1:08f028bd97d10a161d3672ebcebd95e8127aeda9 + pristine_git_object: bc7c9f356b424aec4e2c3d6208db0e9d8cea6277 + src/models/components/platformagentversioncreaterequest.ts: + id: 16efa535f4be + last_write_checksum: sha1:d352883c9d6581be7e5e47ff98a02d7216d2a7d0 + pristine_git_object: 811ec9193c23153e2f4774fec41f0494105ca2ae + src/models/components/platformagentversiongetresponse.ts: + id: f1686f274e29 + last_write_checksum: sha1:d6e99c61a5f2ffa19d6705741805bdf62b127d12 + pristine_git_object: 3d37b8dc582d32ca2b1985674fe3b51ba55a4d65 + src/models/components/platformagentversionslistresponse.ts: + id: d5d0b1f3b12e + last_write_checksum: sha1:a35cb8e09e59c11c9e883af79024e602c134de66 + pristine_git_object: 14f83087bec1e2722945e041b9f48cf02925bb58 + src/models/components/platformagentversionwithdefinition.ts: + id: e99bc979c650 + last_write_checksum: sha1:086941a34e4f99d30fe69c9b3de5c7d738d9f9b3 + pristine_git_object: 01d2ff6a2cb1cd4aa84fc60b67279890dc5e4620 src/models/components/platformanonymousauthtoken.ts: id: 9457d46232a4 last_write_checksum: sha1:ab251c5f0ef707ab771787337166715374ce1427 @@ -11903,24 +12071,28 @@ trackedFiles: pristine_git_object: f52624c4b3a68b92391d00e7552639abe68f9988 src/models/components/platformlistadminagentsresponse.ts: id: c022d32545ae - last_write_checksum: sha1:a2a7b44f8ed7d418ded089500678c13decb8a4cf - pristine_git_object: 484700cae058572cbd701b0d810fb5d21d21e553 + last_write_checksum: sha1:06a1ce84d0efab3589a40a4fa46ae64a99ab628a + pristine_git_object: 8606a1dfa8d7fa6e85d74c25ff75d3ebc845cfa2 + src/models/components/platformlistagentrunsresponse.ts: + id: 09f3c495fe67 + last_write_checksum: sha1:e2027dadda1ab21439e787c93a2ab05812bd9fac + pristine_git_object: dd3e06f628d3bbb21fe51716f7793fa68a05ca1a src/models/components/platformlistdepartmentsresponse.ts: id: c0ec3528fb68 - last_write_checksum: sha1:683ac4cb21731042b31c042cc14157cb8e4f9855 - pristine_git_object: b1b05c08cb20ca021491ebde7e61be0129545a38 + last_write_checksum: sha1:124ddccb693ddd9175abaeb4de2adce2d29d1687 + pristine_git_object: fc27664a0d193f9146b5719ee0d816cde7314ac5 src/models/components/platformlistidpgroupsresponse.ts: id: 5b709703cb04 - last_write_checksum: sha1:d2e58b3a6e0b3930eb5df0dc376459a1274a993b - pristine_git_object: 41918de91885d0792d2bef37473feacd2d60ce37 + last_write_checksum: sha1:77b758cecf73ea528a7f298d52fc6877fbf8a465 + pristine_git_object: ef5b6d6260728bccccc6c8b6ce648a546991f2c9 src/models/components/platformlistoauthclientsresponse.ts: id: fa3d70d6dfb6 - last_write_checksum: sha1:e2b437285bde7d7209cb0ef3968048bd53f11d0c - pristine_git_object: 6b219e5ad8aac3d73c5a871ca3361cba0d2c394a + last_write_checksum: sha1:02e60db433e55c36d112775668cf270702f63eb3 + pristine_git_object: d0552b7b9d3595545ef33c97b01880320fa0073e src/models/components/platformlistusersresponse.ts: id: 13732ab68462 - last_write_checksum: sha1:2af5376e65adc9e64a5161b39c7026a83686f049 - pristine_git_object: 5c5ac2ea625aa5aa72fb9824105d9b9474e9670a + last_write_checksum: sha1:709e7c564ec3d1344024e5559a70b69ea44d2c6a + pristine_git_object: 41e5a320d6d6f88efa746fb4b3cef90a09fe1a5a src/models/components/platformmessage.ts: id: 8869a2cf3a64 last_write_checksum: sha1:d212ca1afdfb21f03e1daccdf33d744b7f2d1ad7 @@ -12227,8 +12399,8 @@ trackedFiles: pristine_git_object: 1cc9dec351d9c6a55fe1ac436393fa5b377415d4 src/models/components/platformtriggereventreason.ts: id: 3e21a733137e - last_write_checksum: sha1:ffff38c8d860135b362a58f983c3275d535adefc - pristine_git_object: 805863476a7feba12728717ea1e975ebe00a2cd9 + last_write_checksum: sha1:5cbdcc1ec485d4546a42bc75d40a059ce2496788 + pristine_git_object: d23b09a6d42782ee914dc5572535234d8d99d276 src/models/components/platformtriggereventsearchrequest.ts: id: 65684ccd7f59 last_write_checksum: sha1:bc27ed2ac637aa25c661e7bb4c123b5da943dd2d @@ -13159,8 +13331,8 @@ trackedFiles: pristine_git_object: 79fbf1f31b278bb6131ba66d28872de768813d5f src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:0b434703e424cde6dabc3b97d344c11e0cfd0ea7 - pristine_git_object: 6678235970e85d0b2eb1ccda7fd6cde212e20b0c + last_write_checksum: sha1:56157770ac835d18bb90aa499092a0b5629e7300 + pristine_git_object: 0ca679b0e41e89301168ceb8206bd133bb49e9b6 src/models/operations/insights.ts: id: 7bef0edaab32 last_write_checksum: sha1:4b9e5140167f92997691b496a27bdd46ca899bff @@ -13245,10 +13417,18 @@ trackedFiles: id: d6bc6eccfb90 last_write_checksum: sha1:4ba99d9ad290c178fc0454410c5fe332cfdbfc67 pristine_git_object: 3f28068464bbb515bab5b5e9e40a492cfbf6b3bc + src/models/operations/platformagentscreateversion.ts: + id: 41d8da393111 + last_write_checksum: sha1:4f006827d987476bb77d6ef107f56d1025211877 + pristine_git_object: 27a0002e3ee027ae5c6a404e7fee20a98cc799d9 src/models/operations/platformagentsdelete.ts: id: 3e70cd9d77be last_write_checksum: sha1:1e6ea11ddbec188168ce85e5bec42c5507a0884b pristine_git_object: d65f13c342da04dd82e605c67516054f16da2ab5 + src/models/operations/platformagentsdeleteversion.ts: + id: 81dd4bd129ba + last_write_checksum: sha1:d0ef057a1fd3df11e2f3fc2c01fdd780a03b6f83 + pristine_git_object: 473412027bd16a7826b335e28dcd50ccc5dcea40 src/models/operations/platformagentsget.ts: id: a1a38c3fd799 last_write_checksum: sha1:122291ae757c9ae7d1e339589e168518239d0c1b @@ -13261,6 +13441,18 @@ trackedFiles: id: c025879102b3 last_write_checksum: sha1:f3ec3ce75fb94238bc7186359808677b6312bfb1 pristine_git_object: 6e2eba89b9d2266378d3fe229e061a3573a5ddc8 + src/models/operations/platformagentsgetversion.ts: + id: c60d227d59c2 + last_write_checksum: sha1:3478fd54ba8ab4232f683f79fe6610d6c58cc708 + pristine_git_object: a02c6c83780d281dfaed0c1d261487e56f9f62ab + src/models/operations/platformagentslistruns.ts: + id: c4e7575bbbfa + last_write_checksum: sha1:ae9b0f11dcc9fe3e96584b71b79574d82c80edb4 + pristine_git_object: 9590f4e6def5718d50fb20a97b627a805390ed97 + src/models/operations/platformagentslistversions.ts: + id: f9de64492e21 + last_write_checksum: sha1:0bd8877be6223023b45ca751a4f094360122e94b + pristine_git_object: 71e4188a371675d9119f8706927373d7472f71ea src/models/operations/platformagentsupdate.ts: id: ce9e46fa2d0e last_write_checksum: sha1:a86716378fafdb735cc0c0ed7f5b5d5bce6df5b2 @@ -13495,8 +13687,8 @@ trackedFiles: pristine_git_object: f7a8cbb1c8141cd8706e676cf12dd09fba59dc2f src/react-query/adminAgentsList.ts: id: 613f91de945e - last_write_checksum: sha1:cb895918629752da2e51ba509e3a375c0a3e1451 - pristine_git_object: be030ea43ae86b95cf7cc24d49b99277ccb1b75c + last_write_checksum: sha1:6aed7308fd9ef158519595cccbe3f461aaaf98c3 + pristine_git_object: 399d3a308c04349c3f18005bc1d9ada394b1a1cc src/react-query/adminIdpgroupsGet.core.ts: id: 496513d3f336 last_write_checksum: sha1:0eed6e74429052ab16734e53a9a3823eff03d4ff @@ -13511,8 +13703,8 @@ trackedFiles: pristine_git_object: 413b6b37d2f751624e6b0b003321fe098dfb1a15 src/react-query/adminIdpgroupsList.ts: id: 0f1e91b5ddda - last_write_checksum: sha1:1a5ff1f94232bc99c358573445d55ba766cf00c9 - pristine_git_object: 1ba05d215f9b58e28a9c9ed55198cfc3514643cf + last_write_checksum: sha1:c7de086119cadfac771afe3abf07854e5570af2a + pristine_git_object: bf1476a1b025b3eeef499059ea888dcdd550f30d src/react-query/adminOauthClientsGet.core.ts: id: b1e3964055be last_write_checksum: sha1:aa369f67f7109d146d3a45d809aa155d9048b67b @@ -13527,16 +13719,16 @@ trackedFiles: pristine_git_object: ceb30493e041d88df177b3e0551edf96b184db7e src/react-query/adminOauthClientsList.ts: id: dd5b3f8a1094 - last_write_checksum: sha1:c58f81f844f855571292ffc161317768a15d003c - pristine_git_object: 821beb162442bc62afbb4cdbb4b06f7ab736c901 + last_write_checksum: sha1:160710949d7936eb4471eb95b95fddcfa1d64176 + pristine_git_object: 9ac58186ec63808ccda3d77a69b8d20a952b6a9c src/react-query/agentsCancelRun.ts: id: 26e1ed795930 last_write_checksum: sha1:4a2dfc2d456c2f17128e109c42e42ac4a9690b0e pristine_git_object: 5d2d60e7c469d1df9189866da44fa4d07e763f91 src/react-query/agentsCreate.ts: id: 708911cbb5a0 - last_write_checksum: sha1:4390dc2419f8d114f208bb25084fbb52bebacb08 - pristine_git_object: 54a1ff514cc6a822bb762510d47d89f237fc298e + last_write_checksum: sha1:6ad6f8047aac25c4e2221185ea82be9f931fc08b + pristine_git_object: be0e0b535b85c036aef101a13b82a8cd20752f40 src/react-query/agentsCreateRun.ts: id: b1268b5938b6 last_write_checksum: sha1:32cab41857945a873a0f56b01e141f8655cefd12 @@ -13545,10 +13737,18 @@ trackedFiles: id: ccb446d85a83 last_write_checksum: sha1:e5d3a0823109753c1b6bd679e80487a81215bf0d pristine_git_object: 1a43ee72ef060e7ad2fc7dee92a552c76161200e + src/react-query/agentsCreateVersion.ts: + id: 7e1c4e16cc45 + last_write_checksum: sha1:6ca062df9d1c7aaa0e184513316d32c48a39034c + pristine_git_object: aabeb59d32ca7d219a30bec0c860781e3a2b0f0a src/react-query/agentsDelete.ts: id: 2533789925bc last_write_checksum: sha1:71da93ed3a97c35b84d4410bcd218422b4fa8196 pristine_git_object: b3a0e0162f46d14ff72f9618e56622ad02dea264 + src/react-query/agentsDeleteVersion.ts: + id: fe1f61f15a95 + last_write_checksum: sha1:7219ae27dad6bb2af4868cd03c999d7deb870024 + pristine_git_object: 950fc744f3b9aebebe7309691eb2851bd9ec352a src/react-query/agentsGet.core.ts: id: bf202f112850 last_write_checksum: sha1:ae2d4c525fe9ac849bcfafdec85702496dce2954 @@ -13573,18 +13773,42 @@ trackedFiles: id: e5e8003439d2 last_write_checksum: sha1:4873c704c9b3562f03dbfb678ba2768aa8dd0c40 pristine_git_object: 8dd62558175eb164bf6cda1bb6d833ea05e1e8f1 + src/react-query/agentsGetVersion.core.ts: + id: e4866130b691 + last_write_checksum: sha1:7daa59530013c597b7e4ca77168d62a01ce30f75 + pristine_git_object: ffb0ec99877c9701b5f18a0dd227b8fdb29229ae + src/react-query/agentsGetVersion.ts: + id: 9927b890386b + last_write_checksum: sha1:d203b4c5c81e2a86000e9734898370d402e94256 + pristine_git_object: 70a5e0101c0c12140fa834fc8bb0513ca5d8294b + src/react-query/agentsListRuns.core.ts: + id: 6c2683987eee + last_write_checksum: sha1:4e6e8a32c4d4ac4860e4ef2ffcb7087898bd753f + pristine_git_object: 790fb34d9dca364aa42154336dbf4d49dfd17990 + src/react-query/agentsListRuns.ts: + id: 0362dc62e5cf + last_write_checksum: sha1:6f4dbb54f6e5ff9355e5e262819eaec3420a3a2d + pristine_git_object: 21baa3edca3d1b313ccdfc950486bb95e97a3070 + src/react-query/agentsListVersions.core.ts: + id: a891c12d19aa + last_write_checksum: sha1:34a222c4404cfd130c84ac6778b846a7152ab477 + pristine_git_object: 319fa684e5905c2509d8d3fe4a8d125cc4f557f7 + src/react-query/agentsListVersions.ts: + id: 1d6744aabb99 + last_write_checksum: sha1:132e491a300edda77002a3269da59a27841901b4 + pristine_git_object: 6469d1e491e889c0802785b9ed8ca8a96e455867 src/react-query/agentsRespondToRun.ts: id: e9ad48bcd941 last_write_checksum: sha1:c5d3fcc9832583c216a3b26547c09732407ea143 pristine_git_object: 6e0a09c05f7bf92a535aff9e25cab894503e8f93 src/react-query/agentsSearch.ts: id: 9405791fe3f7 - last_write_checksum: sha1:bf4c703a377f012c96457d339596b4f141e3bd5f - pristine_git_object: 9bd164a480480bc1f07b41dde8d086504f5946f3 + last_write_checksum: sha1:45680985738358f79d4dd70e4739b8705e4ff22b + pristine_git_object: 558c19900cdb589df1b42c21ac40bc4225c3acbd src/react-query/agentsUpdate.ts: id: 24fb46b54df9 - last_write_checksum: sha1:4937a83cc78e1a29ff64b831a8d6527de939c1ce - pristine_git_object: 1a9ec52054188a1b44d331f281bf6176b184c0d6 + last_write_checksum: sha1:52315a1d746be1ae1dbcf3e0e78d1dfe9e83f3f8 + pristine_git_object: a949056c3564dd5a17658004a434c69943a38c81 src/react-query/anonymousauthtokensCreate.ts: id: 9565752f94db last_write_checksum: sha1:6d31099e8dbc5681c8d1e5d33a31b2a7d1ef8c73 @@ -14071,8 +14295,8 @@ trackedFiles: pristine_git_object: d25500db4b271a40ae65efbb4ae04792d098d41c src/react-query/departmentsList.ts: id: 8429e29d8f7c - last_write_checksum: sha1:527683b3c144c01a04ef35bb3fddc628309614e3 - pristine_git_object: 120a5b3519a7ed2449f900570a947a2bf6835b1a + last_write_checksum: sha1:50370ec2f142f8a17d74701ac205cfeb6a1e678b + pristine_git_object: 775f0f63786f571d37e9a4a43f95b7aa07a87172 src/react-query/documentsBatch.ts: id: f1fd28dd0f13 last_write_checksum: sha1:878b21cff5ad7054ea704e9f70c25167c11600d8 @@ -14095,8 +14319,8 @@ trackedFiles: pristine_git_object: a9f37ea69f54d7c1072f42f8990e3f25d9d984e5 src/react-query/index.ts: id: 9e975471aa65 - last_write_checksum: sha1:2a0a74e438a9e358728d6f4373874b5b9cbdf175 - pristine_git_object: 3523da35565fc7e9ee39c4edc4263329ab423076 + last_write_checksum: sha1:9e4dc534574899edf2cdbe4fe6170c536f82ba26 + pristine_git_object: e8080cce26c3b0082d1b851433d3f92d963771f5 src/react-query/indexingAuthenticationRotateToken.ts: id: e56c0845e38e last_write_checksum: sha1:035d7baae9a7fd7c32f69211cfe85b0f6ccbbf8c @@ -14455,8 +14679,8 @@ trackedFiles: pristine_git_object: 8352de769073f97317d3eed9886c59744714dd1e src/react-query/usersList.ts: id: 6ec27ce94c00 - last_write_checksum: sha1:6ea141c0ebbbd0afdef60d5e62207e65adba2def - pristine_git_object: 589d2a9d9d5659d98fa1d0719d00c34162122eb5 + last_write_checksum: sha1:2e2962ad5cf3fdda3008671fcdd874374f3fe02c + pristine_git_object: 8696941831ee4f61e844a365826545226402826f src/sdk/activity.lazy.ts: id: 06f0ac292e66 last_write_checksum: sha1:2d41ddf55956a8ddb8402c48e4806e316eb58cd7 @@ -14475,20 +14699,20 @@ trackedFiles: pristine_git_object: 8274a1736a34e180a136da2fdd1c46030bb64483 src/sdk/adminagents.lazy.ts: id: 1a6e8e42a4a7 - last_write_checksum: sha1:5dbafef41280474b7d317106702858e953ed0a00 - pristine_git_object: 9ea54da187ce196db039dfefa4e5b26d599f8c8f + last_write_checksum: sha1:4529c20b23fa0ad82b14413785dc0978d8fa9781 + pristine_git_object: 6fa46e598c99d8cde898c38b558aa36bd02b60c8 src/sdk/adminagents.ts: id: 3aa167398f4e - last_write_checksum: sha1:fe0aebca4b64c38310512072b1c9a90ea1457b4c - pristine_git_object: eda0414a52a681da22db3b2f44c47f20cfe48540 + last_write_checksum: sha1:ceecd23ec812f16f72aeae9243f35e2babf1eeb1 + pristine_git_object: 0e43803ae2246764cdee91d382f46712fa74f716 src/sdk/agents.lazy.ts: id: 7d195535d1a2 - last_write_checksum: sha1:d5517f78535c583e1b7c5c9cc5bdf36cd19e9ab3 - pristine_git_object: 3ecd2a173b35fe723b395f434e5775a696afdb49 + last_write_checksum: sha1:c2e174d5a1e3b1578b9b7f1f7943bd1dbb80f4eb + pristine_git_object: 71f66417fda854fecd178f6afaf2058efdbe8d01 src/sdk/agents.ts: id: a103cd018c9b - last_write_checksum: sha1:b58eba5d9fcc90d0d2d2030641143ec311b19801 - pristine_git_object: 3363202220690938a61758c21307fdbed439124f + last_write_checksum: sha1:ab461f786d9b015390e11377ae2d17de20169e14 + pristine_git_object: d6025fd33596fdb9f2645bafeb602b5ca57d2d01 src/sdk/announcements.lazy.ts: id: 909c7e131653 last_write_checksum: sha1:ecf0463a722dc57a7b46ef6872c05d3266e39c10 @@ -14571,12 +14795,12 @@ trackedFiles: pristine_git_object: e8ee24f701b86a1276635a9a65e933858d6dd97b src/sdk/clients.lazy.ts: id: 013a500e322a - last_write_checksum: sha1:a85fcf3d9aa748c0ced58111c7d9d5056e03af6c - pristine_git_object: d484c6cdb71fb9a75863a8685d2f5419d5aba34c + last_write_checksum: sha1:0085b5bf41a1e27f03856c33aa592a9d867df285 + pristine_git_object: 3db26592053bbd67de1d7816efb7fa14caa6b821 src/sdk/clients.ts: id: b76ed594ae48 - last_write_checksum: sha1:791227def7888d61e46340d41fcd30e5eb3aa186 - pristine_git_object: c6bfaa2cc87255d36e5c9cabb0b77d127e306f4c + last_write_checksum: sha1:3be41cb2c9a3ae782e54ee4126de78c5d53ccace + pristine_git_object: e3b81fc0a820277760357c3fc120724bff0353b7 src/sdk/clientsearch.lazy.ts: id: 30a2c5f1e7fa last_write_checksum: sha1:b55a150722f0a3d0d3d3320d175df1bc7759278b @@ -14627,12 +14851,12 @@ trackedFiles: pristine_git_object: 656499e8d6b1e6a244a45c948b71c2f8cff454aa src/sdk/departments.lazy.ts: id: 6b413e63520d - last_write_checksum: sha1:f63735c6da426e578f8d6e11553714afddb5f497 - pristine_git_object: a20de3e4a8786765529a1a2a4150422dd91eee59 + last_write_checksum: sha1:fd7f5b4090a9bf734eda14702d9cae6f1a72919e + pristine_git_object: afb319f1148d7cad66d0a014445de8dbc0da8d7d src/sdk/departments.ts: id: 8278c9a9987d - last_write_checksum: sha1:d986797a9fe65cc79c9497830ab3590667494dcd - pristine_git_object: ba279cc5003e8e4c7ee1ed9a81ab0809b3a59c7a + last_write_checksum: sha1:78e81b1b54a9bc7cd0a0886b5881d60adadcdc68 + pristine_git_object: b658c0a1ac7567f2c75489639cb29b22a38fe054 src/sdk/documents.lazy.ts: id: 0cdb88910e6d last_write_checksum: sha1:3aa1aeb3296a5cbcf5594a02bcf2b389c461ec63 @@ -14675,12 +14899,12 @@ trackedFiles: pristine_git_object: 8ae5246d3de39e8ecc9d3256da2ac3758917b388 src/sdk/idpgroups.lazy.ts: id: 5a9d34893d30 - last_write_checksum: sha1:9eacaf624851dbd23d9164d91c2cd3f0e01a2794 - pristine_git_object: 7d21304169c3604df8115f168797dcd7366da216 + last_write_checksum: sha1:b2df0fe1807311e7e2360dbe95c64720a3484b4a + pristine_git_object: 2cb174feee340641918c3914818ef736b7fa839e src/sdk/idpgroups.ts: id: b272c6e1d425 - last_write_checksum: sha1:3d2f82204199b53a428d3af03d6ed7cf3c69a4e8 - pristine_git_object: 602b98e38fd468380ca0fff0066adfb46ca8854c + last_write_checksum: sha1:3cf7ce96d82eb584eee33d759e886da4627068a4 + pristine_git_object: 8061b0708564718d5498b4e0ae92bf4ffe3f2081 src/sdk/index.ts: id: a857902a703f last_write_checksum: sha1:54cdd8319bfbee269b54b8c56988fc0a678f2ec3 @@ -14839,12 +15063,12 @@ trackedFiles: pristine_git_object: 61dda95baa52f3cc3ab756d3948cde9ad33a7ad4 src/sdk/users.lazy.ts: id: 6306a88731b0 - last_write_checksum: sha1:851be667a13dd920af8e0f5f62a6b5cefe977f00 - pristine_git_object: cdc086d6e18e755a85b8054e2dbec0ba01b78658 + last_write_checksum: sha1:691cbb6dfbd8f2b5933f4729c15ea8f3658c39f3 + pristine_git_object: 6d5c08bbbb8b4c09d39aaa7b53db971835904a43 src/sdk/users.ts: id: 2df5828eed03 - last_write_checksum: sha1:aa0e25b6a29ff93cedf7af140876eb8769cabcac - pristine_git_object: c04e590cc639195022d659bab3204ad374528709 + last_write_checksum: sha1:82b8103ef5c299abf6e98c75894d69ee0fc78942 + pristine_git_object: a581b6a102f2cba33a5c4820108e207490f79dab src/sdk/verification.lazy.ts: id: 9d94b9c88faa last_write_checksum: sha1:19e8fe901f3daa31290d0b6444e3448789554676 @@ -15846,10 +16070,10 @@ examples: platform-agents-search: speakeasy-default-platform-agents-search: requestBody: - application/json: {"name": "HR Policy Agent"} + application/json: {"name": "HR Policy Agent", "page_size": 100} responses: "200": - application/json: {"agents": [], "request_id": ""} + application/json: {"agents": [], "has_more": true, "request_id": ""} "400": application/problem+json: {"type": "https://developer.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developer.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} "500": @@ -16546,7 +16770,7 @@ examples: platform-agents-create: speakeasy-default-platform-agents-create: requestBody: - application/json: {"name": "HR Policy Agent", "instructions": "Answer employee questions about HR policies and benefits."} + application/json: {"name": "HR Policy Agent", "instructions": "Answer employee questions about HR policies and benefits.", "draft": false} responses: "201": application/json: {"agent": {"name": "HR Policy Agent", "agent_id": "ef33aecf52c142a6873adf76037b642e", "capabilities": {}, "subagents": [{"name": "HR Policy Agent"}]}, "request_id": ""} @@ -16645,6 +16869,72 @@ examples: responses: "200": image/*: "x-file: example.file" + platform-agents-list-runs: + speakeasy-default-platform-agents-list-runs: + parameters: + path: + agent_id: "{agent_id}" + query: + page_size: 50 + responses: + "200": + application/json: {"results": [{"run_id": "", "agent_id": "", "state": "RUNNING", "created_at": "2024-09-28T20:59:41.155Z"}], "has_more": false, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-agents-list-versions: + speakeasy-default-platform-agents-list-versions: + parameters: + path: + agent_id: "{agent_id}" + query: + page_size: 20 + responses: + "200": + application/json: {"results": [], "has_more": true, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-agents-create-version: + speakeasy-default-platform-agents-create-version: + parameters: + path: + agent_id: "{agent_id}" + requestBody: + application/json: {"display_name": "Caterina.Walsh", "agent": {"name": "HR Policy Agent", "instructions": "Answer employee questions about HR policies and benefits.", "draft": false}} + responses: + "201": + application/json: {"version": {"version_id": "", "display_name": "Imani_Lebsack", "created_at": "2025-05-23T00:57:48.585Z", "agent": {"name": "HR Policy Agent", "agent_id": "ef33aecf52c142a6873adf76037b642e", "capabilities": {}, "subagents": [{"name": "HR Policy Agent"}]}}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-agents-get-version: + speakeasy-default-platform-agents-get-version: + parameters: + path: + agent_id: "{agent_id}" + version_id: "{version_id}" + responses: + "200": + application/json: {"version": {"version_id": "", "display_name": "Mauricio.Pouros72", "created_at": "2025-04-07T11:45:00.644Z", "agent": {"name": "HR Policy Agent", "agent_id": "ef33aecf52c142a6873adf76037b642e", "capabilities": {}, "subagents": [{"name": "HR Policy Agent"}]}}, "request_id": ""} + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + platform-agents-delete-version: + speakeasy-default-platform-agents-delete-version: + parameters: + path: + agent_id: "{agent_id}" + version_id: "{version_id}" + responses: + "400": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} + "500": + application/problem+json: {"type": "https://developers.glean.com/errors/invalid-cursor", "title": "Invalid Pagination Cursor", "status": 400, "detail": "The provided cursor has expired. Start a new search to get a fresh cursor.\n", "code": "invalid_cursor", "documentation_url": "https://developers.glean.com/errors/invalid-cursor", "request_id": "req_7f8a9b0c1d2e", "errors": [{"pointer": "/messages/0/role", "detail": "Must be one of: USER, GLEAN_AI.", "code": "invalid_cursor"}]} examplesVersion: 1.0.2 generatedTests: activity: "2025-05-05T15:08:35-05:00" @@ -16868,13 +17158,11 @@ generatedTests: platform-models-list: "2026-12-01T00:49:11Z" platform-anonymous-auth-tokens-create: "2026-12-01T00:49:11Z" getImage: "2026-12-01T00:49:12Z" -releaseNotes: | - ## Typescript SDK Changes: - * `glean.models.list()`: **Added** - * `glean.anonymousauthtokens.create()`: **Added** - * `glean.client.chat.retrieveImage()`: **Added** - * `glean.chat.create()`: `request` **Changed** - * `glean.chat.createStream()`: `request` **Changed** + platform-agents-list-runs: "2026-12-03T21:48:24Z" + platform-agents-list-versions: "2026-12-03T21:48:24Z" + platform-agents-create-version: "2026-12-03T21:48:24Z" + platform-agents-get-version: "2026-12-03T21:48:24Z" +releaseNotes: "## Typescript SDK Changes:\n* `glean.agents.listRuns()`: **Added**\n* `glean.agents.listVersions()`: **Added**\n* `glean.agents.createVersion()`: **Added**\n* `glean.agents.getVersion()`: **Added**\n* `glean.agents.deleteVersion()`: **Added**\n* `glean.agents.create()`: \n * `request.draft` **Added**\n * `response.agent.isDraft` **Added**\n* `glean.agents.search()`: \n * `request` **Changed**\n * `response` **Changed**\n* `glean.agents.get()`: `response.agent.isDraft` **Added**\n* `glean.agents.update()`: \n * `request.platformAgentUpdateRequest.draft` **Added**\n * `response.agent.isDraft` **Added**\n* `glean.admin.agents.list()`: `response.results[].isDraft` **Added**\n* `glean.triggers.searchEvents()`: `response.results[].reason` **Changed**\n* `glean.triggers.searchPresetEvents()`: `response.results[].reason` **Changed**\n* `glean.client.activity.feedback()`: \n * `request.feedback1.manualFeedbackInfo.source.enum(needToKnow)` **Added**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index fe47bb710..47ae3f298 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,7 +36,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true typescript: - version: 0.21.2 + version: 0.21.3 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 122563994..78a74def9 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.1.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 31ad03140234f66424854f64d0106442914e8fae - x-open-api-commit-sha: f55eff25e144e29e05f049264bcf2db6777b91d3 + x-source-commit-sha: 5b22c61faca7419e847c8ae41b265a3648374fe5 + x-open-api-commit-sha: 887088723a67b285072f6192d61f1f7fb2b2d318 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. @@ -37,7 +37,7 @@ paths: - Agents summary: Create agent description: | - Create and publish an agent from its complete definition. + Create an agent from its complete definition. The agent is published unless `draft` is true. operationId: platform-agents-create x-glean-scopes: legacy: @@ -60,7 +60,7 @@ paths: $ref: "#/components/schemas/PlatformAgentCreateRequest" responses: "201": - description: Agent created and published. + description: Agent created. content: application/json: schema: @@ -97,7 +97,7 @@ paths: - Agents summary: Search agents description: | - Search agents available to the authenticated user by agent name. + Search agents available to the authenticated user by agent name. Results come one page at a time. When has_more is true, send next_cursor as cursor, with the same name, to get the next page. operationId: platform-agents-search x-glean-scopes: legacy: @@ -200,7 +200,7 @@ paths: - Agents summary: Update agent description: | - Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. operationId: platform-agents-update x-glean-scopes: legacy: @@ -231,7 +231,7 @@ paths: $ref: "#/components/schemas/PlatformAgentUpdateRequest" responses: "200": - description: Agent updated and published. + description: Agent updated. content: application/json: schema: @@ -370,6 +370,76 @@ paths: security: - APIToken: [] /api/agents/{agent_id}/runs: + get: + tags: + - Agents + summary: List agent runs + description: | + List the authenticated user's persisted runs of an agent, newest first. Each result holds run metadata only + operationId: platform-agents-list-runs + x-glean-scopes: + legacy: + - AGENTS + platform: + - agents:run + x-visibility: Public + x-glean-release: + stage: beta + introduced: "2026-12-01" + parameters: + - in: path + name: agent_id + description: ID of the agent whose runs should be listed. + required: true + example: "{agent_id}" + schema: + type: string + minLength: 1 + maxLength: 256 + - in: query + name: page_size + description: Maximum number of runs to return. Defaults to 50. Maximum is 100. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 50 + - in: query + name: cursor + description: | + Opaque pagination cursor from a previous response. Send it with the same agent_id that the previous request used. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformListAgentRunsResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: agents + x-speakeasy-name-override: listRuns + security: + - APIToken: [] post: tags: - Agents @@ -643,6 +713,258 @@ paths: x-speakeasy-name-override: respondToRun security: - APIToken: [] + /api/agents/{agent_id}/versions: + get: + tags: + - Agents + summary: List agent versions + description: | + List saved versions of an agent, newest first. Requires permission to edit the agent. + operationId: platform-agents-list-versions + x-glean-scopes: + legacy: + - AGENTS + platform: + - agents:read + x-visibility: Public + x-glean-release: + stage: beta + introduced: "2026-11-26" + parameters: + - in: path + name: agent_id + description: ID of the agent whose versions to list. + required: true + example: "{agent_id}" + schema: + type: string + minLength: 1 + - in: query + name: page_size + description: Maximum number of versions to return. Defaults to 20. Maximum is 50. + required: false + schema: + type: integer + minimum: 1 + maximum: 50 + default: 20 + - in: query + name: cursor + description: Opaque pagination cursor returned as next_cursor by the previous page. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformAgentVersionsListResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: agents + x-speakeasy-name-override: listVersions + security: + - APIToken: [] + post: + tags: + - Agents + summary: Create agent version + description: | + Save a complete agent as a named version without publishing it. The agent's published definition is unchanged. When the agent already has 50 saved versions, the oldest one is deleted. Requires permission to edit the agent. + operationId: platform-agents-create-version + x-glean-scopes: + legacy: + - AGENTS + platform: + - agents:write + x-visibility: Public + x-glean-release: + stage: beta + introduced: "2026-11-26" + x-codegen-request-body-name: payload + parameters: + - in: path + name: agent_id + description: ID of the agent to save a version of. + required: true + example: "{agent_id}" + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + application/json: + example: + display_name: Stricter HR policy wording + agent: + name: HR Policy Agent + instructions: Answer only from the 2026 HR policy handbook. + schema: + $ref: "#/components/schemas/PlatformAgentVersionCreateRequest" + responses: + "201": + description: Agent version created. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformAgentVersionGetResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: agents + x-speakeasy-name-override: createVersion + security: + - APIToken: [] + /api/agents/{agent_id}/versions/{version_id}: + get: + tags: + - Agents + summary: Get agent version + description: | + Retrieve a saved version of an agent, including the complete agent it saved. + operationId: platform-agents-get-version + x-glean-scopes: + legacy: + - AGENTS + platform: + - agents:read + x-visibility: Public + x-glean-release: + stage: beta + introduced: "2026-11-26" + parameters: + - in: path + name: agent_id + description: ID of the agent. + required: true + example: "{agent_id}" + schema: + type: string + minLength: 1 + - in: path + name: version_id + description: Opaque ID of the agent version to retrieve, as returned by List agent versions. + required: true + example: "{version_id}" + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformAgentVersionGetResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: agents + x-speakeasy-name-override: getVersion + security: + - APIToken: [] + delete: + tags: + - Agents + summary: Delete agent version + description: | + Delete a saved version of an agent. The agent itself is unchanged. Requires permission to edit the agent. + operationId: platform-agents-delete-version + x-glean-scopes: + legacy: + - AGENTS + platform: + - agents:write + x-visibility: Public + x-glean-release: + stage: beta + introduced: "2026-11-26" + parameters: + - in: path + name: agent_id + description: ID of the agent. + required: true + example: "{agent_id}" + schema: + type: string + minLength: 1 + - in: path + name: version_id + description: Opaque ID of the agent version to delete, as returned by List agent versions. + required: true + example: "{version_id}" + schema: + type: string + minLength: 1 + responses: + "204": + description: Agent version deleted. + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: agents + x-speakeasy-name-override: deleteVersion + security: + - APIToken: [] /api/chat: post: tags: @@ -2620,7 +2942,7 @@ paths: stage: beta introduced: "2026-09-25" description: | - Requires usage.limit_increase_requests:read. The collection is limited to the authenticated canonical user's requests, including resolved requests. Cursors bind the filters and current authorization context; a billing grant cannot widen results. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404. + Requires usage.limit_increase_requests:read. The collection is limited to the authenticated canonical user's requests, including resolved requests. Cursors bind the filters and current authorization context; a billing grant cannot widen results. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404. A page leaves out a stored request that this API cannot represent; reading that request by identifier returns 503. parameters: - $ref: "#/components/parameters/PageSize" description: Maximum page size; defaults to 20 and cannot exceed 100. @@ -2800,7 +3122,7 @@ paths: stage: beta introduced: "2026-09-25" description: | - Requires admin.usage.limit_increase_requests:read and current workspace billing read permission. Agent ownership is not queue access. Cursors bind filters and current authorization context. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404, not a successful empty page. + Requires admin.usage.limit_increase_requests:read and current workspace billing read permission. Agent ownership is not queue access. Cursors bind filters and current authorization context. Supported token issuance, experimental opt-in, and request-more enablement are required. Missing opt-in or a disabled flag returns 404, not a successful empty page. A page leaves out a stored request that this API cannot represent; reading that request by identifier returns 503. parameters: - $ref: "#/components/parameters/PageSize" description: Maximum page size; defaults to 20 and cannot exceed 100. @@ -2970,7 +3292,7 @@ paths: - OAuth clients summary: List OAuth clients description: | - List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. operationId: platform-admin-oauth-clients-list x-glean-scopes: legacy: @@ -3096,7 +3418,7 @@ paths: - Departments summary: List departments description: | - List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. operationId: platform-departments-list x-glean-scopes: legacy: @@ -3234,7 +3556,7 @@ paths: - IdP Groups summary: List IdP groups description: | - List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. operationId: platform-admin-idp-groups-list x-glean-scopes: legacy: @@ -3421,7 +3743,7 @@ paths: - Users summary: List users description: | - List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. operationId: platform-users-list x-glean-scopes: legacy: @@ -3598,7 +3920,7 @@ paths: - Admin Agents summary: List all agents description: | - List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. operationId: platform-admin-agents-list x-glean-scopes: legacy: @@ -10440,6 +10762,11 @@ components: $ref: "#/components/schemas/PlatformSubagent" trigger: $ref: "#/components/schemas/PlatformAgentTrigger" + draft: + type: boolean + default: false + description: | + Whether to save the agent as an unpublished draft instead of publishing it. PlatformAgentCapabilities: type: object additionalProperties: true @@ -10495,6 +10822,10 @@ components: $ref: "#/components/schemas/PlatformSubagent" trigger: $ref: "#/components/schemas/PlatformAgentTrigger" + is_draft: + type: boolean + description: | + Whether the agent is an unpublished draft that has never been published. Omitted for a published agent. created_by: $ref: "#/components/schemas/PlatformPersonReference" description: Person who created the agent. Omitted when the agent hides attribution. @@ -10696,17 +11027,38 @@ components: type: string description: Case-insensitive substring to match against agent names. If omitted or empty, no name filter is applied. example: HR Policy Agent + page_size: + type: integer + minimum: 1 + maximum: 100 + default: 100 + description: Maximum number of agents to return. Defaults to 100. Maximum is 100. + cursor: + type: string + minLength: 1 + description: | + Opaque pagination cursor from a previous response. Send the same name that the previous request used. + example: "" PlatformAgentsSearchResponse: type: object required: - agents + - has_more - request_id properties: agents: type: array - description: Agents matching the search request. + description: Agents on this page that match the search request. items: $ref: "#/components/schemas/PlatformAgent" + has_more: + type: boolean + description: Whether more matching agents are available after this page. + next_cursor: + type: + - string + - "null" + description: Opaque cursor for the next page; null or absent when has_more is false. request_id: type: string description: Platform-generated request ID for support correlation. @@ -10776,6 +11128,10 @@ components: $ref: "#/components/schemas/PlatformAgentTrigger" description: | How the agent is invoked. Applies to top-level agents only. The supplied object replaces the entire saved trigger, including its input fields, prompts, and content filters, so omitted fields are removed. + draft: + type: boolean + description: | + Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. PlatformActionSummary: type: object required: @@ -10833,6 +11189,82 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformAgentRunState: + type: string + enum: + - QUEUED + - RUNNING + - REQUIRES_INPUT + - SUCCEEDED + - FAILED + - CANCELLING + - CANCELLED + - EXPIRED + description: State of the persisted workflow execution. REQUIRES_INPUT is nonterminal. + PlatformAgentRunTrigger: + type: string + enum: + - MANUAL + - SCHEDULE + - CONTENT_CHANGE + - CONTENT_SCHEDULE + description: | + What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting. + PlatformAgentRunSummary: + type: object + description: Metadata of a persisted agent run, without its output or pending approvals. + additionalProperties: false + required: + - run_id + - agent_id + - state + - created_at + properties: + run_id: + type: string + description: ID of the run. Use it with the agent-scoped GET run endpoint. + agent_id: + type: string + description: ID of the agent that owns the run. + state: + $ref: "#/components/schemas/PlatformAgentRunState" + description: Stored lifecycle state of the run. + created_at: + type: string + format: date-time + description: Timestamp when the run was first persisted. + ended_at: + type: string + format: date-time + description: Timestamp when the run reached SUCCEEDED, FAILED, or CANCELLED. Omitted in other states. + triggered_by: + $ref: "#/components/schemas/PlatformAgentRunTrigger" + description: What started the run. Omitted when the run did not record it. + PlatformListAgentRunsResponse: + type: object + description: One page of the authenticated user's runs of an agent. + additionalProperties: false + required: + - results + - has_more + - request_id + properties: + results: + type: array + description: The runs on this page, newest first, ordered by created_at and then by run_id. + items: + $ref: "#/components/schemas/PlatformAgentRunSummary" + has_more: + type: boolean + description: Whether more runs are available after this page. + next_cursor: + type: + - string + - "null" + description: Opaque cursor for the next page; null or absent when has_more is false. + request_id: + type: string + description: Request identifier for correlating this response. PlatformMessageRole: type: string description: Role of the message author. @@ -11218,18 +11650,6 @@ components: mapping: message: "#/components/schemas/PlatformAgentRunMessageEvent" run.failed: "#/components/schemas/PlatformAgentRunFailedEvent" - PlatformAgentRunState: - type: string - enum: - - QUEUED - - RUNNING - - REQUIRES_INPUT - - SUCCEEDED - - FAILED - - CANCELLING - - CANCELLED - - EXPIRED - description: State of the persisted workflow execution. REQUIRES_INPUT is nonterminal. PlatformAgentRunToolApproval: type: object description: Pending approval for a specific persisted tool invocation and its arguments. @@ -11419,6 +11839,93 @@ components: description: One decision per pending interaction. Interaction IDs must be unique. items: $ref: "#/components/schemas/PlatformAgentRunApprovalDecision" + PlatformAgentVersion: + type: object + description: A named, immutable snapshot of an agent. + required: + - version_id + - display_name + - created_at + properties: + version_id: + type: string + description: | + Opaque ID of the version, unique within the agent. It is not an ordinal; do not sort or compare IDs. + display_name: + type: string + description: Name given to the version when it was created. + created_at: + type: string + format: date-time + description: Time the version was created. + PlatformAgentVersionsListResponse: + type: object + description: One page of saved versions of an agent. + additionalProperties: false + required: + - results + - has_more + - request_id + properties: + results: + type: array + description: Versions of the agent, newest first. + items: + $ref: "#/components/schemas/PlatformAgentVersion" + has_more: + type: boolean + description: Whether more versions are available after this page. + next_cursor: + type: + - string + - "null" + description: Opaque cursor for the next page; null or absent when has_more is false. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformAgentVersionCreateRequest: + type: object + description: Complete agent to save and the name of the version. + additionalProperties: false + required: + - display_name + - agent + properties: + display_name: + type: string + minLength: 1 + maxLength: 255 + description: Name of the version. Leading and trailing whitespace is removed. + agent: + $ref: "#/components/schemas/PlatformAgentCreateRequest" + description: | + Complete agent to save in the version, in the same shape as Create agent. Send every field, not only the changed ones; omitted fields are not copied from the agent. For example, omitting `glean_search_config` saves the version with Glean Search off, and omitting `model.auto_upgrade` applies its default. The version keeps the agent's `use_agent_identity`. Sending `true` for an agent that does not use its own identity returns 400. + PlatformAgentVersionWithDefinition: + description: A saved version of an agent and the complete agent it saved. + allOf: + - $ref: "#/components/schemas/PlatformAgentVersion" + - type: object + required: + - agent + properties: + agent: + $ref: "#/components/schemas/PlatformAgent" + description: | + The agent as saved in this version. Audit fields are omitted; the version's creation time is on the version. + PlatformAgentVersionGetResponse: + type: object + description: A saved version of an agent. + additionalProperties: false + required: + - version + - request_id + properties: + version: + $ref: "#/components/schemas/PlatformAgentVersionWithDefinition" + description: The saved version. + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformChatInputMessage: type: object additionalProperties: false @@ -15003,7 +15510,7 @@ components: resolution_target: $ref: "#/components/schemas/PlatformRequestResolutionTarget" description: | - Stored approval breadth, only on approvals; older PERIOD approvals may omit it. + Stored approval breadth, only on approvals; older PERIOD approvals may omit it. AGENT ONGOING approvals, which raise the agent's own limit, always omit it. resolution_target_id: type: string description: | @@ -15020,8 +15527,31 @@ components: format: date-time description: Last stored update time; this is the resolution time for resolved requests. allOf: - - $ref: "#/components/schemas/PlatformRequestResolutionFields" - description: Shared resolution target and identifier pairings. + - description: Shared resolution pairings, or a stored AGENT ONGOING approval without a target. + oneOf: + - $ref: "#/components/schemas/PlatformRequestResolutionFields" + description: Shared resolution target and identifier pairings. + - description: A stored AGENT ONGOING approval raises the agent's own limit without a breadth. + required: + - entity_type + - scope + properties: + entity_type: + description: Agent request. + enum: + - AGENT + scope: + description: Ongoing approval. + enum: + - ONGOING + not: + anyOf: + - required: + - resolution_target + description: Detect a resolution target. + - required: + - resolution_target_id + description: Detect a resolution target identifier. - description: Status determines which approval fields are present. oneOf: - description: An approval always records its amount and scope. @@ -15435,7 +15965,8 @@ components: properties: results: type: array - description: The clients on this page, ordered by display_name and then by client_id. + description: | + The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. items: $ref: "#/components/schemas/PlatformOAuthClient" has_more: @@ -15523,7 +16054,7 @@ components: results: type: array description: | - The departments on this page, ordered by display_name and then by department_id. + The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. items: $ref: "#/components/schemas/PlatformDepartment" has_more: @@ -15632,7 +16163,7 @@ components: results: type: array description: | - The IdP groups on this page, ordered by display_name and then by idp_group_id. + The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. items: $ref: "#/components/schemas/PlatformIdpGroup" has_more: @@ -15842,7 +16373,8 @@ components: properties: results: type: array - description: The users on this page, ordered by display_name and then by user_id. + description: | + The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. items: $ref: "#/components/schemas/PlatformUser" has_more: @@ -15924,7 +16456,8 @@ components: properties: results: type: array - description: The agents on this page, ordered by name and then by agent_id. + description: | + The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. items: $ref: "#/components/schemas/PlatformAgent" has_more: @@ -16509,6 +17042,8 @@ components: - CLOSED - COMMENT_ADDED - COMMENT_RESOLVED + - CALENDAR_GUEST_ADDED + - CALENDAR_GUEST_REMOVED x-enumDescriptions: CREATED: The document was created. UPDATED: The document was updated. @@ -16527,6 +17062,8 @@ components: CLOSED: The item was closed. COMMENT_ADDED: A comment was added to the item. COMMENT_RESOLVED: A comment thread on the item was resolved. + CALENDAR_GUEST_ADDED: A guest was added to the calendar event. + CALENDAR_GUEST_REMOVED: A guest was removed from the calendar event. x-speakeasy-enum-descriptions: CREATED: The document was created. UPDATED: The document was updated. @@ -16545,6 +17082,8 @@ components: CLOSED: The item was closed. COMMENT_ADDED: A comment was added to the item. COMMENT_RESOLVED: A comment thread on the item was resolved. + CALENDAR_GUEST_ADDED: A guest was added to the calendar event. + CALENDAR_GUEST_REMOVED: A guest was removed from the calendar event. PlatformTriggerEvent: type: object required: @@ -17113,6 +17652,7 @@ components: - GENERATED_Q_AND_A - INLINE_MENU - NATIVE_RESULT + - NEED_TO_KNOW - PRISM - Q_AND_A - RELATED_QUESTIONS diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index 59cd06e1e..24775a351 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -164613,12 +164613,13 @@ workflows: contentType: application/json payload: name: HR Policy Agent + page_size: 100 successCriteria: - condition: $statusCode == 200 - condition: $response.header.Content-Type == application/json - context: $response.body condition: | - {"agents":[],"request_id":""} + {"agents":[],"has_more":true,"request_id":""} type: simple x-speakeasy-test-group: agents x-speakeasy-test-rebuild: true @@ -165702,6 +165703,7 @@ workflows: requestBody: contentType: application/json payload: + draft: false instructions: Answer employee questions about HR policies and benefits. name: HR Policy Agent successCriteria: @@ -165798,3 +165800,88 @@ workflows: type: simple x-speakeasy-test-group: client_chat x-speakeasy-test-rebuild: true + - workflowId: platform-agents-list-runs + steps: + - stepId: test + operationId: platform-agents-list-runs + parameters: + - name: agent_id + in: path + value: '{agent_id}' + - name: page_size + in: query + value: 50 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[{"run_id":"","agent_id":"","state":"RUNNING","created_at":"2024-09-28T20:59:41.155Z"}],"has_more":false,"request_id":""} + type: simple + x-speakeasy-test-group: agents + x-speakeasy-test-rebuild: true + - workflowId: platform-agents-list-versions + steps: + - stepId: test + operationId: platform-agents-list-versions + parameters: + - name: agent_id + in: path + value: '{agent_id}' + - name: page_size + in: query + value: 20 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[],"has_more":true,"request_id":""} + type: simple + x-speakeasy-test-group: agents + x-speakeasy-test-rebuild: true + - workflowId: platform-agents-create-version + steps: + - stepId: test + operationId: platform-agents-create-version + parameters: + - name: agent_id + in: path + value: '{agent_id}' + requestBody: + contentType: application/json + payload: + agent: + draft: false + instructions: Answer employee questions about HR policies and benefits. + name: HR Policy Agent + display_name: Caterina.Walsh + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"version":{"version_id":"","display_name":"Imani_Lebsack","created_at":"2025-05-23T00:57:48.585Z","agent":{"name":"HR Policy Agent","agent_id":"ef33aecf52c142a6873adf76037b642e","capabilities":{},"subagents":[{"name":"HR Policy Agent"}]}},"request_id":""} + type: simple + x-speakeasy-test-group: agents + x-speakeasy-test-rebuild: true + - workflowId: platform-agents-get-version + steps: + - stepId: test + operationId: platform-agents-get-version + parameters: + - name: agent_id + in: path + value: '{agent_id}' + - name: version_id + in: path + value: '{version_id}' + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"version":{"version_id":"","display_name":"Mauricio.Pouros72","created_at":"2025-04-07T11:45:00.644Z","agent":{"name":"HR Policy Agent","agent_id":"ef33aecf52c142a6873adf76037b642e","capabilities":{},"subagents":[{"name":"HR Policy Agent"}]}},"request_id":""} + type: simple + x-speakeasy-test-group: agents + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0c127bd74..a00289596 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.813.1 +speakeasyVersion: 1.813.4 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:9131f5e7e4df026356a1ea4c21ff018af9de5f7262878da2eeef4ed9b7cab02a - sourceBlobDigest: sha256:a2cbc5f3b13973c3bf3f9c191c68e5a66507d417b6f3a9f7b910e8d6e5dd463e + sourceRevisionDigest: sha256:51b914a5a0cbf5ed05d3cea4e1e195d9f1034df8189fcc739bf8be6d849f6e06 + sourceBlobDigest: sha256:2617fe1d85ec02c6ee95b16ffb01fd7ce9a905e74ba2e62c5e2ab01fdab6cc79 tags: - latest Glean Client API: @@ -17,10 +17,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:9131f5e7e4df026356a1ea4c21ff018af9de5f7262878da2eeef4ed9b7cab02a - sourceBlobDigest: sha256:a2cbc5f3b13973c3bf3f9c191c68e5a66507d417b6f3a9f7b910e8d6e5dd463e + sourceRevisionDigest: sha256:51b914a5a0cbf5ed05d3cea4e1e195d9f1034df8189fcc739bf8be6d849f6e06 + sourceBlobDigest: sha256:2617fe1d85ec02c6ee95b16ffb01fd7ce9a905e74ba2e62c5e2ab01fdab6cc79 codeSamplesNamespace: glean-api-specs-typescript-code-samples - codeSamplesRevisionDigest: sha256:5489cd62ed40b34bf904893ba23af5cf14979183f439ac5b58e2c27894262671 + codeSamplesRevisionDigest: sha256:fbfa5109c6a48f3eaa68970a3e366c04f615cfc352fcce7a72069e2afe3da454 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index b65b9de7e..dd13a68db 100644 --- a/README.md +++ b/README.md @@ -303,10 +303,15 @@ For more information on obtaining the appropriate token type, please contact you * [update](docs/sdks/agents/README.md#update) - Update agent * [delete](docs/sdks/agents/README.md#delete) - Delete agent * [getSchemas](docs/sdks/agents/README.md#getschemas) - Get agent schemas +* [listRuns](docs/sdks/agents/README.md#listruns) - List agent runs * [createRun](docs/sdks/agents/README.md#createrun) - Create agent run * [getRun](docs/sdks/agents/README.md#getrun) - Get agent run * [cancelRun](docs/sdks/agents/README.md#cancelrun) - Cancel an agent run * [respondToRun](docs/sdks/agents/README.md#respondtorun) - Respond to agent run approvals +* [listVersions](docs/sdks/agents/README.md#listversions) - List agent versions +* [createVersion](docs/sdks/agents/README.md#createversion) - Create agent version +* [getVersion](docs/sdks/agents/README.md#getversion) - Get agent version +* [deleteVersion](docs/sdks/agents/README.md#deleteversion) - Delete agent version * [createRunStream](docs/sdks/agents/README.md#createrunstream) - Create a streaming agent run ### [Anonymousauthtokens](docs/sdks/anonymousauthtokens/README.md) @@ -632,10 +637,15 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`agentsCreate`](docs/sdks/agents/README.md#create) - Create agent - [`agentsCreateRun`](docs/sdks/agents/README.md#createrun) - Create agent run - [`agentsCreateRunStream`](docs/sdks/agents/README.md#createrunstream) - Create a streaming agent run +- [`agentsCreateVersion`](docs/sdks/agents/README.md#createversion) - Create agent version - [`agentsDelete`](docs/sdks/agents/README.md#delete) - Delete agent +- [`agentsDeleteVersion`](docs/sdks/agents/README.md#deleteversion) - Delete agent version - [`agentsGet`](docs/sdks/agents/README.md#get) - Get agent - [`agentsGetRun`](docs/sdks/agents/README.md#getrun) - Get agent run - [`agentsGetSchemas`](docs/sdks/agents/README.md#getschemas) - Get agent schemas +- [`agentsGetVersion`](docs/sdks/agents/README.md#getversion) - Get agent version +- [`agentsListRuns`](docs/sdks/agents/README.md#listruns) - List agent runs +- [`agentsListVersions`](docs/sdks/agents/README.md#listversions) - List agent versions - [`agentsRespondToRun`](docs/sdks/agents/README.md#respondtorun) - Respond to agent run approvals - [`agentsSearch`](docs/sdks/agents/README.md#search) - Search agents - [`agentsUpdate`](docs/sdks/agents/README.md#update) - Update agent @@ -856,10 +866,15 @@ To learn about this feature and how to get started, check - [`useAgentsCreateMutation`](docs/sdks/agents/README.md#create) - Create agent - [`useAgentsCreateRunMutation`](docs/sdks/agents/README.md#createrun) - Create agent run - [`useAgentsCreateRunStreamMutation`](docs/sdks/agents/README.md#createrunstream) - Create a streaming agent run +- [`useAgentsCreateVersionMutation`](docs/sdks/agents/README.md#createversion) - Create agent version - [`useAgentsDeleteMutation`](docs/sdks/agents/README.md#delete) - Delete agent +- [`useAgentsDeleteVersionMutation`](docs/sdks/agents/README.md#deleteversion) - Delete agent version - [`useAgentsGet`](docs/sdks/agents/README.md#get) - Get agent - [`useAgentsGetRun`](docs/sdks/agents/README.md#getrun) - Get agent run - [`useAgentsGetSchemas`](docs/sdks/agents/README.md#getschemas) - Get agent schemas +- [`useAgentsGetVersion`](docs/sdks/agents/README.md#getversion) - Get agent version +- [`useAgentsListRuns`](docs/sdks/agents/README.md#listruns) - List agent runs +- [`useAgentsListVersions`](docs/sdks/agents/README.md#listversions) - List agent versions - [`useAgentsRespondToRunMutation`](docs/sdks/agents/README.md#respondtorun) - Respond to agent run approvals - [`useAgentsSearchMutation`](docs/sdks/agents/README.md#search) - Search agents - [`useAgentsUpdateMutation`](docs/sdks/agents/README.md#update) - Update agent diff --git a/RELEASES.md b/RELEASES.md index 5f7b52515..f30ef81c1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1168,4 +1168,14 @@ Based on: ### Generated - [typescript v0.21.2] . ### Releases -- [NPM v0.21.2] https://www.npmjs.com/package/@gleanwork/api-client/v/0.21.2 - . \ No newline at end of file +- [NPM v0.21.2] https://www.npmjs.com/package/@gleanwork/api-client/v/0.21.2 - . + +## 2026-12-03 21:44:18 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.813.4 (2.969.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.21.3] . +### Releases +- [NPM v0.21.3] https://www.npmjs.com/package/@gleanwork/api-client/v/0.21.3 - . \ No newline at end of file diff --git a/docs/models/components/manualfeedbackinfosource.md b/docs/models/components/manualfeedbackinfosource.md index 270ce9411..fb0aff08c 100644 --- a/docs/models/components/manualfeedbackinfosource.md +++ b/docs/models/components/manualfeedbackinfosource.md @@ -13,5 +13,5 @@ let value: ManualFeedbackInfoSource = "SEARCH"; ## Values ```typescript -"AUTOCOMPLETE" | "CALENDAR" | "CHAT" | "CHAT_GENERAL" | "CONCEPT_CARD" | "DESKTOP_APP" | "DISAMBIGUATION_CARD" | "EXPERT_DETECTION" | "FEED" | "GENERATED_Q_AND_A" | "INLINE_MENU" | "NATIVE_RESULT" | "PRISM" | "Q_AND_A" | "RELATED_QUESTIONS" | "REPORT_ISSUE" | "SCIOBOT" | "SEARCH" | "SIDEBAR" | "SUMMARY" | "TASKS" | "TASK_EXECUTION" +"AUTOCOMPLETE" | "CALENDAR" | "CHAT" | "CHAT_GENERAL" | "CONCEPT_CARD" | "DESKTOP_APP" | "DISAMBIGUATION_CARD" | "EXPERT_DETECTION" | "FEED" | "GENERATED_Q_AND_A" | "INLINE_MENU" | "NATIVE_RESULT" | "NEED_TO_KNOW" | "PRISM" | "Q_AND_A" | "RELATED_QUESTIONS" | "REPORT_ISSUE" | "SCIOBOT" | "SEARCH" | "SIDEBAR" | "SUMMARY" | "TASKS" | "TASK_EXECUTION" ``` \ No newline at end of file diff --git a/docs/models/components/platformagent.md b/docs/models/components/platformagent.md index 9a2dd99f4..b4cf3759e 100644 --- a/docs/models/components/platformagent.md +++ b/docs/models/components/platformagent.md @@ -39,6 +39,7 @@ let value: PlatformAgent = { | `channels` | [components.PlatformAgentChannels](../../models/components/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | | `subagents` | [components.PlatformSubagent](../../models/components/platformsubagent.md)[] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents.
| | | `trigger` | [components.PlatformAgentTrigger](../../models/components/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `isDraft` | *boolean* | :heavy_minus_sign: | Whether the agent is an unpublished draft that has never been published. Omitted for a published agent.
| | | `createdBy` | [components.PlatformPersonReference](../../models/components/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | | `updatedBy` | [components.PlatformPersonReference](../../models/components/platformpersonreference.md) | :heavy_minus_sign: | A lightweight reference to a person, used where a payload merely points at someone. | | | `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Time the agent was created. | | diff --git a/docs/models/components/platformagentcreaterequest.md b/docs/models/components/platformagentcreaterequest.md index 3011940bc..c41001a01 100644 --- a/docs/models/components/platformagentcreaterequest.md +++ b/docs/models/components/platformagentcreaterequest.md @@ -29,4 +29,5 @@ let value: PlatformAgentCreateRequest = { | `useAgentIdentity` | *boolean* | :heavy_minus_sign: | Whether the agent acts with its own identity instead of the invoking user's. Cannot be changed after the agent is created.
| | | `channels` | [components.PlatformAgentChannels](../../models/components/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | | `subagents` | [components.PlatformSubagent](../../models/components/platformsubagent.md)[] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents, and their dependencies may only reference published skills.
| | -| `trigger` | [components.PlatformAgentTrigger](../../models/components/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | \ No newline at end of file +| `trigger` | [components.PlatformAgentTrigger](../../models/components/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | | +| `draft` | *boolean* | :heavy_minus_sign: | Whether to save the agent as an unpublished draft instead of publishing it.
| | \ No newline at end of file diff --git a/docs/models/components/platformagentrunsummary.md b/docs/models/components/platformagentrunsummary.md new file mode 100644 index 000000000..d360b0ac4 --- /dev/null +++ b/docs/models/components/platformagentrunsummary.md @@ -0,0 +1,27 @@ +# PlatformAgentRunSummary + +Metadata of a persisted agent run, without its output or pending approvals. + +## Example Usage + +```typescript +import { PlatformAgentRunSummary } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentRunSummary = { + run_id: "", + agent_id: "", + state: "FAILED", + created_at: new Date("2024-05-06T01:17:37.650Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `runId` | *string* | :heavy_check_mark: | ID of the run. Use it with the agent-scoped GET run endpoint. | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent that owns the run. | +| `state` | [components.PlatformAgentRunState](../../models/components/platformagentrunstate.md) | :heavy_check_mark: | State of the persisted workflow execution. REQUIRES_INPUT is nonterminal. | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Timestamp when the run was first persisted. | +| `endedAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Timestamp when the run reached SUCCEEDED, FAILED, or CANCELLED. Omitted in other states. | +| `triggeredBy` | [components.PlatformAgentRunTrigger](../../models/components/platformagentruntrigger.md) | :heavy_minus_sign: | What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting.
| \ No newline at end of file diff --git a/docs/models/components/platformagentruntrigger.md b/docs/models/components/platformagentruntrigger.md new file mode 100644 index 000000000..e83e00875 --- /dev/null +++ b/docs/models/components/platformagentruntrigger.md @@ -0,0 +1,20 @@ +# PlatformAgentRunTrigger + +What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting. + + +## Example Usage + +```typescript +import { PlatformAgentRunTrigger } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentRunTrigger = "CONTENT_SCHEDULE"; + +// Open enum: unrecognized values are captured as Unrecognized +``` + +## Values + +```typescript +"MANUAL" | "SCHEDULE" | "CONTENT_CHANGE" | "CONTENT_SCHEDULE" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/components/platformagentssearchrequest.md b/docs/models/components/platformagentssearchrequest.md index b8680f14c..753906dc1 100644 --- a/docs/models/components/platformagentssearchrequest.md +++ b/docs/models/components/platformagentssearchrequest.md @@ -14,4 +14,6 @@ let value: PlatformAgentsSearchRequest = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_minus_sign: | Case-insensitive substring to match against agent names. If omitted or empty, no name filter is applied. | HR Policy Agent | \ No newline at end of file +| `name` | *string* | :heavy_minus_sign: | Case-insensitive substring to match against agent names. If omitted or empty, no name filter is applied. | HR Policy Agent | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of agents to return. Defaults to 100. Maximum is 100. | | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Send the same name that the previous request used.
| | \ No newline at end of file diff --git a/docs/models/components/platformagentssearchresponse.md b/docs/models/components/platformagentssearchresponse.md index bdb37b0b0..43e541e8a 100644 --- a/docs/models/components/platformagentssearchresponse.md +++ b/docs/models/components/platformagentssearchresponse.md @@ -7,13 +7,16 @@ import { PlatformAgentsSearchResponse } from "@gleanwork/api-client/models/compo let value: PlatformAgentsSearchResponse = { agents: [], + has_more: false, request_id: "", }; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `agents` | [components.PlatformAgent](../../models/components/platformagent.md)[] | :heavy_check_mark: | Agents matching the search request. | -| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `agents` | [components.PlatformAgent](../../models/components/platformagent.md)[] | :heavy_check_mark: | Agents on this page that match the search request. | +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more matching agents are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformagentupdaterequest.md b/docs/models/components/platformagentupdaterequest.md index 969f8f62c..5a60e4ffe 100644 --- a/docs/models/components/platformagentupdaterequest.md +++ b/docs/models/components/platformagentupdaterequest.md @@ -28,4 +28,5 @@ let value: PlatformAgentUpdateRequest = { | `serviceCredentials` | [components.PlatformAgentServiceCredential](../../models/components/platformagentservicecredential.md)[] | :heavy_minus_sign: | Service credentials the agent uses to call tools. The supplied list replaces the entire saved list.
| | `channels` | [components.PlatformAgentChannels](../../models/components/platformagentchannels.md) | :heavy_minus_sign: | Messaging channels the agent is deployed to. Requires `use_agent_identity`. | | `subagents` | [components.PlatformSubagent](../../models/components/platformsubagent.md)[] | :heavy_minus_sign: | Subagents the agent dispatches work to. Subagents cannot contain subagents. The supplied list replaces the entire saved list, so saved subagents left out are removed. Keep a saved subagent's `subagent_id` to preserve it, and omit `subagent_id` to add a subagent.
| -| `trigger` | [components.PlatformAgentTrigger](../../models/components/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | \ No newline at end of file +| `trigger` | [components.PlatformAgentTrigger](../../models/components/platformagenttrigger.md) | :heavy_minus_sign: | How the agent is invoked. Applies to top-level agents only. | +| `draft` | *boolean* | :heavy_minus_sign: | Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent.
| \ No newline at end of file diff --git a/docs/models/components/platformagentversion.md b/docs/models/components/platformagentversion.md new file mode 100644 index 000000000..41306ab0a --- /dev/null +++ b/docs/models/components/platformagentversion.md @@ -0,0 +1,23 @@ +# PlatformAgentVersion + +A named, immutable snapshot of an agent. + +## Example Usage + +```typescript +import { PlatformAgentVersion } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentVersion = { + version_id: "", + display_name: "Dawn29", + created_at: new Date("2025-01-18T04:52:58.524Z"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `versionId` | *string* | :heavy_check_mark: | Opaque ID of the version, unique within the agent. It is not an ordinal; do not sort or compare IDs.
| +| `displayName` | *string* | :heavy_check_mark: | Name given to the version when it was created. | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Time the version was created. | \ No newline at end of file diff --git a/docs/models/components/platformagentversioncreaterequest.md b/docs/models/components/platformagentversioncreaterequest.md new file mode 100644 index 000000000..f743d24d6 --- /dev/null +++ b/docs/models/components/platformagentversioncreaterequest.md @@ -0,0 +1,24 @@ +# PlatformAgentVersionCreateRequest + +Complete agent to save and the name of the version. + +## Example Usage + +```typescript +import { PlatformAgentVersionCreateRequest } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentVersionCreateRequest = { + display_name: "Sidney_Keebler", + agent: { + name: "HR Policy Agent", + instructions: "Answer employee questions about HR policies and benefits.", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `displayName` | *string* | :heavy_check_mark: | Name of the version. Leading and trailing whitespace is removed. | | +| `agent` | [components.PlatformAgentCreateRequest](../../models/components/platformagentcreaterequest.md) | :heavy_check_mark: | Complete agent definition. | {
"name": "HR Policy Agent",
"instructions": "Answer employee questions about HR policies and benefits."
} | \ No newline at end of file diff --git a/docs/models/components/platformagentversiongetresponse.md b/docs/models/components/platformagentversiongetresponse.md new file mode 100644 index 000000000..27881d66c --- /dev/null +++ b/docs/models/components/platformagentversiongetresponse.md @@ -0,0 +1,35 @@ +# PlatformAgentVersionGetResponse + +A saved version of an agent. + +## Example Usage + +```typescript +import { PlatformAgentVersionGetResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentVersionGetResponse = { + version: { + version_id: "", + display_name: "Sid.Fisher", + created_at: new Date("2024-04-05T06:39:29.859Z"), + agent: { + name: "HR Policy Agent", + agent_id: "ef33aecf52c142a6873adf76037b642e", + capabilities: {}, + subagents: [ + { + name: "HR Policy Agent", + }, + ], + }, + }, + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `version` | [components.PlatformAgentVersionWithDefinition](../../models/components/platformagentversionwithdefinition.md) | :heavy_check_mark: | A saved version of an agent and the complete agent it saved. | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformagentversionslistresponse.md b/docs/models/components/platformagentversionslistresponse.md new file mode 100644 index 000000000..4a54cb6b0 --- /dev/null +++ b/docs/models/components/platformagentversionslistresponse.md @@ -0,0 +1,30 @@ +# PlatformAgentVersionsListResponse + +One page of saved versions of an agent. + +## Example Usage + +```typescript +import { PlatformAgentVersionsListResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentVersionsListResponse = { + results: [ + { + version_id: "", + display_name: "Kimberly_Hoppe11", + created_at: new Date("2025-06-27T22:58:44.313Z"), + }, + ], + has_more: false, + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `results` | [components.PlatformAgentVersion](../../models/components/platformagentversion.md)[] | :heavy_check_mark: | Versions of the agent, newest first. | +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more versions are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/components/platformagentversionwithdefinition.md b/docs/models/components/platformagentversionwithdefinition.md new file mode 100644 index 000000000..369e6973b --- /dev/null +++ b/docs/models/components/platformagentversionwithdefinition.md @@ -0,0 +1,34 @@ +# PlatformAgentVersionWithDefinition + +A saved version of an agent and the complete agent it saved. + +## Example Usage + +```typescript +import { PlatformAgentVersionWithDefinition } from "@gleanwork/api-client/models/components"; + +let value: PlatformAgentVersionWithDefinition = { + version_id: "", + display_name: "Jarod_Koepp12", + created_at: new Date("2024-12-10T21:55:35.266Z"), + agent: { + name: "HR Policy Agent", + agent_id: "ef33aecf52c142a6873adf76037b642e", + capabilities: {}, + subagents: [ + { + name: "HR Policy Agent", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `versionId` | *string* | :heavy_check_mark: | Opaque ID of the version, unique within the agent. It is not an ordinal; do not sort or compare IDs.
| +| `displayName` | *string* | :heavy_check_mark: | Name given to the version when it was created. | +| `createdAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Time the version was created. | +| `agent` | [components.PlatformAgent](../../models/components/platformagent.md) | :heavy_check_mark: | An agent available to the authenticated user. | \ No newline at end of file diff --git a/docs/models/components/platformlistadminagentsresponse.md b/docs/models/components/platformlistadminagentsresponse.md index 614b3da87..2beee2e84 100644 --- a/docs/models/components/platformlistadminagentsresponse.md +++ b/docs/models/components/platformlistadminagentsresponse.md @@ -27,9 +27,9 @@ let value: PlatformListAdminAgentsResponse = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `results` | [components.PlatformAgent](../../models/components/platformagent.md)[] | :heavy_check_mark: | The agents on this page, ordered by name and then by agent_id. | -| `hasMore` | *boolean* | :heavy_check_mark: | Whether more agents are available after this page. | -| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | [components.PlatformAgent](../../models/components/platformagent.md)[] | :heavy_check_mark: | The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id.
| +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more agents are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/components/platformlistagentrunsresponse.md b/docs/models/components/platformlistagentrunsresponse.md new file mode 100644 index 000000000..9085521d3 --- /dev/null +++ b/docs/models/components/platformlistagentrunsresponse.md @@ -0,0 +1,24 @@ +# PlatformListAgentRunsResponse + +One page of the authenticated user's runs of an agent. + +## Example Usage + +```typescript +import { PlatformListAgentRunsResponse } from "@gleanwork/api-client/models/components"; + +let value: PlatformListAgentRunsResponse = { + results: [], + has_more: true, + request_id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `results` | [components.PlatformAgentRunSummary](../../models/components/platformagentrunsummary.md)[] | :heavy_check_mark: | The runs on this page, newest first, ordered by created_at and then by run_id. | +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more runs are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/components/platformlistdepartmentsresponse.md b/docs/models/components/platformlistdepartmentsresponse.md index 110dcf3d1..b5a9ba34a 100644 --- a/docs/models/components/platformlistdepartmentsresponse.md +++ b/docs/models/components/platformlistdepartmentsresponse.md @@ -21,9 +21,9 @@ let value: PlatformListDepartmentsResponse = { ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `results` | [components.PlatformDepartmentReference](../../models/components/platformdepartmentreference.md)[] | :heavy_check_mark: | The departments on this page, ordered by display_name and then by department_id.
| -| `hasMore` | *boolean* | :heavy_check_mark: | Whether more departments are available after this page. | -| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | [components.PlatformDepartmentReference](../../models/components/platformdepartmentreference.md)[] | :heavy_check_mark: | The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id.
| +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more departments are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/components/platformlistidpgroupsresponse.md b/docs/models/components/platformlistidpgroupsresponse.md index 20ab52ff7..7cfc34e5c 100644 --- a/docs/models/components/platformlistidpgroupsresponse.md +++ b/docs/models/components/platformlistidpgroupsresponse.md @@ -23,9 +23,9 @@ let value: PlatformListIdpGroupsResponse = { ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `results` | [components.PlatformIdpGroup](../../models/components/platformidpgroup.md)[] | :heavy_check_mark: | The IdP groups on this page, ordered by display_name and then by idp_group_id.
| -| `hasMore` | *boolean* | :heavy_check_mark: | Whether more IdP groups are available after this page. | -| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | [components.PlatformIdpGroup](../../models/components/platformidpgroup.md)[] | :heavy_check_mark: | The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id.
| +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more IdP groups are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/components/platformlistoauthclientsresponse.md b/docs/models/components/platformlistoauthclientsresponse.md index ffa95e015..8320d11bc 100644 --- a/docs/models/components/platformlistoauthclientsresponse.md +++ b/docs/models/components/platformlistoauthclientsresponse.md @@ -29,9 +29,9 @@ let value: PlatformListOAuthClientsResponse = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `results` | [components.PlatformOAuthClient](../../models/components/platformoauthclient.md)[] | :heavy_check_mark: | The clients on this page, ordered by display_name and then by client_id. | -| `hasMore` | *boolean* | :heavy_check_mark: | Whether more clients are available after this page. | -| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | [components.PlatformOAuthClient](../../models/components/platformoauthclient.md)[] | :heavy_check_mark: | The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id.
| +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more clients are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/components/platformlistusersresponse.md b/docs/models/components/platformlistusersresponse.md index 18be20b75..79b1f9eaa 100644 --- a/docs/models/components/platformlistusersresponse.md +++ b/docs/models/components/platformlistusersresponse.md @@ -16,9 +16,9 @@ let value: PlatformListUsersResponse = { ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `results` | [components.PlatformUser](../../models/components/platformuser.md)[] | :heavy_check_mark: | The users on this page, ordered by display_name and then by user_id. | -| `hasMore` | *boolean* | :heavy_check_mark: | Whether more users are available after this page. | -| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | -| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `results` | [components.PlatformUser](../../models/components/platformuser.md)[] | :heavy_check_mark: | The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id.
| +| `hasMore` | *boolean* | :heavy_check_mark: | Whether more users are available after this page. | +| `nextCursor` | *string* | :heavy_minus_sign: | Opaque cursor for the next page; null or absent when has_more is false. | +| `requestId` | *string* | :heavy_check_mark: | Request identifier for correlating this response. | \ No newline at end of file diff --git a/docs/models/components/platformtriggereventreason.md b/docs/models/components/platformtriggereventreason.md index 06e8ce5b2..a2cbf0006 100644 --- a/docs/models/components/platformtriggereventreason.md +++ b/docs/models/components/platformtriggereventreason.md @@ -15,5 +15,5 @@ let value: PlatformTriggerEventReason = "REVIEW_REQUESTED"; ## Values ```typescript -"CREATED" | "UPDATED" | "DELETED" | "MEETS_CONDITION" | "ASSIGNED" | "UNASSIGNED" | "LABELED" | "UNLABELED" | "REVIEW_REQUESTED" | "REVIEW_REQUEST_REMOVED" | "READY_FOR_REVIEW" | "CONVERTED_TO_DRAFT" | "WEBHOOK_UPDATED" | "WEBHOOK_CREATED" | "CLOSED" | "COMMENT_ADDED" | "COMMENT_RESOLVED" | Unrecognized +"CREATED" | "UPDATED" | "DELETED" | "MEETS_CONDITION" | "ASSIGNED" | "UNASSIGNED" | "LABELED" | "UNLABELED" | "REVIEW_REQUESTED" | "REVIEW_REQUEST_REMOVED" | "READY_FOR_REVIEW" | "CONVERTED_TO_DRAFT" | "WEBHOOK_UPDATED" | "WEBHOOK_CREATED" | "CLOSED" | "COMMENT_ADDED" | "COMMENT_RESOLVED" | "CALENDAR_GUEST_ADDED" | "CALENDAR_GUEST_REMOVED" | Unrecognized ``` \ No newline at end of file diff --git a/docs/models/operations/platformagentscreateversionrequest.md b/docs/models/operations/platformagentscreateversionrequest.md new file mode 100644 index 000000000..4824195d4 --- /dev/null +++ b/docs/models/operations/platformagentscreateversionrequest.md @@ -0,0 +1,25 @@ +# PlatformAgentsCreateVersionRequest + +## Example Usage + +```typescript +import { PlatformAgentsCreateVersionRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformAgentsCreateVersionRequest = { + agent_id: "{agent_id}", + platformAgentVersionCreateRequest: { + display_name: "Leda.Hermiston23", + agent: { + name: "HR Policy Agent", + instructions: "Answer employee questions about HR policies and benefits.", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent to save a version of. | {agent_id} | +| `platformAgentVersionCreateRequest` | [components.PlatformAgentVersionCreateRequest](../../models/components/platformagentversioncreaterequest.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/platformagentsdeleteversionrequest.md b/docs/models/operations/platformagentsdeleteversionrequest.md new file mode 100644 index 000000000..84b59ca27 --- /dev/null +++ b/docs/models/operations/platformagentsdeleteversionrequest.md @@ -0,0 +1,19 @@ +# PlatformAgentsDeleteVersionRequest + +## Example Usage + +```typescript +import { PlatformAgentsDeleteVersionRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformAgentsDeleteVersionRequest = { + agent_id: "{agent_id}", + version_id: "{version_id}", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent. | {agent_id} | +| `versionId` | *string* | :heavy_check_mark: | Opaque ID of the agent version to delete, as returned by List agent versions. | {version_id} | \ No newline at end of file diff --git a/docs/models/operations/platformagentsgetversionrequest.md b/docs/models/operations/platformagentsgetversionrequest.md new file mode 100644 index 000000000..de3605c14 --- /dev/null +++ b/docs/models/operations/platformagentsgetversionrequest.md @@ -0,0 +1,19 @@ +# PlatformAgentsGetVersionRequest + +## Example Usage + +```typescript +import { PlatformAgentsGetVersionRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformAgentsGetVersionRequest = { + agent_id: "{agent_id}", + version_id: "{version_id}", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent. | {agent_id} | +| `versionId` | *string* | :heavy_check_mark: | Opaque ID of the agent version to retrieve, as returned by List agent versions. | {version_id} | \ No newline at end of file diff --git a/docs/models/operations/platformagentslistrunsrequest.md b/docs/models/operations/platformagentslistrunsrequest.md new file mode 100644 index 000000000..b111e42c4 --- /dev/null +++ b/docs/models/operations/platformagentslistrunsrequest.md @@ -0,0 +1,19 @@ +# PlatformAgentsListRunsRequest + +## Example Usage + +```typescript +import { PlatformAgentsListRunsRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformAgentsListRunsRequest = { + agent_id: "{agent_id}", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent whose runs should be listed. | {agent_id} | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of runs to return. Defaults to 50. Maximum is 100. | | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Send it with the same agent_id that the previous request used.
| | \ No newline at end of file diff --git a/docs/models/operations/platformagentslistversionsrequest.md b/docs/models/operations/platformagentslistversionsrequest.md new file mode 100644 index 000000000..675d205c2 --- /dev/null +++ b/docs/models/operations/platformagentslistversionsrequest.md @@ -0,0 +1,19 @@ +# PlatformAgentsListVersionsRequest + +## Example Usage + +```typescript +import { PlatformAgentsListVersionsRequest } from "@gleanwork/api-client/models/operations"; + +let value: PlatformAgentsListVersionsRequest = { + agent_id: "{agent_id}", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent whose versions to list. | {agent_id} | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of versions to return. Defaults to 20. Maximum is 50. | | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination cursor returned as next_cursor by the previous page. | | \ No newline at end of file diff --git a/docs/sdks/adminagents/README.md b/docs/sdks/adminagents/README.md index fc114cc93..cff93f16d 100644 --- a/docs/sdks/adminagents/README.md +++ b/docs/sdks/adminagents/README.md @@ -8,7 +8,7 @@ ## list -List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. +List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. ### Example Usage diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index 84ac9e372..b2d856a96 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -10,15 +10,20 @@ * [update](#update) - Update agent * [delete](#delete) - Delete agent * [getSchemas](#getschemas) - Get agent schemas +* [listRuns](#listruns) - List agent runs * [createRun](#createrun) - Create agent run * [getRun](#getrun) - Get agent run * [cancelRun](#cancelrun) - Cancel an agent run * [respondToRun](#respondtorun) - Respond to agent run approvals +* [listVersions](#listversions) - List agent versions +* [createVersion](#createversion) - Create agent version +* [getVersion](#getversion) - Get agent version +* [deleteVersion](#deleteversion) - Delete agent version * [createRunStream](#createrunstream) - Create a streaming agent run ## create -Create and publish an agent from its complete definition. +Create an agent from its complete definition. The agent is published unless `draft` is true. ### Example Usage @@ -113,7 +118,7 @@ import { ## search -Search agents available to the authenticated user by agent name. +Search agents available to the authenticated user by agent name. Results come one page at a time. When has_more is true, send next_cursor as cursor, with the same name, to get the next page. ### Example Usage @@ -306,7 +311,7 @@ import { ## update -Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. +Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. ### Example Usage @@ -588,6 +593,108 @@ import { | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | +## listRuns + +List the authenticated user's persisted runs of an agent, newest first. Each result holds run metadata only + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.agents.listRuns("{agent_id}"); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { agentsListRuns } from "@gleanwork/api-client/funcs/agentsListRuns.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await agentsListRuns(glean, "{agent_id}"); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("agentsListRuns failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useAgentsListRuns, + useAgentsListRunsSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchAgentsListRuns, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateAgentsListRuns, + invalidateAllAgentsListRuns, +} from "@gleanwork/api-client/react-query/agentsListRuns.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent whose runs should be listed. | {agent_id} | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of runs to return. Defaults to 50. Maximum is 100. | | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. Send it with the same agent_id that the previous request used.
| | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | + +### Response + +**Promise\<[components.PlatformListAgentRunsResponse](../../models/components/platformlistagentrunsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + ## createRun Execute an agent run. By default, set `stream` to true to receive server-sent events; otherwise the response contains the final agent messages. Set `execution_mode` to `DURABLE` to persist a new run and return its initial snapshot with HTTP 201 without waiting for execution. Poll the agent-scoped GET run endpoint for progress. Durable execution continues after an HTTP disconnect, but is not automatically resumed after a QE restart or crash. An active turn becomes overdue more than 40 minutes after acceptance (a 30-minute execution timeout plus 10 minutes of grace). The next GET of the run marks the overdue turn FAILED without replay; there is no periodic sweep. Without a GET, the stored run can remain RUNNING. Failure does not prove that external tool work has stopped. Paused runs are not expired; an accepted approval continuation starts a fresh deadline. Each POST creates a new run; retrying a POST can create another execution. Submit pending approval decisions through the run responses endpoint, and cancellation can be requested through the run cancellations endpoint. A run tracks one workflow execution; automatic background-subagent wake turns are separate executions, not continuations tracked by this run ID. @@ -1004,6 +1111,401 @@ import { | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | +## listVersions + +List saved versions of an agent, newest first. Requires permission to edit the agent. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.agents.listVersions("{agent_id}"); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { agentsListVersions } from "@gleanwork/api-client/funcs/agentsListVersions.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await agentsListVersions(glean, "{agent_id}"); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("agentsListVersions failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useAgentsListVersions, + useAgentsListVersionsSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchAgentsListVersions, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateAgentsListVersions, + invalidateAllAgentsListVersions, +} from "@gleanwork/api-client/react-query/agentsListVersions.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent whose versions to list. | {agent_id} | +| `pageSize` | *number* | :heavy_minus_sign: | Maximum number of versions to return. Defaults to 20. Maximum is 50. | | +| `cursor` | *string* | :heavy_minus_sign: | Opaque pagination cursor returned as next_cursor by the previous page. | | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | + +### Response + +**Promise\<[components.PlatformAgentVersionsListResponse](../../models/components/platformagentversionslistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## createVersion + +Save a complete agent as a named version without publishing it. The agent's published definition is unchanged. When the agent already has 50 saved versions, the oldest one is deleted. Requires permission to edit the agent. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.agents.createVersion({ + display_name: "Stricter HR policy wording", + agent: { + name: "HR Policy Agent", + instructions: "Answer only from the 2026 HR policy handbook.", + }, + }, "{agent_id}"); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { agentsCreateVersion } from "@gleanwork/api-client/funcs/agentsCreateVersion.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await agentsCreateVersion(glean, { + display_name: "Stricter HR policy wording", + agent: { + name: "HR Policy Agent", + instructions: "Answer only from the 2026 HR policy handbook.", + }, + }, "{agent_id}"); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("agentsCreateVersion failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useAgentsCreateVersionMutation +} from "@gleanwork/api-client/react-query/agentsCreateVersion.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent to save a version of. | {agent_id} | +| `platformAgentVersionCreateRequest` | [components.PlatformAgentVersionCreateRequest](../../models/components/platformagentversioncreaterequest.md) | :heavy_check_mark: | N/A | | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | + +### Response + +**Promise\<[components.PlatformAgentVersionGetResponse](../../models/components/platformagentversiongetresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## getVersion + +Retrieve a saved version of an agent, including the complete agent it saved. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const result = await glean.agents.getVersion("{agent_id}", "{version_id}"); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { agentsGetVersion } from "@gleanwork/api-client/funcs/agentsGetVersion.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await agentsGetVersion(glean, "{agent_id}", "{version_id}"); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("agentsGetVersion failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useAgentsGetVersion, + useAgentsGetVersionSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchAgentsGetVersion, + + // Utilities to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateAgentsGetVersion, + invalidateAllAgentsGetVersion, +} from "@gleanwork/api-client/react-query/agentsGetVersion.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent. | {agent_id} | +| `versionId` | *string* | :heavy_check_mark: | Opaque ID of the agent version to retrieve, as returned by List agent versions. | {version_id} | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | + +### Response + +**Promise\<[components.PlatformAgentVersionGetResponse](../../models/components/platformagentversiongetresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## deleteVersion + +Delete a saved version of an agent. The agent itself is unchanged. Requires permission to edit the agent. + + +### Example Usage + + +```typescript +import { Glean } from "@gleanwork/api-client"; + +const glean = new Glean({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + await glean.agents.deleteVersion("{agent_id}", "{version_id}"); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { GleanCore } from "@gleanwork/api-client/core.js"; +import { agentsDeleteVersion } from "@gleanwork/api-client/funcs/agentsDeleteVersion.js"; + +// Use `GleanCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const glean = new GleanCore({ + apiToken: process.env["GLEAN_API_TOKEN"] ?? "", +}); + +async function run() { + const res = await agentsDeleteVersion(glean, "{agent_id}", "{version_id}"); + if (res.ok) { + const { value: result } = res; + + } else { + console.log("agentsDeleteVersion failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useAgentsDeleteVersionMutation +} from "@gleanwork/api-client/react-query/agentsDeleteVersion.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `agentId` | *string* | :heavy_check_mark: | ID of the agent. | {agent_id} | +| `versionId` | *string* | :heavy_check_mark: | Opaque ID of the agent version to delete, as returned by List agent versions. | {version_id} | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + ## createRunStream SDK-only logical operation. HTTP clients must call the base path; the URL fragment is not sent. Execute an agent run as server-sent events. HTTP clients request this mode by setting `stream` to true in the JSON body. Streaming is not supported in DURABLE mode. diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index ac3541ab3..09d1996f0 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -9,7 +9,7 @@ ## list -List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. +List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. ### Example Usage diff --git a/docs/sdks/departments/README.md b/docs/sdks/departments/README.md index bafcf8e1c..dcc69ac16 100644 --- a/docs/sdks/departments/README.md +++ b/docs/sdks/departments/README.md @@ -9,7 +9,7 @@ ## list -List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. +List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. ### Example Usage diff --git a/docs/sdks/idpgroups/README.md b/docs/sdks/idpgroups/README.md index 5d5df83a0..0d494cc4f 100644 --- a/docs/sdks/idpgroups/README.md +++ b/docs/sdks/idpgroups/README.md @@ -9,7 +9,7 @@ ## list -List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. +List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. ### Example Usage diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index fbccfedbb..4f6ea40bd 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -9,7 +9,7 @@ ## list -List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. +List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. ### Example Usage diff --git a/examples/package-lock.json b/examples/package-lock.json index fa82581f5..7e45b9d1c 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@gleanwork/api-client", - "version": "0.21.2", + "version": "0.21.3", "dependencies": { "zod": "^3.25.0 || ^4.6.6" }, diff --git a/jsr.json b/jsr.json index 748a047aa..8961522c4 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@gleanwork/api-client", - "version": "0.21.2", + "version": "0.21.3", "exports": { ".": "./src/index.ts", "./node": "./src/node.ts", diff --git a/package-lock.json b/package-lock.json index 489d54ddf..e9562fbd1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gleanwork/api-client", - "version": "0.21.2", + "version": "0.21.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gleanwork/api-client", - "version": "0.21.2", + "version": "0.21.3", "dependencies": { "zod": "^3.25.0 || ^4.6.6" }, diff --git a/package.json b/package.json index ff1e3ce88..760816eed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gleanwork/api-client", - "version": "0.21.2", + "version": "0.21.3", "author": "Speakeasy", "tshy": { "sourceDialects": [ diff --git a/src/__tests__/agents.test.ts b/src/__tests__/agents.test.ts index 435c5372e..37e4ff9a4 100644 --- a/src/__tests__/agents.test.ts +++ b/src/__tests__/agents.test.ts @@ -216,3 +216,61 @@ test("Agents Platform Agents Update", async () => { }, "{agent_id}"); expect(result).toBeDefined(); }); + +test("Agents Platform Agents List Runs", async () => { + const testHttpClient = createTestHTTPClient("platform-agents-list-runs"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.agents.listRuns("{agent_id}"); + expect(result).toBeDefined(); +}); + +test("Agents Platform Agents List Versions", async () => { + const testHttpClient = createTestHTTPClient("platform-agents-list-versions"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.agents.listVersions("{agent_id}"); + expect(result).toBeDefined(); +}); + +test("Agents Platform Agents Create Version", async () => { + const testHttpClient = createTestHTTPClient("platform-agents-create-version"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.agents.createVersion({ + display_name: "Caterina.Walsh", + agent: { + name: "HR Policy Agent", + instructions: "Answer employee questions about HR policies and benefits.", + }, + }, "{agent_id}"); + expect(result).toBeDefined(); +}); + +test("Agents Platform Agents Get Version", async () => { + const testHttpClient = createTestHTTPClient("platform-agents-get-version"); + + const glean = new Glean({ + serverURL: process.env["TEST_SERVER_URL"] ?? "http://localhost:18080", + httpClient: testHttpClient, + apiToken: process.env["GLEAN_API_TOKEN"] ?? "value", + }); + + const result = await glean.agents.getVersion("{agent_id}", "{version_id}"); + expect(result).toBeDefined(); +}); diff --git a/src/__tests__/mockserver/internal/handler/generated_handlers.go b/src/__tests__/mockserver/internal/handler/generated_handlers.go index e2c7723bb..961f3d20e 100644 --- a/src/__tests__/mockserver/internal/handler/generated_handlers.go +++ b/src/__tests__/mockserver/internal/handler/generated_handlers.go @@ -21,8 +21,11 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodGet, "/api/admin/oauth/clients", pathGetAPIAdminOauthClients(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/admin/oauth/clients/{client_id}", pathGetAPIAdminOauthClientsClientID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}", pathGetAPIAgentsAgentID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}/runs", pathGetAPIAgentsAgentIDRuns(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}/runs/{run_id}", pathGetAPIAgentsAgentIDRunsRunID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}/schemas", pathGetAPIAgentsAgentIDSchemas(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}/versions", pathGetAPIAgentsAgentIDVersions(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/agents/{agent_id}/versions/{version_id}", pathGetAPIAgentsAgentIDVersionsVersionID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/departments", pathGetAPIDepartments(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/departments/{department_id}", pathGetAPIDepartmentsDepartmentID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/documents", pathGetAPIDocuments(dir, rt)), @@ -67,6 +70,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/cancellations", pathPostAPIAgentsAgentIDCancellations(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/responses", pathPostAPIAgentsAgentIDResponses(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/runs", pathPostAPIAgentsAgentIDRuns(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/versions", pathPostAPIAgentsAgentIDVersions(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/anonymous-auth-tokens", pathPostAPIAnonymousAuthTokens(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/chat", pathPostAPIChat(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/chats/{chat_id}/cancellations", pathPostAPIChatsChatIDCancellations(dir, rt)), diff --git a/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidruns.go b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidruns.go new file mode 100644 index 000000000..33221bfcb --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidruns.go @@ -0,0 +1,75 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 3c110fe85305 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPIAgentsAgentIDRuns(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-agents-list-runs[0]": + dir.HandlerFunc("platform-agents-list-runs", testPlatformAgentsListRunsPlatformAgentsListRuns0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformAgentsListRunsPlatformAgentsListRuns0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformListAgentRunsResponse = &components.PlatformListAgentRunsResponse{ + Results: []components.PlatformAgentRunSummary{ + components.PlatformAgentRunSummary{ + RunID: "", + AgentID: "", + State: components.PlatformAgentRunStateRunning, + CreatedAt: types.MustTimeFromString("2024-09-28T20:59:41.155Z"), + }, + }, + HasMore: false, + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversions.go b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversions.go new file mode 100644 index 000000000..bb6725bd0 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversions.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 4fcd61a17857 + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPIAgentsAgentIDVersions(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-agents-list-versions[0]": + dir.HandlerFunc("platform-agents-list-versions", testPlatformAgentsListVersionsPlatformAgentsListVersions0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformAgentsListVersionsPlatformAgentsListVersions0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformAgentVersionsListResponse = &components.PlatformAgentVersionsListResponse{ + Results: []components.PlatformAgentVersion{}, + HasMore: true, + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversionsversionid.go b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversionsversionid.go new file mode 100644 index 000000000..62a64631c --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathgetapiagentsagentidversionsversionid.go @@ -0,0 +1,81 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 375da58fa5db + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathGetAPIAgentsAgentIDVersionsVersionID(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-agents-get-version[0]": + dir.HandlerFunc("platform-agents-get-version", testPlatformAgentsGetVersionPlatformAgentsGetVersion0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformAgentsGetVersionPlatformAgentsGetVersion0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformAgentVersionGetResponse = &components.PlatformAgentVersionGetResponse{ + Version: components.PlatformAgentVersionWithDefinition{ + VersionID: "", + DisplayName: "Mauricio.Pouros72", + CreatedAt: types.MustTimeFromString("2025-04-07T11:45:00.644Z"), + Agent: components.PlatformAgent{ + Name: "HR Policy Agent", + AgentID: "ef33aecf52c142a6873adf76037b642e", + Capabilities: components.PlatformAgentCapabilities{}, + Subagents: []components.PlatformSubagent{ + components.PlatformSubagent{ + Name: "HR Policy Agent", + }, + }, + }, + }, + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusOK) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostapiagentsagentidversions.go b/src/__tests__/mockserver/internal/handler/pathpostapiagentsagentidversions.go new file mode 100644 index 000000000..3e7c5b863 --- /dev/null +++ b/src/__tests__/mockserver/internal/handler/pathpostapiagentsagentidversions.go @@ -0,0 +1,86 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: ec81c6b4099d + +package handler + +import ( + "fmt" + "log" + "mockserver/internal/handler/assert" + "mockserver/internal/logging" + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/types" + "mockserver/internal/sdk/utils" + "mockserver/internal/tracking" + "net/http" +) + +func pathPostAPIAgentsAgentIDVersions(dir *logging.HTTPFileDirectory, rt *tracking.RequestTracker) http.HandlerFunc { + return func(w http.ResponseWriter, req *http.Request) { + test := req.Header.Get("x-speakeasy-test-name") + instanceID := req.Header.Get("x-speakeasy-test-instance-id") + + count := rt.GetRequestCount(test, instanceID) + + switch fmt.Sprintf("%s[%d]", test, count) { + case "platform-agents-create-version[0]": + dir.HandlerFunc("platform-agents-create-version", testPlatformAgentsCreateVersionPlatformAgentsCreateVersion0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformAgentsCreateVersionPlatformAgentsCreateVersion0(w http.ResponseWriter, req *http.Request) { + if err := assert.SecurityAuthorizationHeader(req, false, "Bearer"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusUnauthorized) + return + } + if err := assert.ContentType(req, "application/json", true); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.AcceptHeader(req, []string{"application/json"}); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + if err := assert.HeaderExists(req, "User-Agent"); err != nil { + log.Printf("assertion error: %s\n", err) + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + var respBody *components.PlatformAgentVersionGetResponse = &components.PlatformAgentVersionGetResponse{ + Version: components.PlatformAgentVersionWithDefinition{ + VersionID: "", + DisplayName: "Imani_Lebsack", + CreatedAt: types.MustTimeFromString("2025-05-23T00:57:48.585Z"), + Agent: components.PlatformAgent{ + Name: "HR Policy Agent", + AgentID: "ef33aecf52c142a6873adf76037b642e", + Capabilities: components.PlatformAgentCapabilities{}, + Subagents: []components.PlatformSubagent{ + components.PlatformSubagent{ + Name: "HR Policy Agent", + }, + }, + }, + }, + RequestID: "", + } + respBodyBytes, err := utils.MarshalJSON(respBody, "", true) + + if err != nil { + http.Error( + w, + "Unable to encode response body as JSON: "+err.Error(), + http.StatusInternalServerError, + ) + return + } + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + _, _ = w.Write(respBodyBytes) +} diff --git a/src/__tests__/mockserver/internal/handler/pathpostapiagentssearch.go b/src/__tests__/mockserver/internal/handler/pathpostapiagentssearch.go index a0cc4a107..88f4b40ec 100644 --- a/src/__tests__/mockserver/internal/handler/pathpostapiagentssearch.go +++ b/src/__tests__/mockserver/internal/handler/pathpostapiagentssearch.go @@ -53,6 +53,7 @@ func testPlatformAgentsSearchPlatformAgentsSearch0(w http.ResponseWriter, req *h } var respBody *components.PlatformAgentsSearchResponse = &components.PlatformAgentsSearchResponse{ Agents: []components.PlatformAgent{}, + HasMore: true, RequestID: "", } respBodyBytes, err := utils.MarshalJSON(respBody, "", true) diff --git a/src/__tests__/mockserver/internal/sdk/models/components/manualfeedbackinfo.go b/src/__tests__/mockserver/internal/sdk/models/components/manualfeedbackinfo.go index fc8ed6d79..bd16f7e6b 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/manualfeedbackinfo.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/manualfeedbackinfo.go @@ -24,6 +24,7 @@ const ( ManualFeedbackInfoSourceGeneratedQAndA ManualFeedbackInfoSource = "GENERATED_Q_AND_A" ManualFeedbackInfoSourceInlineMenu ManualFeedbackInfoSource = "INLINE_MENU" ManualFeedbackInfoSourceNativeResult ManualFeedbackInfoSource = "NATIVE_RESULT" + ManualFeedbackInfoSourceNeedToKnow ManualFeedbackInfoSource = "NEED_TO_KNOW" ManualFeedbackInfoSourcePrism ManualFeedbackInfoSource = "PRISM" ManualFeedbackInfoSourceQAndA ManualFeedbackInfoSource = "Q_AND_A" ManualFeedbackInfoSourceRelatedQuestions ManualFeedbackInfoSource = "RELATED_QUESTIONS" @@ -69,6 +70,8 @@ func (e *ManualFeedbackInfoSource) UnmarshalJSON(data []byte) error { fallthrough case "NATIVE_RESULT": fallthrough + case "NEED_TO_KNOW": + fallthrough case "PRISM": fallthrough case "Q_AND_A": diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go index ea2339fc3..7a7ee8093 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagent.go @@ -45,6 +45,9 @@ type PlatformAgent struct { Subagents []PlatformSubagent `json:"subagents,omitempty"` // How the agent is invoked. Applies to top-level agents only. Trigger *PlatformAgentTrigger `json:"trigger,omitempty"` + // Whether the agent is an unpublished draft that has never been published. Omitted for a published agent. + // + IsDraft *bool `json:"is_draft,omitempty"` // A lightweight reference to a person, used where a payload merely points at someone. CreatedBy *PlatformPersonReference `json:"created_by,omitempty"` // A lightweight reference to a person, used where a payload merely points at someone. @@ -178,6 +181,13 @@ func (o *PlatformAgent) GetTrigger() *PlatformAgentTrigger { return o.Trigger } +func (o *PlatformAgent) GetIsDraft() *bool { + if o == nil { + return nil + } + return o.IsDraft +} + func (o *PlatformAgent) GetCreatedBy() *PlatformPersonReference { if o == nil { return nil diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentcreaterequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcreaterequest.go index 932b81d01..03a3fa9a5 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformagentcreaterequest.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentcreaterequest.go @@ -3,6 +3,10 @@ package components +import ( + "mockserver/internal/sdk/utils" +) + // PlatformAgentCreateRequest - Complete agent definition. type PlatformAgentCreateRequest struct { // Human-readable name. @@ -35,6 +39,20 @@ type PlatformAgentCreateRequest struct { Subagents []PlatformSubagent `json:"subagents,omitempty"` // How the agent is invoked. Applies to top-level agents only. Trigger *PlatformAgentTrigger `json:"trigger,omitempty"` + // Whether to save the agent as an unpublished draft instead of publishing it. + // + Draft *bool `default:"false" json:"draft"` +} + +func (p PlatformAgentCreateRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentCreateRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"name"}); err != nil { + return err + } + return nil } func (o *PlatformAgentCreateRequest) GetName() string { @@ -127,3 +145,10 @@ func (o *PlatformAgentCreateRequest) GetTrigger() *PlatformAgentTrigger { } return o.Trigger } + +func (o *PlatformAgentCreateRequest) GetDraft() *bool { + if o == nil { + return nil + } + return o.Draft +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentrunsummary.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentrunsummary.go new file mode 100644 index 000000000..3ce609873 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentrunsummary.go @@ -0,0 +1,79 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 88fc9ea97896 + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// PlatformAgentRunSummary - Metadata of a persisted agent run, without its output or pending approvals. +type PlatformAgentRunSummary struct { + // ID of the run. Use it with the agent-scoped GET run endpoint. + RunID string `json:"run_id"` + // ID of the agent that owns the run. + AgentID string `json:"agent_id"` + // State of the persisted workflow execution. REQUIRES_INPUT is nonterminal. + State PlatformAgentRunState `json:"state"` + // Timestamp when the run was first persisted. + CreatedAt time.Time `json:"created_at"` + // Timestamp when the run reached SUCCEEDED, FAILED, or CANCELLED. Omitted in other states. + EndedAt *time.Time `json:"ended_at,omitempty"` + // What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting. + // + TriggeredBy *PlatformAgentRunTrigger `json:"triggered_by,omitempty"` +} + +func (p PlatformAgentRunSummary) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentRunSummary) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"run_id", "agent_id", "state", "created_at"}); err != nil { + return err + } + return nil +} + +func (o *PlatformAgentRunSummary) GetRunID() string { + if o == nil { + return "" + } + return o.RunID +} + +func (o *PlatformAgentRunSummary) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *PlatformAgentRunSummary) GetState() PlatformAgentRunState { + if o == nil { + return PlatformAgentRunState("") + } + return o.State +} + +func (o *PlatformAgentRunSummary) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *PlatformAgentRunSummary) GetEndedAt() *time.Time { + if o == nil { + return nil + } + return o.EndedAt +} + +func (o *PlatformAgentRunSummary) GetTriggeredBy() *PlatformAgentRunTrigger { + if o == nil { + return nil + } + return o.TriggeredBy +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentruntrigger.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentruntrigger.go new file mode 100644 index 000000000..a39fb83a2 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentruntrigger.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 613267a6fe3e + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformAgentRunTrigger - What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting. +type PlatformAgentRunTrigger string + +const ( + PlatformAgentRunTriggerManual PlatformAgentRunTrigger = "MANUAL" + PlatformAgentRunTriggerSchedule PlatformAgentRunTrigger = "SCHEDULE" + PlatformAgentRunTriggerContentChange PlatformAgentRunTrigger = "CONTENT_CHANGE" + PlatformAgentRunTriggerContentSchedule PlatformAgentRunTrigger = "CONTENT_SCHEDULE" +) + +func (e PlatformAgentRunTrigger) ToPointer() *PlatformAgentRunTrigger { + return &e +} +func (e *PlatformAgentRunTrigger) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "MANUAL": + fallthrough + case "SCHEDULE": + fallthrough + case "CONTENT_CHANGE": + fallthrough + case "CONTENT_SCHEDULE": + *e = PlatformAgentRunTrigger(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformAgentRunTrigger: %v", v) + } +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchrequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchrequest.go index dcb71156c..8b57cdff6 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchrequest.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchrequest.go @@ -3,9 +3,29 @@ package components +import ( + "mockserver/internal/sdk/utils" +) + type PlatformAgentsSearchRequest struct { // Case-insensitive substring to match against agent names. If omitted or empty, no name filter is applied. Name *string `json:"name,omitempty"` + // Maximum number of agents to return. Defaults to 100. Maximum is 100. + PageSize *int64 `default:"100" json:"page_size"` + // Opaque pagination cursor from a previous response. Send the same name that the previous request used. + // + Cursor *string `json:"cursor,omitempty"` +} + +func (p PlatformAgentsSearchRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentsSearchRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil } func (o *PlatformAgentsSearchRequest) GetName() *string { @@ -14,3 +34,17 @@ func (o *PlatformAgentsSearchRequest) GetName() *string { } return o.Name } + +func (o *PlatformAgentsSearchRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformAgentsSearchRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchresponse.go index 233e621c6..12ce1544f 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentssearchresponse.go @@ -3,9 +3,17 @@ package components +import ( + "mockserver/internal/sdk/optionalnullable" +) + type PlatformAgentsSearchResponse struct { - // Agents matching the search request. + // Agents on this page that match the search request. Agents []PlatformAgent `json:"agents"` + // Whether more matching agents are available after this page. + HasMore bool `json:"has_more"` + // Opaque cursor for the next page; null or absent when has_more is false. + NextCursor optionalnullable.OptionalNullable[string] `json:"next_cursor,omitempty"` // Platform-generated request ID for support correlation. RequestID string `json:"request_id"` } @@ -17,6 +25,20 @@ func (o *PlatformAgentsSearchResponse) GetAgents() []PlatformAgent { return o.Agents } +func (o *PlatformAgentsSearchResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformAgentsSearchResponse) GetNextCursor() optionalnullable.OptionalNullable[string] { + if o == nil { + return nil + } + return o.NextCursor +} + func (o *PlatformAgentsSearchResponse) GetRequestID() string { if o == nil { return "" diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentupdaterequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentupdaterequest.go index 4c85fa2de..6b74e93ff 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformagentupdaterequest.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentupdaterequest.go @@ -39,6 +39,9 @@ type PlatformAgentUpdateRequest struct { Subagents []PlatformSubagent `json:"subagents,omitempty"` // How the agent is invoked. Applies to top-level agents only. Trigger *PlatformAgentTrigger `json:"trigger,omitempty"` + // Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. + // + Draft *bool `json:"draft,omitempty"` } func (o *PlatformAgentUpdateRequest) GetName() *string { @@ -124,3 +127,10 @@ func (o *PlatformAgentUpdateRequest) GetTrigger() *PlatformAgentTrigger { } return o.Trigger } + +func (o *PlatformAgentUpdateRequest) GetDraft() *bool { + if o == nil { + return nil + } + return o.Draft +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentversion.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversion.go new file mode 100644 index 000000000..f0f2e5618 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversion.go @@ -0,0 +1,52 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 97828e26bcb2 + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// PlatformAgentVersion - A named, immutable snapshot of an agent. +type PlatformAgentVersion struct { + // Opaque ID of the version, unique within the agent. It is not an ordinal; do not sort or compare IDs. + // + VersionID string `json:"version_id"` + // Name given to the version when it was created. + DisplayName string `json:"display_name"` + // Time the version was created. + CreatedAt time.Time `json:"created_at"` +} + +func (p PlatformAgentVersion) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentVersion) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"version_id", "display_name", "created_at"}); err != nil { + return err + } + return nil +} + +func (o *PlatformAgentVersion) GetVersionID() string { + if o == nil { + return "" + } + return o.VersionID +} + +func (o *PlatformAgentVersion) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformAgentVersion) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentversioncreaterequest.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversioncreaterequest.go new file mode 100644 index 000000000..b35c48dfd --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversioncreaterequest.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 42c5db81ad52 + +package components + +// PlatformAgentVersionCreateRequest - Complete agent to save and the name of the version. +type PlatformAgentVersionCreateRequest struct { + // Name of the version. Leading and trailing whitespace is removed. + DisplayName string `json:"display_name"` + // Complete agent definition. + Agent PlatformAgentCreateRequest `json:"agent"` +} + +func (o *PlatformAgentVersionCreateRequest) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformAgentVersionCreateRequest) GetAgent() PlatformAgentCreateRequest { + if o == nil { + return PlatformAgentCreateRequest{} + } + return o.Agent +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentversiongetresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversiongetresponse.go new file mode 100644 index 000000000..7ac405496 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversiongetresponse.go @@ -0,0 +1,26 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: fb1b1825c185 + +package components + +// PlatformAgentVersionGetResponse - A saved version of an agent. +type PlatformAgentVersionGetResponse struct { + // A saved version of an agent and the complete agent it saved. + Version PlatformAgentVersionWithDefinition `json:"version"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformAgentVersionGetResponse) GetVersion() PlatformAgentVersionWithDefinition { + if o == nil { + return PlatformAgentVersionWithDefinition{} + } + return o.Version +} + +func (o *PlatformAgentVersionGetResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentversionslistresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversionslistresponse.go new file mode 100644 index 000000000..2082a2fdf --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversionslistresponse.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: e1fc5a5ec06a + +package components + +import ( + "mockserver/internal/sdk/optionalnullable" +) + +// PlatformAgentVersionsListResponse - One page of saved versions of an agent. +type PlatformAgentVersionsListResponse struct { + // Versions of the agent, newest first. + Results []PlatformAgentVersion `json:"results"` + // Whether more versions are available after this page. + HasMore bool `json:"has_more"` + // Opaque cursor for the next page; null or absent when has_more is false. + NextCursor optionalnullable.OptionalNullable[string] `json:"next_cursor,omitempty"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformAgentVersionsListResponse) GetResults() []PlatformAgentVersion { + if o == nil { + return []PlatformAgentVersion{} + } + return o.Results +} + +func (o *PlatformAgentVersionsListResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformAgentVersionsListResponse) GetNextCursor() optionalnullable.OptionalNullable[string] { + if o == nil { + return nil + } + return o.NextCursor +} + +func (o *PlatformAgentVersionsListResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformagentversionwithdefinition.go b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversionwithdefinition.go new file mode 100644 index 000000000..8cdab6052 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformagentversionwithdefinition.go @@ -0,0 +1,61 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: c4de629b0aea + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// PlatformAgentVersionWithDefinition - A saved version of an agent and the complete agent it saved. +type PlatformAgentVersionWithDefinition struct { + // Opaque ID of the version, unique within the agent. It is not an ordinal; do not sort or compare IDs. + // + VersionID string `json:"version_id"` + // Name given to the version when it was created. + DisplayName string `json:"display_name"` + // Time the version was created. + CreatedAt time.Time `json:"created_at"` + // An agent available to the authenticated user. + Agent PlatformAgent `json:"agent"` +} + +func (p PlatformAgentVersionWithDefinition) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentVersionWithDefinition) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"version_id", "display_name", "created_at", "agent"}); err != nil { + return err + } + return nil +} + +func (o *PlatformAgentVersionWithDefinition) GetVersionID() string { + if o == nil { + return "" + } + return o.VersionID +} + +func (o *PlatformAgentVersionWithDefinition) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformAgentVersionWithDefinition) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *PlatformAgentVersionWithDefinition) GetAgent() PlatformAgent { + if o == nil { + return PlatformAgent{} + } + return o.Agent +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go index ea3848147..abb2271cf 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformlistadminagentsresponse.go @@ -9,7 +9,8 @@ import ( // PlatformListAdminAgentsResponse - One page of agents. type PlatformListAdminAgentsResponse struct { - // The agents on this page, ordered by name and then by agent_id. + // The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. + // Results []PlatformAgent `json:"results"` // Whether more agents are available after this page. HasMore bool `json:"has_more"` diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformlistagentrunsresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformlistagentrunsresponse.go new file mode 100644 index 000000000..f45e06ba7 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformlistagentrunsresponse.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: feb60ba59226 + +package components + +import ( + "mockserver/internal/sdk/optionalnullable" +) + +// PlatformListAgentRunsResponse - One page of the authenticated user's runs of an agent. +type PlatformListAgentRunsResponse struct { + // The runs on this page, newest first, ordered by created_at and then by run_id. + Results []PlatformAgentRunSummary `json:"results"` + // Whether more runs are available after this page. + HasMore bool `json:"has_more"` + // Opaque cursor for the next page; null or absent when has_more is false. + NextCursor optionalnullable.OptionalNullable[string] `json:"next_cursor,omitempty"` + // Request identifier for correlating this response. + RequestID string `json:"request_id"` +} + +func (o *PlatformListAgentRunsResponse) GetResults() []PlatformAgentRunSummary { + if o == nil { + return []PlatformAgentRunSummary{} + } + return o.Results +} + +func (o *PlatformListAgentRunsResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformListAgentRunsResponse) GetNextCursor() optionalnullable.OptionalNullable[string] { + if o == nil { + return nil + } + return o.NextCursor +} + +func (o *PlatformListAgentRunsResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go index 1ebd1cdda..8c1aaffc9 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformlistdepartmentsresponse.go @@ -9,7 +9,7 @@ import ( // PlatformListDepartmentsResponse - One page of departments. type PlatformListDepartmentsResponse struct { - // The departments on this page, ordered by display_name and then by department_id. + // The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. // Results []PlatformDepartmentReference `json:"results"` // Whether more departments are available after this page. diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go index 000ab9b7b..13d43d861 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformlistidpgroupsresponse.go @@ -9,7 +9,7 @@ import ( // PlatformListIdpGroupsResponse - One page of IdP groups. type PlatformListIdpGroupsResponse struct { - // The IdP groups on this page, ordered by display_name and then by idp_group_id. + // The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. // Results []PlatformIdpGroup `json:"results"` // Whether more IdP groups are available after this page. diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go index 872eb2b3f..bf962356a 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformlistoauthclientsresponse.go @@ -9,7 +9,8 @@ import ( // PlatformListOAuthClientsResponse - One page of OAuth clients. type PlatformListOAuthClientsResponse struct { - // The clients on this page, ordered by display_name and then by client_id. + // The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. + // Results []PlatformOAuthClient `json:"results"` // Whether more clients are available after this page. HasMore bool `json:"has_more"` diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformlistusersresponse.go b/src/__tests__/mockserver/internal/sdk/models/components/platformlistusersresponse.go index 939be344b..e45828bdb 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformlistusersresponse.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformlistusersresponse.go @@ -9,7 +9,8 @@ import ( // PlatformListUsersResponse - One page of users. type PlatformListUsersResponse struct { - // The users on this page, ordered by display_name and then by user_id. + // The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. + // Results []PlatformUser `json:"results"` // Whether more users are available after this page. HasMore bool `json:"has_more"` diff --git a/src/__tests__/mockserver/internal/sdk/models/components/platformtriggereventreason.go b/src/__tests__/mockserver/internal/sdk/models/components/platformtriggereventreason.go index 9bd9dd7a4..1f116c0bd 100644 --- a/src/__tests__/mockserver/internal/sdk/models/components/platformtriggereventreason.go +++ b/src/__tests__/mockserver/internal/sdk/models/components/platformtriggereventreason.go @@ -29,6 +29,8 @@ const ( PlatformTriggerEventReasonClosed PlatformTriggerEventReason = "CLOSED" PlatformTriggerEventReasonCommentAdded PlatformTriggerEventReason = "COMMENT_ADDED" PlatformTriggerEventReasonCommentResolved PlatformTriggerEventReason = "COMMENT_RESOLVED" + PlatformTriggerEventReasonCalendarGuestAdded PlatformTriggerEventReason = "CALENDAR_GUEST_ADDED" + PlatformTriggerEventReasonCalendarGuestRemoved PlatformTriggerEventReason = "CALENDAR_GUEST_REMOVED" ) func (e PlatformTriggerEventReason) ToPointer() *PlatformTriggerEventReason { @@ -73,6 +75,10 @@ func (e *PlatformTriggerEventReason) UnmarshalJSON(data []byte) error { case "COMMENT_ADDED": fallthrough case "COMMENT_RESOLVED": + fallthrough + case "CALENDAR_GUEST_ADDED": + fallthrough + case "CALENDAR_GUEST_REMOVED": *e = PlatformTriggerEventReason(v) return nil default: diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreate.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreate.go index f64accddf..ffaa0a0df 100644 --- a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreate.go +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreate.go @@ -9,7 +9,7 @@ import ( type PlatformAgentsCreateResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` - // Agent created and published. + // Agent created. PlatformAgentGetResponse *components.PlatformAgentGetResponse } diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreateversion.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreateversion.go new file mode 100644 index 000000000..a0db2be35 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentscreateversion.go @@ -0,0 +1,48 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 712774508b6e + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformAgentsCreateVersionRequest struct { + // ID of the agent to save a version of. + AgentID string `pathParam:"style=simple,explode=false,name=agent_id"` + Body components.PlatformAgentVersionCreateRequest `request:"mediaType=application/json"` +} + +func (o *PlatformAgentsCreateVersionRequest) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *PlatformAgentsCreateVersionRequest) GetBody() components.PlatformAgentVersionCreateRequest { + if o == nil { + return components.PlatformAgentVersionCreateRequest{} + } + return o.Body +} + +type PlatformAgentsCreateVersionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Agent version created. + PlatformAgentVersionGetResponse *components.PlatformAgentVersionGetResponse +} + +func (o *PlatformAgentsCreateVersionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformAgentsCreateVersionResponse) GetPlatformAgentVersionGetResponse() *components.PlatformAgentVersionGetResponse { + if o == nil { + return nil + } + return o.PlatformAgentVersionGetResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsdeleteversion.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsdeleteversion.go new file mode 100644 index 000000000..1782fe58a --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsdeleteversion.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 8a8cbb88cffd + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformAgentsDeleteVersionRequest struct { + // ID of the agent. + AgentID string `pathParam:"style=simple,explode=false,name=agent_id"` + // Opaque ID of the agent version to delete, as returned by List agent versions. + VersionID string `pathParam:"style=simple,explode=false,name=version_id"` +} + +func (o *PlatformAgentsDeleteVersionRequest) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *PlatformAgentsDeleteVersionRequest) GetVersionID() string { + if o == nil { + return "" + } + return o.VersionID +} + +type PlatformAgentsDeleteVersionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PlatformAgentsDeleteVersionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsgetversion.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsgetversion.go new file mode 100644 index 000000000..0bc931824 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsgetversion.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: cb8a0642f3ff + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformAgentsGetVersionRequest struct { + // ID of the agent. + AgentID string `pathParam:"style=simple,explode=false,name=agent_id"` + // Opaque ID of the agent version to retrieve, as returned by List agent versions. + VersionID string `pathParam:"style=simple,explode=false,name=version_id"` +} + +func (o *PlatformAgentsGetVersionRequest) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *PlatformAgentsGetVersionRequest) GetVersionID() string { + if o == nil { + return "" + } + return o.VersionID +} + +type PlatformAgentsGetVersionResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformAgentVersionGetResponse *components.PlatformAgentVersionGetResponse +} + +func (o *PlatformAgentsGetVersionResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformAgentsGetVersionResponse) GetPlatformAgentVersionGetResponse() *components.PlatformAgentVersionGetResponse { + if o == nil { + return nil + } + return o.PlatformAgentVersionGetResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistruns.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistruns.go new file mode 100644 index 000000000..9accae202 --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistruns.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: 2980f2938c5b + +package operations + +import ( + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type PlatformAgentsListRunsRequest struct { + // ID of the agent whose runs should be listed. + AgentID string `pathParam:"style=simple,explode=false,name=agent_id"` + // Maximum number of runs to return. Defaults to 50. Maximum is 100. + PageSize *int64 `default:"50" queryParam:"style=form,explode=true,name=page_size"` + // Opaque pagination cursor from a previous response. Send it with the same agent_id that the previous request used. + // + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` +} + +func (p PlatformAgentsListRunsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentsListRunsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"agent_id"}); err != nil { + return err + } + return nil +} + +func (o *PlatformAgentsListRunsRequest) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *PlatformAgentsListRunsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformAgentsListRunsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +type PlatformAgentsListRunsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformListAgentRunsResponse *components.PlatformListAgentRunsResponse +} + +func (o *PlatformAgentsListRunsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformAgentsListRunsResponse) GetPlatformListAgentRunsResponse() *components.PlatformListAgentRunsResponse { + if o == nil { + return nil + } + return o.PlatformListAgentRunsResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistversions.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistversions.go new file mode 100644 index 000000000..71721fa8d --- /dev/null +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentslistversions.go @@ -0,0 +1,70 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// @generated-id: e1a45063a6e7 + +package operations + +import ( + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type PlatformAgentsListVersionsRequest struct { + // ID of the agent whose versions to list. + AgentID string `pathParam:"style=simple,explode=false,name=agent_id"` + // Maximum number of versions to return. Defaults to 20. Maximum is 50. + PageSize *int64 `default:"20" queryParam:"style=form,explode=true,name=page_size"` + // Opaque pagination cursor returned as next_cursor by the previous page. + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` +} + +func (p PlatformAgentsListVersionsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformAgentsListVersionsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"agent_id"}); err != nil { + return err + } + return nil +} + +func (o *PlatformAgentsListVersionsRequest) GetAgentID() string { + if o == nil { + return "" + } + return o.AgentID +} + +func (o *PlatformAgentsListVersionsRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformAgentsListVersionsRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +type PlatformAgentsListVersionsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformAgentVersionsListResponse *components.PlatformAgentVersionsListResponse +} + +func (o *PlatformAgentsListVersionsResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformAgentsListVersionsResponse) GetPlatformAgentVersionsListResponse() *components.PlatformAgentVersionsListResponse { + if o == nil { + return nil + } + return o.PlatformAgentVersionsListResponse +} diff --git a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsupdate.go b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsupdate.go index 3cb30bb7a..1f5f5a357 100644 --- a/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsupdate.go +++ b/src/__tests__/mockserver/internal/sdk/models/operations/platformagentsupdate.go @@ -29,7 +29,7 @@ func (o *PlatformAgentsUpdateRequest) GetBody() components.PlatformAgentUpdateRe type PlatformAgentsUpdateResponse struct { HTTPMeta components.HTTPMetadata `json:"-"` - // Agent updated and published. + // Agent updated. PlatformAgentGetResponse *components.PlatformAgentGetResponse } diff --git a/src/__tests__/summarize.test.ts b/src/__tests__/summarize.test.ts index bb5e2b02f..3dfcfe72a 100644 --- a/src/__tests__/summarize.test.ts +++ b/src/__tests__/summarize.test.ts @@ -19,7 +19,7 @@ test("Summarize Summarize", async () => { const result = await glean.client.documents.summarize({ documentSpecs: [ { - url: "https://dim-glider.com/", + url: "https://judicious-squid.info", }, { id: "", diff --git a/src/funcs/adminAgentsList.ts b/src/funcs/adminAgentsList.ts index 5b75b5903..a31ebc9c3 100644 --- a/src/funcs/adminAgentsList.ts +++ b/src/funcs/adminAgentsList.ts @@ -36,7 +36,7 @@ import { Result } from "../types/fp.js"; * List all agents * * @remarks - * List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + * List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. */ export function adminAgentsList( client: GleanCore, diff --git a/src/funcs/adminIdpgroupsList.ts b/src/funcs/adminIdpgroupsList.ts index 37b38f896..ad9ccd0ea 100644 --- a/src/funcs/adminIdpgroupsList.ts +++ b/src/funcs/adminIdpgroupsList.ts @@ -36,7 +36,7 @@ import { Result } from "../types/fp.js"; * List IdP groups * * @remarks - * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. */ export function adminIdpgroupsList( client: GleanCore, diff --git a/src/funcs/adminOauthClientsList.ts b/src/funcs/adminOauthClientsList.ts index 2780d2bae..66b3d617f 100644 --- a/src/funcs/adminOauthClientsList.ts +++ b/src/funcs/adminOauthClientsList.ts @@ -36,7 +36,7 @@ import { Result } from "../types/fp.js"; * List OAuth clients * * @remarks - * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. */ export function adminOauthClientsList( client: GleanCore, diff --git a/src/funcs/agentsCreate.ts b/src/funcs/agentsCreate.ts index 6e864668a..27a3f23b1 100644 --- a/src/funcs/agentsCreate.ts +++ b/src/funcs/agentsCreate.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * Create agent * * @remarks - * Create and publish an agent from its complete definition. + * Create an agent from its complete definition. The agent is published unless `draft` is true. */ export function agentsCreate( client: GleanCore, diff --git a/src/funcs/agentsCreateVersion.ts b/src/funcs/agentsCreateVersion.ts new file mode 100644 index 000000000..c23024ed1 --- /dev/null +++ b/src/funcs/agentsCreateVersion.ts @@ -0,0 +1,202 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9efd04f01ec9 + */ + +import { GleanCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { encodePath, RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create agent version + * + * @remarks + * Save a complete agent as a named version without publishing it. The agent's published definition is unchanged. When the agent already has 50 saved versions, the oldest one is deleted. Requires permission to edit the agent. + */ +export function agentsCreateVersion( + client: GleanCore, + platformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest, + agentId: string, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformAgentVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + platformAgentVersionCreateRequest, + agentId, + options, + )); +} + +async function $do( + client: GleanCore, + platformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest, + agentId: string, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformAgentVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformAgentsCreateVersionRequest = { + platformAgentVersionCreateRequest: platformAgentVersionCreateRequest, + agent_id: agentId, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformAgentsCreateVersionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.PlatformAgentVersionCreateRequest, { + explode: true, + }); + + const pathParams = { + agent_id: encodeSimple("agent_id", payload.agent_id, { + explode: false, + charEncoding: "percent", + }), + }; + const pathResult = encodePath("/api/agents/{agent_id}/versions", pathParams); + if (!pathResult.ok) { + return [pathResult, { status: "invalid" }]; + } + const path = pathResult.value; + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-agents-create-version", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PlatformAgentVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(201, components.PlatformAgentVersionGetResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 413, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/agentsDeleteVersion.ts b/src/funcs/agentsDeleteVersion.ts new file mode 100644 index 000000000..796180ba9 --- /dev/null +++ b/src/funcs/agentsDeleteVersion.ts @@ -0,0 +1,204 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 33c90b6f83d1 + */ + +import * as z from "zod/v3"; +import { GleanCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { encodePath, RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Delete agent version + * + * @remarks + * Delete a saved version of an agent. The agent itself is unchanged. Requires permission to edit the agent. + */ +export function agentsDeleteVersion( + client: GleanCore, + agentId: string, + versionId: string, + options?: RequestOptions, +): APIPromise< + Result< + void, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + agentId, + versionId, + options, + )); +} + +async function $do( + client: GleanCore, + agentId: string, + versionId: string, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformAgentsDeleteVersionRequest = { + agent_id: agentId, + version_id: versionId, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformAgentsDeleteVersionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + agent_id: encodeSimple("agent_id", payload.agent_id, { + explode: false, + charEncoding: "percent", + }), + version_id: encodeSimple("version_id", payload.version_id, { + explode: false, + charEncoding: "percent", + }), + }; + const pathResult = encodePath( + "/api/agents/{agent_id}/versions/{version_id}", + pathParams, + ); + if (!pathResult.ok) { + return [pathResult, { status: "invalid" }]; + } + const path = pathResult.value; + + const headers = new Headers(compactMap({ + Accept: "application/problem+json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-agents-delete-version", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "DELETE", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + void, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.nil(204, z.void()), + M.jsonErr( + [400, 401, 403, 404, 408, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/agentsGetVersion.ts b/src/funcs/agentsGetVersion.ts new file mode 100644 index 000000000..7ab978327 --- /dev/null +++ b/src/funcs/agentsGetVersion.ts @@ -0,0 +1,204 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 01612d24c20d + */ + +import { GleanCore } from "../core.js"; +import { encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { encodePath, RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get agent version + * + * @remarks + * Retrieve a saved version of an agent, including the complete agent it saved. + */ +export function agentsGetVersion( + client: GleanCore, + agentId: string, + versionId: string, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformAgentVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + agentId, + versionId, + options, + )); +} + +async function $do( + client: GleanCore, + agentId: string, + versionId: string, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformAgentVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformAgentsGetVersionRequest = { + agent_id: agentId, + version_id: versionId, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformAgentsGetVersionRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + agent_id: encodeSimple("agent_id", payload.agent_id, { + explode: false, + charEncoding: "percent", + }), + version_id: encodeSimple("version_id", payload.version_id, { + explode: false, + charEncoding: "percent", + }), + }; + const pathResult = encodePath( + "/api/agents/{agent_id}/versions/{version_id}", + pathParams, + ); + if (!pathResult.ok) { + return [pathResult, { status: "invalid" }]; + } + const path = pathResult.value; + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-agents-get-version", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PlatformAgentVersionGetResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformAgentVersionGetResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/agentsListRuns.ts b/src/funcs/agentsListRuns.ts new file mode 100644 index 000000000..798538f6f --- /dev/null +++ b/src/funcs/agentsListRuns.ts @@ -0,0 +1,207 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9b994e0f5173 + */ + +import { GleanCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { encodePath, RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List agent runs + * + * @remarks + * List the authenticated user's persisted runs of an agent, newest first. Each result holds run metadata only + */ +export function agentsListRuns( + client: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformListAgentRunsResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + agentId, + pageSize, + cursor, + options, + )); +} + +async function $do( + client: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformListAgentRunsResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformAgentsListRunsRequest = { + agent_id: agentId, + page_size: pageSize, + cursor: cursor, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformAgentsListRunsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + agent_id: encodeSimple("agent_id", payload.agent_id, { + explode: false, + charEncoding: "percent", + }), + }; + const pathResult = encodePath("/api/agents/{agent_id}/runs", pathParams); + if (!pathResult.ok) { + return [pathResult, { status: "invalid" }]; + } + const path = pathResult.value; + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-agents-list-runs", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PlatformListAgentRunsResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformListAgentRunsResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/agentsListVersions.ts b/src/funcs/agentsListVersions.ts new file mode 100644 index 000000000..077b0bffc --- /dev/null +++ b/src/funcs/agentsListVersions.ts @@ -0,0 +1,207 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 70bd9b6819a0 + */ + +import { GleanCore } from "../core.js"; +import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; +import { matchStatusCode } from "../lib/http.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { encodePath, RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List agent versions + * + * @remarks + * List saved versions of an agent, newest first. Requires permission to edit the agent. + */ +export function agentsListVersions( + client: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): APIPromise< + Result< + components.PlatformAgentVersionsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + agentId, + pageSize, + cursor, + options, + )); +} + +async function $do( + client: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + components.PlatformAgentVersionsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const input: operations.PlatformAgentsListVersionsRequest = { + agent_id: agentId, + page_size: pageSize, + cursor: cursor, + }; + + const parsed = safeParse( + input, + (value) => + operations.PlatformAgentsListVersionsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const pathParams = { + agent_id: encodeSimple("agent_id", payload.agent_id, { + explode: false, + charEncoding: "percent", + }), + }; + const pathResult = encodePath("/api/agents/{agent_id}/versions", pathParams); + if (!pathResult.ok) { + return [pathResult, { status: "invalid" }]; + } + const path = pathResult.value; + + const query = encodeFormQuery({ + "cursor": payload.cursor, + "page_size": payload.page_size, + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiToken); + const securityInput = secConfig == null ? {} : { apiToken: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "platform-agents-list-versions", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiToken, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + isErrorStatusCode: (statusCode: number) => + matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]), + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.PlatformAgentVersionsListResponse, + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.PlatformAgentVersionsListResponse$inboundSchema), + M.jsonErr( + [400, 401, 403, 404, 408, 429], + errors.PlatformProblemDetailError$inboundSchema, + { ctype: "application/problem+json" }, + ), + M.jsonErr([500, 503], errors.PlatformProblemDetailError$inboundSchema, { + ctype: "application/problem+json", + }), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/agentsSearch.ts b/src/funcs/agentsSearch.ts index 9579ddb62..8494e4506 100644 --- a/src/funcs/agentsSearch.ts +++ b/src/funcs/agentsSearch.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * Search agents * * @remarks - * Search agents available to the authenticated user by agent name. + * Search agents available to the authenticated user by agent name. Results come one page at a time. When has_more is true, send next_cursor as cursor, with the same name, to get the next page. */ export function agentsSearch( client: GleanCore, diff --git a/src/funcs/agentsUpdate.ts b/src/funcs/agentsUpdate.ts index 75f11669b..a1a834137 100644 --- a/src/funcs/agentsUpdate.ts +++ b/src/funcs/agentsUpdate.ts @@ -31,7 +31,7 @@ import { Result } from "../types/fp.js"; * Update agent * * @remarks - * Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + * Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. */ export function agentsUpdate( client: GleanCore, diff --git a/src/funcs/departmentsList.ts b/src/funcs/departmentsList.ts index 3df0ff0ad..919f4ef09 100644 --- a/src/funcs/departmentsList.ts +++ b/src/funcs/departmentsList.ts @@ -36,7 +36,7 @@ import { Result } from "../types/fp.js"; * List departments * * @remarks - * List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + * List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. */ export function departmentsList( client: GleanCore, diff --git a/src/funcs/usersList.ts b/src/funcs/usersList.ts index ce6b56b2c..e90eb94e7 100644 --- a/src/funcs/usersList.ts +++ b/src/funcs/usersList.ts @@ -36,7 +36,7 @@ import { Result } from "../types/fp.js"; * List users * * @remarks - * List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + * List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. */ export function usersList( client: GleanCore, diff --git a/src/lib/config.ts b/src/lib/config.ts index 8259e5797..129bdd9cf 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.9.0", - sdkVersion: "0.21.2", - genVersion: "2.969.4", + sdkVersion: "0.21.3", + genVersion: "2.969.7", userAgent: - "speakeasy-sdk/typescript 0.21.2 2.969.4 0.9.0 @gleanwork/api-client", + "speakeasy-sdk/typescript 0.21.3 2.969.7 0.9.0 @gleanwork/api-client", } as const; diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 700297cab..ba02dd7af 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -393,7 +393,9 @@ export * from "./platformagentrunresponsesrequest.js"; export * from "./platformagentrunstate.js"; export * from "./platformagentrunstreamevent.js"; export * from "./platformagentrunstreammessage.js"; +export * from "./platformagentrunsummary.js"; export * from "./platformagentruntoolapproval.js"; +export * from "./platformagentruntrigger.js"; export * from "./platformagentrunwaitresponse.js"; export * from "./platformagentschedule.js"; export * from "./platformagentschemasresponse.js"; @@ -407,6 +409,11 @@ export * from "./platformagentssearchresponse.js"; export * from "./platformagenttoolset.js"; export * from "./platformagenttrigger.js"; export * from "./platformagentupdaterequest.js"; +export * from "./platformagentversion.js"; +export * from "./platformagentversioncreaterequest.js"; +export * from "./platformagentversiongetresponse.js"; +export * from "./platformagentversionslistresponse.js"; +export * from "./platformagentversionwithdefinition.js"; export * from "./platformanonymousauthtoken.js"; export * from "./platformauthenticationsuggestion.js"; export * from "./platformchat.js"; @@ -468,6 +475,7 @@ export * from "./platformgetuserresponse.js"; export * from "./platformidpgroup.js"; export * from "./platformidpgroupfilter.js"; export * from "./platformlistadminagentsresponse.js"; +export * from "./platformlistagentrunsresponse.js"; export * from "./platformlistdepartmentsresponse.js"; export * from "./platformlistidpgroupsresponse.js"; export * from "./platformlistoauthclientsresponse.js"; diff --git a/src/models/components/manualfeedbackinfo.ts b/src/models/components/manualfeedbackinfo.ts index 9c57c7656..0c6a54bef 100644 --- a/src/models/components/manualfeedbackinfo.ts +++ b/src/models/components/manualfeedbackinfo.ts @@ -28,6 +28,7 @@ export const ManualFeedbackInfoSource = { GeneratedQAndA: "GENERATED_Q_AND_A", InlineMenu: "INLINE_MENU", NativeResult: "NATIVE_RESULT", + NeedToKnow: "NEED_TO_KNOW", Prism: "PRISM", QAndA: "Q_AND_A", RelatedQuestions: "RELATED_QUESTIONS", diff --git a/src/models/components/platformagent.ts b/src/models/components/platformagent.ts index 7d22afbb8..dbd8e4dc0 100644 --- a/src/models/components/platformagent.ts +++ b/src/models/components/platformagent.ts @@ -125,6 +125,12 @@ export type PlatformAgent = { * How the agent is invoked. Applies to top-level agents only. */ trigger?: PlatformAgentTrigger | undefined; + /** + * Whether the agent is an unpublished draft that has never been published. Omitted for a published agent. + * + * @remarks + */ + is_draft?: boolean | undefined; /** * A lightweight reference to a person, used where a payload merely points at someone. */ @@ -168,6 +174,7 @@ export const PlatformAgent$inboundSchema: z.ZodType< channels: PlatformAgentChannels$inboundSchema.optional(), subagents: z.array(PlatformSubagent$inboundSchema).optional(), trigger: PlatformAgentTrigger$inboundSchema.optional(), + is_draft: z.boolean().optional(), created_by: PlatformPersonReference$inboundSchema.optional(), updated_by: PlatformPersonReference$inboundSchema.optional(), created_at: z.string().datetime({ offset: true }).transform(v => diff --git a/src/models/components/platformagentcreaterequest.ts b/src/models/components/platformagentcreaterequest.ts index 039cba313..3fed99bc5 100644 --- a/src/models/components/platformagentcreaterequest.ts +++ b/src/models/components/platformagentcreaterequest.ts @@ -115,6 +115,12 @@ export type PlatformAgentCreateRequest = { * How the agent is invoked. Applies to top-level agents only. */ trigger?: PlatformAgentTrigger | undefined; + /** + * Whether to save the agent as an unpublished draft instead of publishing it. + * + * @remarks + */ + draft?: boolean | undefined; }; /** @internal */ @@ -134,6 +140,7 @@ export type PlatformAgentCreateRequest$Outbound = { channels?: PlatformAgentChannels$Outbound | undefined; subagents?: Array | undefined; trigger?: PlatformAgentTrigger$Outbound | undefined; + draft: boolean; }; /** @internal */ @@ -158,6 +165,7 @@ export const PlatformAgentCreateRequest$outboundSchema: z.ZodType< channels: PlatformAgentChannels$outboundSchema.optional(), subagents: z.array(PlatformSubagent$outboundSchema).optional(), trigger: PlatformAgentTrigger$outboundSchema.optional(), + draft: z.boolean().default(false), }) ); diff --git a/src/models/components/platformagentrunsummary.ts b/src/models/components/platformagentrunsummary.ts new file mode 100644 index 000000000..584536a2e --- /dev/null +++ b/src/models/components/platformagentrunsummary.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1c276144359f + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentRunState, + PlatformAgentRunState$inboundSchema, +} from "./platformagentrunstate.js"; +import { + PlatformAgentRunTrigger, + PlatformAgentRunTrigger$inboundSchema, +} from "./platformagentruntrigger.js"; + +/** + * Metadata of a persisted agent run, without its output or pending approvals. + */ +export type PlatformAgentRunSummary = { + /** + * ID of the run. Use it with the agent-scoped GET run endpoint. + */ + run_id: string; + /** + * ID of the agent that owns the run. + */ + agent_id: string; + /** + * State of the persisted workflow execution. REQUIRES_INPUT is nonterminal. + */ + state: PlatformAgentRunState; + /** + * Timestamp when the run was first persisted. + */ + created_at: Date; + /** + * Timestamp when the run reached SUCCEEDED, FAILED, or CANCELLED. Omitted in other states. + */ + ended_at?: Date | undefined; + /** + * What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting. + * + * @remarks + */ + triggered_by?: PlatformAgentRunTrigger | undefined; +}; + +/** @internal */ +export const PlatformAgentRunSummary$inboundSchema: z.ZodType< + PlatformAgentRunSummary, + z.ZodTypeDef, + unknown +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + run_id: z.string(), + agent_id: z.string(), + state: PlatformAgentRunState$inboundSchema, + created_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + ended_at: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + triggered_by: PlatformAgentRunTrigger$inboundSchema.optional(), + }) +); + +export function platformAgentRunSummaryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentRunSummary$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentRunSummary' from JSON`, + ); +} diff --git a/src/models/components/platformagentruntrigger.ts b/src/models/components/platformagentruntrigger.ts new file mode 100644 index 000000000..a903f51f7 --- /dev/null +++ b/src/models/components/platformagentruntrigger.ts @@ -0,0 +1,36 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f43d2d08cbf2 + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; +import * as openEnums from "../../types/enums.js"; +import { OpenEnum } from "../../types/enums.js"; + +/** + * What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting. + * + * @remarks + */ +export const PlatformAgentRunTrigger = { + Manual: "MANUAL", + Schedule: "SCHEDULE", + ContentChange: "CONTENT_CHANGE", + ContentSchedule: "CONTENT_SCHEDULE", +} as const; +/** + * What started an agent run. MANUAL is a user or API request, SCHEDULE is a recurring schedule, CONTENT_CHANGE is a change to indexed content, and CONTENT_SCHEDULE is a time relative to a content event such as a meeting. + * + * @remarks + */ +export type PlatformAgentRunTrigger = OpenEnum; + +/** @internal */ +export const PlatformAgentRunTrigger$inboundSchema: z.ZodType< + PlatformAgentRunTrigger, + z.ZodTypeDef, + unknown +> = /* @__PURE__ */ lazySchema$(() => + openEnums.inboundSchema(PlatformAgentRunTrigger) +); diff --git a/src/models/components/platformagentssearchrequest.ts b/src/models/components/platformagentssearchrequest.ts index 551ac58c6..7a3ca87dc 100644 --- a/src/models/components/platformagentssearchrequest.ts +++ b/src/models/components/platformagentssearchrequest.ts @@ -11,11 +11,23 @@ export type PlatformAgentsSearchRequest = { * Case-insensitive substring to match against agent names. If omitted or empty, no name filter is applied. */ name?: string | undefined; + /** + * Maximum number of agents to return. Defaults to 100. Maximum is 100. + */ + page_size?: number | undefined; + /** + * Opaque pagination cursor from a previous response. Send the same name that the previous request used. + * + * @remarks + */ + cursor?: string | undefined; }; /** @internal */ export type PlatformAgentsSearchRequest$Outbound = { name?: string | undefined; + page_size: number; + cursor?: string | undefined; }; /** @internal */ @@ -26,6 +38,8 @@ export const PlatformAgentsSearchRequest$outboundSchema: z.ZodType< > = /* @__PURE__ */ lazySchema$(() => z.object({ name: z.string().optional(), + page_size: z.number().int().default(100), + cursor: z.string().optional(), }) ); diff --git a/src/models/components/platformagentssearchresponse.ts b/src/models/components/platformagentssearchresponse.ts index 56c69577f..a9da91723 100644 --- a/src/models/components/platformagentssearchresponse.ts +++ b/src/models/components/platformagentssearchresponse.ts @@ -11,9 +11,17 @@ import { PlatformAgent, PlatformAgent$inboundSchema } from "./platformagent.js"; export type PlatformAgentsSearchResponse = { /** - * Agents matching the search request. + * Agents on this page that match the search request. */ agents: Array; + /** + * Whether more matching agents are available after this page. + */ + has_more: boolean; + /** + * Opaque cursor for the next page; null or absent when has_more is false. + */ + next_cursor?: string | null | undefined; /** * Platform-generated request ID for support correlation. */ @@ -28,6 +36,8 @@ export const PlatformAgentsSearchResponse$inboundSchema: z.ZodType< > = /* @__PURE__ */ lazySchema$(() => z.object({ agents: z.array(PlatformAgent$inboundSchema), + has_more: z.boolean(), + next_cursor: z.nullable(z.string()).optional(), request_id: z.string(), }) ); diff --git a/src/models/components/platformagentupdaterequest.ts b/src/models/components/platformagentupdaterequest.ts index 89d8decad..0ee97619d 100644 --- a/src/models/components/platformagentupdaterequest.ts +++ b/src/models/components/platformagentupdaterequest.ts @@ -117,6 +117,12 @@ export type PlatformAgentUpdateRequest = { * How the agent is invoked. Applies to top-level agents only. */ trigger?: PlatformAgentTrigger | undefined; + /** + * Whether the update is saved as an unpublished draft. Defaults to the agent's current state. `false` publishes a draft agent. `true` isn't allowed for a published agent. + * + * @remarks + */ + draft?: boolean | undefined; }; /** @internal */ @@ -138,6 +144,7 @@ export type PlatformAgentUpdateRequest$Outbound = { channels?: PlatformAgentChannels$Outbound | undefined; subagents?: Array | undefined; trigger?: PlatformAgentTrigger$Outbound | undefined; + draft?: boolean | undefined; }; /** @internal */ @@ -162,6 +169,7 @@ export const PlatformAgentUpdateRequest$outboundSchema: z.ZodType< channels: PlatformAgentChannels$outboundSchema.optional(), subagents: z.array(PlatformSubagent$outboundSchema).optional(), trigger: PlatformAgentTrigger$outboundSchema.optional(), + draft: z.boolean().optional(), }) ); diff --git a/src/models/components/platformagentversion.ts b/src/models/components/platformagentversion.ts new file mode 100644 index 000000000..bc7c9f356 --- /dev/null +++ b/src/models/components/platformagentversion.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 8eb4744ccf79 + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * A named, immutable snapshot of an agent. + */ +export type PlatformAgentVersion = { + /** + * Opaque ID of the version, unique within the agent. It is not an ordinal; do not sort or compare IDs. + * + * @remarks + */ + version_id: string; + /** + * Name given to the version when it was created. + */ + display_name: string; + /** + * Time the version was created. + */ + created_at: Date; +}; + +/** @internal */ +export const PlatformAgentVersion$inboundSchema: z.ZodType< + PlatformAgentVersion, + z.ZodTypeDef, + unknown +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + version_id: z.string(), + display_name: z.string(), + created_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + }) +); + +export function platformAgentVersionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentVersion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentVersion' from JSON`, + ); +} diff --git a/src/models/components/platformagentversioncreaterequest.ts b/src/models/components/platformagentversioncreaterequest.ts new file mode 100644 index 000000000..811ec9193 --- /dev/null +++ b/src/models/components/platformagentversioncreaterequest.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 16efa535f4be + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; +import { + PlatformAgentCreateRequest, + PlatformAgentCreateRequest$Outbound, + PlatformAgentCreateRequest$outboundSchema, +} from "./platformagentcreaterequest.js"; + +/** + * Complete agent to save and the name of the version. + */ +export type PlatformAgentVersionCreateRequest = { + /** + * Name of the version. Leading and trailing whitespace is removed. + */ + display_name: string; + /** + * Complete agent definition. + */ + agent: PlatformAgentCreateRequest; +}; + +/** @internal */ +export type PlatformAgentVersionCreateRequest$Outbound = { + display_name: string; + agent: PlatformAgentCreateRequest$Outbound; +}; + +/** @internal */ +export const PlatformAgentVersionCreateRequest$outboundSchema: z.ZodType< + PlatformAgentVersionCreateRequest$Outbound, + z.ZodTypeDef, + PlatformAgentVersionCreateRequest +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + display_name: z.string(), + agent: PlatformAgentCreateRequest$outboundSchema, + }) +); + +export function platformAgentVersionCreateRequestToJSON( + platformAgentVersionCreateRequest: PlatformAgentVersionCreateRequest, +): string { + return JSON.stringify( + PlatformAgentVersionCreateRequest$outboundSchema.parse( + platformAgentVersionCreateRequest, + ), + ); +} diff --git a/src/models/components/platformagentversiongetresponse.ts b/src/models/components/platformagentversiongetresponse.ts new file mode 100644 index 000000000..3d37b8dc5 --- /dev/null +++ b/src/models/components/platformagentversiongetresponse.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f1686f274e29 + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentVersionWithDefinition, + PlatformAgentVersionWithDefinition$inboundSchema, +} from "./platformagentversionwithdefinition.js"; + +/** + * A saved version of an agent. + */ +export type PlatformAgentVersionGetResponse = { + /** + * A saved version of an agent and the complete agent it saved. + */ + version: PlatformAgentVersionWithDefinition; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformAgentVersionGetResponse$inboundSchema: z.ZodType< + PlatformAgentVersionGetResponse, + z.ZodTypeDef, + unknown +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + version: PlatformAgentVersionWithDefinition$inboundSchema, + request_id: z.string(), + }) +); + +export function platformAgentVersionGetResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentVersionGetResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentVersionGetResponse' from JSON`, + ); +} diff --git a/src/models/components/platformagentversionslistresponse.ts b/src/models/components/platformagentversionslistresponse.ts new file mode 100644 index 000000000..14f83087b --- /dev/null +++ b/src/models/components/platformagentversionslistresponse.ts @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: d5d0b1f3b12e + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentVersion, + PlatformAgentVersion$inboundSchema, +} from "./platformagentversion.js"; + +/** + * One page of saved versions of an agent. + */ +export type PlatformAgentVersionsListResponse = { + /** + * Versions of the agent, newest first. + */ + results: Array; + /** + * Whether more versions are available after this page. + */ + has_more: boolean; + /** + * Opaque cursor for the next page; null or absent when has_more is false. + */ + next_cursor?: string | null | undefined; + /** + * Platform-generated request ID for support correlation. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformAgentVersionsListResponse$inboundSchema: z.ZodType< + PlatformAgentVersionsListResponse, + z.ZodTypeDef, + unknown +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + results: z.array(PlatformAgentVersion$inboundSchema), + has_more: z.boolean(), + next_cursor: z.nullable(z.string()).optional(), + request_id: z.string(), + }) +); + +export function platformAgentVersionsListResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformAgentVersionsListResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentVersionsListResponse' from JSON`, + ); +} diff --git a/src/models/components/platformagentversionwithdefinition.ts b/src/models/components/platformagentversionwithdefinition.ts new file mode 100644 index 000000000..01d2ff6a2 --- /dev/null +++ b/src/models/components/platformagentversionwithdefinition.ts @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e99bc979c650 + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { PlatformAgent, PlatformAgent$inboundSchema } from "./platformagent.js"; + +/** + * A saved version of an agent and the complete agent it saved. + */ +export type PlatformAgentVersionWithDefinition = { + /** + * Opaque ID of the version, unique within the agent. It is not an ordinal; do not sort or compare IDs. + * + * @remarks + */ + version_id: string; + /** + * Name given to the version when it was created. + */ + display_name: string; + /** + * Time the version was created. + */ + created_at: Date; + /** + * An agent available to the authenticated user. + */ + agent: PlatformAgent; +}; + +/** @internal */ +export const PlatformAgentVersionWithDefinition$inboundSchema: z.ZodType< + PlatformAgentVersionWithDefinition, + z.ZodTypeDef, + unknown +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + version_id: z.string(), + display_name: z.string(), + created_at: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + agent: PlatformAgent$inboundSchema, + }) +); + +export function platformAgentVersionWithDefinitionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + PlatformAgentVersionWithDefinition$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformAgentVersionWithDefinition' from JSON`, + ); +} diff --git a/src/models/components/platformlistadminagentsresponse.ts b/src/models/components/platformlistadminagentsresponse.ts index 484700cae..8606a1dfa 100644 --- a/src/models/components/platformlistadminagentsresponse.ts +++ b/src/models/components/platformlistadminagentsresponse.ts @@ -14,7 +14,9 @@ import { PlatformAgent, PlatformAgent$inboundSchema } from "./platformagent.js"; */ export type PlatformListAdminAgentsResponse = { /** - * The agents on this page, ordered by name and then by agent_id. + * The agents on this page, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. + * + * @remarks */ results: Array; /** diff --git a/src/models/components/platformlistagentrunsresponse.ts b/src/models/components/platformlistagentrunsresponse.ts new file mode 100644 index 000000000..dd3e06f62 --- /dev/null +++ b/src/models/components/platformlistagentrunsresponse.ts @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 09f3c495fe67 + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + PlatformAgentRunSummary, + PlatformAgentRunSummary$inboundSchema, +} from "./platformagentrunsummary.js"; + +/** + * One page of the authenticated user's runs of an agent. + */ +export type PlatformListAgentRunsResponse = { + /** + * The runs on this page, newest first, ordered by created_at and then by run_id. + */ + results: Array; + /** + * Whether more runs are available after this page. + */ + has_more: boolean; + /** + * Opaque cursor for the next page; null or absent when has_more is false. + */ + next_cursor?: string | null | undefined; + /** + * Request identifier for correlating this response. + */ + request_id: string; +}; + +/** @internal */ +export const PlatformListAgentRunsResponse$inboundSchema: z.ZodType< + PlatformListAgentRunsResponse, + z.ZodTypeDef, + unknown +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + results: z.array(PlatformAgentRunSummary$inboundSchema), + has_more: z.boolean(), + next_cursor: z.nullable(z.string()).optional(), + request_id: z.string(), + }) +); + +export function platformListAgentRunsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlatformListAgentRunsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlatformListAgentRunsResponse' from JSON`, + ); +} diff --git a/src/models/components/platformlistdepartmentsresponse.ts b/src/models/components/platformlistdepartmentsresponse.ts index b1b05c08c..fc27664a0 100644 --- a/src/models/components/platformlistdepartmentsresponse.ts +++ b/src/models/components/platformlistdepartmentsresponse.ts @@ -17,7 +17,7 @@ import { */ export type PlatformListDepartmentsResponse = { /** - * The departments on this page, ordered by display_name and then by department_id. + * The departments on this page, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. * * @remarks */ diff --git a/src/models/components/platformlistidpgroupsresponse.ts b/src/models/components/platformlistidpgroupsresponse.ts index 41918de91..ef5b6d626 100644 --- a/src/models/components/platformlistidpgroupsresponse.ts +++ b/src/models/components/platformlistidpgroupsresponse.ts @@ -17,7 +17,7 @@ import { */ export type PlatformListIdpGroupsResponse = { /** - * The IdP groups on this page, ordered by display_name and then by idp_group_id. + * The IdP groups on this page, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. * * @remarks */ diff --git a/src/models/components/platformlistoauthclientsresponse.ts b/src/models/components/platformlistoauthclientsresponse.ts index 6b219e5ad..d0552b7b9 100644 --- a/src/models/components/platformlistoauthclientsresponse.ts +++ b/src/models/components/platformlistoauthclientsresponse.ts @@ -17,7 +17,9 @@ import { */ export type PlatformListOAuthClientsResponse = { /** - * The clients on this page, ordered by display_name and then by client_id. + * The clients on this page, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. + * + * @remarks */ results: Array; /** diff --git a/src/models/components/platformlistusersresponse.ts b/src/models/components/platformlistusersresponse.ts index 5c5ac2ea6..41e5a320d 100644 --- a/src/models/components/platformlistusersresponse.ts +++ b/src/models/components/platformlistusersresponse.ts @@ -14,7 +14,9 @@ import { PlatformUser, PlatformUser$inboundSchema } from "./platformuser.js"; */ export type PlatformListUsersResponse = { /** - * The users on this page, ordered by display_name and then by user_id. + * The users on this page, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. + * + * @remarks */ results: Array; /** diff --git a/src/models/components/platformtriggereventreason.ts b/src/models/components/platformtriggereventreason.ts index 805863476..d23b09a6d 100644 --- a/src/models/components/platformtriggereventreason.ts +++ b/src/models/components/platformtriggereventreason.ts @@ -80,6 +80,14 @@ export const PlatformTriggerEventReason = { * A comment thread on the item was resolved. */ CommentResolved: "COMMENT_RESOLVED", + /** + * A guest was added to the calendar event. + */ + CalendarGuestAdded: "CALENDAR_GUEST_ADDED", + /** + * A guest was removed from the calendar event. + */ + CalendarGuestRemoved: "CALENDAR_GUEST_REMOVED", } as const; /** * Why the event fired. diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 667823597..0ca679b0e 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -84,10 +84,15 @@ export * from "./platformagentscancelrun.js"; export * from "./platformagentscreaterun.js"; export * from "./platformagentscreaterunresponses.js"; export * from "./platformagentscreaterunstream.js"; +export * from "./platformagentscreateversion.js"; export * from "./platformagentsdelete.js"; +export * from "./platformagentsdeleteversion.js"; export * from "./platformagentsget.js"; export * from "./platformagentsgetrun.js"; export * from "./platformagentsgetschemas.js"; +export * from "./platformagentsgetversion.js"; +export * from "./platformagentslistruns.js"; +export * from "./platformagentslistversions.js"; export * from "./platformagentsupdate.js"; export * from "./platformchatcancel.js"; export * from "./platformchatcreate.js"; diff --git a/src/models/operations/platformagentscreateversion.ts b/src/models/operations/platformagentscreateversion.ts new file mode 100644 index 000000000..27a0002e3 --- /dev/null +++ b/src/models/operations/platformagentscreateversion.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 41d8da393111 + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; +import * as components from "../components/index.js"; + +export type PlatformAgentsCreateVersionRequest = { + /** + * ID of the agent to save a version of. + */ + agent_id: string; + platformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest; +}; + +/** @internal */ +export type PlatformAgentsCreateVersionRequest$Outbound = { + agent_id: string; + PlatformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest$Outbound; +}; + +/** @internal */ +export const PlatformAgentsCreateVersionRequest$outboundSchema: z.ZodType< + PlatformAgentsCreateVersionRequest$Outbound, + z.ZodTypeDef, + PlatformAgentsCreateVersionRequest +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + agent_id: z.string(), + platformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest$outboundSchema, + }).transform((v) => { + return remap$(v, { + platformAgentVersionCreateRequest: "PlatformAgentVersionCreateRequest", + }); + }) +); + +export function platformAgentsCreateVersionRequestToJSON( + platformAgentsCreateVersionRequest: PlatformAgentsCreateVersionRequest, +): string { + return JSON.stringify( + PlatformAgentsCreateVersionRequest$outboundSchema.parse( + platformAgentsCreateVersionRequest, + ), + ); +} diff --git a/src/models/operations/platformagentsdeleteversion.ts b/src/models/operations/platformagentsdeleteversion.ts new file mode 100644 index 000000000..473412027 --- /dev/null +++ b/src/models/operations/platformagentsdeleteversion.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 81dd4bd129ba + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; + +export type PlatformAgentsDeleteVersionRequest = { + /** + * ID of the agent. + */ + agent_id: string; + /** + * Opaque ID of the agent version to delete, as returned by List agent versions. + */ + version_id: string; +}; + +/** @internal */ +export type PlatformAgentsDeleteVersionRequest$Outbound = { + agent_id: string; + version_id: string; +}; + +/** @internal */ +export const PlatformAgentsDeleteVersionRequest$outboundSchema: z.ZodType< + PlatformAgentsDeleteVersionRequest$Outbound, + z.ZodTypeDef, + PlatformAgentsDeleteVersionRequest +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + agent_id: z.string(), + version_id: z.string(), + }) +); + +export function platformAgentsDeleteVersionRequestToJSON( + platformAgentsDeleteVersionRequest: PlatformAgentsDeleteVersionRequest, +): string { + return JSON.stringify( + PlatformAgentsDeleteVersionRequest$outboundSchema.parse( + platformAgentsDeleteVersionRequest, + ), + ); +} diff --git a/src/models/operations/platformagentsgetversion.ts b/src/models/operations/platformagentsgetversion.ts new file mode 100644 index 000000000..a02c6c837 --- /dev/null +++ b/src/models/operations/platformagentsgetversion.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c60d227d59c2 + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; + +export type PlatformAgentsGetVersionRequest = { + /** + * ID of the agent. + */ + agent_id: string; + /** + * Opaque ID of the agent version to retrieve, as returned by List agent versions. + */ + version_id: string; +}; + +/** @internal */ +export type PlatformAgentsGetVersionRequest$Outbound = { + agent_id: string; + version_id: string; +}; + +/** @internal */ +export const PlatformAgentsGetVersionRequest$outboundSchema: z.ZodType< + PlatformAgentsGetVersionRequest$Outbound, + z.ZodTypeDef, + PlatformAgentsGetVersionRequest +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + agent_id: z.string(), + version_id: z.string(), + }) +); + +export function platformAgentsGetVersionRequestToJSON( + platformAgentsGetVersionRequest: PlatformAgentsGetVersionRequest, +): string { + return JSON.stringify( + PlatformAgentsGetVersionRequest$outboundSchema.parse( + platformAgentsGetVersionRequest, + ), + ); +} diff --git a/src/models/operations/platformagentslistruns.ts b/src/models/operations/platformagentslistruns.ts new file mode 100644 index 000000000..9590f4e6d --- /dev/null +++ b/src/models/operations/platformagentslistruns.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: c4e7575bbbfa + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; + +export type PlatformAgentsListRunsRequest = { + /** + * ID of the agent whose runs should be listed. + */ + agent_id: string; + /** + * Maximum number of runs to return. Defaults to 50. Maximum is 100. + */ + page_size?: number | undefined; + /** + * Opaque pagination cursor from a previous response. Send it with the same agent_id that the previous request used. + * + * @remarks + */ + cursor?: string | undefined; +}; + +/** @internal */ +export type PlatformAgentsListRunsRequest$Outbound = { + agent_id: string; + page_size: number; + cursor?: string | undefined; +}; + +/** @internal */ +export const PlatformAgentsListRunsRequest$outboundSchema: z.ZodType< + PlatformAgentsListRunsRequest$Outbound, + z.ZodTypeDef, + PlatformAgentsListRunsRequest +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + agent_id: z.string(), + page_size: z.number().int().default(50), + cursor: z.string().optional(), + }) +); + +export function platformAgentsListRunsRequestToJSON( + platformAgentsListRunsRequest: PlatformAgentsListRunsRequest, +): string { + return JSON.stringify( + PlatformAgentsListRunsRequest$outboundSchema.parse( + platformAgentsListRunsRequest, + ), + ); +} diff --git a/src/models/operations/platformagentslistversions.ts b/src/models/operations/platformagentslistversions.ts new file mode 100644 index 000000000..71e4188a3 --- /dev/null +++ b/src/models/operations/platformagentslistversions.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: f9de64492e21 + */ + +import * as z from "zod/v3"; +import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; + +export type PlatformAgentsListVersionsRequest = { + /** + * ID of the agent whose versions to list. + */ + agent_id: string; + /** + * Maximum number of versions to return. Defaults to 20. Maximum is 50. + */ + page_size?: number | undefined; + /** + * Opaque pagination cursor returned as next_cursor by the previous page. + */ + cursor?: string | undefined; +}; + +/** @internal */ +export type PlatformAgentsListVersionsRequest$Outbound = { + agent_id: string; + page_size: number; + cursor?: string | undefined; +}; + +/** @internal */ +export const PlatformAgentsListVersionsRequest$outboundSchema: z.ZodType< + PlatformAgentsListVersionsRequest$Outbound, + z.ZodTypeDef, + PlatformAgentsListVersionsRequest +> = /* @__PURE__ */ lazySchema$(() => + z.object({ + agent_id: z.string(), + page_size: z.number().int().default(20), + cursor: z.string().optional(), + }) +); + +export function platformAgentsListVersionsRequestToJSON( + platformAgentsListVersionsRequest: PlatformAgentsListVersionsRequest, +): string { + return JSON.stringify( + PlatformAgentsListVersionsRequest$outboundSchema.parse( + platformAgentsListVersionsRequest, + ), + ); +} diff --git a/src/react-query/adminAgentsList.ts b/src/react-query/adminAgentsList.ts index be030ea43..399d3a308 100644 --- a/src/react-query/adminAgentsList.ts +++ b/src/react-query/adminAgentsList.ts @@ -57,7 +57,7 @@ export type AdminAgentsListQueryError = * List all agents * * @remarks - * List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + * List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. */ export function useAdminAgentsList( pageSize?: number | undefined, @@ -85,7 +85,7 @@ export function useAdminAgentsList( * List all agents * * @remarks - * List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + * List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. */ export function useAdminAgentsListSuspense( pageSize?: number | undefined, diff --git a/src/react-query/adminIdpgroupsList.ts b/src/react-query/adminIdpgroupsList.ts index 1ba05d215..bf1476a1b 100644 --- a/src/react-query/adminIdpgroupsList.ts +++ b/src/react-query/adminIdpgroupsList.ts @@ -57,7 +57,7 @@ export type AdminIdpgroupsListQueryError = * List IdP groups * * @remarks - * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. */ export function useAdminIdpgroupsList( pageSize?: number | undefined, @@ -85,7 +85,7 @@ export function useAdminIdpgroupsList( * List IdP groups * * @remarks - * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. */ export function useAdminIdpgroupsListSuspense( pageSize?: number | undefined, diff --git a/src/react-query/adminOauthClientsList.ts b/src/react-query/adminOauthClientsList.ts index 821beb162..9ac58186e 100644 --- a/src/react-query/adminOauthClientsList.ts +++ b/src/react-query/adminOauthClientsList.ts @@ -57,7 +57,7 @@ export type AdminOauthClientsListQueryError = * List OAuth clients * * @remarks - * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. */ export function useAdminOauthClientsList( pageSize?: number | undefined, @@ -88,7 +88,7 @@ export function useAdminOauthClientsList( * List OAuth clients * * @remarks - * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. */ export function useAdminOauthClientsListSuspense( pageSize?: number | undefined, diff --git a/src/react-query/agentsCreate.ts b/src/react-query/agentsCreate.ts index 54a1ff514..be0e0b535 100644 --- a/src/react-query/agentsCreate.ts +++ b/src/react-query/agentsCreate.ts @@ -50,7 +50,7 @@ export type AgentsCreateMutationError = * Create agent * * @remarks - * Create and publish an agent from its complete definition. + * Create an agent from its complete definition. The agent is published unless `draft` is true. */ export function useAgentsCreateMutation( options?: MutationHookOptions< diff --git a/src/react-query/agentsCreateVersion.ts b/src/react-query/agentsCreateVersion.ts new file mode 100644 index 000000000..aabeb59d3 --- /dev/null +++ b/src/react-query/agentsCreateVersion.ts @@ -0,0 +1,116 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 7e1c4e16cc45 + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { agentsCreateVersion } from "../funcs/agentsCreateVersion.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useGleanContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type AgentsCreateVersionMutationVariables = { + platformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest; + agentId: string; + options?: RequestOptions; +}; + +export type AgentsCreateVersionMutationData = + components.PlatformAgentVersionGetResponse; + +export type AgentsCreateVersionMutationError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Create agent version + * + * @remarks + * Save a complete agent as a named version without publishing it. The agent's published definition is unchanged. When the agent already has 50 saved versions, the oldest one is deleted. Requires permission to edit the agent. + */ +export function useAgentsCreateVersionMutation( + options?: MutationHookOptions< + AgentsCreateVersionMutationData, + AgentsCreateVersionMutationError, + AgentsCreateVersionMutationVariables + >, +): UseMutationResult< + AgentsCreateVersionMutationData, + AgentsCreateVersionMutationError, + AgentsCreateVersionMutationVariables +> { + const client = useGleanContext(); + return useMutation({ + ...buildAgentsCreateVersionMutation(client, options), + ...options, + }); +} + +export function mutationKeyAgentsCreateVersion(): MutationKey { + return ["@gleanwork/api-client", "agents", "createVersion"]; +} + +export function buildAgentsCreateVersionMutation( + client$: GleanCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: AgentsCreateVersionMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeyAgentsCreateVersion(), + mutationFn: function agentsCreateVersionMutationFn({ + platformAgentVersionCreateRequest, + agentId, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(agentsCreateVersion( + client$, + platformAgentVersionCreateRequest, + agentId, + mergedOptions, + )); + }, + }; +} diff --git a/src/react-query/agentsDeleteVersion.ts b/src/react-query/agentsDeleteVersion.ts new file mode 100644 index 000000000..950fc744f --- /dev/null +++ b/src/react-query/agentsDeleteVersion.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: fe1f61f15a95 + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { agentsDeleteVersion } from "../funcs/agentsDeleteVersion.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useGleanContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type AgentsDeleteVersionMutationVariables = { + agentId: string; + versionId: string; + options?: RequestOptions; +}; + +export type AgentsDeleteVersionMutationData = void; + +export type AgentsDeleteVersionMutationError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Delete agent version + * + * @remarks + * Delete a saved version of an agent. The agent itself is unchanged. Requires permission to edit the agent. + */ +export function useAgentsDeleteVersionMutation( + options?: MutationHookOptions< + AgentsDeleteVersionMutationData, + AgentsDeleteVersionMutationError, + AgentsDeleteVersionMutationVariables + >, +): UseMutationResult< + AgentsDeleteVersionMutationData, + AgentsDeleteVersionMutationError, + AgentsDeleteVersionMutationVariables +> { + const client = useGleanContext(); + return useMutation({ + ...buildAgentsDeleteVersionMutation(client, options), + ...options, + }); +} + +export function mutationKeyAgentsDeleteVersion(): MutationKey { + return ["@gleanwork/api-client", "agents", "deleteVersion"]; +} + +export function buildAgentsDeleteVersionMutation( + client$: GleanCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: AgentsDeleteVersionMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeyAgentsDeleteVersion(), + mutationFn: function agentsDeleteVersionMutationFn({ + agentId, + versionId, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(agentsDeleteVersion( + client$, + agentId, + versionId, + mergedOptions, + )); + }, + }; +} diff --git a/src/react-query/agentsGetVersion.core.ts b/src/react-query/agentsGetVersion.core.ts new file mode 100644 index 000000000..ffb0ec998 --- /dev/null +++ b/src/react-query/agentsGetVersion.core.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: e4866130b691 + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { agentsGetVersion } from "../funcs/agentsGetVersion.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type AgentsGetVersionQueryData = + components.PlatformAgentVersionGetResponse; + +export function prefetchAgentsGetVersion( + queryClient: QueryClient, + client$: GleanCore, + agentId: string, + versionId: string, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildAgentsGetVersionQuery( + client$, + agentId, + versionId, + options, + ), + }); +} + +export function buildAgentsGetVersionQuery( + client$: GleanCore, + agentId: string, + versionId: string, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeyAgentsGetVersion(agentId, versionId), + queryFn: async function agentsGetVersionQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(agentsGetVersion( + client$, + agentId, + versionId, + mergedOptions, + )); + }, + }; +} + +export function queryKeyAgentsGetVersion( + agentId: string, + versionId: string, +): QueryKey { + return ["@gleanwork/api-client", "agents", "getVersion", agentId, versionId]; +} diff --git a/src/react-query/agentsGetVersion.ts b/src/react-query/agentsGetVersion.ts new file mode 100644 index 000000000..70a5e0101 --- /dev/null +++ b/src/react-query/agentsGetVersion.ts @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 9927b890386b + */ + +import { + InvalidateQueryFilters, + QueryClient, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { useGleanContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; +import { + AgentsGetVersionQueryData, + buildAgentsGetVersionQuery, + prefetchAgentsGetVersion, + queryKeyAgentsGetVersion, +} from "./agentsGetVersion.core.js"; +export { + type AgentsGetVersionQueryData, + buildAgentsGetVersionQuery, + prefetchAgentsGetVersion, + queryKeyAgentsGetVersion, +}; + +export type AgentsGetVersionQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * Get agent version + * + * @remarks + * Retrieve a saved version of an agent, including the complete agent it saved. + */ +export function useAgentsGetVersion( + agentId: string, + versionId: string, + options?: QueryHookOptions< + AgentsGetVersionQueryData, + AgentsGetVersionQueryError + >, +): UseQueryResult { + const client = useGleanContext(); + return useQuery({ + ...buildAgentsGetVersionQuery( + client, + agentId, + versionId, + options, + ), + ...options, + }); +} + +/** + * Get agent version + * + * @remarks + * Retrieve a saved version of an agent, including the complete agent it saved. + */ +export function useAgentsGetVersionSuspense( + agentId: string, + versionId: string, + options?: SuspenseQueryHookOptions< + AgentsGetVersionQueryData, + AgentsGetVersionQueryError + >, +): UseSuspenseQueryResult< + AgentsGetVersionQueryData, + AgentsGetVersionQueryError +> { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildAgentsGetVersionQuery( + client, + agentId, + versionId, + options, + ), + ...options, + }); +} + +export function setAgentsGetVersionData( + client: QueryClient, + queryKeyBase: [agentId: string, versionId: string], + data: AgentsGetVersionQueryData, +): AgentsGetVersionQueryData | undefined { + const key = queryKeyAgentsGetVersion(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateAgentsGetVersion( + client: QueryClient, + queryKeyBase: TupleToPrefixes<[agentId: string, versionId: string]>, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gleanwork/api-client", + "agents", + "getVersion", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllAgentsGetVersion( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "agents", "getVersion"], + }); +} diff --git a/src/react-query/agentsListRuns.core.ts b/src/react-query/agentsListRuns.core.ts new file mode 100644 index 000000000..790fb34d9 --- /dev/null +++ b/src/react-query/agentsListRuns.core.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 6c2683987eee + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { agentsListRuns } from "../funcs/agentsListRuns.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type AgentsListRunsQueryData = components.PlatformListAgentRunsResponse; + +export function prefetchAgentsListRuns( + queryClient: QueryClient, + client$: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildAgentsListRunsQuery( + client$, + agentId, + pageSize, + cursor, + options, + ), + }); +} + +export function buildAgentsListRunsQuery( + client$: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: (context: QueryFunctionContext) => Promise; +} { + return { + queryKey: queryKeyAgentsListRuns(agentId, { pageSize, cursor }), + queryFn: async function agentsListRunsQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(agentsListRuns( + client$, + agentId, + pageSize, + cursor, + mergedOptions, + )); + }, + }; +} + +export function queryKeyAgentsListRuns( + agentId: string, + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, +): QueryKey { + return ["@gleanwork/api-client", "agents", "listRuns", agentId, parameters]; +} diff --git a/src/react-query/agentsListRuns.ts b/src/react-query/agentsListRuns.ts new file mode 100644 index 000000000..21baa3edc --- /dev/null +++ b/src/react-query/agentsListRuns.ts @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 0362dc62e5cf + */ + +import { + InvalidateQueryFilters, + QueryClient, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { useGleanContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; +import { + AgentsListRunsQueryData, + buildAgentsListRunsQuery, + prefetchAgentsListRuns, + queryKeyAgentsListRuns, +} from "./agentsListRuns.core.js"; +export { + type AgentsListRunsQueryData, + buildAgentsListRunsQuery, + prefetchAgentsListRuns, + queryKeyAgentsListRuns, +}; + +export type AgentsListRunsQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * List agent runs + * + * @remarks + * List the authenticated user's persisted runs of an agent, newest first. Each result holds run metadata only + */ +export function useAgentsListRuns( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: QueryHookOptions, +): UseQueryResult { + const client = useGleanContext(); + return useQuery({ + ...buildAgentsListRunsQuery( + client, + agentId, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +/** + * List agent runs + * + * @remarks + * List the authenticated user's persisted runs of an agent, newest first. Each result holds run metadata only + */ +export function useAgentsListRunsSuspense( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: SuspenseQueryHookOptions< + AgentsListRunsQueryData, + AgentsListRunsQueryError + >, +): UseSuspenseQueryResult { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildAgentsListRunsQuery( + client, + agentId, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +export function setAgentsListRunsData( + client: QueryClient, + queryKeyBase: [ + agentId: string, + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, + ], + data: AgentsListRunsQueryData, +): AgentsListRunsQueryData | undefined { + const key = queryKeyAgentsListRuns(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateAgentsListRuns( + client: QueryClient, + queryKeyBase: TupleToPrefixes< + [ + agentId: string, + parameters: { + pageSize?: number | undefined; + cursor?: string | undefined; + }, + ] + >, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "agents", "listRuns", ...queryKeyBase], + }); +} + +export function invalidateAllAgentsListRuns( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "agents", "listRuns"], + }); +} diff --git a/src/react-query/agentsListVersions.core.ts b/src/react-query/agentsListVersions.core.ts new file mode 100644 index 000000000..319fa684e --- /dev/null +++ b/src/react-query/agentsListVersions.core.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: a891c12d19aa + */ + +import { + QueryClient, + QueryFunctionContext, + QueryKey, +} from "@tanstack/react-query"; +import { GleanCore } from "../core.js"; +import { agentsListVersions } from "../funcs/agentsListVersions.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import { unwrapAsync } from "../types/fp.js"; +export type AgentsListVersionsQueryData = + components.PlatformAgentVersionsListResponse; + +export function prefetchAgentsListVersions( + queryClient: QueryClient, + client$: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): Promise { + return queryClient.prefetchQuery({ + ...buildAgentsListVersionsQuery( + client$, + agentId, + pageSize, + cursor, + options, + ), + }); +} + +export function buildAgentsListVersionsQuery( + client$: GleanCore, + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeyAgentsListVersions(agentId, { pageSize, cursor }), + queryFn: async function agentsListVersionsQueryFn( + ctx, + ): Promise { + const sig = combineSignals( + ctx.signal, + options?.signal, + options?.fetchOptions?.signal, + ); + const mergedOptions = { + ...options?.fetchOptions, + ...options, + signal: sig, + }; + + return unwrapAsync(agentsListVersions( + client$, + agentId, + pageSize, + cursor, + mergedOptions, + )); + }, + }; +} + +export function queryKeyAgentsListVersions( + agentId: string, + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, +): QueryKey { + return [ + "@gleanwork/api-client", + "agents", + "listVersions", + agentId, + parameters, + ]; +} diff --git a/src/react-query/agentsListVersions.ts b/src/react-query/agentsListVersions.ts new file mode 100644 index 000000000..6469d1e49 --- /dev/null +++ b/src/react-query/agentsListVersions.ts @@ -0,0 +1,159 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + * @generated-id: 1d6744aabb99 + */ + +import { + InvalidateQueryFilters, + QueryClient, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { GleanBaseError } from "../models/errors/gleanbaseerror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { useGleanContext } from "./_context.js"; +import { + QueryHookOptions, + SuspenseQueryHookOptions, + TupleToPrefixes, +} from "./_types.js"; +import { + AgentsListVersionsQueryData, + buildAgentsListVersionsQuery, + prefetchAgentsListVersions, + queryKeyAgentsListVersions, +} from "./agentsListVersions.core.js"; +export { + type AgentsListVersionsQueryData, + buildAgentsListVersionsQuery, + prefetchAgentsListVersions, + queryKeyAgentsListVersions, +}; + +export type AgentsListVersionsQueryError = + | errors.PlatformProblemDetailError + | GleanBaseError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError; + +/** + * List agent versions + * + * @remarks + * List saved versions of an agent, newest first. Requires permission to edit the agent. + */ +export function useAgentsListVersions( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: QueryHookOptions< + AgentsListVersionsQueryData, + AgentsListVersionsQueryError + >, +): UseQueryResult { + const client = useGleanContext(); + return useQuery({ + ...buildAgentsListVersionsQuery( + client, + agentId, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +/** + * List agent versions + * + * @remarks + * List saved versions of an agent, newest first. Requires permission to edit the agent. + */ +export function useAgentsListVersionsSuspense( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: SuspenseQueryHookOptions< + AgentsListVersionsQueryData, + AgentsListVersionsQueryError + >, +): UseSuspenseQueryResult< + AgentsListVersionsQueryData, + AgentsListVersionsQueryError +> { + const client = useGleanContext(); + return useSuspenseQuery({ + ...buildAgentsListVersionsQuery( + client, + agentId, + pageSize, + cursor, + options, + ), + ...options, + }); +} + +export function setAgentsListVersionsData( + client: QueryClient, + queryKeyBase: [ + agentId: string, + parameters: { pageSize?: number | undefined; cursor?: string | undefined }, + ], + data: AgentsListVersionsQueryData, +): AgentsListVersionsQueryData | undefined { + const key = queryKeyAgentsListVersions(...queryKeyBase); + + return client.setQueryData(key, data); +} + +export function invalidateAgentsListVersions( + client: QueryClient, + queryKeyBase: TupleToPrefixes< + [ + agentId: string, + parameters: { + pageSize?: number | undefined; + cursor?: string | undefined; + }, + ] + >, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: [ + "@gleanwork/api-client", + "agents", + "listVersions", + ...queryKeyBase, + ], + }); +} + +export function invalidateAllAgentsListVersions( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@gleanwork/api-client", "agents", "listVersions"], + }); +} diff --git a/src/react-query/agentsSearch.ts b/src/react-query/agentsSearch.ts index 9bd164a48..558c19900 100644 --- a/src/react-query/agentsSearch.ts +++ b/src/react-query/agentsSearch.ts @@ -50,7 +50,7 @@ export type AgentsSearchMutationError = * Search agents * * @remarks - * Search agents available to the authenticated user by agent name. + * Search agents available to the authenticated user by agent name. Results come one page at a time. When has_more is true, send next_cursor as cursor, with the same name, to get the next page. */ export function useAgentsSearchMutation( options?: MutationHookOptions< diff --git a/src/react-query/agentsUpdate.ts b/src/react-query/agentsUpdate.ts index 1a9ec5205..a949056c3 100644 --- a/src/react-query/agentsUpdate.ts +++ b/src/react-query/agentsUpdate.ts @@ -51,7 +51,7 @@ export type AgentsUpdateMutationError = * Update agent * * @remarks - * Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + * Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. */ export function useAgentsUpdateMutation( options?: MutationHookOptions< diff --git a/src/react-query/departmentsList.ts b/src/react-query/departmentsList.ts index 120a5b351..775f0f637 100644 --- a/src/react-query/departmentsList.ts +++ b/src/react-query/departmentsList.ts @@ -57,7 +57,7 @@ export type DepartmentsListQueryError = * List departments * * @remarks - * List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + * List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. */ export function useDepartmentsList( pageSize?: number | undefined, @@ -85,7 +85,7 @@ export function useDepartmentsList( * List departments * * @remarks - * List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + * List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. */ export function useDepartmentsListSuspense( pageSize?: number | undefined, diff --git a/src/react-query/index.ts b/src/react-query/index.ts index 3523da355..e8080cce2 100644 --- a/src/react-query/index.ts +++ b/src/react-query/index.ts @@ -15,10 +15,15 @@ export * from "./agentsCancelRun.js"; export * from "./agentsCreate.js"; export * from "./agentsCreateRun.js"; export * from "./agentsCreateRunStream.js"; +export * from "./agentsCreateVersion.js"; export * from "./agentsDelete.js"; +export * from "./agentsDeleteVersion.js"; export * from "./agentsGet.js"; export * from "./agentsGetRun.js"; export * from "./agentsGetSchemas.js"; +export * from "./agentsGetVersion.js"; +export * from "./agentsListRuns.js"; +export * from "./agentsListVersions.js"; export * from "./agentsRespondToRun.js"; export * from "./agentsSearch.js"; export * from "./agentsUpdate.js"; diff --git a/src/react-query/usersList.ts b/src/react-query/usersList.ts index 589d2a9d9..869694183 100644 --- a/src/react-query/usersList.ts +++ b/src/react-query/usersList.ts @@ -57,7 +57,7 @@ export type UsersListQueryError = * List users * * @remarks - * List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + * List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. */ export function useUsersList( pageSize?: number | undefined, @@ -84,7 +84,7 @@ export function useUsersList( * List users * * @remarks - * List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + * List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. */ export function useUsersListSuspense( pageSize?: number | undefined, diff --git a/src/sdk/adminagents.lazy.ts b/src/sdk/adminagents.lazy.ts index 9ea54da18..6fa46e598 100644 --- a/src/sdk/adminagents.lazy.ts +++ b/src/sdk/adminagents.lazy.ts @@ -31,7 +31,7 @@ export class AdminAgents extends ClientSDK { * List all agents * * @remarks - * List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + * List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/adminagents.ts b/src/sdk/adminagents.ts index eda0414a5..0e43803ae 100644 --- a/src/sdk/adminagents.ts +++ b/src/sdk/adminagents.ts @@ -13,7 +13,7 @@ export class AdminAgents extends ClientSDK { * List all agents * * @remarks - * List every agent in the workspace, ordered by name and then by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. + * List every agent in the workspace, ordered by name and then by agent_id. Only about the first 2 KB of a name is compared, less when agent_id is long, so names that share that leading part are ordered by agent_id. Each agent has the same shape that Get agent returns. Unlike agent search, the list does not depend on who an agent is shared with, so it includes private and disabled agents. Deleted agents are left out. Use the agent_id with other Platform APIs, for example as a usage limit target. The caller must be able to read all agents, administer agents, or read workspace billing. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/agents.lazy.ts b/src/sdk/agents.lazy.ts index 3ecd2a173..71f66417f 100644 --- a/src/sdk/agents.lazy.ts +++ b/src/sdk/agents.lazy.ts @@ -106,6 +106,24 @@ const agentsGetSchemas = )).then((module) => module.agentsGetSchemas(...args).$inspect()), )) as typeof import("../funcs/agentsGetSchemas.js").agentsGetSchemas; +let agentsListRuns$module: + | Promise + | undefined; +const agentsListRuns = + (( + ...args: Parameters< + typeof import("../funcs/agentsListRuns.js").agentsListRuns + > + ) => + new APIPromise( + (agentsListRuns$module ??= import("../funcs/agentsListRuns.js").catch( + (error: unknown) => { + agentsListRuns$module = undefined; + throw error; + }, + )).then((module) => module.agentsListRuns(...args).$inspect()), + )) as typeof import("../funcs/agentsListRuns.js").agentsListRuns; + let agentsCreateRun$module: | Promise | undefined; @@ -175,6 +193,75 @@ const agentsRespondToRun = })).then((module) => module.agentsRespondToRun(...args).$inspect()), )) as typeof import("../funcs/agentsRespondToRun.js").agentsRespondToRun; +let agentsListVersions$module: + | Promise + | undefined; +const agentsListVersions = + (( + ...args: Parameters< + typeof import("../funcs/agentsListVersions.js").agentsListVersions + > + ) => + new APIPromise( + (agentsListVersions$module ??= import("../funcs/agentsListVersions.js") + .catch((error: unknown) => { + agentsListVersions$module = undefined; + throw error; + })).then((module) => module.agentsListVersions(...args).$inspect()), + )) as typeof import("../funcs/agentsListVersions.js").agentsListVersions; + +let agentsCreateVersion$module: + | Promise + | undefined; +const agentsCreateVersion = + (( + ...args: Parameters< + typeof import("../funcs/agentsCreateVersion.js").agentsCreateVersion + > + ) => + new APIPromise( + (agentsCreateVersion$module ??= import("../funcs/agentsCreateVersion.js") + .catch((error: unknown) => { + agentsCreateVersion$module = undefined; + throw error; + })).then((module) => module.agentsCreateVersion(...args).$inspect()), + )) as typeof import("../funcs/agentsCreateVersion.js").agentsCreateVersion; + +let agentsGetVersion$module: + | Promise + | undefined; +const agentsGetVersion = + (( + ...args: Parameters< + typeof import("../funcs/agentsGetVersion.js").agentsGetVersion + > + ) => + new APIPromise( + (agentsGetVersion$module ??= import("../funcs/agentsGetVersion.js").catch( + (error: unknown) => { + agentsGetVersion$module = undefined; + throw error; + }, + )).then((module) => module.agentsGetVersion(...args).$inspect()), + )) as typeof import("../funcs/agentsGetVersion.js").agentsGetVersion; + +let agentsDeleteVersion$module: + | Promise + | undefined; +const agentsDeleteVersion = + (( + ...args: Parameters< + typeof import("../funcs/agentsDeleteVersion.js").agentsDeleteVersion + > + ) => + new APIPromise( + (agentsDeleteVersion$module ??= import("../funcs/agentsDeleteVersion.js") + .catch((error: unknown) => { + agentsDeleteVersion$module = undefined; + throw error; + })).then((module) => module.agentsDeleteVersion(...args).$inspect()), + )) as typeof import("../funcs/agentsDeleteVersion.js").agentsDeleteVersion; + let agentsCreateRunStream$module: | Promise | undefined; @@ -198,7 +285,7 @@ export class Agents extends ClientSDK { * Create agent * * @remarks - * Create and publish an agent from its complete definition. + * Create an agent from its complete definition. The agent is published unless `draft` is true. */ async create( request: components.PlatformAgentCreateRequest, @@ -215,7 +302,7 @@ export class Agents extends ClientSDK { * Search agents * * @remarks - * Search agents available to the authenticated user by agent name. + * Search agents available to the authenticated user by agent name. Results come one page at a time. When has_more is true, send next_cursor as cursor, with the same name, to get the next page. */ async search( request: components.PlatformAgentsSearchRequest, @@ -249,7 +336,7 @@ export class Agents extends ClientSDK { * Update agent * * @remarks - * Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + * Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. */ async update( platformAgentUpdateRequest: components.PlatformAgentUpdateRequest, @@ -300,6 +387,27 @@ export class Agents extends ClientSDK { )); } + /** + * List agent runs + * + * @remarks + * List the authenticated user's persisted runs of an agent, newest first. Each result holds run metadata only + */ + async listRuns( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsListRuns( + this, + agentId, + pageSize, + cursor, + options, + )); + } + /** * Create agent run * @@ -378,6 +486,85 @@ export class Agents extends ClientSDK { )); } + /** + * List agent versions + * + * @remarks + * List saved versions of an agent, newest first. Requires permission to edit the agent. + */ + async listVersions( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsListVersions( + this, + agentId, + pageSize, + cursor, + options, + )); + } + + /** + * Create agent version + * + * @remarks + * Save a complete agent as a named version without publishing it. The agent's published definition is unchanged. When the agent already has 50 saved versions, the oldest one is deleted. Requires permission to edit the agent. + */ + async createVersion( + platformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest, + agentId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsCreateVersion( + this, + platformAgentVersionCreateRequest, + agentId, + options, + )); + } + + /** + * Get agent version + * + * @remarks + * Retrieve a saved version of an agent, including the complete agent it saved. + */ + async getVersion( + agentId: string, + versionId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsGetVersion( + this, + agentId, + versionId, + options, + )); + } + + /** + * Delete agent version + * + * @remarks + * Delete a saved version of an agent. The agent itself is unchanged. Requires permission to edit the agent. + */ + async deleteVersion( + agentId: string, + versionId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsDeleteVersion( + this, + agentId, + versionId, + options, + )); + } + /** * Create a streaming agent run * diff --git a/src/sdk/agents.ts b/src/sdk/agents.ts index 336320222..d6025fd33 100644 --- a/src/sdk/agents.ts +++ b/src/sdk/agents.ts @@ -7,10 +7,15 @@ import { agentsCancelRun } from "../funcs/agentsCancelRun.js"; import { agentsCreate } from "../funcs/agentsCreate.js"; import { agentsCreateRun } from "../funcs/agentsCreateRun.js"; import { agentsCreateRunStream } from "../funcs/agentsCreateRunStream.js"; +import { agentsCreateVersion } from "../funcs/agentsCreateVersion.js"; import { agentsDelete } from "../funcs/agentsDelete.js"; +import { agentsDeleteVersion } from "../funcs/agentsDeleteVersion.js"; import { agentsGet } from "../funcs/agentsGet.js"; import { agentsGetRun } from "../funcs/agentsGetRun.js"; import { agentsGetSchemas } from "../funcs/agentsGetSchemas.js"; +import { agentsGetVersion } from "../funcs/agentsGetVersion.js"; +import { agentsListRuns } from "../funcs/agentsListRuns.js"; +import { agentsListVersions } from "../funcs/agentsListVersions.js"; import { agentsRespondToRun } from "../funcs/agentsRespondToRun.js"; import { agentsSearch } from "../funcs/agentsSearch.js"; import { agentsUpdate } from "../funcs/agentsUpdate.js"; @@ -25,7 +30,7 @@ export class Agents extends ClientSDK { * Create agent * * @remarks - * Create and publish an agent from its complete definition. + * Create an agent from its complete definition. The agent is published unless `draft` is true. */ async create( request: components.PlatformAgentCreateRequest, @@ -42,7 +47,7 @@ export class Agents extends ClientSDK { * Search agents * * @remarks - * Search agents available to the authenticated user by agent name. + * Search agents available to the authenticated user by agent name. Results come one page at a time. When has_more is true, send next_cursor as cursor, with the same name, to get the next page. */ async search( request: components.PlatformAgentsSearchRequest, @@ -76,7 +81,7 @@ export class Agents extends ClientSDK { * Update agent * * @remarks - * Update and publish an agent. Supplied fields replace their saved values and omitted fields are kept. + * Update an agent. Supplied fields replace their saved values, and omitted fields are kept. Updates to a published agent are published. Updates to a draft agent stay in its draft until `draft` is false. */ async update( platformAgentUpdateRequest: components.PlatformAgentUpdateRequest, @@ -127,6 +132,27 @@ export class Agents extends ClientSDK { )); } + /** + * List agent runs + * + * @remarks + * List the authenticated user's persisted runs of an agent, newest first. Each result holds run metadata only + */ + async listRuns( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsListRuns( + this, + agentId, + pageSize, + cursor, + options, + )); + } + /** * Create agent run * @@ -205,6 +231,85 @@ export class Agents extends ClientSDK { )); } + /** + * List agent versions + * + * @remarks + * List saved versions of an agent, newest first. Requires permission to edit the agent. + */ + async listVersions( + agentId: string, + pageSize?: number | undefined, + cursor?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsListVersions( + this, + agentId, + pageSize, + cursor, + options, + )); + } + + /** + * Create agent version + * + * @remarks + * Save a complete agent as a named version without publishing it. The agent's published definition is unchanged. When the agent already has 50 saved versions, the oldest one is deleted. Requires permission to edit the agent. + */ + async createVersion( + platformAgentVersionCreateRequest: + components.PlatformAgentVersionCreateRequest, + agentId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsCreateVersion( + this, + platformAgentVersionCreateRequest, + agentId, + options, + )); + } + + /** + * Get agent version + * + * @remarks + * Retrieve a saved version of an agent, including the complete agent it saved. + */ + async getVersion( + agentId: string, + versionId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsGetVersion( + this, + agentId, + versionId, + options, + )); + } + + /** + * Delete agent version + * + * @remarks + * Delete a saved version of an agent. The agent itself is unchanged. Requires permission to edit the agent. + */ + async deleteVersion( + agentId: string, + versionId: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(agentsDeleteVersion( + this, + agentId, + versionId, + options, + )); + } + /** * Create a streaming agent run * diff --git a/src/sdk/clients.lazy.ts b/src/sdk/clients.lazy.ts index d484c6cdb..3db265920 100644 --- a/src/sdk/clients.lazy.ts +++ b/src/sdk/clients.lazy.ts @@ -49,7 +49,7 @@ export class Clients extends ClientSDK { * List OAuth clients * * @remarks - * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/clients.ts b/src/sdk/clients.ts index c6bfaa2cc..e3b81fc0a 100644 --- a/src/sdk/clients.ts +++ b/src/sdk/clients.ts @@ -14,7 +14,7 @@ export class Clients extends ClientSDK { * List OAuth clients * * @remarks - * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. + * List the static OAuth clients that admins created for this workspace, ordered by display_name and then by client_id. Only about the first 2 KB of a name is compared, less when client_id is long, so names that share that leading part are ordered by client_id. Dynamically registered clients and Glean's own clients, such as Glean Desktop, are not listed. Disabled clients are left out unless an is_enabled filter includes the value "false". Use filters to find clients by name, client_id, usage_client_id, LLM Gateway access, or supported app. To set a usage limit for a client, send its ai_gateway.usage_client_id, not its client_id, to the usage APIs. The caller needs admin read or billing read permission. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/departments.lazy.ts b/src/sdk/departments.lazy.ts index a20de3e4a..afb319f11 100644 --- a/src/sdk/departments.lazy.ts +++ b/src/sdk/departments.lazy.ts @@ -49,7 +49,7 @@ export class Departments extends ClientSDK { * List departments * * @remarks - * List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + * List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/departments.ts b/src/sdk/departments.ts index ba279cc50..b658c0a1a 100644 --- a/src/sdk/departments.ts +++ b/src/sdk/departments.ts @@ -14,7 +14,7 @@ export class Departments extends ClientSDK { * List departments * * @remarks - * List the departments in the Glean directory, ordered by display_name and then by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. + * List the departments in the Glean directory, ordered by display_name and then by department_id. Only about the first 2 KB of a name is compared, less when department_id is long, so names that share that leading part are ordered by department_id. The list includes every department that at least one user belongs to or that a usage limit names, so a caller can show the name of a department that a usage limit still names after its users leave it. Department names are exact, so names that differ only by case are different departments. Send a name filter to return only the departments whose display_name contains a value. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/idpgroups.lazy.ts b/src/sdk/idpgroups.lazy.ts index 7d2130416..2cb174fee 100644 --- a/src/sdk/idpgroups.lazy.ts +++ b/src/sdk/idpgroups.lazy.ts @@ -47,7 +47,7 @@ export class Idpgroups extends ClientSDK { * List IdP groups * * @remarks - * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/idpgroups.ts b/src/sdk/idpgroups.ts index 602b98e38..8061b0708 100644 --- a/src/sdk/idpgroups.ts +++ b/src/sdk/idpgroups.ts @@ -14,7 +14,7 @@ export class Idpgroups extends ClientSDK { * List IdP groups * * @remarks - * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. + * List the identity provider (IdP) groups that Glean loads from the directory, ordered by display_name and then by idp_group_id. Only about the first 2 KB of a name is compared, less when idp_group_id is long, so names that share that leading part are ordered by idp_group_id. Use idp_group_id to name a group in other Platform APIs, such as the usage limit evaluation and limit increase request APIs. Usage limits apply only to IdP groups from the datasource instance in usage_settings.user_grouping.idp_group_provider_instance of the get usage settings response, and this API always lists that instance's groups. To list only those groups, pass that value in a provider_instance filter of the filters parameter, for example `filters=[{"field":"provider_instance","operator":"EQUALS","values":["okta"]}]`, URL-encoded as `filters=%5B%7B%22field%22%3A%22provider_instance%22%2C%22operator%22%3A%22EQUALS%22%2C%22values%22%3A%5B%22okta%22%5D%7D%5D`. Send a provider filter to list only one provider's groups, and a name filter to list only the groups whose display_name contains a value. Internal O365 ownership groups and SharePoint groups are left out. The caller must be able to read the workspace configuration or the workspace billing. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/users.lazy.ts b/src/sdk/users.lazy.ts index cdc086d6e..6d5c08bbb 100644 --- a/src/sdk/users.lazy.ts +++ b/src/sdk/users.lazy.ts @@ -39,7 +39,7 @@ export class Users extends ClientSDK { * List users * * @remarks - * List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + * List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. */ async list( pageSize?: number | undefined, diff --git a/src/sdk/users.ts b/src/sdk/users.ts index c04e590cc..a581b6a10 100644 --- a/src/sdk/users.ts +++ b/src/sdk/users.ts @@ -14,7 +14,7 @@ export class Users extends ClientSDK { * List users * * @remarks - * List the users in the Glean directory, ordered by display_name and then by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. + * List the users in the Glean directory, ordered by display_name and then by user_id. Only about the first 2 KB of a name is compared, less when user_id is long, so names that share that leading part are ordered by user_id. The list includes the same people as the Glean People directory. Filter by name, email, manager_id, or department_id to find specific users. Use the returned user_id values with other Platform APIs, for example as usage limit targets. */ async list( pageSize?: number | undefined,