diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 49e59a2b..a363546f 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: 1d1c4c798b764226bfeeae4268f907c1 + docChecksum: ad6eb58334f497f3629d2f74601cfc13 docVersion: 0.9.0 - speakeasyVersion: 1.792.0 - generationVersion: 2.927.0 - releaseVersion: 0.15.5 - configChecksum: 2d7eb6b1e296b48ffc7d66cf6e6b21cd + speakeasyVersion: 1.795.0 + generationVersion: 2.931.0 + releaseVersion: 0.16.0 + configChecksum: 305d1b3865da828cf96c1c98829ad9ba repoURL: https://github.com/gleanwork/api-client-python.git installationURL: https://github.com/gleanwork/api-client-python.git published: true persistentEdits: - generation_id: 2c6b40a9-5bf5-4774-9389-0275aa4de10b - pristine_commit_hash: 9d93e89051da150d3c7ed6e5acb2fc862affb253 - pristine_tree_hash: f94026f8e759a799c60bb7b8c2b8fac16e8400a6 + generation_id: ff649fa3-dddb-4ac4-bf73-fd6f02973039 + pristine_commit_hash: 4af65e2f24c75072b0046ae1696dd6e3a65debb8 + pristine_tree_hash: b3bc537535faa3d20f6b7a8dac73411cfc565ebb features: python: acceptHeaders: 3.0.0 @@ -21,7 +21,7 @@ features: additionalProperties: 1.0.2 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.35 + core: 6.1.0 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 devContainers: 3.0.0 @@ -36,6 +36,7 @@ features: globalSecurityFlattening: 1.0.0 globalServerURLs: 3.2.1 groups: 3.0.1 + inputOutputModels: 3.0.0 methodArguments: 1.1.1 methodServerURLs: 3.1.2 mockServer: 0.1.4 @@ -43,10 +44,10 @@ features: nameOverrides: 3.0.3 nullables: 1.0.2 responseFormat: 1.1.0 - retries: 3.0.7 + retries: 3.1.0 sdkHooks: 1.3.0 tests: 1.19.10 - unions: 3.1.8 + unions: 3.1.9 uploadStreams: 1.0.3 trackedFiles: .devcontainer/README.md: @@ -459,12 +460,16 @@ trackedFiles: pristine_git_object: 58af4f277fb9df54ac00672daccab0a9de5ef85f docs/models/calendarevent.md: id: 9e2312fab53f - last_write_checksum: sha1:ab74d1fc0dae4709bce9315595b2e0540db47d49 - pristine_git_object: 91c8c22a8b8193d6390213ea3b67c6063b605084 + last_write_checksum: sha1:c2de9681ec86517396f9cc8a33510f4f3eabf801 + pristine_git_object: 077d4b46088935902b373240047029acb7cbe778 docs/models/calendareventeventtype.md: id: d46158398e36 last_write_checksum: sha1:086fce57b60cd539b9ab120f24055d3d5388959a pristine_git_object: d477e13e31d8af9e32a0b71dfaa896fad33b3c8a + docs/models/calendarroombookingstatus.md: + id: 13dcf29d9ff0 + last_write_checksum: sha1:ef6d2c2a8a35236862b39153ca4ef12eac8e9e75 + pristine_git_object: a26d6c42b17422f9446c26dd26d6cea5d0d7d41b docs/models/canonicalizingregextype.md: id: 7fbd76463a36 last_write_checksum: sha1:8a160bf9d8941da21f49dcdcd60dca736abe56c6 @@ -1403,8 +1408,8 @@ trackedFiles: pristine_git_object: a851a7f13eb25d515fa9b9244c5dfdc98fa14e2c docs/models/feedrequestcategory.md: id: 31a02f3064c7 - last_write_checksum: sha1:63f6abf5e4f5048535b7767274c8a18176020427 - pristine_git_object: c3eab96e8f64c7ed1323eaf2c292c044db933f71 + last_write_checksum: sha1:e377f827763a348ab5dce9ad4b795b4481b8aba9 + pristine_git_object: 35d5beb1e75476d726e4106beba705ecb46b9228 docs/models/feedrequestoptions.md: id: 58eb26b19e77 last_write_checksum: sha1:fd2ab08736cef8156169b0cfee8c52e7aed1accf @@ -1419,12 +1424,12 @@ trackedFiles: pristine_git_object: 7f3ded753911005508191be31592746cef1c2781 docs/models/feedresult.md: id: 4b67dc1cea64 - last_write_checksum: sha1:6781234248531681b38a1394afc7a62438440758 - pristine_git_object: f14153ca4fc73e08d620714d4ed5ef2c0bad05c5 + last_write_checksum: sha1:9257ff8b3d935716255b221c801b7e080b31f580 + pristine_git_object: f6f92abf16b61f88b527e1c906f605e98306878e docs/models/feedresultcategory.md: id: a5f77f38d0a7 - last_write_checksum: sha1:2bfa3af25a938fbbc55b12b94d555f4b95517986 - pristine_git_object: c27f4b3b80f6c54cb0fe407dc9151821aad91a2e + last_write_checksum: sha1:141ed36910bee33d07acc055181eeb9a9e25087d + pristine_git_object: 3689b4f8adf4ec869de90b6bff497b52b474f877 docs/models/fieldscope.md: id: e6b52bcb22a6 last_write_checksum: sha1:13a1492ce39d2f89a01d626996a345a1339a1873 @@ -1811,8 +1816,8 @@ trackedFiles: pristine_git_object: 92e666de5f7156588d4dbaa09b36fec6e8f2403e docs/models/input.md: id: 5cbc446a3956 - last_write_checksum: sha1:21bbe04c0f6ee4212e9cb7a56a4697391d0b8800 - pristine_git_object: 3df083089f7f6f344f710748aae75582955e7e71 + last_write_checksum: sha1:edb11fdd84b602cb02ed2ca9e3a54e664bfafb17 + pristine_git_object: c54bec05e2353c4d45c272873e3d645b333a2d7e docs/models/inputoptions.md: id: 138e423f4a10 last_write_checksum: sha1:35aa8de6835bef5a294ef685f6480529f55f26f6 @@ -1871,8 +1876,8 @@ trackedFiles: pristine_git_object: 647f9bb67a6af30d7fd71c8ddb3c5e1bf40bb938 docs/models/justificationtype.md: id: 8286affacee4 - last_write_checksum: sha1:02dcd2b35c40d2f4c5435e0724cb13efabbe9a9e - pristine_git_object: cff9e6dd34fd05679bdc9629b86bb9b4d9577436 + last_write_checksum: sha1:1e0a5598956da7c0d5e59c76ab6f8552320c7453 + pristine_git_object: c8bb723f4aebb242cdd3ae1af36dc2874cb1543c docs/models/knowledgetype.md: id: 1e0c90679228 last_write_checksum: sha1:0030a7539b9362bbb59e0bbd36580676058b3540 @@ -2083,8 +2088,8 @@ trackedFiles: pristine_git_object: b1cd1e56279e4db030fc140598c10231ff311137 docs/models/object.md: id: 7ffe67d0b83f - last_write_checksum: sha1:cfed269f495144bd4a6de8da4b0bef46f7911d72 - pristine_git_object: fedbfbb5b542f5d5c91327b32225a0c18d3eca68 + last_write_checksum: sha1:f0d75b529d5e6940235cd6e8bff91249c97f8f07 + pristine_git_object: 06f80d51f75580152f7992a7b7dc76cda72db346 docs/models/objectdefinition.md: id: 11daa0bec25f last_write_checksum: sha1:6990618d91fdb10bba60313d1b94e1f1be0dcc24 @@ -2203,8 +2208,8 @@ trackedFiles: pristine_git_object: a24b8b95237035cda5ff134a9c0cc3bb601e06d7 docs/models/placementreason.md: id: e3d1cdfcf2b5 - last_write_checksum: sha1:f4720f3ce89ed29c92e2bd0aa15169ccc428bafd - pristine_git_object: 515cd010b7035e35f410e715d18da9c175d18e89 + last_write_checksum: sha1:20993a6ca9e751a4d3aa46f8f84f03fc00348d53 + pristine_git_object: f17278f2ff7680bcda387e90fb710196973b281c docs/models/platformactionsummary.md: id: 66630faec49a last_write_checksum: sha1:918357358bb6dd6840b6ef69e9bbfc05620f3eda @@ -2275,8 +2280,8 @@ trackedFiles: pristine_git_object: e15e66b29879dd3b3686d9faf64bce2bf40367b5 docs/models/platformchatcitationannotationtype.md: id: 5a3d664a4de0 - last_write_checksum: sha1:fa9bf18e32084d55a086f56c361162903b9d7eb0 - pristine_git_object: e3bd53ef1230ec9539fae60f8dbcfd7137be015f + last_write_checksum: sha1:a83dc5f7153c2ff2f9182814a510d30f4db79edd + pristine_git_object: 8b83f20e7d35a28336d2ba64a7ef200f13d552c6 docs/models/platformchatcitationsnippet.md: id: c06b44710f50 last_write_checksum: sha1:23d5a1e3a551da8805c66df5f1f5854edd42f997 @@ -2291,12 +2296,12 @@ trackedFiles: pristine_git_object: 34af8ff1c4add0e01b27c73bb654ba7c32433860 docs/models/platformchatcompletedresponsestatus.md: id: f52ac98c71f7 - last_write_checksum: sha1:d86828d0116f982a35bbbad563f5f536a176257b - pristine_git_object: 904a9c8af84b218e1531be2907087fefdb0fb516 + last_write_checksum: sha1:08119b0731b552212f11f6f657a933cd06d9daec + pristine_git_object: 8bed3e0696e7a1665d1fc1ef77e883aa51affcb1 docs/models/platformchatcreaterequest.md: id: cd33a9dfda85 - last_write_checksum: sha1:e7b60df8a893f94b2c4e91d8c48ca634e6ee3965 - pristine_git_object: 6b00a961af3ae11b028ef12e4dcb5d66f059987d + last_write_checksum: sha1:a7d397ede45f0f7fd3332236f19e7bfe0f916f5a + pristine_git_object: f37f1031bb6bf575329284f2c5c9426194d0eca1 docs/models/platformchatcreateresponse.md: id: d07ae96f238d last_write_checksum: sha1:2e27d36585ba58fc31cff8823ea1b6ba5203dd57 @@ -2307,8 +2312,8 @@ trackedFiles: pristine_git_object: 8631370028a7c5005205ac7f2a6deb35691bde9e docs/models/platformchatcustomentitysourcetype.md: id: 4a2f676cfbbf - last_write_checksum: sha1:f9d3d784b8345805e7da76d170aad7ae1a2ce565 - pristine_git_object: 67daadbc2301f12e55042279884712c6dce55aff + last_write_checksum: sha1:97187241129d869f4eeb58fbb00fc0df7fdb146e + pristine_git_object: 5f5b4fc6a9d3a1d27f2d4705173376c15ed71e9f docs/models/platformchatdocumentsource.md: id: 953dce7a7ae9 last_write_checksum: sha1:db9abd75c816fff5a3726568415a64b6024336a9 @@ -2323,56 +2328,56 @@ trackedFiles: pristine_git_object: 1b8f64e4c598febb186b9a5552ca6827daf09b60 docs/models/platformchatdocumentsourcetype1.md: id: 47c9b6b27f95 - last_write_checksum: sha1:d63b162e3b63e3a835d8fc35c8bf25cdfc806acf - pristine_git_object: 60cb54d7cbc72e463642a8f7897741b5d9a85dc4 + last_write_checksum: sha1:ea69403c15356c2edcb66e3bbf405c90b9892496 + pristine_git_object: 81404bd87eb8e842cb795c315d1425c2841d3acf docs/models/platformchatdocumentsourcetype2.md: id: 4bd893a73267 - last_write_checksum: sha1:418c77b0474def8a736d26b49d0abb6aa24dbc77 - pristine_git_object: 1fd2304902ee5390e7b2194481d599f640884139 + last_write_checksum: sha1:920bce6ed056ceb6e7958e0be8620ef2ff4f6e31 + pristine_git_object: 30967f4550b07d4dc49b041428597bc44b56731f docs/models/platformchatfilesource.md: id: b64eca888132 last_write_checksum: sha1:88e87ca14737f8d3166da647fbb1313fdacad945 pristine_git_object: f18a6c67730ad51ee22272a20c75e9be0a5e3745 docs/models/platformchatfilesourcetype.md: id: 5d5aa5197a97 - last_write_checksum: sha1:b77d67df65d98faa83f7685ff7a52d53490113e7 - pristine_git_object: 156db8e2059f401f7452bcb57453ea18c26b01ab + last_write_checksum: sha1:3c2addfc1c2334452e8c420b7a0535f1179a8ecb + pristine_git_object: eccc6d3a144cf818a082a0f8761d820e32e41d93 docs/models/platformchatinputmessage.md: id: c9769df9aff9 last_write_checksum: sha1:bf167f7b171a561dfc3713b0d524135d05229809 pristine_git_object: d69e40b0db035b7e3f05be03d64a5149324d8261 docs/models/platformchatinputmessagerole.md: id: 0b46bce28b93 - last_write_checksum: sha1:6afb0dadbd6de522e699f2005572a6755f4cbde6 - pristine_git_object: b756fc9543f34a0104eb9c3f1f9ab2901a23a4a8 + last_write_checksum: sha1:f48e66526e0a2167b36ca51042ccd0df50b1c59c + pristine_git_object: cdf92876978850841d258d07db48586891089897 docs/models/platformchatoutputmessage.md: id: d236a3fe09a2 last_write_checksum: sha1:be7029860368e4db9a914916e2e2617f233f24aa pristine_git_object: a931e573200b0863e0902d8fef8bf77032a13643 docs/models/platformchatoutputmessagerole.md: id: 50ec5e5c605b - last_write_checksum: sha1:2c85de61ff192dfdb6252747be2a367cfd8cc1ea - pristine_git_object: 7f8dc49418efa328521e2f64cb622279b81511be + last_write_checksum: sha1:abf7f0886f60b8c18568e07d4cc1aecd9833360d + pristine_git_object: 07e97be111d2ee7924ce0295af12e5dfe2f668f1 docs/models/platformchatoutputmessagetype.md: id: f19e88fb1997 - last_write_checksum: sha1:0db13db8e85a17ffbf000e5984548b5ebb93f09c - pristine_git_object: 8e2d0020a502eef1249ce19d1dcdcc4f696e571d + last_write_checksum: sha1:03bd4ec00c5fd4668246640263bc0eb4cd5ed319 + pristine_git_object: c14068505b05003de4e946a3418828950b15479a docs/models/platformchatoutputtextcontent.md: id: fd2f6a03da55 last_write_checksum: sha1:c72902588f7531a39f1783e29433709cfe157a7a pristine_git_object: 1ea074b5e646042d60c921c8d3351e31bc0ccde2 docs/models/platformchatoutputtextcontenttype.md: id: 2eca715382a5 - last_write_checksum: sha1:0fc8d0cde4553b138b2e2c9f131faaa478faeb09 - pristine_git_object: 05886daacc0a2814c0d1609ebb4d6eaf2f40f5d9 + last_write_checksum: sha1:89991c8d41e18cda29836b95477f9d6fc9919f58 + pristine_git_object: 2f8f45b28775f40b8b5014f1d056f6699de24a70 docs/models/platformchatpersonsource.md: id: 779c60aeabfb last_write_checksum: sha1:bbb6d30600c5b18a2b6e286f878fc721a8e81d94 pristine_git_object: c42d99e3556e5c16dbf32d1b37677dd04305c15a docs/models/platformchatpersonsourcetype.md: id: e514ca59ade7 - last_write_checksum: sha1:56015a25be5c0c7f8c345250cb3d1c90760fc0c7 - pristine_git_object: 3c36b121d3dff43a7665ca2a1ff1dcc6d3682789 + last_write_checksum: sha1:e0856c009120a4df0c15efccdb17b7474ba9fcd7 + pristine_git_object: 4648aec0ab515b868f019c2d399cd3a45f34472c docs/models/platformcontenttype.md: id: a9175ad4799d last_write_checksum: sha1:abb012a639cead86824ed11e596bda3632e2fddb @@ -2633,6 +2638,146 @@ trackedFiles: id: c37b2e815a8d last_write_checksum: sha1:31db2f83dba4ccb6d0a5e7b80edbeff356529101 pristine_git_object: ff19123b19a2dd81301974a38d793afff935e9aa + docs/models/platformtrigger.md: + id: 63c7d9d07b1e + last_write_checksum: sha1:f55b6593fd7f00c3df7394d5cc3fc23f94a2f13b + pristine_git_object: f3e02df0d523c38f7a6727684963c42435b03d98 + docs/models/platformtriggerauth.md: + id: 1f1c930b21ad + last_write_checksum: sha1:c57fd544e86a1adb75decbc227ddf20e93317540 + pristine_git_object: 3ac3da2d8ed1ad9de00cf2afe2a5590ce1df4012 + docs/models/platformtriggerauthoutput.md: + id: d6e1359e1170 + last_write_checksum: sha1:57bc2525ff4f3a9afe1a944f53effe40d4fdd13a + pristine_git_object: a83975e6de80ed4574f5cff5bf3e498f4d0fd7a4 + docs/models/platformtriggerauthtype.md: + id: d6871997fb2e + last_write_checksum: sha1:a2f8310ce492a5fd323327b3ffa7dfc89518477f + pristine_git_object: 18bca2b77d8e18020179f4ee8fc95062981b9f33 + docs/models/platformtriggercreaterequest.md: + id: ef6b7277f869 + last_write_checksum: sha1:cf4de4fa21dbc989b10da6f32fb9df8d1e89c78d + pristine_git_object: 1ac177d170aecdf5ef1f9360560e87a26e9223c0 + docs/models/platformtriggercreateresponse.md: + id: 5dafc492951e + last_write_checksum: sha1:9cec8887a26a76a2330d3f2268761bf28f9b9611 + pristine_git_object: 3a9417a890de473ee9893c5925b3d2507fb05764 + docs/models/platformtriggerdelivery.md: + id: a50bc1969699 + last_write_checksum: sha1:09f3d428fc5f47d3d45c1a892fde6c2afc461782 + pristine_git_object: 8aeb685468c00009e1f68e82d2c18fbaa7e94120 + docs/models/platformtriggerdeliveryoutput.md: + id: 8c7a53433836 + last_write_checksum: sha1:c640d7bab17fb190fc9ffe0c78da8565890aaebf + pristine_git_object: 1b7ab7c26ba88fe86443715c2dde3182cfa0b7e1 + docs/models/platformtriggerevent.md: + id: 8c1265454530 + last_write_checksum: sha1:b9def159fe60a279c711b224cada900af6ce82b3 + pristine_git_object: 931bb314a673759a9f82a26c6a1ca9f9a1fb5d1c + docs/models/platformtriggereventreason.md: + id: d3b45140acfa + last_write_checksum: sha1:367bbc029e25edc8d3ac0024ec8bb759fa71af04 + pristine_git_object: e3c221b823b661eb933566e99c49ab8d9c76f750 + docs/models/platformtriggereventsearchrequest.md: + id: 29860dfa66e9 + last_write_checksum: sha1:dd92227615d8d7aa8908fbe20c5e1e4897f68fbd + pristine_git_object: c81ec61cbc253194973a912a240fc15ea018bbca + docs/models/platformtriggereventsearchresponse.md: + id: e9afba1cf9e7 + last_write_checksum: sha1:e6a3cd44cb28803c2288ec5d4971b984301efe17 + pristine_git_object: 7aff8cbe0bd9dc10e50eb02b130b4a3789a1d933 + docs/models/platformtriggereventtype.md: + id: fb6dc1525a69 + last_write_checksum: sha1:bd1102eabcb5449113e66e1e7470877275808b58 + pristine_git_object: 09a8a1e835a8bae6767446e23bd5dc6578f85b25 + docs/models/platformtriggergetresponse.md: + id: 77ecfe35a196 + last_write_checksum: sha1:da6a967ab0cbffba82094731084586d3e664509a + pristine_git_object: 2f3a0c491cdda17c6fde095e1bd30f33abf7b753 + docs/models/platformtriggerlistresponse.md: + id: 4a6ccfef2b35 + last_write_checksum: sha1:277bf462a0b0309ce564b8797d3db45168af7d6a + pristine_git_object: e4980bf508355f6bc7d593da278d5132f54255d2 + docs/models/platformtriggerpreset.md: + id: 769ffcf2051b + last_write_checksum: sha1:72de9e96bab36ce641e9a1154be80f69978f60ee + pristine_git_object: d33769146731607a414d607f35f45f9cdc0e3dde + docs/models/platformtriggerpreseteventsearchrequest.md: + id: 1a8922142a34 + last_write_checksum: sha1:3e85055c157588f14882df6b604d4f98353545c1 + pristine_git_object: 3ae9d5273cf0689bba316d4a94f9d25653376566 + docs/models/platformtriggerpresetgetresponse.md: + id: 19121824b568 + last_write_checksum: sha1:ded9f8a90fccdcb3b00b272733dfab69311aa7b8 + pristine_git_object: cca8734b87a0afa34b048f156c37862218110b54 + docs/models/platformtriggerpresetinput.md: + id: b092c1006740 + last_write_checksum: sha1:5ab60cfecc9cc80d165e2cf5dc6723741398011e + pristine_git_object: aeb4fc2e8aa63705e3e872214d12dbe6af210e10 + docs/models/platformtriggerpresetinputtype.md: + id: 4d704bfa30e4 + last_write_checksum: sha1:0d71f75a1d403f799c409428d80c48e1939cba2d + pristine_git_object: 4b454180e464205fd17f51ec1d2adf60104fb054 + docs/models/platformtriggerpresetinputvalue.md: + id: "9736363254e3" + last_write_checksum: sha1:ec1da24fd407094a2de63083a33a6d612da8e929 + pristine_git_object: cd55991387088a9068f7497df8743b23d2f236d5 + docs/models/platformtriggerpresetinputvaluelistresponse.md: + id: 83d72534a3ca + last_write_checksum: sha1:87a3ad39529499b19c00b83757190076014f51c2 + pristine_git_object: f76e44bdbeb134d314848b47e4a267a547ed1453 + docs/models/platformtriggerpresetlistresponse.md: + id: f20264dc45fe + last_write_checksum: sha1:290e8f11d09d200030884ba4e5670d95ffc2dda1 + pristine_git_object: e83bf66480760338aca8aea664a9e21e8838575d + docs/models/platformtriggerpresetseventssearchrequest.md: + id: 232ded4889d9 + last_write_checksum: sha1:d9a9ee0f13732e71d3b3992e77b33e4a1b3733cd + pristine_git_object: 5b9b8544bf4d062ecd84bf2a3b88434de8992bc1 + docs/models/platformtriggerpresetsgetrequest.md: + id: 661f8ca0e756 + last_write_checksum: sha1:929b48e2e062df8129c84b9ec32073f9c518580c + pristine_git_object: 3649388d7de32d0dc06b74fa874db4059e0daae0 + docs/models/platformtriggerpresetsinputvalueslistrequest.md: + id: 9cbbb9eaa9c2 + last_write_checksum: sha1:8ee9facdf533164c5b41ee488662311797ef4b25 + pristine_git_object: cb4a01b8fc67367a86e2e3d1e605ac63eb0c3f33 + docs/models/platformtriggerpresetslistrequest.md: + id: 9e0579bc5584 + last_write_checksum: sha1:917462b037f2d306e1b474f0616e96eec2d2753b + pristine_git_object: 8361b45a7b32594a73b3e8255b886ee31a6d750b + docs/models/platformtriggersdeleterequest.md: + id: ef6711cefab2 + last_write_checksum: sha1:f08630c117e01c5a37f6379503545d0946e73b13 + pristine_git_object: b31a34f21a3e6bdc081e4370925cde7cbc07698b + docs/models/platformtriggerseventssearchrequest.md: + id: 5c71525b6edd + last_write_checksum: sha1:f4781a66d1c1f4afd3a179a152fdae5357fed40d + pristine_git_object: 940d83b992170c738553280443a44da3e9d57c50 + docs/models/platformtriggersgetrequest.md: + id: 7a4d34377937 + last_write_checksum: sha1:a1d8d6ee1b8e6deb15bad88b45d8020dd8e7e862 + pristine_git_object: e0823c5833042f711f0f90eec4bea9fc38ea9373 + docs/models/platformtriggerslistrequest.md: + id: 67c0b855996f + last_write_checksum: sha1:e20f86ad16ceeb59341302bbc0bebaf3ae8e8536 + pristine_git_object: 8ca8fde1f9f2bf77274bcffbba9814ff6383c823 + docs/models/platformtriggerstatus.md: + id: 5faa86db7dff + last_write_checksum: sha1:520c8f1ab4ebb201670619a7c557c9194a855967 + pristine_git_object: 652a23718a22cce3498feef53e0f06dd1c196088 + docs/models/platformtriggersupdaterequest.md: + id: 35ee38f0c9c1 + last_write_checksum: sha1:6060a8f654f62b05919fc5b72d68d350fec9a517 + pristine_git_object: 8e9c286d9962b7c0b4e5be59a588081d06610175 + docs/models/platformtriggerupdaterequest.md: + id: 9df406d86a64 + last_write_checksum: sha1:5d394ff7ff72766158e5a2205de06c78e45587b0 + pristine_git_object: 25295f38a1790a413f1576213979b5c2a2131691 + docs/models/platformtriggerwithsecret.md: + id: ba7807f1bd05 + last_write_checksum: sha1:c1acd6db523532323168239a2af88350dc3e6324 + pristine_git_object: 5b456f62f3a76acd90cadfcc0cb4230569cf9e03 docs/models/platformwarning.md: id: 458ffec7aa61 last_write_checksum: sha1:b70d5a767413fd7559601eb8e1e9728ad8b15773 @@ -3431,8 +3576,8 @@ trackedFiles: pristine_git_object: 85153af7ec594c2dbd1e4a8c2eba5ce713796265 docs/sdks/chatsdk/README.md: id: 83b4ee321663 - last_write_checksum: sha1:62f9a8c011ac90c694906d130778fc9e085e53d8 - pristine_git_object: 36fdb267cc1fede165adb54e68b0369f6c091d0e + last_write_checksum: sha1:47740532523da2b553e05be325f4af9de0fcd998 + pristine_git_object: fbb19c8f85059b35437ecc3f384f449499bd38cc docs/sdks/clientactivity/README.md: id: a309613986a5 last_write_checksum: sha1:d9737458d891593ba2fb3372ab6e60ea728fe9a5 @@ -3539,12 +3684,16 @@ trackedFiles: pristine_git_object: 2367ff8a3d48bca392eedfc035583e9806bb5b98 docs/sdks/skills/README.md: id: 3a14a5c90791 - last_write_checksum: sha1:9a3df5cc9d02857242b4beffca8425e9cda22456 - pristine_git_object: f3f50714613a13b869631f96a3f0a2057e6eb06e + last_write_checksum: sha1:49e30084ae2c99ba6a53d5aa6e0851e63cc2dba8 + pristine_git_object: 8cdfbc33daa86ae3521cb79c6fdc38bebff866cf docs/sdks/tools/README.md: id: 044286549bac - last_write_checksum: sha1:692aff6a75b65e73bad2742d68cfd78be6bf6f6d - pristine_git_object: 5481f3f8b06a25d77b856f3e42a989d9f4914c90 + last_write_checksum: sha1:9b9a8e80c1d16018bd66150ba482b83825d6cf67 + pristine_git_object: 8a3368140d93e032981bd19a4cff0ad9c35e8f1e + docs/sdks/triggers/README.md: + id: 6706220e8a9c + last_write_checksum: sha1:adf347b670158c3fb147aa132b891a224519b36c + pristine_git_object: 08875d7da4de3ed8cd76286e739770ea422a1ef5 docs/sdks/visibilityoverrides/README.md: id: c7d003d6a68f last_write_checksum: sha1:738c52c3b0964cfb441542710e10c51ca226f177 @@ -3563,8 +3712,8 @@ trackedFiles: pristine_git_object: 79e388be87446ab6a4064b372bad0e8376d0cb5e pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:45e124f939485287d52a21c3cef63a7f0d6b7c47 - pristine_git_object: 0a9c335a9a31ec8fdae149276535421a5ea9865a + last_write_checksum: sha1:c24376fbeda6b68fea9fac8500c6133e9a13f7e5 + pristine_git_object: d391b6dbed7565288eed49d23677f789e3c487eb scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:c2c83f71dea61eb50c9e05da83b16d18b4da8794 @@ -3591,8 +3740,8 @@ trackedFiles: pristine_git_object: 55f23c1feabfedeb7e8cd5bea8b910f0ae0b77d9 src/glean/api_client/_version.py: id: 0ce22b26136b - last_write_checksum: sha1:b46c6e4af3f5cb325a715d8f230ab39237903756 - pristine_git_object: c5dd907a297d4edf9c1839e3cfd484204c8fdac0 + last_write_checksum: sha1:57cc2a77e271cbb66de17c282b178610f8721f4b + pristine_git_object: 40d90d59424be27c65f6bc6ccda8dcdfe6609d1b src/glean/api_client/agents.py: id: b925701a9217 last_write_checksum: sha1:1d4b152d9d9260d1c97d4983f521f30b5cfa1085 @@ -3611,8 +3760,8 @@ trackedFiles: pristine_git_object: bf7b1b3b25ce6530403b0dd9f60599d236c780ce src/glean/api_client/chat_sdk.py: id: f2f30e13ca42 - last_write_checksum: sha1:85cacb2d7e0ab9a89daf48159d3b19680cc3425e - pristine_git_object: 4275af06711244c4e56b62c34e78bb5c7b37f8c1 + last_write_checksum: sha1:328e511b8bdb485025a2091b999cb098c89960b3 + pristine_git_object: 8d63acc688a0876d3a64f4fe794b8aad3d17ed8a src/glean/api_client/client.py: id: c0c188098f10 last_write_checksum: sha1:bfadba5dfdc64280fd9c7bdbf96a0651e5db429f @@ -3775,8 +3924,8 @@ trackedFiles: pristine_git_object: 77016bfff6209866592fd8b42f2f3527f900992b src/glean/api_client/models/__init__.py: id: d5f6ea5efcbe - last_write_checksum: sha1:1b0044c96eea7dd2d873ff70d19ffa1726c6a1f0 - pristine_git_object: 24f7f7a7d344b3dd70bc20326d2b41599acb5fd4 + last_write_checksum: sha1:9bfb23915a13a1a91cd1057003139197ac3f2dbc + pristine_git_object: 194a3892adcb0740eed22b1195cda389ed39df81 src/glean/api_client/models/accessrequestpermissiondeniedresponse_error.py: id: 22a2fa0d5899 last_write_checksum: sha1:f7dd6f906a4dd7433992f77395f9fb491fa5ac5c @@ -4039,8 +4188,12 @@ trackedFiles: pristine_git_object: 40d5ce80074cfd76645b910df1f5fdc0c0014405 src/glean/api_client/models/calendarevent.py: id: 1b4d4993373e - last_write_checksum: sha1:1a2fd8d18b4e5b73dabfb0e91a895ababb232644 - pristine_git_object: c954de14ea1cf3d55b4f0c647efab056a8df3d79 + last_write_checksum: sha1:26f2455c66791dccc013541a8875ca3256bd4fe4 + pristine_git_object: 212954dc43329ec417443a0af410595f10f71bbc + src/glean/api_client/models/calendarroombookingstatus.py: + id: 4bfc6652b632 + last_write_checksum: sha1:0715c8756d82af9ea8c4433597ea2dbd17f6b0d6 + pristine_git_object: 908bd7849f4b3c657e244d68b5982fe85669f1e5 src/glean/api_client/models/canonicalizingregextype.py: id: b2cd5b9de633 last_write_checksum: sha1:63eb44ad7f15925c9d47460f997a2ec8271d7a88 @@ -4819,16 +4972,16 @@ trackedFiles: pristine_git_object: 44041cb376d89949c815ea1e7813505940605855 src/glean/api_client/models/feedentry.py: id: 023eb6c10ae1 - last_write_checksum: sha1:baa7d04a5ae830282e82b19e870788c2b90da464 - pristine_git_object: 03dd978e2940f2d93f5b9393c84d60c0e36f10b6 + last_write_checksum: sha1:4c905fd75bf5666b862fab64ef813b05466c5f8b + pristine_git_object: 9c0bc18247e6ccf9925351636a7707bdf293eed6 src/glean/api_client/models/feedop.py: id: b8067ac0a127 last_write_checksum: sha1:c58cb0a3a01925eb14d84176c5c6e9d8f4d84cf1 pristine_git_object: f39626285f84630e5a9233736d652914b759d44b src/glean/api_client/models/feedrequest.py: id: 33496b6a5bab - last_write_checksum: sha1:e67128cc0d6e17f4bf4f5a33717cd0ef53e68560 - pristine_git_object: 69d85fb78ee67fc423208f0cb864b5416c5d38f4 + last_write_checksum: sha1:9e76dc4e42515478e49a66aac44c597544970a04 + pristine_git_object: d6d5f2d0cdf0519b45b59814f749b9240de850ad src/glean/api_client/models/feedrequestoptions.py: id: b99003fbf522 last_write_checksum: sha1:d5ffee29242075cbe6d2dd5ec916b0c3d40acf54 @@ -4839,8 +4992,8 @@ trackedFiles: pristine_git_object: 683438c837601f483526ec18756fadc7222edb24 src/glean/api_client/models/feedresult.py: id: ae187332b37a - last_write_checksum: sha1:fd675d08d2aa02216a2c20748560bf9273e35347 - pristine_git_object: f5bc568a98732c157152a822c5009544bd4275eb + last_write_checksum: sha1:10a4ce7eb8ab59144da0378ef166f99323a83a4c + pristine_git_object: 548eedb012383c7dea8ac5649096c876e1794a69 src/glean/api_client/models/followupaction.py: id: e2de5c4c8524 last_write_checksum: sha1:49e1a826449081fecfcd828c940604db949a8533 @@ -5509,6 +5662,42 @@ trackedFiles: id: 48967688f399 last_write_checksum: sha1:f68e7c13d27210e6b53530e94b24408540d4314c pristine_git_object: 42e0aca116a2efe4c5677df642857a6d87ea33b8 + src/glean/api_client/models/platform_trigger_presets_events_searchop.py: + id: b0f92c9e51c0 + last_write_checksum: sha1:43a982dfeb43611dd5f6a8eb030d6b1471666c8c + pristine_git_object: 79b57ae0802b2276f29106841cd3f30220302bda + src/glean/api_client/models/platform_trigger_presets_getop.py: + id: d35c8c1f7979 + last_write_checksum: sha1:f74824ae6cdbd2ea35317694fbd534c20de879fb + pristine_git_object: 3003dbdfed61fc7b1721e64c0067f799643cf135 + src/glean/api_client/models/platform_trigger_presets_input_values_listop.py: + id: 7951dfdf15f3 + last_write_checksum: sha1:96dda20479e6342ac1255e6e849ae875a8dea470 + pristine_git_object: 6579af39c9914ac78cac95acd516765e11c1b07c + src/glean/api_client/models/platform_trigger_presets_listop.py: + id: 45db1bf0d71a + last_write_checksum: sha1:2f6a5b7e107639316261106de2c225d258efe3fa + pristine_git_object: dee0141c3834adc08beaf23f06510147af1f22b1 + src/glean/api_client/models/platform_triggers_deleteop.py: + id: 4cc5fa5f610c + last_write_checksum: sha1:8e488be9541b1f55ff63ba02e5ce8a8bf6164965 + pristine_git_object: e3caabe56a5f10774d467da23ef58db3a7185906 + src/glean/api_client/models/platform_triggers_events_searchop.py: + id: 57bde8d65d6d + last_write_checksum: sha1:cc953a4c764d32db794cd0ee010263146936dfdd + pristine_git_object: 6ac07ec2a687d87dfe87a467de5d5fb959b6ed5c + src/glean/api_client/models/platform_triggers_getop.py: + id: 6e5e83bd3585 + last_write_checksum: sha1:4ade6bd1e582d818f8ee1fc2f0693f1b47a7316f + pristine_git_object: 892ee9941f53cbaa38221871219e4d59b80be0c1 + src/glean/api_client/models/platform_triggers_listop.py: + id: 855dd1c60f61 + last_write_checksum: sha1:9b7f95121a02bdc5c4c8775bde84f4beb6d80507 + pristine_git_object: 4eb3df404a9993d2f39df37bfb20afcdbfb6bb5e + src/glean/api_client/models/platform_triggers_updateop.py: + id: ee2002799c52 + last_write_checksum: sha1:b4e89947c50873b2b74a283fdd1bbfa852134c6b + pristine_git_object: c57697e4999df306ed30b910fd2e1d0e5007663b src/glean/api_client/models/platformactionsummary.py: id: 00069b22d246 last_write_checksum: sha1:f714e076c3e0c86ded17dd732ba304dfc7d5526e @@ -5559,8 +5748,8 @@ trackedFiles: pristine_git_object: 04be56b8972f39419fc27c325e9f4824a09f96f2 src/glean/api_client/models/platformchatcitationannotation.py: id: 50f8f46928e1 - last_write_checksum: sha1:ab8c8b10f62850297db51063e09bb29479c12e12 - pristine_git_object: e100f70c8bcd8303c5fd51b63c733faa479420db + last_write_checksum: sha1:205801bf117b3d26c686c529d0d8cb28e30a6100 + pristine_git_object: 5dd276ba7ca775a7c7f0a50e3fa7ad1228c39924 src/glean/api_client/models/platformchatcitationsnippet.py: id: 99f1e0941ff0 last_write_checksum: sha1:97c26e2f2d9196f5bb6514b90248c920278eb9b0 @@ -5571,40 +5760,40 @@ trackedFiles: pristine_git_object: 790d1678e2ca7151021a18bcd5f48344fbfb6b77 src/glean/api_client/models/platformchatcompletedresponse.py: id: ed59f46e73df - last_write_checksum: sha1:751f90005564470d001894b717276fc8079445c4 - pristine_git_object: 946d487c21beaecdb8b8b23e411aca25d44fb4e0 + last_write_checksum: sha1:0dd038141a88aec0d7a5838053ac167f894ffc53 + pristine_git_object: 4b32c84bd902a79b2e55da4f0e602a485a0fdff1 src/glean/api_client/models/platformchatcreaterequest.py: id: d6d4fc59e049 - last_write_checksum: sha1:134f060233ff4ec9858ef2b0709a7bcd54f43ef6 - pristine_git_object: 252f07c14d7c123424d9b17b5d2c2802ae6ad642 + last_write_checksum: sha1:aa28b7ef6c55c105e95ee31604f5c060b968abd6 + pristine_git_object: b596efc574a30fc43c9780d9b19dc2c6bfeac6ce src/glean/api_client/models/platformchatcustomentitysource.py: id: 385a56c07858 - last_write_checksum: sha1:94736d2559fc829455e00b865f787e97b5b6d7a9 - pristine_git_object: 768037684869993e6de63e7457072716d2cc6149 + last_write_checksum: sha1:219f6e5baa20d6954839bfc16a00a9f424fbb96e + pristine_git_object: f2ec133b16adcf53ecb88e3c1aa69ecd112b5dcd src/glean/api_client/models/platformchatdocumentsource.py: id: 1cd8111e3b4c - last_write_checksum: sha1:9381db0a65890243ff595a663ee7b78621f85880 - pristine_git_object: 0fa4f61a2bbcfc246569e597192574f429c3e3e2 + last_write_checksum: sha1:43c63d69794b3897ce38c321806a719e7957f36b + pristine_git_object: 73aad8d2edf3d1d6880e9cff3a0057b368d84543 src/glean/api_client/models/platformchatfilesource.py: id: 1a9d4653c065 - last_write_checksum: sha1:b335a3fe30a805eaf7fe831e82231edc0f280c9b - pristine_git_object: bde933e7ef7312398aafb3622337ac3867f77e70 + last_write_checksum: sha1:d995e1a8bf690e316793f4916fbca81f0a279e47 + pristine_git_object: 228194cbc7650afc2858cb8d66ee469d388fb543 src/glean/api_client/models/platformchatinputmessage.py: id: e32871fda394 - last_write_checksum: sha1:44856f2b0747bd3dee0ba7dea3f63d1c7b871b41 - pristine_git_object: 1031b46478635c863692e2ca0d32644bd0977c66 + last_write_checksum: sha1:1ddb82a8dcac6a1943b99fb2cdfb2c464e8eab07 + pristine_git_object: 9d21d2a18e6de246b38312c05fafc8698635ac6a src/glean/api_client/models/platformchatoutputmessage.py: id: 15c8512d3810 - last_write_checksum: sha1:58607803b4c6067d91792378356cc1af3d769309 - pristine_git_object: 686a0c29b38fc9796d4454ffe88d0e3bb7ddfed6 + last_write_checksum: sha1:1f0846a6e9bf7c2a1b9f5ea870cb0c4f6896c449 + pristine_git_object: 9082277a0bb6b75d23c5fef7eead2aa13d8147cf src/glean/api_client/models/platformchatoutputtextcontent.py: id: 91b9987e8b98 - last_write_checksum: sha1:936d1dad8ef1421b171c6b02006b9b66e6fab3da - pristine_git_object: 0d076b64bd1876e63763f043398f508e47146b16 + last_write_checksum: sha1:a24b36ff3c3d310f82183fd5d0c39a0182bef73a + pristine_git_object: d37425276eb8efbdd22c199f76b5448f8c9cb0b4 src/glean/api_client/models/platformchatpersonsource.py: id: 617b816c747b - last_write_checksum: sha1:83261124006375eaa486bc3703beb10271e39450 - pristine_git_object: d25484864c73797b854d25188747a07815195aa0 + last_write_checksum: sha1:1068fde6d156f689d9f93b799dd8b5a2fa399315 + pristine_git_object: a2e120b176b2a3d8f8d5060f5717290ffb07eda4 src/glean/api_client/models/platformcontenttype.py: id: 87e6bc168e08 last_write_checksum: sha1:97548628abf68b0b2727ba126ce363000e8d2882 @@ -5793,6 +5982,102 @@ trackedFiles: id: bf2b03e84949 last_write_checksum: sha1:645217a3827cd2a7455b88277f1ba2dcd4a5daf1 pristine_git_object: 0a5acb2a9110e33b96db4e36aa09c1bf36ab1cbf + src/glean/api_client/models/platformtrigger.py: + id: 5c3b071bd50e + last_write_checksum: sha1:741572e81b11b6088c4764bd5d4e2008e0c612a8 + pristine_git_object: c354235905c7d7dedba4138e92ff2da100fd9964 + src/glean/api_client/models/platformtriggerauth_output.py: + id: afb2090fc73a + last_write_checksum: sha1:3f5774a5446a8e72ce52ef899151cd734f3eba57 + pristine_git_object: 0288980e445de6bfd6c19f98d62c63e4a4bb0a9d + src/glean/api_client/models/platformtriggercreaterequest.py: + id: d11a4c9a8272 + last_write_checksum: sha1:77412e6a290a4926ac2a1b1cc70ddd064c074e54 + pristine_git_object: d70686f2babf5c986d36ea0577a39d1ba0f614c4 + src/glean/api_client/models/platformtriggercreateresponse.py: + id: "632392221518" + last_write_checksum: sha1:0159ee031fb0d52920a5ee996fc802c8f994dae8 + pristine_git_object: f0f1a850dd346eb83826e18d131d8e571ac7fcc4 + src/glean/api_client/models/platformtriggerdelivery.py: + id: 90a60a468b73 + last_write_checksum: sha1:12e538baea1385ac8e57b29b78e1ce348a918512 + pristine_git_object: fb8e5f0279f8fb4be88109944b03121ced2b2209 + src/glean/api_client/models/platformtriggerdelivery_output.py: + id: d3848fcf9e21 + last_write_checksum: sha1:1976f8507e847f7ddc49a852ebe96644010c17fc + pristine_git_object: 4e6137551b1bd22520d7fbe40bb6572efcc0815b + src/glean/api_client/models/platformtriggerevent.py: + id: 9da9f24676df + last_write_checksum: sha1:154f5078dfb4cf504db8b9dc718624c95b92cc4d + pristine_git_object: 63b745f87358171623fcaeab71d1fde5362bdc6a + src/glean/api_client/models/platformtriggereventreason.py: + id: 1fa4b52d7d21 + last_write_checksum: sha1:2069eddfbc2916258b08488dac62d93d34df0799 + pristine_git_object: 984437d89b22051adf813bced10ad8b407b015c7 + src/glean/api_client/models/platformtriggereventsearchrequest.py: + id: a12d9a25b03f + last_write_checksum: sha1:ef2cb01810db71399032e363a7b3ce2e83ddb803 + pristine_git_object: a8f990c26aa733629f3b4d383b354bdb76a48134 + src/glean/api_client/models/platformtriggereventsearchresponse.py: + id: e64d420cabe2 + last_write_checksum: sha1:9c8ce1282d7df5d5fc91dcfc48b883a14ce0cc7f + pristine_git_object: 11179d5bdc0e4047ad89230c0b5d6318b4e33353 + src/glean/api_client/models/platformtriggereventtype.py: + id: 81de03948651 + last_write_checksum: sha1:0a60b18c68c8e992dca5807929baae8809e6d1e1 + pristine_git_object: cef1d084ad80b0c0bd5ee39971fcceb18e5ad2b5 + src/glean/api_client/models/platformtriggergetresponse.py: + id: 932df858954f + last_write_checksum: sha1:b57d9c962f0e3e1a18a913ecf5e9c3765c22f665 + pristine_git_object: ca171e8de7e7eea3a11b3b7702f408bb2896fcf3 + src/glean/api_client/models/platformtriggerlistresponse.py: + id: 0e42c35449ae + last_write_checksum: sha1:8991a1b3fb50b336d7ac62ea62a92b7118765e7d + pristine_git_object: 16bdf27f18c3ac5eada3adbfd80508096704eeb2 + src/glean/api_client/models/platformtriggerpreset.py: + id: c6916e8c8b88 + last_write_checksum: sha1:c0a09c7a33620e1975162d53cdbd2e719293e94d + pristine_git_object: a7c372a895acf96f964ca1727dda09eb9792380e + src/glean/api_client/models/platformtriggerpreseteventsearchrequest.py: + id: 9ba241010b73 + last_write_checksum: sha1:b4befaefcf96dee59741252944510be840fabeac + pristine_git_object: ac214e062927c1a0c080d5d4274e24230899731a + src/glean/api_client/models/platformtriggerpresetgetresponse.py: + id: c7c32a376aaa + last_write_checksum: sha1:52985b19b8be2adc1bedbe14deeee8c8d6f7d0c0 + pristine_git_object: a5b185f33bd4d68228b6904fd1868a5a9e0d954c + src/glean/api_client/models/platformtriggerpresetinput.py: + id: 05ad6ccb0653 + last_write_checksum: sha1:69b3c9306c65b037e5cd5c58cd443eb3ba3e1565 + pristine_git_object: ebe2f2240d97ad6b416268c4bd5df602a824ae63 + src/glean/api_client/models/platformtriggerpresetinputtype.py: + id: a49815e9d095 + last_write_checksum: sha1:50bba9278f596b1700f74881b8d6a6c4f267305b + pristine_git_object: 2697c7d54e58d37f48b1633f0ec1c9a5996cca26 + src/glean/api_client/models/platformtriggerpresetinputvalue.py: + id: 5345564e839c + last_write_checksum: sha1:655d2fd769bab34e13669b58b5c73fb956d9f3ec + pristine_git_object: 0e3bedde7b0c8283b546ce4b4ad8717427bbb8ca + src/glean/api_client/models/platformtriggerpresetinputvaluelistresponse.py: + id: b1cef62c38a8 + last_write_checksum: sha1:ae83380b43c871c2d13e7faf165778ec5333204f + pristine_git_object: d3a2336f945a1f5e9ad0be5622960425c4a94238 + src/glean/api_client/models/platformtriggerpresetlistresponse.py: + id: af06a9ea071d + last_write_checksum: sha1:fe197ac2c1ef31956ec50d8622edb6adc2967f24 + pristine_git_object: f7c9c6ce9a562c7af3c83cc4b1cfb66e3fa573e7 + src/glean/api_client/models/platformtriggerstatus.py: + id: b50f5721d508 + last_write_checksum: sha1:d96648687316249472f6d1417db1a0a941df04ce + pristine_git_object: 0c789c9a5c0bd295a19cf12d8dd3f929bb3042b8 + src/glean/api_client/models/platformtriggerupdaterequest.py: + id: 91dbd3e53881 + last_write_checksum: sha1:22d575e744eff6e20cefcd3c0dc4e84437331c43 + pristine_git_object: 7dcbd6a275b49e1ab02477079becfa9474622bb4 + src/glean/api_client/models/platformtriggerwithsecret.py: + id: e0f28c4af07a + last_write_checksum: sha1:67c0caf11f47d82d1015c5c4e8a0acd5a36cf81c + pristine_git_object: 380c1979b32bea257b09842fae9c526f7a37190f src/glean/api_client/models/platformwarning.py: id: b99ca6ee1c74 last_write_checksum: sha1:4e82a608e924c72338481e61b2e51fec9e447605 @@ -6427,8 +6712,8 @@ trackedFiles: pristine_git_object: 3a4c3e6eee14c25616dbc8cbec206d9a74070d80 src/glean/api_client/sdk.py: id: e2de37b3ce92 - last_write_checksum: sha1:1cea83604fe25c207935e67219047e719405c46c - pristine_git_object: 484c68fff8ddecaa06dceeb457186ddcde7a16de + last_write_checksum: sha1:5d8613780a840ea8e2a3981406cd7d6c6064ea41 + pristine_git_object: 4efe2dd7071b0043e18c04b36398978c357f8255 src/glean/api_client/sdkconfiguration.py: id: f356ce00b5b7 last_write_checksum: sha1:1ae43e08ae57ae277b3ab5e66b52d020149ebe00 @@ -6439,12 +6724,16 @@ trackedFiles: pristine_git_object: 91ea57d2012c5dda71fb1a4b5d420173d7c357b5 src/glean/api_client/skills.py: id: 79f3c37e1b5a - last_write_checksum: sha1:dfa798ad4b711ec1d6368d32f296f612f79ddd5f - pristine_git_object: d86ec8e33184403d1d84a32f1b23de3f80ecc3f2 + last_write_checksum: sha1:aebe5c9b6e2b24a13332ca13160d3994e008e477 + pristine_git_object: 89e97e10c092905a2b012a8f05f8fc986d018c6e src/glean/api_client/tools.py: id: 3ea40147c1cc - last_write_checksum: sha1:255ffc640ebbd6a9f0c6486a78f1e7d3eb9f4645 - pristine_git_object: aa8b10a3ab803a126388d5221b8b65cf44c647cf + last_write_checksum: sha1:83c2360844995f2f83170f8e8c8388ffe5800758 + pristine_git_object: a9a8b1001149141922966a721ceed7660f21796c + src/glean/api_client/triggers.py: + id: 9fac703b5844 + last_write_checksum: sha1:cc5988d98d7e4b8fa4b4ac511115af9925ae7272 + pristine_git_object: f72ca99dde2422384dad0098d8c100825cdc7be7 src/glean/api_client/types/__init__.py: id: f63c790831ee last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9 @@ -6507,8 +6796,8 @@ trackedFiles: pristine_git_object: 591415af8e64baa410627b507d2740afb5387d13 src/glean/api_client/utils/retries.py: id: 36d4cce6fbf6 - last_write_checksum: sha1:3585b891142f30a597fbf7a2f0340700babef8e4 - pristine_git_object: ca7b59efebbbd9545744d0207ef42725c4cc5143 + last_write_checksum: sha1:481dfc7cd6a07a3987f0f443e91bee72888ae41d + pristine_git_object: c7418a62826fc73990a52e70df0d54093c5e2a57 src/glean/api_client/utils/security.py: id: 5c4255995c2c last_write_checksum: sha1:355ba142fd72ec019e46b9aadb1da7172c17a312 @@ -6527,8 +6816,8 @@ trackedFiles: pristine_git_object: c78ccbae426ce6d385709d97ce0b1c2813ea2418 src/glean/api_client/utils/values.py: id: 3c2d5aa49b0e - last_write_checksum: sha1:acaa178a7c41ddd000f58cc691e4632d925b2553 - pristine_git_object: dae01a44384ac3bc13ae07453a053bf6c898ebe3 + last_write_checksum: sha1:65e1ee8607767a4fc1ae7a55c74d77a23ab3cef1 + pristine_git_object: ac217f473c5d52a454a2979b3eb35e66175d365c src/glean/api_client/visibilityoverrides.py: id: 85e53a1c5de5 last_write_checksum: sha1:633cf3b5b0f1f2e4359d271a3a678a229e95f20a @@ -6595,8 +6884,8 @@ trackedFiles: pristine_git_object: 929558ef2e1165f7e09da6d0a64f016c90971655 tests/mockserver/internal/handler/generated_handlers.go: id: 61ac4f7cce9e - last_write_checksum: sha1:6eb71a2e61e6610c4a41191a22bdab7764994582 - pristine_git_object: 1ea7cd1da577eab4f39f7df5c6a4101129b23088 + last_write_checksum: sha1:6b77f36c3b3dc12b960b49941ee55263a0a6c05f + pristine_git_object: 8e541a71eba67ec8fd003759038b2b1ec43d6ab9 tests/mockserver/internal/handler/pathdeleterestapiindexcustommetadataschemagroupname.go: id: 979e4583765b last_write_checksum: sha1:b1d4edb259d907c7a88b634bf16f0cf152321693 @@ -6641,6 +6930,26 @@ trackedFiles: id: c6ac26c4873f last_write_checksum: sha1:77b816a0cb7f4ac54d9b73b5da6d6dbceadff6e6 pristine_git_object: ccccbef049419482a201b8a73aca33d632120e2f + tests/mockserver/internal/handler/pathgetapitriggerpresets.go: + id: 8cbf477f0939 + last_write_checksum: sha1:66a3e20e34ab5f3f5192aa6ff6c99592cded3c1c + pristine_git_object: bf480d62ad7516f08357e026186140ea1d6eaf16 + tests/mockserver/internal/handler/pathgetapitriggerpresetspresetid.go: + id: a571f52cc5d7 + last_write_checksum: sha1:525317411bfd43b5881d1206954a45f3a58cf870 + pristine_git_object: 87f98a9ec99c2b92a2ee217b9f5cbb31a26732b6 + tests/mockserver/internal/handler/pathgetapitriggerpresetspresetidinputvalues.go: + id: "352313839387" + last_write_checksum: sha1:82eca3576ab664ab32f29cdc507e01ffb9b6b0db + pristine_git_object: 92c4e66356b06036f4e484c2abd5d1d3a20df097 + tests/mockserver/internal/handler/pathgetapitriggers.go: + id: 38c98b6efaf3 + last_write_checksum: sha1:52382d934f67c64dc20ae112848a5e36d3f2ac80 + pristine_git_object: 04c4bdc1dd177b742f724b6b16af9190ecd7280d + tests/mockserver/internal/handler/pathgetapitriggerstriggerid.go: + id: 024861a723c9 + last_write_checksum: sha1:ef0bb1dda14cdd45a181fde7dcb5f622ce9ae786 + pristine_git_object: 3f4515d9a339be4d3182320c193d68a020b56428 tests/mockserver/internal/handler/pathgetrestapiindexcustommetadataschemagroupname.go: id: a14a30d0e377 last_write_checksum: sha1:83a992c70c3b7d010928d89a52f70db1042dd186 @@ -6701,6 +7010,10 @@ trackedFiles: id: e09721a8879b last_write_checksum: sha1:90c425f15814afd0ac42817b7ad6a056b6efc278 pristine_git_object: 2b4d9db548fd58503a768732db17aca59d354d25 + tests/mockserver/internal/handler/pathpatchapitriggerstriggerid.go: + id: 76c9eb373567 + last_write_checksum: sha1:b04c8bb9823566606aa298710111f7f285491e83 + pristine_git_object: a5b44ba21bb7d8a34da9892a8d6e66808baf634d tests/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: id: 24dd79d2c474 last_write_checksum: sha1:14d3e93a3f37b61145188a9e6544398fcfc200e4 @@ -6861,6 +7174,18 @@ trackedFiles: id: eaa6c1478b34 last_write_checksum: sha1:cc8f959924866fdf5febe729b5d5819ff7e53173 pristine_git_object: 2048ae91e6f81a6ecb4bb9281ef60ce287330724 + tests/mockserver/internal/handler/pathpostapitriggerpresetspresetideventssearch.go: + id: e3d540cdeac5 + last_write_checksum: sha1:512aee9f0f41a114b70ccb1c695b935e75218dc8 + pristine_git_object: 11d7757c819836f76b527d2bfbeae859d16bc04e + tests/mockserver/internal/handler/pathpostapitriggers.go: + id: 85f970d314eb + last_write_checksum: sha1:8b557e02f782cafd0ba877a1103a28420de8e437 + pristine_git_object: f1277b4b46d78a11f492de1cdceacf93f395604b + tests/mockserver/internal/handler/pathpostapitriggerstriggerideventssearch.go: + id: e27c1d4cb373 + last_write_checksum: sha1:c82a659a1f52230b3e35737bc01f1651977fb9c0 + pristine_git_object: 31c524e0c9b3d0474f4c3cee827ac126e1934eb2 tests/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go: id: 1a5daf7874ce last_write_checksum: sha1:b5b37f0b5a7b4d9a4c69ab523e831f1702301118 @@ -6991,8 +7316,8 @@ trackedFiles: pristine_git_object: abb763ddc8504b28c0cb6fdf8d25237d46e21bab tests/mockserver/internal/handler/pathpostrestapiv1getchat.go: id: a0ec7bafa599 - last_write_checksum: sha1:b48e2313407814ee4f8ed181b8e5299a84960c44 - pristine_git_object: 96d4127e0455272a9842e2d1954e5fcefa3278cc + last_write_checksum: sha1:2267292ba8173cf8df70ddbc6ac02ff3439cb879 + pristine_git_object: 8740195860b6c08e036caae19aab8e7374350960 tests/mockserver/internal/handler/pathpostrestapiv1getchatapplication.go: id: 7d101c69d4bc last_write_checksum: sha1:7b81898137fdb3a89b4dcfa318b9b5b92e8860c0 @@ -7387,8 +7712,12 @@ trackedFiles: pristine_git_object: c237f6fdfc76002db00450dcc1c0f833ab83d8e8 tests/mockserver/internal/sdk/models/components/calendarevent.go: id: 8266e43a77b2 - last_write_checksum: sha1:8b37f864d04425db3f5370c63a2a01c3e9e66e94 - pristine_git_object: 33ac7433919695239120f18f62fb966c05d0e831 + last_write_checksum: sha1:0d0d354c949de0fb7c2bbde2fd7d5a53012b9511 + pristine_git_object: 9086716f92a2039aa7bd53c25bd50a064f828695 + tests/mockserver/internal/sdk/models/components/calendarroombookingstatus.go: + id: 3c93f43fc5be + last_write_checksum: sha1:3ed3979dbce33877b55551bdd465e73d797ddc86 + pristine_git_object: 1f0d78191d5a37b2b88e524aacdaf870f0e72c21 tests/mockserver/internal/sdk/models/components/canonicalizingregextype.go: id: 7df117f09631 last_write_checksum: sha1:2d0c192b2b7d99262441a1ee0cbd670bf7970746 @@ -8059,12 +8388,12 @@ trackedFiles: pristine_git_object: 04cc3a93272ac70933b0485bee31b335e05ab623 tests/mockserver/internal/sdk/models/components/feedentry.go: id: d25fd66fcf7a - last_write_checksum: sha1:7c8546042939c356feeb9846070c23a04edd1a13 - pristine_git_object: 75c2030f1bf29bd59360b09c62df32f9efee0517 + last_write_checksum: sha1:6adf9257d92a72fe3a7bc694c22dd8d16f2b7108 + pristine_git_object: 19beb02fb45c1c4ee3df3011a18b1a8791224514 tests/mockserver/internal/sdk/models/components/feedrequest.go: id: b06bc4cef0cf - last_write_checksum: sha1:ca761301495e36eaf10fc4fa9086380498e6491a - pristine_git_object: 854c8390fa48c1647f0f3c04d19d89f6aae43d6f + last_write_checksum: sha1:a1293c6cdc3c294628e854614229c370a5218b71 + pristine_git_object: 97365efff1b005e6769bb2d5b561de68aadfc221 tests/mockserver/internal/sdk/models/components/feedrequestoptions.go: id: fd9245fe1bf2 last_write_checksum: sha1:fa30b7fd6ee3e45896d7bbe36e33e7c0cb9000ba @@ -8075,8 +8404,8 @@ trackedFiles: pristine_git_object: 54f9d1a8997983156c84e69f888c59a80d06c2b1 tests/mockserver/internal/sdk/models/components/feedresult.go: id: 47411573e67a - last_write_checksum: sha1:1980e5be5848c3aa1e732c680f7472899c9eb19c - pristine_git_object: 158c74284653d58bdffbab15a8f23188e092875d + last_write_checksum: sha1:973eec9b2d273d721f6310ebb20578c7d4f142d1 + pristine_git_object: cc69740a57fd002be69b2922812d7497a0778f51 tests/mockserver/internal/sdk/models/components/followupaction.go: id: 38179fec19b1 last_write_checksum: sha1:32a31f7af77a58ce6f3284e8550d01fcf0d3bddd @@ -8587,8 +8916,8 @@ trackedFiles: pristine_git_object: 58281ae6e982ccb6e585a3299a3893a5850cfb3d tests/mockserver/internal/sdk/models/components/platformchatcitationannotation.go: id: f4acfb6b571a - last_write_checksum: sha1:a07b63c29342dbc8760451a07748ecc5a795dd2a - pristine_git_object: eb920c4166fc2bc302a641531f1c92c946847124 + last_write_checksum: sha1:1f7f643895fdec20a70e5efebecdf9d8f636384e + pristine_git_object: 64b253ab16d8eea7f910fb7c32635756312c7866 tests/mockserver/internal/sdk/models/components/platformchatcitationsnippet.go: id: 19303510f847 last_write_checksum: sha1:521a16886f1f96d692e7dfc60c68ed16195f9db9 @@ -8599,40 +8928,40 @@ trackedFiles: pristine_git_object: c4c149d7a1856c60ae47b1f2e9b524d4d8458459 tests/mockserver/internal/sdk/models/components/platformchatcompletedresponse.go: id: dfc6d86d9ca2 - last_write_checksum: sha1:b6cfe25cea6372862c6cb89c31f0a27f32768b48 - pristine_git_object: 3626477733c9d6b8350ce69c4b0c114e6d12ecee + last_write_checksum: sha1:0a214ec8175734c89d968fbb3af56fc19e817264 + pristine_git_object: be4e37123971803d69d6581668ac6fa8e0f56347 tests/mockserver/internal/sdk/models/components/platformchatcreaterequest.go: id: b024a90db5cf - last_write_checksum: sha1:a5d728f3340cd89d08c5cb4c45ca2495bf063099 - pristine_git_object: ff12189e8a27b80e6ebd875b23d3ab15415afc9b + last_write_checksum: sha1:c7c3b67893cd7e42c4995e7e5b8f13bbb91090f1 + pristine_git_object: a5b50b89f856fa678f9bc26fa08818a8d91f183b tests/mockserver/internal/sdk/models/components/platformchatcustomentitysource.go: id: 19335eec1f0c - last_write_checksum: sha1:782fd0be48c718f3748c4f0a49dc82cface4d644 - pristine_git_object: a935970d4dccc9196d4c34855dc24db23f0f2a44 + last_write_checksum: sha1:52947945dd84893095dd04c7c1d0fed92eed9d03 + pristine_git_object: ccd6eac366414927d53ec579b691a1abf3f34867 tests/mockserver/internal/sdk/models/components/platformchatdocumentsource.go: id: 50d8ddf827c8 - last_write_checksum: sha1:c172280641caf057547c11ec1fa16e539a11fcdb - pristine_git_object: 9dd42aa5e0abcb1b41e68d833f349779f7fa90b1 + last_write_checksum: sha1:601d2c92039f18fcf03ea3abe7a8cb30d96862d2 + pristine_git_object: 63d8078fd2f1510238397be59455ef19090a3a3a tests/mockserver/internal/sdk/models/components/platformchatfilesource.go: id: f717724c0acb - last_write_checksum: sha1:572e86750f5f0a9d3a1d7bb4fe6507d47d9d11a1 - pristine_git_object: ad39a1dedf884498db229569f975d07cbfceda37 + last_write_checksum: sha1:9c1cf43539e36e553ea918fd22db2e9a6985f926 + pristine_git_object: 6714718990fc59806d1a8f15d9b24515397fa930 tests/mockserver/internal/sdk/models/components/platformchatinputmessage.go: id: 56818bc51e4c - last_write_checksum: sha1:70c4b032b5066633b8cd34d0c49c28df2387bf75 - pristine_git_object: 5989ab25d09e93f7dda37735c4756dd941e76b14 + last_write_checksum: sha1:42af3af208da28f93f0f2201e3daa8b46a7e1dba + pristine_git_object: 97c1e067fb5ecb6b2f97606419d967243488f520 tests/mockserver/internal/sdk/models/components/platformchatoutputmessage.go: id: 7ca1fc5cc683 - last_write_checksum: sha1:9da219f4f8004153d64d9ec89365dd92ba0b99f7 - pristine_git_object: c7ccd4be66bf0f4e6a931a470d244774d3ca256d + last_write_checksum: sha1:3db396040f3153e9079616c8618abeecc999e663 + pristine_git_object: 69218f0ebe38116259e1e0a7c021e605a79e88f6 tests/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go: id: b5d5f31f9886 - last_write_checksum: sha1:7b83b7cadf85b852949b765447c7c165acf49021 - pristine_git_object: fedd3f2853557a146f561b333d30dfe6799bf274 + last_write_checksum: sha1:65d94d8a5470bd836564c69e1476d29c7c8041b9 + pristine_git_object: d5020f5ca750f648d73d9153f3a332745d72304c tests/mockserver/internal/sdk/models/components/platformchatpersonsource.go: id: b44852860bd9 - last_write_checksum: sha1:baa4c11fc983d682b8f66d282ef55955bfd3bf99 - pristine_git_object: 1e969fb91bd34be3dcd9e2e2e242565eb97b15fd + last_write_checksum: sha1:ae83c0e9521f08d5818d9aa5cff33ca7233239a7 + pristine_git_object: 9576e8664747c8ca292816827aae56589aeab5c0 tests/mockserver/internal/sdk/models/components/platformcontenttype.go: id: d1a02baa3621 last_write_checksum: sha1:b552f26421544664b54a4423c8335c90b09480c6 @@ -8821,6 +9150,102 @@ trackedFiles: id: cf2540151ce1 last_write_checksum: sha1:3a0ec2ca473681b89ff97606f648fc15fcdae38e pristine_git_object: b88a152d5940b3e49fb73807c476607374d9d01e + tests/mockserver/internal/sdk/models/components/platformtrigger.go: + id: 46daff53baeb + last_write_checksum: sha1:6c82eb0357951867b9fad9878a738c218ed31df4 + pristine_git_object: f4ff0336c0ad85f45bfa4f53bfe5c47e6241f7be + tests/mockserver/internal/sdk/models/components/platformtriggerauthoutput.go: + id: 71e6f1f9954d + last_write_checksum: sha1:4509100855356b44534c924fb9d1e89461311371 + pristine_git_object: b72ecabbfec66c0cee56269317cefd05716178cd + tests/mockserver/internal/sdk/models/components/platformtriggercreaterequest.go: + id: 141f31ac21f0 + last_write_checksum: sha1:6d43e92de90a43429ce5e7def4b9d46e42b74b40 + pristine_git_object: f0b4f7f1f96534d2d43ef31ae8e11aa44ecc37f4 + tests/mockserver/internal/sdk/models/components/platformtriggercreateresponse.go: + id: 1e05f6421894 + last_write_checksum: sha1:d9e287757cdbfcbce72440976a49fa5b6330e257 + pristine_git_object: 2bc5301472ac71d0bf015b020a072c19d511cbd2 + tests/mockserver/internal/sdk/models/components/platformtriggerdelivery.go: + id: dbc485abe9e1 + last_write_checksum: sha1:9711fb0935b821528745e601e045b3c537c19ce8 + pristine_git_object: 7f8b8cbffac797c8f9a52041f2ac9e4cef5183d3 + tests/mockserver/internal/sdk/models/components/platformtriggerdeliveryoutput.go: + id: 14b6c01c5556 + last_write_checksum: sha1:32696e4746e8bb2cb19bad450876d6984f1b8ad9 + pristine_git_object: 9bf09b4504be7b9b4febf98997a208a297ed4def + tests/mockserver/internal/sdk/models/components/platformtriggerevent.go: + id: 40ac7d97e87d + last_write_checksum: sha1:18079dceac7b8684f8f4c8f14c884dcd083a9832 + pristine_git_object: c75c1db09df575371fcd6433291957aa9aa939ca + tests/mockserver/internal/sdk/models/components/platformtriggereventreason.go: + id: a9f89c6ff900 + last_write_checksum: sha1:d13aad890584ba5531a741afad4f368ecf2ad033 + pristine_git_object: 7f0bda2d068426631a0cd1964476166db7ac70c0 + tests/mockserver/internal/sdk/models/components/platformtriggereventsearchrequest.go: + id: 9cc3d3ae7054 + last_write_checksum: sha1:7634063252a61e46a0f2de39d39ae1865b44cb7d + pristine_git_object: dd4df12aa5aeb1ae9a73d527012942c548bc2f36 + tests/mockserver/internal/sdk/models/components/platformtriggereventsearchresponse.go: + id: 81da5b782e91 + last_write_checksum: sha1:e6537a85004ec418f7785951742ec970b6cca4d6 + pristine_git_object: 052cac3bdecffa85957c905e37d0c06258823eaf + tests/mockserver/internal/sdk/models/components/platformtriggereventtype.go: + id: a4c8db90bb12 + last_write_checksum: sha1:ad40d6d39507a292a6ebfecec4ee87e809bb07c4 + pristine_git_object: 01a90c1892683cf4df4a1010553fa59d05169154 + tests/mockserver/internal/sdk/models/components/platformtriggergetresponse.go: + id: d2394632e1bd + last_write_checksum: sha1:3d51d8dfdb10dc312c36ef9a0f6acd88495a02ea + pristine_git_object: bf48ffae47ed0c8257515f8c07ea7d8e85728021 + tests/mockserver/internal/sdk/models/components/platformtriggerlistresponse.go: + id: ec67e38158cb + last_write_checksum: sha1:b1535697540b7c3cb50af2e00e6880131efd08ee + pristine_git_object: ee21c82435f4435504b49ce34aed10780b9e3a5e + tests/mockserver/internal/sdk/models/components/platformtriggerpreset.go: + id: 022c4cab659c + last_write_checksum: sha1:1336162aca79ecfb73b240d465f02db245d4b7c2 + pristine_git_object: 8ec754d7659f3c4629dd340f36d2cabf98db81a5 + tests/mockserver/internal/sdk/models/components/platformtriggerpreseteventsearchrequest.go: + id: e50ada6912e4 + last_write_checksum: sha1:fbc9af64f34da12d9fe3988a2b0148737d59241c + pristine_git_object: e461aefd8d7cae92208bd528dc0c3255b54ea405 + tests/mockserver/internal/sdk/models/components/platformtriggerpresetgetresponse.go: + id: 3327e7fb3ac1 + last_write_checksum: sha1:68ae39f59612e960dba5926d8534bb0a0f4b84b3 + pristine_git_object: 75202b87350ce7eaff249ab4bc245c8d5c5fd6d1 + tests/mockserver/internal/sdk/models/components/platformtriggerpresetinput.go: + id: f9aae855e61f + last_write_checksum: sha1:4bc4a629ea10db2aa7fcdd1d36e3f59c07439024 + pristine_git_object: 674722cafba59e60e82956a9b48f327afd0e7ac7 + tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputtype.go: + id: 3637710c2323 + last_write_checksum: sha1:ea5de994ba8c96e0049ce5009516bd3f26a8928c + pristine_git_object: b51f9eac287417af1cdc4e9be6aadcabaab9f04e + tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvalue.go: + id: 66d3fb5c0b53 + last_write_checksum: sha1:4b7fec202ef73a577cc60598fa4aea02077a9ccc + pristine_git_object: 53487dfacea86ac4241008990791040ae5159a51 + tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvaluelistresponse.go: + id: 77efafb42b6c + last_write_checksum: sha1:43a7950f2686a18cf952c90d557b1205574d1ac2 + pristine_git_object: bc923be00f133b16429463a31daecbc7942cab89 + tests/mockserver/internal/sdk/models/components/platformtriggerpresetlistresponse.go: + id: 82a42aecc0f2 + last_write_checksum: sha1:d458be12780c41a67f589b8070878d524c363e6e + pristine_git_object: 3555da2cacb16368a2fe911f359aa6851188b9f6 + tests/mockserver/internal/sdk/models/components/platformtriggerstatus.go: + id: 1d8e591a1116 + last_write_checksum: sha1:b321c6fbc2f38fd0dcfbfa189b4254ef599cc469 + pristine_git_object: ac192ac6722d95648a08ecc83eb83234e5e00f17 + tests/mockserver/internal/sdk/models/components/platformtriggerupdaterequest.go: + id: 37bb79e7c302 + last_write_checksum: sha1:6aca83308ad6f81a494a21390318e6662d3a38f6 + pristine_git_object: 872cf5559b57fdbddceba6694f976fff1216f1f1 + tests/mockserver/internal/sdk/models/components/platformtriggerwithsecret.go: + id: 5b5f73675f76 + last_write_checksum: sha1:ee7c279b62fc32822f1937e52f633c95572adf22 + pristine_git_object: d97036ef0bb53ee4dc38945f5bfb065824f2fc50 tests/mockserver/internal/sdk/models/components/platformwarning.go: id: bf3a0578fb90 last_write_checksum: sha1:4f58e985f8592a928bb3d605f1a8538a5e611d2a @@ -9761,6 +10186,46 @@ trackedFiles: id: c98dd1ece70f last_write_checksum: sha1:2449140437acabcd61691b30b730c1edcec089f5 pristine_git_object: a05a3ba6ac66e2352bd97184f45caeb2c782d9c0 + tests/mockserver/internal/sdk/models/operations/platformtriggerpresetseventssearch.go: + id: c260f0bc0ba1 + last_write_checksum: sha1:6b2fbc1bfe081acc67336c62929e1b2f7d47c8d6 + pristine_git_object: 37c7771eebc13a58c446f7421a20280b3d5c548e + tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsget.go: + id: bc100e1216f5 + last_write_checksum: sha1:4f4fe20e0ad1db86926be70871e3d5c0e07edd8e + pristine_git_object: b6d75f2ae837db9a54ed6bad56ae4ddb33e7dd9b + tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsinputvalueslist.go: + id: b1ec3c1cf3e3 + last_write_checksum: sha1:59946a06b8130a08524781f91163b945bebbbdaa + pristine_git_object: f177d8a9da85f8db5707d69ee418153e827e0e88 + tests/mockserver/internal/sdk/models/operations/platformtriggerpresetslist.go: + id: 48e01ca825c3 + last_write_checksum: sha1:b9c893f9526c01e90b64fd1b08e8b54b7d770002 + pristine_git_object: 24cd563d67daaeaf6493816ac6cb637eaa7743bf + tests/mockserver/internal/sdk/models/operations/platformtriggerscreate.go: + id: c4ad7fe46213 + last_write_checksum: sha1:0e31564c243a483b8a09a964835b2e0473d3461b + pristine_git_object: 664f9c97722ccd5548a9aa09ca49245503daccb3 + tests/mockserver/internal/sdk/models/operations/platformtriggersdelete.go: + id: 7a29a3143cd7 + last_write_checksum: sha1:7aaa82731255b447c81d27ec0346bb72cd95accc + pristine_git_object: 58a202ca831378c3fdfbf0c435e70745a046cb0b + tests/mockserver/internal/sdk/models/operations/platformtriggerseventssearch.go: + id: 5dcce0e80035 + last_write_checksum: sha1:02160a745440b9cbe3a914c63e923261609559de + pristine_git_object: bfcff5748aae56306838c80f6c7014eafa84d896 + tests/mockserver/internal/sdk/models/operations/platformtriggersget.go: + id: c299ef1342d0 + last_write_checksum: sha1:d88fdb3095fdcc442c54b2b735c4c370bf19c2a3 + pristine_git_object: 548dcbf0cad526ef77d4fa58d10b0ebc99403e34 + tests/mockserver/internal/sdk/models/operations/platformtriggerslist.go: + id: 9da758308a26 + last_write_checksum: sha1:a5d0980c2dbf8f9f6a9ae73b360ba268b50d5bbe + pristine_git_object: 24df6582a02e0b02a8a78120d1f539851d80b573 + tests/mockserver/internal/sdk/models/operations/platformtriggersupdate.go: + id: 97cc4ddb3921 + last_write_checksum: sha1:0aafe1072c61b82f62f6bbb29c91dac410fa0a17 + pristine_git_object: 0c16788ff815693180b186aa0e9d4a016ffe2c28 tests/mockserver/internal/sdk/models/operations/postapiindexv1adddatasource.go: id: 85e7185113c5 last_write_checksum: sha1:2f82dc427027cdb45f8fcf8fa6454e28599233aa @@ -10235,12 +10700,16 @@ trackedFiles: pristine_git_object: 98d7f69d362a6770ee01a6c3d9f3684b01a6cbd6 tests/test_summarize.py: id: a255d8a6f627 - last_write_checksum: sha1:f6642c3c0f1fb75b4f7bb80025d98eb45a89d51f - pristine_git_object: 2cfa3243af32eacf74865c581c8ad2ddf0b0f551 + last_write_checksum: sha1:1fa40d6b0d438ba1eab1f497726f4290e131484d + pristine_git_object: 176748ca1a31da3ced2490494b227befe400ee32 tests/test_tools.py: id: 70889bdf7321 last_write_checksum: sha1:e9e37efd6a65d805c02d70d548df9c87dd062b0e pristine_git_object: 626f9c2c92cff302bac5dd4340d7b962551b5c8f + tests/test_triggers.py: + id: 99ebb55d09b2 + last_write_checksum: sha1:cd661eeb48e74e759c6b2d726fa0a4457f52754c + pristine_git_object: 191b2c6bc162256161aaa755d9ecbfbf1cdb15d5 tests/test_troubleshooting.py: id: 784c409f631e last_write_checksum: sha1:5af30befb8fffd54210e313bf98c24a64a685c50 @@ -11390,7 +11859,7 @@ examples: application/json: {"input": "", "stream": false, "store": true} responses: "200": - application/json: {"id": "", "object": "response", "created_at": "2026-05-19T05:32:52.505Z", "status": "completed", "output": [{"type": "message", "role": "assistant", "content": [{"type": "output_text", "text": ""}]}], "store": false, "request_id": ""} + application/json: {"id": "", "object": "RESPONSE", "created_at": "2026-05-19T05:32:52.505Z", "status": "COMPLETED", "output": [{"type": "MESSAGE", "role": "ASSISTANT", "content": [{"type": "OUTPUT_TEXT", "text": ""}]}], "store": false, "request_id": ""} text/event-stream: "" "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"}]} @@ -11486,6 +11955,129 @@ examples: responses: "200": application/json: {"tools": [{"serverId": "", "name": ""}]} + platform-triggers-create: + speakeasy-default-platform-triggers-create: + requestBody: + application/json: {"preset_id": "jira_high_priority_bug", "description": "High-priority Jira bugs in the Engineering project", "inputs": {"project": "ENG"}, "delivery": {"webhook_url": "https://customer.app/webhook", "auth": {"type": "BEARER", "secret": "a8f5f167f44f4964e6c998dee827110c"}}} + responses: + "201": + application/json: {"trigger": {"trigger_id": "2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c", "preset_id": "jira_high_priority_bug", "description": "High-priority Jira bugs in the Engineering project", "status": "ENABLED", "inputs": {"project": "ENG"}, "delivery": {"webhook_url": "https://customer.app/webhook"}, "created_at": "2025-08-17T18:19:46.877Z", "updated_at": "2024-09-14T03:27:40.201Z", "signing_secret": "whsec_xxx"}, "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-triggers-list: + speakeasy-default-platform-triggers-list: + parameters: + query: + page_size: 50 + responses: + "200": + application/json: {"results": [], "has_more": true, "next_cursor": "", "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-triggers-get: + speakeasy-default-platform-triggers-get: + parameters: + path: + trigger_id: "" + responses: + "200": + application/json: {"trigger": {"trigger_id": "2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c", "preset_id": "jira_high_priority_bug", "description": "High-priority Jira bugs in the Engineering project", "status": "ENABLED", "inputs": {"project": "ENG"}, "delivery": {"webhook_url": "https://customer.app/webhook"}, "created_at": "2024-01-06T01:37:37.232Z", "updated_at": "2025-07-02T01:19:47.126Z"}, "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-triggers-update: + speakeasy-default-platform-triggers-update: + parameters: + path: + trigger_id: "" + requestBody: + application/json: {"status": "ENABLED", "description": "High-priority Jira bugs in the Engineering project", "inputs": {"project": "ENG"}, "delivery": {"webhook_url": "https://customer.app/webhook", "auth": {"type": "BEARER", "secret": "a8f5f167f44f4964e6c998dee827110c"}}} + responses: + "200": + application/json: {"trigger": {"trigger_id": "2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c", "preset_id": "jira_high_priority_bug", "description": "High-priority Jira bugs in the Engineering project", "status": "ENABLED", "inputs": {"project": "ENG"}, "delivery": {"webhook_url": "https://customer.app/webhook"}, "created_at": "2026-09-03T11:57:47.699Z", "updated_at": "2026-01-25T02:15:09.513Z"}, "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-triggers-delete: + speakeasy-default-platform-triggers-delete: + parameters: + path: + trigger_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"}]} + platform-triggers-events-search: + speakeasy-default-platform-triggers-events-search: + parameters: + path: + trigger_id: "" + responses: + "200": + application/json: {"results": [{"event_type": "DOCUMENT_CHANGE", "datasource": "GITHUB", "reason": "CREATED", "doc_type": "Ticket", "doc_id": "", "view_url": "https://silent-omelet.biz", "title": "", "event_time": "2024-06-12T22:23:25.274Z"}], "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-trigger-presets-list: + speakeasy-default-platform-trigger-presets-list: + parameters: + query: + page_size: 50 + responses: + "200": + application/json: {"results": [], "has_more": false, "next_cursor": null, "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-trigger-presets-get: + speakeasy-default-platform-trigger-presets-get: + parameters: + path: + preset_id: "" + responses: + "200": + application/json: {"trigger_preset": {"preset_id": "jira_high_priority_bug", "datasource": "jira", "display_name": "High-priority Jira bugs", "description": "Fires when a high-priority bug is created.", "inputs": []}, "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-trigger-presets-input-values-list: + speakeasy-default-platform-trigger-presets-input-values-list: + parameters: + path: + preset_id: "" + query: + field: "" + responses: + "200": + application/json: {"results": [{"value": "test.user@glean.com", "display_name": "Test User"}], "is_truncated": 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-trigger-presets-events-search: + speakeasy-default-platform-trigger-presets-events-search: + parameters: + path: + preset_id: "" + requestBody: + application/json: {"inputs": {"TITLE": "checkout outage"}, "page_size": 10} + responses: + "200": + application/json: {"results": [{"event_type": "DOCUMENT_CHANGE", "datasource": "GITHUB", "reason": "CREATED", "doc_type": "Ticket", "doc_id": "", "view_url": "https://prickly-cutover.info/", "title": "", "event_time": "2025-04-15T15:45:31.544Z"}], "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"}]} examplesVersion: 1.0.2 generatedTests: activity: "2025-04-28T22:05:12+01:00" @@ -11677,6 +12269,16 @@ generatedTests: post_/api/index/v1/debug/{datasource}/documents: "2026-08-07T21:21:16Z" post_/api/index/v1/debug/{datasource}/document/events: "2026-08-07T21:21:16Z" post_/api/index/v1/debug/{datasource}/user: "2026-08-07T21:21:16Z" + platform-triggers-create: "2026-08-19T01:17:09Z" + platform-triggers-list: "2026-08-19T01:17:09Z" + platform-triggers-get: "2026-08-19T01:17:09Z" + platform-triggers-update: "2026-08-19T01:17:09Z" + platform-triggers-events-search: "2026-08-19T01:17:09Z" + platform-trigger-presets-list: "2026-08-19T01:17:09Z" + platform-trigger-presets-get: "2026-08-19T01:17:09Z" + platform-trigger-presets-input-values-list: "2026-08-19T01:17:09Z" + platform-trigger-presets-events-search: "2026-08-19T01:17:09Z" +releaseNotes: "## Python SDK Changes:\n* `glean.chat.create()`: \n * `request.input.union(Array)[].role` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `glean.triggers.create()`: **Added**\n* `glean.triggers.list()`: **Added**\n* `glean.triggers.get()`: **Added**\n* `glean.triggers.update()`: **Added**\n* `glean.triggers.delete()`: **Added**\n* `glean.triggers.search_events()`: **Added**\n* `glean.triggers.list_presets()`: **Added**\n* `glean.triggers.get_preset()`: **Added**\n* `glean.triggers.list_preset_input_values()`: **Added**\n* `glean.triggers.search_preset_events()`: **Added**\n* `glean.client.search.retrieve_feed()`: \n * `request.categories[].enum(knowledge_gap)` **Added**\n * `response.results[]` **Changed**\n" generatedFiles: - .devcontainer/README.md - .devcontainer/devcontainer.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e610108f..03fd977a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -34,7 +34,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: true python: - version: 0.15.5 + version: 0.16.0 additionalDependencies: dev: {} main: {} @@ -68,6 +68,7 @@ python: flatteningOrder: parameters-first forwardCompatibleEnumsByDefault: true forwardCompatibleUnionsByDefault: "false" + httpClientLibrary: httpx imports: option: openapi paths: diff --git a/.speakeasy/glean-merged-spec.yaml b/.speakeasy/glean-merged-spec.yaml index 1906bd1f..7a9e4598 100644 --- a/.speakeasy/glean-merged-spec.yaml +++ b/.speakeasy/glean-merged-spec.yaml @@ -2,8 +2,8 @@ openapi: 3.0.0 info: version: "0.9.0" title: Glean API - x-source-commit-sha: 7a82cb818d032eca9f42d56706dd9e0a65418d45 - x-open-api-commit-sha: 987c3f6458420f6a99420d808bdccea74ab84dad + x-source-commit-sha: c6a7fe7e225afa4f8d53ce1daf1554e5a5984657 + x-open-api-commit-sha: e80fbb8a812785a04c164d71ad6909be8a818e91 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. @@ -205,7 +205,8 @@ paths: text/event-stream: schema: type: string - description: Server-sent events emitted by the running agent. + description: | + Server-sent events emitted by the running agent. Successful runs emit `message` events. A terminal failure after the stream has started emits exactly one `run.failed` event whose `data` is an `AgentRunFailedEventData` payload, then closes. example: | id: 1 event: message @@ -214,6 +215,10 @@ paths: id: 2 event: message data: {"messages":[{"role":"GLEAN_AI","content":[{"text":", I can help with HR policy questions.","type":"text"}]}]} + + id: 3 + event: run.failed + data: {"error":{"type":"https://developers.glean.com/errors/spend-limit-exceeded","title":"Spend Limit Exceeded","status":403,"detail":"You've reached the monthly limit set by your admin.","code":"spend_limit_exceeded","request_id":"req_123","documentation_url":"https://developers.glean.com/errors/spend-limit-exceeded"}} "400": $ref: "#/components/responses/PlatformBadRequest" "401": @@ -277,20 +282,24 @@ paths: Server-sent events for a streaming chat run. Event payloads are documented under ChatStream* schemas. example: | id: 1 - event: response.created - data: {"type":"response.created","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015"} + event: RESPONSE_CREATED + data: {"type":"RESPONSE_CREATED","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015"} id: 2 - event: response.output_text.delta - data: {"type":"response.output_text.delta","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","delta":"Hello"} + event: RESPONSE_PROGRESS + data: {"type":"RESPONSE_PROGRESS","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","text":"**Searching:** foo"} id: 3 - event: response.output_text.done - data: {"type":"response.output_text.done","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","text":"Hello"} + event: RESPONSE_OUTPUT_TEXT_DELTA + data: {"type":"RESPONSE_OUTPUT_TEXT_DELTA","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","delta":"Hello"} id: 4 - event: response.completed - data: {"type":"response.completed","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","response":{"id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","object":"response","status":"completed","output":[{"type":"message","role":"assistant","content":[{"type":"output_text","text":"Hello"}]}],"store":true,"request_id":"req_123","created_at":"2026-07-14T20:00:00Z"}} + event: RESPONSE_OUTPUT_TEXT_DONE + data: {"type":"RESPONSE_OUTPUT_TEXT_DONE","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","text":"Hello"} + + id: 5 + event: RESPONSE_COMPLETED + data: {"type":"RESPONSE_COMPLETED","response_id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","response":{"id":"resp_e65a0a77-97a2-4c91-be60-eae7f6238015","object":"RESPONSE","status":"COMPLETED","output":[{"type":"MESSAGE","role":"ASSISTANT","content":[{"type":"OUTPUT_TEXT","text":"Hello"}]}],"store":true,"request_id":"req_123","created_at":"2026-07-14T20:00:00Z"}} "400": $ref: "#/components/responses/PlatformBadRequest" "401": @@ -417,42 +426,42 @@ paths: x-speakeasy-name-override: list security: - APIToken: [] - /api/skills/validation: + /api/skills/import: post: tags: - Skills - summary: Validate skill bundle + summary: Import skills from GitHub description: | - Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. - operationId: platform-skills-validate + Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. + operationId: platform-skills-import x-visibility: Public x-glean-experimental: - id: 0b086fa6-30f8-4279-8d11-10ab0059c14a - introduced: "2026-06-24" + id: 9162d790-e101-437d-a9a0-25e4687d150b + introduced: "2026-07-28" + x-codegen-request-body-name: request requestBody: required: true content: - multipart/form-data: + application/json: schema: - $ref: "#/components/schemas/PlatformSkillValidationRequest" - x-codegen-request-body-name: request + $ref: "#/components/schemas/PlatformSkillImportRequest" responses: "200": - description: Successful response. + description: Skills imported successfully. content: application/json: schema: - $ref: "#/components/schemas/PlatformSkillValidationResponse" + $ref: "#/components/schemas/PlatformSkillImportResponse" "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" + "409": + $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": @@ -462,45 +471,45 @@ paths: "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills - x-speakeasy-name-override: validate + x-speakeasy-name-override: import security: - APIToken: [] - /api/skills/import: + /api/skills/validation: post: tags: - Skills - summary: Import skills from GitHub + summary: Validate skill bundle description: | - Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. - operationId: platform-skills-import + Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + operationId: platform-skills-validate x-visibility: Public x-glean-experimental: - id: 9162d790-e101-437d-a9a0-25e4687d150b - introduced: "2026-07-28" - x-codegen-request-body-name: request + id: 0b086fa6-30f8-4279-8d11-10ab0059c14a + introduced: "2026-06-24" requestBody: required: true content: - application/json: + multipart/form-data: schema: - $ref: "#/components/schemas/PlatformSkillImportRequest" + $ref: "#/components/schemas/PlatformSkillValidationRequest" + x-codegen-request-body-name: request responses: "200": - description: Skills imported successfully. + description: Successful response. content: application/json: schema: - $ref: "#/components/schemas/PlatformSkillImportResponse" + $ref: "#/components/schemas/PlatformSkillValidationResponse" "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" - "409": - $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": @@ -510,7 +519,7 @@ paths: "503": $ref: "#/components/responses/PlatformServiceUnavailable" x-speakeasy-group: skills - x-speakeasy-name-override: import + x-speakeasy-name-override: validate security: - APIToken: [] /api/skills/sources/preview: @@ -832,34 +841,631 @@ paths: - Skills summary: Create skill version description: | - Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. - operationId: platform-skills-create-version + Create a new immutable version for an existing caller-managed skill from an uploaded SKILL.md, .zip, or .skill bundle. + operationId: platform-skills-create-version + x-visibility: Public + x-glean-experimental: + id: 0d5e48e2-7a41-4d54-b3aa-5026f0dd65df + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/PlatformSkillVersionCreateRequest" + x-codegen-request-body-name: request + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionCreateResponse" + "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" + "409": + $ref: "#/components/responses/PlatformConflict" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: skills + x-speakeasy-name-override: createVersion + security: + - APIToken: [] + get: + tags: + - Skills + summary: List skill versions + description: | + List versions for a skill available to the authenticated user. + operationId: platform-skills-list-versions + x-visibility: Public + x-glean-experimental: + id: 9efbb8a3-d546-4304-a653-09bb427e3681 + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - in: query + name: page_size + description: Maximum number of versions to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + - in: query + name: cursor + description: Opaque pagination cursor from a previous response. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionsListResponse" + "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: skills + x-speakeasy-name-override: listVersions + security: + - APIToken: [] + /api/skills/{skill_id}/versions/{version}: + get: + tags: + - Skills + summary: Retrieve skill version + description: | + Retrieve metadata for a skill version available to the authenticated user. + operationId: platform-skills-get-version + x-visibility: Public + x-glean-experimental: + id: d70986b1-ad80-48dd-8e52-f294e7251dda + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - name: version + in: path + required: true + description: Major version number. + schema: + type: integer + minimum: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSkillVersionGetResponse" + "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: skills + x-speakeasy-name-override: retrieveVersion + security: + - APIToken: [] + /api/skills/{skill_id}/versions/{version}/content: + get: + tags: + - Skills + summary: Download skill version content + description: | + Download the installable bundle for a skill version available to the authenticated user. + operationId: platform-skills-get-version-content + x-visibility: Public + x-glean-experimental: + id: 70c85692-7042-403a-a3a5-5b315576432a + introduced: "2026-06-24" + parameters: + - name: skill_id + in: path + required: true + description: Glean skill ID. + schema: + type: string + minLength: 1 + - name: version + in: path + required: true + description: Major version number. + schema: + type: integer + minimum: 1 + responses: + "200": + description: Successful response. + headers: + Content-Disposition: + description: Attachment filename for the skill bundle. + schema: + type: string + content: + application/octet-stream: + schema: + type: string + format: binary + "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: skills + x-speakeasy-name-override: retrieveVersionContent + security: + - APIToken: [] + /api/search: + post: + tags: + - Search + summary: Search + description: | + Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. + Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. + operationId: platform-search + x-visibility: Public + x-glean-experimental: + id: 5ab612fc-ed50-4419-bec3-e5fe83934653 + introduced: "2026-04-08" + x-codegen-request-body-name: payload + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchRequest" + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchResponse" + "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" + "422": + $ref: "#/components/responses/PlatformUnprocessableEntity" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: search + x-speakeasy-name-override: query + security: + - APIToken: [] + /api/search/filters: + get: + tags: + - Search + summary: List search filters + description: | + List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. + Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. + operationId: platform-search-filters + x-visibility: Public + x-glean-experimental: + id: 0b585621-13fb-4544-bf20-5e1c99452735 + introduced: "2026-05-12" + parameters: + - in: query + name: datasources + description: | + Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`. + required: false + schema: + type: array + minItems: 1 + items: + type: string + minLength: 1 + - in: query + name: query + description: | + Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + headers: + Cache-Control: + description: | + Present as `no-store` for query-backed discovery responses. Catalog-only responses omit this endpoint-specific override. + schema: + type: string + example: no-store + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformSearchFiltersResponse" + "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: search + x-speakeasy-name-override: listFilters + security: + - APIToken: [] + /api/triggers: + post: + tags: + - Triggers + summary: Create trigger + description: | + Create a trigger from a preset and return it with its signing secret. + operationId: platform-triggers-create + x-visibility: Public + x-glean-experimental: + id: eb175f18-74e6-4c9c-ba02-23bcc9018fc9 + introduced: "2026-07-06" + x-codegen-request-body-name: payload + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerCreateRequest" + responses: + "201": + description: Trigger created. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerCreateResponse" + "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" + "409": + $ref: "#/components/responses/PlatformConflict" + "413": + $ref: "#/components/responses/PlatformRequestTooLarge" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: triggers + x-speakeasy-name-override: create + security: + - APIToken: [] + get: + tags: + - Triggers + summary: List triggers + description: | + List triggers owned by the authenticated caller. + operationId: platform-triggers-list + x-visibility: Public + x-glean-experimental: + id: e3554987-e043-4561-889a-a1117b1bce06 + introduced: "2026-07-06" + parameters: + - in: query + name: page_size + description: Maximum number of triggers to return. + required: false + schema: + type: integer + minimum: 1 + maximum: 100 + default: 50 + - in: query + name: cursor + description: Opaque pagination cursor from a previous response. + required: false + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerListResponse" + "400": + $ref: "#/components/responses/PlatformBadRequest" + "401": + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" + "429": + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: triggers + x-speakeasy-name-override: list + security: + - APIToken: [] + /api/triggers/{trigger_id}: + get: + tags: + - Triggers + summary: Get trigger + description: | + Retrieve a trigger owned by the authenticated caller. + operationId: platform-triggers-get + x-visibility: Public + x-glean-experimental: + id: 46de62cb-ba31-4f71-9646-649c1d604816 + introduced: "2026-07-06" + parameters: + - in: path + name: trigger_id + description: ID of the trigger to retrieve. + required: true + schema: + type: string + minLength: 1 + responses: + "200": + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerGetResponse" + "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: triggers + x-speakeasy-name-override: get + security: + - APIToken: [] + patch: + tags: + - Triggers + summary: Update trigger + description: | + Update a trigger. + operationId: platform-triggers-update + x-visibility: Public + x-glean-experimental: + id: 3eb4c709-bd5c-4019-b913-0db36c766350 + introduced: "2026-07-06" + x-codegen-request-body-name: payload + parameters: + - in: path + name: trigger_id + description: ID of the trigger to update. + required: true + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerUpdateRequest" + responses: + "200": + description: Trigger updated. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerGetResponse" + "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: triggers + x-speakeasy-name-override: update + security: + - APIToken: [] + delete: + tags: + - Triggers + summary: Delete trigger + description: | + Delete a trigger. + operationId: platform-triggers-delete + x-visibility: Public + x-glean-experimental: + id: e6564ed7-8b4b-4708-918b-eed97110859f + introduced: "2026-07-06" + parameters: + - in: path + name: trigger_id + description: ID of the trigger to delete. + required: true + schema: + type: string + minLength: 1 + responses: + "204": + description: Trigger deleted. No content. + "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: triggers + x-speakeasy-name-override: delete + security: + - APIToken: [] + /api/triggers/{trigger_id}/events/search: + post: + tags: + - Triggers + summary: Search events for a trigger + description: | + Search recent content events an existing trigger matches. Read-only — no webhook delivery is made. Covers the last seven days. + operationId: platform-triggers-events-search x-visibility: Public x-glean-experimental: - id: 0d5e48e2-7a41-4d54-b3aa-5026f0dd65df - introduced: "2026-06-24" + id: c734a377-3dec-4ee2-9ec5-3848a8384f03 + introduced: "2026-08-07" parameters: - - name: skill_id - in: path + - in: path + name: trigger_id + description: ID of the trigger whose events to search. required: true - description: Glean skill ID. schema: type: string minLength: 1 requestBody: - required: true + required: false content: - multipart/form-data: + application/json: schema: - $ref: "#/components/schemas/PlatformSkillVersionCreateRequest" - x-codegen-request-body-name: request + $ref: "#/components/schemas/PlatformTriggerEventSearchRequest" responses: "200": description: Successful response. content: application/json: schema: - $ref: "#/components/schemas/PlatformSkillVersionCreateResponse" + $ref: "#/components/schemas/PlatformTriggerEventSearchResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": @@ -870,8 +1476,6 @@ paths: $ref: "#/components/responses/PlatformNotFound" "408": $ref: "#/components/responses/PlatformRequestTimeout" - "409": - $ref: "#/components/responses/PlatformConflict" "413": $ref: "#/components/responses/PlatformRequestTooLarge" "429": @@ -880,37 +1484,39 @@ paths: $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" - x-speakeasy-group: skills - x-speakeasy-name-override: createVersion + x-speakeasy-group: triggers + x-speakeasy-name-override: searchEvents security: - APIToken: [] + /api/trigger-presets: get: tags: - - Skills - summary: List skill versions + - Triggers + summary: List trigger presets description: | - List versions for a skill available to the authenticated user. - operationId: platform-skills-list-versions + List the trigger presets available to the caller. A preset is a curated content-trigger template (e.g. a new Jira ticket) which is passed when creating a trigger. + operationId: platform-trigger-presets-list x-visibility: Public x-glean-experimental: - id: 9efbb8a3-d546-4304-a653-09bb427e3681 - introduced: "2026-06-24" + id: f5b16196-0d4c-42f0-89bf-40313398728e + introduced: "2026-07-22" parameters: - - name: skill_id - in: path - required: true - description: Glean skill ID. + - in: query + name: datasource + description: Restrict results to presets for a single datasource (e.g. jira). + required: false schema: type: string minLength: 1 - in: query name: page_size - description: Maximum number of versions to return. + description: Maximum number of presets to return. required: false schema: type: integer minimum: 1 maximum: 100 + default: 50 - in: query name: cursor description: Opaque pagination cursor from a previous response. @@ -924,15 +1530,13 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PlatformSkillVersionsListResponse" + $ref: "#/components/schemas/PlatformTriggerPresetListResponse" "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": @@ -941,44 +1545,37 @@ paths: $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" - x-speakeasy-group: skills - x-speakeasy-name-override: listVersions + x-speakeasy-group: triggers + x-speakeasy-name-override: listPresets security: - APIToken: [] - /api/skills/{skill_id}/versions/{version}: + /api/trigger-presets/{preset_id}: get: tags: - - Skills - summary: Retrieve skill version + - Triggers + summary: Get trigger preset description: | - Retrieve metadata for a skill version available to the authenticated user. - operationId: platform-skills-get-version + Retrieve a single trigger preset by id. + operationId: platform-trigger-presets-get x-visibility: Public x-glean-experimental: - id: d70986b1-ad80-48dd-8e52-f294e7251dda - introduced: "2026-06-24" + id: 5277167d-909b-4eee-95d1-8958b07016bb + introduced: "2026-07-22" parameters: - - name: skill_id - in: path + - in: path + name: preset_id + description: ID of the preset to retrieve. required: true - description: Glean skill ID. schema: type: string minLength: 1 - - name: version - in: path - required: true - description: Major version number. - schema: - type: integer - minimum: 1 responses: "200": description: Successful response. content: application/json: schema: - $ref: "#/components/schemas/PlatformSkillVersionGetResponse" + $ref: "#/components/schemas/PlatformTriggerPresetGetResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": @@ -995,50 +1592,51 @@ paths: $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" - x-speakeasy-group: skills - x-speakeasy-name-override: retrieveVersion + x-speakeasy-group: triggers + x-speakeasy-name-override: getPreset security: - APIToken: [] - /api/skills/{skill_id}/versions/{version}/content: + /api/trigger-presets/{preset_id}/input-values: get: tags: - - Skills - summary: Download skill version content + - Triggers + summary: Search trigger preset input values description: | - Download the installable bundle for a skill version available to the authenticated user. - operationId: platform-skills-get-version-content + Return up to 300 selectable values for a single picklist input on a preset. Results are intended for typeahead selection and are not cursor-paginated. When `is_truncated` is true, refine `query` to narrow the result set. + operationId: platform-trigger-presets-input-values-list x-visibility: Public x-glean-experimental: - id: 70c85692-7042-403a-a3a5-5b315576432a - introduced: "2026-06-24" + id: 24c5675d-a57a-48cb-9d71-3dece296f28c + introduced: "2026-08-06" parameters: - - name: skill_id - in: path + - in: path + name: preset_id + description: ID of the preset the input belongs to. required: true - description: Glean skill ID. schema: type: string minLength: 1 - - name: version - in: path + - in: query + name: field + description: Field identifier of the input whose values to list. required: true - description: Major version number. schema: - type: integer - minimum: 1 + type: string + minLength: 1 + - in: query + name: query + description: | + Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name. + required: false + schema: + type: string responses: "200": description: Successful response. - headers: - Content-Disposition: - description: Attachment filename for the skill bundle. - schema: - type: string content: - application/octet-stream: + application/json: schema: - type: string - format: binary + $ref: "#/components/schemas/PlatformTriggerPresetInputValueListResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": @@ -1055,37 +1653,43 @@ paths: $ref: "#/components/responses/PlatformInternalServerError" "503": $ref: "#/components/responses/PlatformServiceUnavailable" - x-speakeasy-group: skills - x-speakeasy-name-override: retrieveVersionContent + x-speakeasy-group: triggers + x-speakeasy-name-override: listPresetInputValues security: - APIToken: [] - /api/search: + /api/trigger-presets/{preset_id}/events/search: post: tags: - - Search - summary: Search + - Triggers + summary: Search events for a trigger preset description: | - Search your organization's connected content and return ranked document results with cursor pagination. Use `GET /api/search/filters` to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. - Errors: HTTP 422 `unprocessable_query` returns no `results` or `next_cursor`. See `warnings` on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error. - operationId: platform-search + Search recent content events an unsaved trigger built from this preset would match, to preview it before creating the trigger. Read-only — no trigger is created and no webhook delivery is made. Covers the last seven days. + operationId: platform-trigger-presets-events-search x-visibility: Public x-glean-experimental: - id: 5ab612fc-ed50-4419-bec3-e5fe83934653 - introduced: "2026-04-08" - x-codegen-request-body-name: payload + id: a48efd80-78d6-46de-9f23-5b8c63ecd157 + introduced: "2026-08-12" + parameters: + - in: path + name: preset_id + description: ID of the preset to preview. + required: true + schema: + type: string + minLength: 1 requestBody: - required: true + required: false content: application/json: schema: - $ref: "#/components/schemas/PlatformSearchRequest" + $ref: "#/components/schemas/PlatformTriggerPresetEventSearchRequest" responses: "200": description: Successful response. content: application/json: schema: - $ref: "#/components/schemas/PlatformSearchResponse" + $ref: "#/components/schemas/PlatformTriggerEventSearchResponse" "400": $ref: "#/components/responses/PlatformBadRequest" "401": @@ -1098,83 +1702,14 @@ paths: $ref: "#/components/responses/PlatformRequestTimeout" "413": $ref: "#/components/responses/PlatformRequestTooLarge" - "422": - $ref: "#/components/responses/PlatformUnprocessableEntity" - "429": - $ref: "#/components/responses/PlatformTooManyRequests" - "500": - $ref: "#/components/responses/PlatformInternalServerError" - "503": - $ref: "#/components/responses/PlatformServiceUnavailable" - x-speakeasy-group: search - x-speakeasy-name-override: query - security: - - APIToken: [] - /api/search/filters: - get: - tags: - - Search - summary: List search filters - description: | - List datasources and common built-in filter fields visible to the authenticated user. This is a best-effort catalog, not an exhaustive list of every filter search accepts. - Without `query`, returns field metadata only and does not run a search. With a nonblank `query`, provide exactly one `datasources` value to request suggested filter values for that query; no documents are returned and this endpoint does not include warning objects. See `FilterFieldInfo.values` for limitations on suggested values. Rate-limited requests return HTTP 429 with `Retry-After`; temporary backend unavailability returns HTTP 503. - operationId: platform-search-filters - x-visibility: Public - x-glean-experimental: - id: 0b585621-13fb-4544-bf20-5e1c99452735 - introduced: "2026-05-12" - parameters: - - in: query - name: datasources - description: | - Restrict metadata to one or more datasource identifiers as returned by this endpoint (for example, `jira`). With a nonblank `query`, exactly one datasource is required. Unknown or inaccessible identifiers return `invalid_datasource`. - required: false - schema: - type: array - minItems: 1 - items: - type: string - minLength: 1 - - in: query - name: query - description: | - Optional search query that requests suggested filter values for the selected datasource. Must be nonblank when present. Triggers a search for facet values only; does not return documents. - required: false - schema: - type: string - minLength: 1 - responses: - "200": - description: Successful response. - headers: - Cache-Control: - description: | - Present as `no-store` for query-backed discovery responses. Catalog-only responses omit this endpoint-specific override. - schema: - type: string - example: no-store - content: - application/json: - schema: - $ref: "#/components/schemas/PlatformSearchFiltersResponse" - "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: search - x-speakeasy-name-override: listFilters + x-speakeasy-group: triggers + x-speakeasy-name-override: searchPresetEvents security: - APIToken: [] /rest/api/v1/activity: @@ -3999,14 +4534,15 @@ paths: summary: Get tool definitions from a tool server. description: | Returns the name, description and JSON input schema for the named tools on the - specified tool server. Works for both action packs and MCP servers. + specified tool server. Works for Glean's built-in tools, tool packs and MCP + servers. `toolNames` is required. Names that do not exist on the server are returned in `notFound` rather than failing the request, so a single bad name does not force callers into one-at-a-time retries. Matching is case-insensitive and treats `-` and `_` as equivalent. - Native tools are not served; `serverId=native` returns 404. + Use `serverId=native` for Glean's built-in tools. tags: - Tools security: @@ -6014,6 +6550,8 @@ paths: summary: Chat description: Have a conversation with Glean AI. operationId: chatStream + security: + - APIToken: [] x-visibility: Public x-codegen-request-body-name: payload parameters: @@ -6603,8 +7141,8 @@ components: role: type: string enum: - - user - - assistant + - USER + - ASSISTANT content: type: string minLength: 1 @@ -6616,7 +7154,7 @@ components: properties: input: description: | - Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. + Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. oneOf: - type: string minLength: 1 @@ -6654,7 +7192,7 @@ components: type: type: string enum: - - document + - DOCUMENT document_id: type: string minLength: 1 @@ -6680,7 +7218,7 @@ components: type: type: string enum: - - person + - PERSON person_id: type: string minLength: 1 @@ -6698,7 +7236,7 @@ components: type: type: string enum: - - file + - FILE file_id: type: string minLength: 1 @@ -6718,7 +7256,7 @@ components: type: type: string enum: - - custom_entity + - CUSTOM_ENTITY entity_id: type: string minLength: 1 @@ -6740,10 +7278,10 @@ components: discriminator: propertyName: type mapping: - document: "#/components/schemas/ChatDocumentSource" - person: "#/components/schemas/ChatPersonSource" - file: "#/components/schemas/ChatFileSource" - custom_entity: "#/components/schemas/ChatCustomEntitySource" + DOCUMENT: "#/components/schemas/ChatDocumentSource" + PERSON: "#/components/schemas/ChatPersonSource" + FILE: "#/components/schemas/ChatFileSource" + CUSTOM_ENTITY: "#/components/schemas/ChatCustomEntitySource" PlatformChatCitationSnippet: type: object additionalProperties: false @@ -6766,7 +7304,7 @@ components: type: type: string enum: - - citation + - CITATION sources: type: array minItems: 1 @@ -6795,7 +7333,7 @@ components: type: type: string enum: - - output_text + - OUTPUT_TEXT text: type: string annotations: @@ -6813,11 +7351,11 @@ components: type: type: string enum: - - message + - MESSAGE role: type: string enum: - - assistant + - ASSISTANT content: type: array minItems: 1 @@ -6841,7 +7379,7 @@ components: object: type: string enum: - - response + - RESPONSE created_at: type: string format: date-time @@ -6849,7 +7387,7 @@ components: status: type: string enum: - - completed + - COMPLETED output: type: array minItems: 1 @@ -7008,6 +7546,37 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. + PlatformSkillImportRequest: + type: object + additionalProperties: false + required: + - source_urls + properties: + source_urls: + type: array + minItems: 1 + maxItems: 100 + uniqueItems: true + description: Resolved GitHub skill URLs selected from a source preview. + items: + type: string + minLength: 1 + maxLength: 2048 + PlatformSkillImportResponse: + type: object + required: + - skills + - request_id + properties: + skills: + type: array + minItems: 1 + description: Independently persisted skills in request order. + items: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. PlatformSkillValidationRequest: type: object additionalProperties: false @@ -7062,41 +7631,10 @@ components: items: $ref: "#/components/schemas/PlatformSkillValidationFile" warnings: - type: array - description: Non-blocking validation warnings. - items: - $ref: "#/components/schemas/PlatformWarning" - request_id: - type: string - description: Platform-generated request ID for support correlation. - PlatformSkillImportRequest: - type: object - additionalProperties: false - required: - - source_urls - properties: - source_urls: - type: array - minItems: 1 - maxItems: 100 - uniqueItems: true - description: Resolved GitHub skill URLs selected from a source preview. - items: - type: string - minLength: 1 - maxLength: 2048 - PlatformSkillImportResponse: - type: object - required: - - skills - - request_id - properties: - skills: - type: array - minItems: 1 - description: Independently persisted skills in request order. + type: array + description: Non-blocking validation warnings. items: - $ref: "#/components/schemas/PlatformSkill" + $ref: "#/components/schemas/PlatformWarning" request_id: type: string description: Platform-generated request ID for support correlation. @@ -7614,6 +8152,459 @@ components: type: string minLength: 1 description: Platform-generated request ID for support correlation. + PlatformTriggerStatus: + type: string + description: Current trigger lifecycle state. + example: ENABLED + enum: + - ENABLED + - DISABLED + PlatformTriggerAuth: + type: object + additionalProperties: false + required: + - type + - secret + description: Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. + properties: + type: + type: string + description: Credential scheme. + enum: + - BEARER + secret: + type: string + writeOnly: true + description: Secret credential value. Write-only; never returned on reads. + example: a8f5f167f44f4964e6c998dee827110c + PlatformTriggerDelivery: + type: object + additionalProperties: false + required: + - webhook_url + properties: + webhook_url: + type: string + format: uri + description: URL that signed events are delivered to. + example: https://customer.app/webhook + auth: + $ref: "#/components/schemas/PlatformTriggerAuth" + PlatformTrigger: + type: object + required: + - trigger_id + - preset_id + - status + - delivery + - created_at + - updated_at + properties: + trigger_id: + type: string + description: ID of the trigger. + example: 2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c + preset_id: + type: string + description: ID of the preset this trigger was created from. + example: jira_high_priority_bug + description: + type: string + description: Optional caller-supplied note describing this trigger. + example: High-priority Jira bugs in the Engineering project + status: + $ref: "#/components/schemas/PlatformTriggerStatus" + inputs: + type: object + additionalProperties: true + description: Values supplied for the preset's inputs. + example: + project: ENG + delivery: + $ref: "#/components/schemas/PlatformTriggerDelivery" + created_at: + type: string + format: date-time + description: Time the trigger was created. + updated_at: + type: string + format: date-time + description: Time the trigger was last updated. + PlatformTriggerListResponse: + type: object + required: + - results + - has_more + - next_cursor + - request_id + properties: + results: + type: array + description: Triggers owned by the caller. + items: + $ref: "#/components/schemas/PlatformTrigger" + has_more: + type: boolean + description: Whether additional results are available. + next_cursor: + type: string + nullable: true + description: Cursor for the next page, or null when no more results are available. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformTriggerCreateRequest: + type: object + additionalProperties: false + required: + - preset_id + - delivery + properties: + preset_id: + type: string + description: ID of the preset to instantiate. + example: jira_high_priority_bug + description: + type: string + description: Optional note describing this trigger. + example: High-priority Jira bugs in the Engineering project + inputs: + type: object + additionalProperties: true + description: Values for the preset's inputs. + example: + project: ENG + delivery: + $ref: "#/components/schemas/PlatformTriggerDelivery" + PlatformTriggerWithSecret: + allOf: + - $ref: "#/components/schemas/PlatformTrigger" + - type: object + required: + - signing_secret + properties: + signing_secret: + type: string + description: Secret for verifying webhook signatures. Returned only at creation. + example: whsec_xxx + PlatformTriggerCreateResponse: + type: object + required: + - trigger + - request_id + properties: + trigger: + $ref: "#/components/schemas/PlatformTriggerWithSecret" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformTriggerGetResponse: + type: object + required: + - trigger + - request_id + properties: + trigger: + $ref: "#/components/schemas/PlatformTrigger" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformTriggerUpdateRequest: + type: object + additionalProperties: false + description: Partial update. Only the supplied fields are changed. + properties: + status: + $ref: "#/components/schemas/PlatformTriggerStatus" + description: + type: string + description: Optional note describing this trigger. + example: High-priority Jira bugs in the Engineering project + inputs: + type: object + additionalProperties: true + description: Values for the preset's inputs. + example: + project: ENG + delivery: + $ref: "#/components/schemas/PlatformTriggerDelivery" + PlatformTriggerEventSearchRequest: + type: object + additionalProperties: false + properties: + page_size: + type: integer + description: Maximum number of events to return. + minimum: 1 + maximum: 100 + default: 10 + PlatformTriggerEventType: + type: string + description: The kind of event. + example: DOCUMENT_CHANGE + enum: + - DOCUMENT_CHANGE + x-enumDescriptions: + DOCUMENT_CHANGE: A document was created, updated, or deleted. + x-speakeasy-enum-descriptions: + DOCUMENT_CHANGE: A document was created, updated, or deleted. + PlatformTriggerEventReason: + type: string + description: Why the event fired. + example: CREATED + enum: + - CREATED + - UPDATED + - DELETED + - MEETS_CONDITION + - ASSIGNED + - UNASSIGNED + - LABELED + - UNLABELED + - REVIEW_REQUESTED + - REVIEW_REQUEST_REMOVED + - READY_FOR_REVIEW + - CONVERTED_TO_DRAFT + - WEBHOOK_UPDATED + x-enumDescriptions: + CREATED: The document was created. + UPDATED: The document was updated. + DELETED: The document was deleted. + MEETS_CONDITION: The document started matching the trigger's conditions. + ASSIGNED: The item was assigned to someone. + UNASSIGNED: The item was unassigned. + LABELED: A label was added. + UNLABELED: A label was removed. + REVIEW_REQUESTED: A review was requested. + REVIEW_REQUEST_REMOVED: A review request was withdrawn. + READY_FOR_REVIEW: A draft was marked ready for review. + CONVERTED_TO_DRAFT: The item was converted back to a draft. + WEBHOOK_UPDATED: The source system sent a webhook update. + x-speakeasy-enum-descriptions: + CREATED: The document was created. + UPDATED: The document was updated. + DELETED: The document was deleted. + MEETS_CONDITION: The document started matching the trigger's conditions. + ASSIGNED: The item was assigned to someone. + UNASSIGNED: The item was unassigned. + LABELED: A label was added. + UNLABELED: A label was removed. + REVIEW_REQUESTED: A review was requested. + REVIEW_REQUEST_REMOVED: A review request was withdrawn. + READY_FOR_REVIEW: A draft was marked ready for review. + CONVERTED_TO_DRAFT: The item was converted back to a draft. + WEBHOOK_UPDATED: The source system sent a webhook update. + PlatformTriggerEvent: + type: object + required: + - event_type + - doc_id + - datasource + - doc_type + - view_url + - title + - reason + - event_time + description: A content event a trigger can fire on. + properties: + event_type: + $ref: "#/components/schemas/PlatformTriggerEventType" + datasource: + type: string + description: Datasource the event originated from. + example: GITHUB + reason: + $ref: "#/components/schemas/PlatformTriggerEventReason" + doc_type: + type: string + description: Datasource-specific object type. + example: Ticket + doc_id: + type: string + description: Identifier of the document the event is about. + view_url: + type: string + description: Link to the document in its source system. + title: + type: string + description: Title of the document, or the subject for email. + event_time: + type: string + format: date-time + description: When the event occurred. + PlatformTriggerEventSearchResponse: + type: object + required: + - results + - has_more + - request_id + properties: + results: + type: array + description: Matching events, most recent first. + items: + $ref: "#/components/schemas/PlatformTriggerEvent" + has_more: + type: boolean + description: | + Whether more events matched than were returned. Raise `page_size` to see more; cursor-based paging is not offered yet. + request_id: + type: string + description: Unique identifier for this request, for support and debugging. + PlatformTriggerPresetInputType: + type: string + description: Type of a preset input. + example: PICKLIST + enum: + - PICKLIST + - TEXT + - USER + PlatformTriggerPresetInputValue: + type: object + required: + - value + - display_name + properties: + value: + type: string + description: | + The exact value to send in the trigger's `inputs` for this choice (e.g. a channel name, a user's email, etc). + example: test.user@glean.com + display_name: + type: string + description: Human-readable name for this value. + example: Test User + PlatformTriggerPresetInput: + type: object + required: + - field + - type + - display_name + - is_required + properties: + field: + type: string + description: Identifier of the input, supplied as a key in the trigger's `inputs`. + example: project + type: + $ref: "#/components/schemas/PlatformTriggerPresetInputType" + display_name: + type: string + description: Human-readable name for the input. + example: Project + is_required: + type: boolean + description: Whether the caller must supply a value for this input. + values: + type: array + description: | + Bounded initial set of selectable values for a picklist input. Omitted entirely for free-text inputs. + items: + $ref: "#/components/schemas/PlatformTriggerPresetInputValue" + is_truncated: + type: boolean + description: | + Whether additional selectable values were omitted from `values`. When true, use GET /trigger-presets/{preset_id}/input-values with a query to narrow the result set. + PlatformTriggerPreset: + type: object + required: + - preset_id + - datasource + - display_name + - inputs + properties: + preset_id: + type: string + description: ID of the preset. Pass this when creating a trigger. + example: jira_high_priority_bug + datasource: + type: string + description: Datasource the preset fires on. + example: jira + display_name: + type: string + description: Human-readable preset name. + example: High-priority Jira bugs + description: + type: string + description: Human-readable description of when the preset fires. + example: Fires when a high-priority bug is created. + inputs: + type: array + description: Inputs the caller may supply when creating a trigger from this preset. + items: + $ref: "#/components/schemas/PlatformTriggerPresetInput" + PlatformTriggerPresetListResponse: + type: object + required: + - results + - has_more + - next_cursor + - request_id + properties: + results: + type: array + description: Trigger presets available to the caller. + items: + $ref: "#/components/schemas/PlatformTriggerPreset" + has_more: + type: boolean + description: Whether additional results are available. + next_cursor: + type: string + nullable: true + description: Cursor for the next page, or null when no more results are available. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformTriggerPresetGetResponse: + type: object + required: + - trigger_preset + - request_id + properties: + trigger_preset: + $ref: "#/components/schemas/PlatformTriggerPreset" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformTriggerPresetInputValueListResponse: + type: object + required: + - results + - is_truncated + - request_id + properties: + results: + type: array + description: The bounded set of selectable values matching the query. + items: + $ref: "#/components/schemas/PlatformTriggerPresetInputValue" + is_truncated: + type: boolean + description: | + Whether additional matches were omitted. When true, refine `query` to narrow the result set. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformTriggerPresetEventSearchRequest: + type: object + additionalProperties: false + properties: + inputs: + type: object + description: | + Values for the preset's input fields, keyed by field name. + additionalProperties: + type: string + example: + TITLE: checkout outage + page_size: + type: integer + description: Maximum number of events to return. + minimum: 1 + maximum: 100 + default: 10 ActivityEventParams: properties: bodyContent: @@ -9189,6 +10180,7 @@ components: properties: count: type: integer + format: int64 description: The counter value period: $ref: '#/components/schemas/Period' @@ -14344,6 +15336,7 @@ components: - OOO_PLANNER - OOO_CATCH_UP - ADMIN_HEALTH_CENTER + - KNOWLEDGE_GAP description: Categories of content requested. An allowlist gives flexibility to request content separately or together. requestOptions: $ref: '#/components/schemas/FeedRequestOptions' @@ -14369,6 +15362,19 @@ components: type: boolean description: show a "New" pill next to the item description: UI configurations for each item of the list + CalendarRoomBookingStatus: + type: string + enum: + - NONE + - ACCEPTED + - DECLINED + - PENDING + description: The current booking status of the room resource associated with an event. + x-enum-varnames: + - CALENDAR_ROOM_BOOKING_STATUS_NONE + - CALENDAR_ROOM_BOOKING_STATUS_ACCEPTED + - CALENDAR_ROOM_BOOKING_STATUS_DECLINED + - CALENDAR_ROOM_BOOKING_STATUS_PENDING ConferenceData: properties: provider: @@ -14473,6 +15479,15 @@ components: description: A permalink for this calendar event attendees: $ref: '#/components/schemas/CalendarAttendees' + isOrganizer: + type: boolean + description: Whether the requesting user is the organizer of this event. + nullable: true + roomBookingStatus: + $ref: '#/components/schemas/CalendarRoomBookingStatus' + roomName: + type: string + description: The display name of the room resource associated with this event. location: type: string description: The location that this event is taking place at. @@ -14773,6 +15788,7 @@ components: - STARTER_KIT_ORG_CHART - STARTER_KIT_ADD_DOC - MEETING_RECAP + - MEETING_ROOM - MEETING_PREP_AUTOMATION - ACTIVE_DISCUSSION - MID_DAY_CATCH_UP @@ -14789,6 +15805,7 @@ components: - OOO_PLANNER - OOO_CATCH_UP - ADMIN_HEALTH_CENTER + - KNOWLEDGE_GAP description: Type of the justification. justification: type: string @@ -14880,6 +15897,7 @@ components: - OOO_PLANNER - OOO_CATCH_UP - ADMIN_HEALTH_CENTER + - KNOWLEDGE_GAP description: Category of the result, one of the requested categories in incoming request. primaryEntry: $ref: '#/components/schemas/FeedEntry' @@ -14896,7 +15914,8 @@ components: enum: - ORGANIC - PROMO - description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + - PINNED + description: Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). required: - category - primaryEntry diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index bbf00bc2..d82e67b6 100644 --- a/.speakeasy/tests.arazzo.yaml +++ b/.speakeasy/tests.arazzo.yaml @@ -159063,7 +159063,7 @@ workflows: - condition: $response.header.Content-Type == application/json - context: $response.body condition: | - {"id":"","object":"response","created_at":"2026-05-19T05:32:52.505Z","status":"completed","output":[{"type":"message","role":"assistant","content":[{"type":"output_text","text":""}]}],"store":false,"request_id":""} + {"id":"","object":"RESPONSE","created_at":"2026-05-19T05:32:52.505Z","status":"COMPLETED","output":[{"type":"MESSAGE","role":"ASSISTANT","content":[{"type":"OUTPUT_TEXT","text":""}]}],"store":false,"request_id":""} type: simple x-speakeasy-test-group: chat_SDK x-speakeasy-test-rebuild: true @@ -159286,3 +159286,185 @@ workflows: type: simple x-speakeasy-test-group: people x-speakeasy-test-rebuild: true + - workflowId: platform-triggers-create + steps: + - stepId: test + operationId: platform-triggers-create + requestBody: + contentType: application/json + payload: + delivery: + auth: + secret: a8f5f167f44f4964e6c998dee827110c + type: BEARER + webhook_url: https://customer.app/webhook + description: High-priority Jira bugs in the Engineering project + inputs: + project: ENG + preset_id: jira_high_priority_bug + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"trigger":{"trigger_id":"2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c","preset_id":"jira_high_priority_bug","description":"High-priority Jira bugs in the Engineering project","status":"ENABLED","inputs":{"project":"ENG"},"delivery":{"webhook_url":"https://customer.app/webhook"},"created_at":"2025-08-17T18:19:46.877Z","updated_at":"2024-09-14T03:27:40.201Z","signing_secret":"whsec_xxx"},"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-triggers-list + steps: + - stepId: test + operationId: platform-triggers-list + parameters: + - name: page_size + in: query + value: 50 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[],"has_more":true,"next_cursor":"","request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-triggers-get + steps: + - stepId: test + operationId: platform-triggers-get + parameters: + - name: trigger_id + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"trigger":{"trigger_id":"2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c","preset_id":"jira_high_priority_bug","description":"High-priority Jira bugs in the Engineering project","status":"ENABLED","inputs":{"project":"ENG"},"delivery":{"webhook_url":"https://customer.app/webhook"},"created_at":"2024-01-06T01:37:37.232Z","updated_at":"2025-07-02T01:19:47.126Z"},"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-triggers-update + steps: + - stepId: test + operationId: platform-triggers-update + parameters: + - name: trigger_id + in: path + value: + requestBody: + contentType: application/json + payload: + delivery: + auth: + secret: a8f5f167f44f4964e6c998dee827110c + type: BEARER + webhook_url: https://customer.app/webhook + description: High-priority Jira bugs in the Engineering project + inputs: + project: ENG + status: ENABLED + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"trigger":{"trigger_id":"2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c","preset_id":"jira_high_priority_bug","description":"High-priority Jira bugs in the Engineering project","status":"ENABLED","inputs":{"project":"ENG"},"delivery":{"webhook_url":"https://customer.app/webhook"},"created_at":"2026-09-03T11:57:47.699Z","updated_at":"2026-01-25T02:15:09.513Z"},"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-triggers-events-search + steps: + - stepId: test + operationId: platform-triggers-events-search + parameters: + - name: trigger_id + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[{"event_type":"DOCUMENT_CHANGE","datasource":"GITHUB","reason":"CREATED","doc_type":"Ticket","doc_id":"","view_url":"https://silent-omelet.biz","title":"","event_time":"2024-06-12T22:23:25.274Z"}],"has_more":false,"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-trigger-presets-list + steps: + - stepId: test + operationId: platform-trigger-presets-list + parameters: + - name: page_size + in: query + value: 50 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[],"has_more":false,"next_cursor":null,"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-trigger-presets-get + steps: + - stepId: test + operationId: platform-trigger-presets-get + parameters: + - name: preset_id + in: path + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"trigger_preset":{"preset_id":"jira_high_priority_bug","datasource":"jira","display_name":"High-priority Jira bugs","description":"Fires when a high-priority bug is created.","inputs":[]},"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-trigger-presets-input-values-list + steps: + - stepId: test + operationId: platform-trigger-presets-input-values-list + parameters: + - name: preset_id + in: path + value: + - name: field + in: query + value: + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[{"value":"test.user@glean.com","display_name":"Test User"}],"is_truncated":false,"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true + - workflowId: platform-trigger-presets-events-search + steps: + - stepId: test + operationId: platform-trigger-presets-events-search + parameters: + - name: preset_id + in: path + value: + requestBody: + contentType: application/json + payload: + inputs: + TITLE: checkout outage + page_size: 10 + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"results":[{"event_type":"DOCUMENT_CHANGE","datasource":"GITHUB","reason":"CREATED","doc_type":"Ticket","doc_id":"","view_url":"https://prickly-cutover.info/","title":"","event_time":"2025-04-15T15:45:31.544Z"}],"has_more":false,"request_id":""} + type: simple + x-speakeasy-test-group: triggers + x-speakeasy-test-rebuild: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 137e8640..4ceb70b3 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.792.0 +speakeasyVersion: 1.795.0 sources: Glean API: sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:ca77ef4550d695da210e8f0d32f3422d29e9d09f7aa66f7b13d248c6ec8c7941 - sourceBlobDigest: sha256:469de4cd2c8ab4928c3989656bf63cc265a8ceea5a8b3e3498734137b19723f8 + sourceRevisionDigest: sha256:60c1d977225b9738eadbbad6fa510250e046e3c366339339693f2e4e0105d9f4 + sourceBlobDigest: sha256:606bf976b7e0df58502363bf80d360070b5430303f05547854383f1962e1fc65 tags: - latest Glean Client API: @@ -16,10 +16,10 @@ targets: glean: source: Glean API sourceNamespace: glean-api-specs - sourceRevisionDigest: sha256:ca77ef4550d695da210e8f0d32f3422d29e9d09f7aa66f7b13d248c6ec8c7941 - sourceBlobDigest: sha256:469de4cd2c8ab4928c3989656bf63cc265a8ceea5a8b3e3498734137b19723f8 + sourceRevisionDigest: sha256:60c1d977225b9738eadbbad6fa510250e046e3c366339339693f2e4e0105d9f4 + sourceBlobDigest: sha256:606bf976b7e0df58502363bf80d360070b5430303f05547854383f1962e1fc65 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:2c3560eb6c6ea1afdbbf7fd64c9e27673ca3ae028fb784f30ecd9151553898f8 + codeSamplesRevisionDigest: sha256:1aa9f4ec562c132b4cb01b6456242b48890feccfe1d3d41c8cbd162b9ee72119 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index a7ebe040..bdb7349c 100644 --- a/README.md +++ b/README.md @@ -561,8 +561,8 @@ For more information on obtaining the appropriate token type, please contact you * [create](docs/sdks/skills/README.md#create) - Create skill * [list](docs/sdks/skills/README.md#list) - List skills -* [validate](docs/sdks/skills/README.md#validate) - Validate skill bundle * [import_](docs/sdks/skills/README.md#import_) - Import skills from GitHub +* [validate](docs/sdks/skills/README.md#validate) - Validate skill bundle * [preview_source](docs/sdks/skills/README.md#preview_source) - Preview a GitHub skill source * [update](docs/sdks/skills/README.md#update) - Update skill * [delete](docs/sdks/skills/README.md#delete) - Delete skill @@ -574,6 +574,19 @@ For more information on obtaining the appropriate token type, please contact you * [retrieve_version](docs/sdks/skills/README.md#retrieve_version) - Retrieve skill version * [retrieve_version_content](docs/sdks/skills/README.md#retrieve_version_content) - Download skill version content +### [Triggers](docs/sdks/triggers/README.md) + +* [create](docs/sdks/triggers/README.md#create) - Create trigger +* [list](docs/sdks/triggers/README.md#list) - List triggers +* [get](docs/sdks/triggers/README.md#get) - Get trigger +* [update](docs/sdks/triggers/README.md#update) - Update trigger +* [delete](docs/sdks/triggers/README.md#delete) - Delete trigger +* [search_events](docs/sdks/triggers/README.md#search_events) - Search events for a trigger +* [list_presets](docs/sdks/triggers/README.md#list_presets) - List trigger presets +* [get_preset](docs/sdks/triggers/README.md#get_preset) - Get trigger preset +* [list_preset_input_values](docs/sdks/triggers/README.md#list_preset_input_values) - Search trigger preset input values +* [search_preset_events](docs/sdks/triggers/README.md#search_preset_events) - Search events for a trigger preset + @@ -889,6 +902,20 @@ class CustomClient(AsyncHttpClient): s = Glean(async_client=CustomClient(httpx.AsyncClient())) ``` +### httpx2 (Pydantic's httpx fork) + +[httpx2](https://httpx2.pydantic.dev/) is Pydantic's maintained fork of `httpx`. To run this SDK on httpx2, call `alias_httpx()` at your program's entry point, before importing the SDK, so every `import httpx` — including the ones inside the SDK — resolves to `httpx2`: +```python +import httpx2 + +httpx2.alias_httpx() + +from glean.api_client import Glean + +s = Glean() +``` + +An SDK can also be generated against httpx2 directly, so it depends on the fork instead of `httpx`, by setting `python.httpClientLibrary: httpx2` in `gen.yaml`. diff --git a/RELEASES.md b/RELEASES.md index 12d27e04..8ece99e6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -818,4 +818,14 @@ Based on: ### Generated - [python v0.15.5] . ### Releases -- [PyPI v0.15.5] https://pypi.org/project/glean-api-client/0.15.5 - . \ No newline at end of file +- [PyPI v0.15.5] https://pypi.org/project/glean-api-client/0.15.5 - . + +## 2026-08-19 01:16:12 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.795.0 (2.931.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.16.0] . +### Releases +- [PyPI v0.16.0] https://pypi.org/project/glean-api-client/0.16.0 - . \ No newline at end of file diff --git a/docs/models/calendarevent.md b/docs/models/calendarevent.md index 91c8c22a..077d4b46 100644 --- a/docs/models/calendarevent.md +++ b/docs/models/calendarevent.md @@ -5,18 +5,21 @@ A generic, light-weight calendar event. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `time` | [Optional[models.TimeInterval]](../models/timeinterval.md) | :heavy_minus_sign: | N/A | -| `event_type` | [Optional[models.CalendarEventEventType]](../models/calendareventeventtype.md) | :heavy_minus_sign: | The nature of the event, for example "out of office". | -| `id` | *str* | :heavy_check_mark: | The calendar event id | -| `url` | *str* | :heavy_check_mark: | A permalink for this calendar event | -| `attendees` | [Optional[models.CalendarAttendees]](../models/calendarattendees.md) | :heavy_minus_sign: | N/A | -| `location` | *Optional[str]* | :heavy_minus_sign: | The location that this event is taking place at. | -| `conference_data` | [Optional[models.ConferenceData]](../models/conferencedata.md) | :heavy_minus_sign: | N/A | -| `description` | *Optional[str]* | :heavy_minus_sign: | The HTML description of the event. | -| `datasource` | *Optional[str]* | :heavy_minus_sign: | The app or other repository type from which the event was extracted | -| `has_transcript` | *Optional[bool]* | :heavy_minus_sign: | The event has a transcript associated with it enabling features like summarization | -| `transcript_url` | *Optional[str]* | :heavy_minus_sign: | A link to the transcript of the event | -| `classifications` | List[[models.EventClassification](../models/eventclassification.md)] | :heavy_minus_sign: | N/A | -| `generated_attachments` | List[[models.GeneratedAttachment](../models/generatedattachment.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `time` | [Optional[models.TimeInterval]](../models/timeinterval.md) | :heavy_minus_sign: | N/A | +| `event_type` | [Optional[models.CalendarEventEventType]](../models/calendareventeventtype.md) | :heavy_minus_sign: | The nature of the event, for example "out of office". | +| `id` | *str* | :heavy_check_mark: | The calendar event id | +| `url` | *str* | :heavy_check_mark: | A permalink for this calendar event | +| `attendees` | [Optional[models.CalendarAttendees]](../models/calendarattendees.md) | :heavy_minus_sign: | N/A | +| `is_organizer` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the requesting user is the organizer of this event. | +| `room_booking_status` | [Optional[models.CalendarRoomBookingStatus]](../models/calendarroombookingstatus.md) | :heavy_minus_sign: | The current booking status of the room resource associated with an event. | +| `room_name` | *Optional[str]* | :heavy_minus_sign: | The display name of the room resource associated with this event. | +| `location` | *Optional[str]* | :heavy_minus_sign: | The location that this event is taking place at. | +| `conference_data` | [Optional[models.ConferenceData]](../models/conferencedata.md) | :heavy_minus_sign: | N/A | +| `description` | *Optional[str]* | :heavy_minus_sign: | The HTML description of the event. | +| `datasource` | *Optional[str]* | :heavy_minus_sign: | The app or other repository type from which the event was extracted | +| `has_transcript` | *Optional[bool]* | :heavy_minus_sign: | The event has a transcript associated with it enabling features like summarization | +| `transcript_url` | *Optional[str]* | :heavy_minus_sign: | A link to the transcript of the event | +| `classifications` | List[[models.EventClassification](../models/eventclassification.md)] | :heavy_minus_sign: | N/A | +| `generated_attachments` | List[[models.GeneratedAttachment](../models/generatedattachment.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/calendarroombookingstatus.md b/docs/models/calendarroombookingstatus.md new file mode 100644 index 00000000..a26d6c42 --- /dev/null +++ b/docs/models/calendarroombookingstatus.md @@ -0,0 +1,23 @@ +# CalendarRoomBookingStatus + +The current booking status of the room resource associated with an event. + +## Example Usage + +```python +from glean.api_client.models import CalendarRoomBookingStatus + +value = CalendarRoomBookingStatus.NONE + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `NONE` | NONE | +| `ACCEPTED` | ACCEPTED | +| `DECLINED` | DECLINED | +| `PENDING` | PENDING | \ No newline at end of file diff --git a/docs/models/feedrequestcategory.md b/docs/models/feedrequestcategory.md index c3eab96e..35d5beb1 100644 --- a/docs/models/feedrequestcategory.md +++ b/docs/models/feedrequestcategory.md @@ -57,4 +57,5 @@ value = FeedRequestCategory.DOCUMENT_SUGGESTION | `DEMO_CARD` | DEMO_CARD | | `OOO_PLANNER` | OOO_PLANNER | | `OOO_CATCH_UP` | OOO_CATCH_UP | -| `ADMIN_HEALTH_CENTER` | ADMIN_HEALTH_CENTER | \ No newline at end of file +| `ADMIN_HEALTH_CENTER` | ADMIN_HEALTH_CENTER | +| `KNOWLEDGE_GAP` | KNOWLEDGE_GAP | \ No newline at end of file diff --git a/docs/models/feedresult.md b/docs/models/feedresult.md index f14153ca..f6f92abf 100644 --- a/docs/models/feedresult.md +++ b/docs/models/feedresult.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `category` | [models.FeedResultCategory](../models/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | -| `primary_entry` | [models.FeedEntry](../models/feedentry.md) | :heavy_check_mark: | N/A | -| `secondary_entries` | List[[models.FeedEntry](../models/feedentry.md)] | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | -| `rank` | *Optional[int]* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | -| `placement_reason` | [Optional[models.PlacementReason]](../models/placementreason.md) | :heavy_minus_sign: | Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `category` | [models.FeedResultCategory](../models/feedresultcategory.md) | :heavy_check_mark: | Category of the result, one of the requested categories in incoming request. | +| `primary_entry` | [models.FeedEntry](../models/feedentry.md) | :heavy_check_mark: | N/A | +| `secondary_entries` | List[[models.FeedEntry](../models/feedentry.md)] | :heavy_minus_sign: | Secondary entries for the result e.g. suggested docs for the calendar, carousel. | +| `rank` | *Optional[int]* | :heavy_minus_sign: | Rank of the result. Rank is suggested by server. Client side rank may differ. | +| `placement_reason` | [Optional[models.PlacementReason]](../models/placementreason.md) | :heavy_minus_sign: | Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). | \ No newline at end of file diff --git a/docs/models/feedresultcategory.md b/docs/models/feedresultcategory.md index c27f4b3b..3689b4f8 100644 --- a/docs/models/feedresultcategory.md +++ b/docs/models/feedresultcategory.md @@ -61,4 +61,5 @@ value = FeedResultCategory.DOCUMENT_SUGGESTION | `DEMO_CARD` | DEMO_CARD | | `OOO_PLANNER` | OOO_PLANNER | | `OOO_CATCH_UP` | OOO_CATCH_UP | -| `ADMIN_HEALTH_CENTER` | ADMIN_HEALTH_CENTER | \ No newline at end of file +| `ADMIN_HEALTH_CENTER` | ADMIN_HEALTH_CENTER | +| `KNOWLEDGE_GAP` | KNOWLEDGE_GAP | \ No newline at end of file diff --git a/docs/models/input.md b/docs/models/input.md index 3df08308..c54bec05 100644 --- a/docs/models/input.md +++ b/docs/models/input.md @@ -1,6 +1,6 @@ # Input -Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. +Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. diff --git a/docs/models/justificationtype.md b/docs/models/justificationtype.md index cff9e6dd..c8bb723f 100644 --- a/docs/models/justificationtype.md +++ b/docs/models/justificationtype.md @@ -59,6 +59,7 @@ value = JustificationType.FREQUENTLY_ACCESSED | `STARTER_KIT_ORG_CHART` | STARTER_KIT_ORG_CHART | | `STARTER_KIT_ADD_DOC` | STARTER_KIT_ADD_DOC | | `MEETING_RECAP` | MEETING_RECAP | +| `MEETING_ROOM` | MEETING_ROOM | | `MEETING_PREP_AUTOMATION` | MEETING_PREP_AUTOMATION | | `ACTIVE_DISCUSSION` | ACTIVE_DISCUSSION | | `MID_DAY_CATCH_UP` | MID_DAY_CATCH_UP | @@ -74,4 +75,5 @@ value = JustificationType.FREQUENTLY_ACCESSED | `DEMO_CARD` | DEMO_CARD | | `OOO_PLANNER` | OOO_PLANNER | | `OOO_CATCH_UP` | OOO_CATCH_UP | -| `ADMIN_HEALTH_CENTER` | ADMIN_HEALTH_CENTER | \ No newline at end of file +| `ADMIN_HEALTH_CENTER` | ADMIN_HEALTH_CENTER | +| `KNOWLEDGE_GAP` | KNOWLEDGE_GAP | \ No newline at end of file diff --git a/docs/models/object.md b/docs/models/object.md index fedbfbb5..06f80d51 100644 --- a/docs/models/object.md +++ b/docs/models/object.md @@ -13,4 +13,4 @@ value = Object.RESPONSE | Name | Value | | ---------- | ---------- | -| `RESPONSE` | response | \ No newline at end of file +| `RESPONSE` | RESPONSE | \ No newline at end of file diff --git a/docs/models/placementreason.md b/docs/models/placementreason.md index 515cd010..f17278f2 100644 --- a/docs/models/placementreason.md +++ b/docs/models/placementreason.md @@ -1,6 +1,6 @@ # PlacementReason -Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. +Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). ## Example Usage @@ -18,4 +18,5 @@ value = PlacementReason.ORGANIC | Name | Value | | --------- | --------- | | `ORGANIC` | ORGANIC | -| `PROMO` | PROMO | \ No newline at end of file +| `PROMO` | PROMO | +| `PINNED` | PINNED | \ No newline at end of file diff --git a/docs/models/platformchatcitationannotationtype.md b/docs/models/platformchatcitationannotationtype.md index e3bd53ef..8b83f20e 100644 --- a/docs/models/platformchatcitationannotationtype.md +++ b/docs/models/platformchatcitationannotationtype.md @@ -13,4 +13,4 @@ value = PlatformChatCitationAnnotationType.CITATION | Name | Value | | ---------- | ---------- | -| `CITATION` | citation | \ No newline at end of file +| `CITATION` | CITATION | \ No newline at end of file diff --git a/docs/models/platformchatcompletedresponsestatus.md b/docs/models/platformchatcompletedresponsestatus.md index 904a9c8a..8bed3e06 100644 --- a/docs/models/platformchatcompletedresponsestatus.md +++ b/docs/models/platformchatcompletedresponsestatus.md @@ -13,4 +13,4 @@ value = PlatformChatCompletedResponseStatus.COMPLETED | Name | Value | | ----------- | ----------- | -| `COMPLETED` | completed | \ No newline at end of file +| `COMPLETED` | COMPLETED | \ No newline at end of file diff --git a/docs/models/platformchatcreaterequest.md b/docs/models/platformchatcreaterequest.md index 6b00a961..f37f1031 100644 --- a/docs/models/platformchatcreaterequest.md +++ b/docs/models/platformchatcreaterequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `input` | [models.Input](../models/input.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`.
| +| `input` | [models.Input](../models/input.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| | `stream` | *Optional[bool]* | :heavy_minus_sign: | When true, respond with `text/event-stream`. When false or omitted, respond with `application/json`.
| | `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| | `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| \ No newline at end of file diff --git a/docs/models/platformchatcustomentitysourcetype.md b/docs/models/platformchatcustomentitysourcetype.md index 67daadbc..5f5b4fc6 100644 --- a/docs/models/platformchatcustomentitysourcetype.md +++ b/docs/models/platformchatcustomentitysourcetype.md @@ -13,4 +13,4 @@ value = PlatformChatCustomEntitySourceType.CUSTOM_ENTITY | Name | Value | | --------------- | --------------- | -| `CUSTOM_ENTITY` | custom_entity | \ No newline at end of file +| `CUSTOM_ENTITY` | CUSTOM_ENTITY | \ No newline at end of file diff --git a/docs/models/platformchatdocumentsourcetype1.md b/docs/models/platformchatdocumentsourcetype1.md index 60cb54d7..81404bd8 100644 --- a/docs/models/platformchatdocumentsourcetype1.md +++ b/docs/models/platformchatdocumentsourcetype1.md @@ -13,4 +13,4 @@ value = PlatformChatDocumentSourceType1.DOCUMENT | Name | Value | | ---------- | ---------- | -| `DOCUMENT` | document | \ No newline at end of file +| `DOCUMENT` | DOCUMENT | \ No newline at end of file diff --git a/docs/models/platformchatdocumentsourcetype2.md b/docs/models/platformchatdocumentsourcetype2.md index 1fd23049..30967f45 100644 --- a/docs/models/platformchatdocumentsourcetype2.md +++ b/docs/models/platformchatdocumentsourcetype2.md @@ -13,4 +13,4 @@ value = PlatformChatDocumentSourceType2.DOCUMENT | Name | Value | | ---------- | ---------- | -| `DOCUMENT` | document | \ No newline at end of file +| `DOCUMENT` | DOCUMENT | \ No newline at end of file diff --git a/docs/models/platformchatfilesourcetype.md b/docs/models/platformchatfilesourcetype.md index 156db8e2..eccc6d3a 100644 --- a/docs/models/platformchatfilesourcetype.md +++ b/docs/models/platformchatfilesourcetype.md @@ -13,4 +13,4 @@ value = PlatformChatFileSourceType.FILE | Name | Value | | ------ | ------ | -| `FILE` | file | \ No newline at end of file +| `FILE` | FILE | \ No newline at end of file diff --git a/docs/models/platformchatinputmessagerole.md b/docs/models/platformchatinputmessagerole.md index b756fc95..cdf92876 100644 --- a/docs/models/platformchatinputmessagerole.md +++ b/docs/models/platformchatinputmessagerole.md @@ -13,5 +13,5 @@ value = PlatformChatInputMessageRole.USER | Name | Value | | ----------- | ----------- | -| `USER` | user | -| `ASSISTANT` | assistant | \ No newline at end of file +| `USER` | USER | +| `ASSISTANT` | ASSISTANT | \ No newline at end of file diff --git a/docs/models/platformchatoutputmessagerole.md b/docs/models/platformchatoutputmessagerole.md index 7f8dc494..07e97be1 100644 --- a/docs/models/platformchatoutputmessagerole.md +++ b/docs/models/platformchatoutputmessagerole.md @@ -13,4 +13,4 @@ value = PlatformChatOutputMessageRole.ASSISTANT | Name | Value | | ----------- | ----------- | -| `ASSISTANT` | assistant | \ No newline at end of file +| `ASSISTANT` | ASSISTANT | \ No newline at end of file diff --git a/docs/models/platformchatoutputmessagetype.md b/docs/models/platformchatoutputmessagetype.md index 8e2d0020..c1406850 100644 --- a/docs/models/platformchatoutputmessagetype.md +++ b/docs/models/platformchatoutputmessagetype.md @@ -13,4 +13,4 @@ value = PlatformChatOutputMessageType.MESSAGE | Name | Value | | --------- | --------- | -| `MESSAGE` | message | \ No newline at end of file +| `MESSAGE` | MESSAGE | \ No newline at end of file diff --git a/docs/models/platformchatoutputtextcontenttype.md b/docs/models/platformchatoutputtextcontenttype.md index 05886daa..2f8f45b2 100644 --- a/docs/models/platformchatoutputtextcontenttype.md +++ b/docs/models/platformchatoutputtextcontenttype.md @@ -13,4 +13,4 @@ value = PlatformChatOutputTextContentType.OUTPUT_TEXT | Name | Value | | ------------- | ------------- | -| `OUTPUT_TEXT` | output_text | \ No newline at end of file +| `OUTPUT_TEXT` | OUTPUT_TEXT | \ No newline at end of file diff --git a/docs/models/platformchatpersonsourcetype.md b/docs/models/platformchatpersonsourcetype.md index 3c36b121..4648aec0 100644 --- a/docs/models/platformchatpersonsourcetype.md +++ b/docs/models/platformchatpersonsourcetype.md @@ -13,4 +13,4 @@ value = PlatformChatPersonSourceType.PERSON | Name | Value | | -------- | -------- | -| `PERSON` | person | \ No newline at end of file +| `PERSON` | PERSON | \ No newline at end of file diff --git a/docs/models/platformtrigger.md b/docs/models/platformtrigger.md new file mode 100644 index 00000000..f3e02df0 --- /dev/null +++ b/docs/models/platformtrigger.md @@ -0,0 +1,15 @@ +# PlatformTrigger + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger. | 2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset this trigger was created from. | jira_high_priority_bug | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional caller-supplied note describing this trigger. | High-priority Jira bugs in the Engineering project | +| `status` | [models.PlatformTriggerStatus](../models/platformtriggerstatus.md) | :heavy_check_mark: | Current trigger lifecycle state. | ENABLED | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values supplied for the preset's inputs. | {
"project": "ENG"
} | +| `delivery` | [models.PlatformTriggerDeliveryOutput](../models/platformtriggerdeliveryoutput.md) | :heavy_check_mark: | N/A | | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Time the trigger was created. | | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Time the trigger was last updated. | | \ No newline at end of file diff --git a/docs/models/platformtriggerauth.md b/docs/models/platformtriggerauth.md new file mode 100644 index 00000000..3ac3da2d --- /dev/null +++ b/docs/models/platformtriggerauth.md @@ -0,0 +1,11 @@ +# PlatformTriggerAuth + +Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `type` | [models.PlatformTriggerAuthType](../models/platformtriggerauthtype.md) | :heavy_check_mark: | Credential scheme. | | +| `secret` | *str* | :heavy_check_mark: | Secret credential value. Write-only; never returned on reads. | a8f5f167f44f4964e6c998dee827110c | \ No newline at end of file diff --git a/docs/models/platformtriggerauthoutput.md b/docs/models/platformtriggerauthoutput.md new file mode 100644 index 00000000..a83975e6 --- /dev/null +++ b/docs/models/platformtriggerauthoutput.md @@ -0,0 +1,10 @@ +# PlatformTriggerAuthOutput + +Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `type` | [models.PlatformTriggerAuthType](../models/platformtriggerauthtype.md) | :heavy_check_mark: | Credential scheme. | \ No newline at end of file diff --git a/docs/models/platformtriggerauthtype.md b/docs/models/platformtriggerauthtype.md new file mode 100644 index 00000000..18bca2b7 --- /dev/null +++ b/docs/models/platformtriggerauthtype.md @@ -0,0 +1,18 @@ +# PlatformTriggerAuthType + +Credential scheme. + +## Example Usage + +```python +from glean.api_client.models import PlatformTriggerAuthType + +value = PlatformTriggerAuthType.BEARER +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `BEARER` | BEARER | \ No newline at end of file diff --git a/docs/models/platformtriggercreaterequest.md b/docs/models/platformtriggercreaterequest.md new file mode 100644 index 00000000..1ac177d1 --- /dev/null +++ b/docs/models/platformtriggercreaterequest.md @@ -0,0 +1,11 @@ +# PlatformTriggerCreateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset to instantiate. | jira_high_priority_bug | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional note describing this trigger. | High-priority Jira bugs in the Engineering project | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"project": "ENG"
} | +| `delivery` | [models.PlatformTriggerDelivery](../models/platformtriggerdelivery.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/platformtriggercreateresponse.md b/docs/models/platformtriggercreateresponse.md new file mode 100644 index 00000000..3a9417a8 --- /dev/null +++ b/docs/models/platformtriggercreateresponse.md @@ -0,0 +1,9 @@ +# PlatformTriggerCreateResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `trigger` | [models.PlatformTriggerWithSecret](../models/platformtriggerwithsecret.md) | :heavy_check_mark: | N/A | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformtriggerdelivery.md b/docs/models/platformtriggerdelivery.md new file mode 100644 index 00000000..8aeb6854 --- /dev/null +++ b/docs/models/platformtriggerdelivery.md @@ -0,0 +1,9 @@ +# PlatformTriggerDelivery + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `webhook_url` | *str* | :heavy_check_mark: | URL that signed events are delivered to. | https://customer.app/webhook | +| `auth` | [Optional[models.PlatformTriggerAuth]](../models/platformtriggerauth.md) | :heavy_minus_sign: | Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. | | \ No newline at end of file diff --git a/docs/models/platformtriggerdeliveryoutput.md b/docs/models/platformtriggerdeliveryoutput.md new file mode 100644 index 00000000..1b7ab7c2 --- /dev/null +++ b/docs/models/platformtriggerdeliveryoutput.md @@ -0,0 +1,9 @@ +# PlatformTriggerDeliveryOutput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `webhook_url` | *str* | :heavy_check_mark: | URL that signed events are delivered to. | https://customer.app/webhook | +| `auth` | [Optional[models.PlatformTriggerAuthOutput]](../models/platformtriggerauthoutput.md) | :heavy_minus_sign: | Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. | | \ No newline at end of file diff --git a/docs/models/platformtriggerevent.md b/docs/models/platformtriggerevent.md new file mode 100644 index 00000000..931bb314 --- /dev/null +++ b/docs/models/platformtriggerevent.md @@ -0,0 +1,17 @@ +# PlatformTriggerEvent + +A content event a trigger can fire on. + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `event_type` | [models.PlatformTriggerEventType](../models/platformtriggereventtype.md) | :heavy_check_mark: | The kind of event. | DOCUMENT_CHANGE | +| `datasource` | *str* | :heavy_check_mark: | Datasource the event originated from. | GITHUB | +| `reason` | [models.PlatformTriggerEventReason](../models/platformtriggereventreason.md) | :heavy_check_mark: | Why the event fired. | CREATED | +| `doc_type` | *str* | :heavy_check_mark: | Datasource-specific object type. | Ticket | +| `doc_id` | *str* | :heavy_check_mark: | Identifier of the document the event is about. | | +| `view_url` | *str* | :heavy_check_mark: | Link to the document in its source system. | | +| `title` | *str* | :heavy_check_mark: | Title of the document, or the subject for email. | | +| `event_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the event occurred. | | \ No newline at end of file diff --git a/docs/models/platformtriggereventreason.md b/docs/models/platformtriggereventreason.md new file mode 100644 index 00000000..e3c221b8 --- /dev/null +++ b/docs/models/platformtriggereventreason.md @@ -0,0 +1,32 @@ +# PlatformTriggerEventReason + +Why the event fired. + +## Example Usage + +```python +from glean.api_client.models import PlatformTriggerEventReason + +value = PlatformTriggerEventReason.CREATED + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `CREATED` | CREATED | +| `UPDATED` | UPDATED | +| `DELETED` | DELETED | +| `MEETS_CONDITION` | MEETS_CONDITION | +| `ASSIGNED` | ASSIGNED | +| `UNASSIGNED` | UNASSIGNED | +| `LABELED` | LABELED | +| `UNLABELED` | UNLABELED | +| `REVIEW_REQUESTED` | REVIEW_REQUESTED | +| `REVIEW_REQUEST_REMOVED` | REVIEW_REQUEST_REMOVED | +| `READY_FOR_REVIEW` | READY_FOR_REVIEW | +| `CONVERTED_TO_DRAFT` | CONVERTED_TO_DRAFT | +| `WEBHOOK_UPDATED` | WEBHOOK_UPDATED | \ No newline at end of file diff --git a/docs/models/platformtriggereventsearchrequest.md b/docs/models/platformtriggereventsearchrequest.md new file mode 100644 index 00000000..c81ec61c --- /dev/null +++ b/docs/models/platformtriggereventsearchrequest.md @@ -0,0 +1,8 @@ +# PlatformTriggerEventSearchRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return. | \ No newline at end of file diff --git a/docs/models/platformtriggereventsearchresponse.md b/docs/models/platformtriggereventsearchresponse.md new file mode 100644 index 00000000..7aff8cbe --- /dev/null +++ b/docs/models/platformtriggereventsearchresponse.md @@ -0,0 +1,10 @@ +# PlatformTriggerEventSearchResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformTriggerEvent](../models/platformtriggerevent.md)] | :heavy_check_mark: | Matching events, most recent first. | +| `has_more` | *bool* | :heavy_check_mark: | Whether more events matched than were returned. Raise `page_size` to see more; cursor-based paging is not offered yet.
| +| `request_id` | *str* | :heavy_check_mark: | Unique identifier for this request, for support and debugging. | \ No newline at end of file diff --git a/docs/models/platformtriggereventtype.md b/docs/models/platformtriggereventtype.md new file mode 100644 index 00000000..09a8a1e8 --- /dev/null +++ b/docs/models/platformtriggereventtype.md @@ -0,0 +1,18 @@ +# PlatformTriggerEventType + +The kind of event. + +## Example Usage + +```python +from glean.api_client.models import PlatformTriggerEventType + +value = PlatformTriggerEventType.DOCUMENT_CHANGE +``` + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `DOCUMENT_CHANGE` | DOCUMENT_CHANGE | \ No newline at end of file diff --git a/docs/models/platformtriggergetresponse.md b/docs/models/platformtriggergetresponse.md new file mode 100644 index 00000000..2f3a0c49 --- /dev/null +++ b/docs/models/platformtriggergetresponse.md @@ -0,0 +1,9 @@ +# PlatformTriggerGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `trigger` | [models.PlatformTrigger](../models/platformtrigger.md) | :heavy_check_mark: | N/A | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformtriggerlistresponse.md b/docs/models/platformtriggerlistresponse.md new file mode 100644 index 00000000..e4980bf5 --- /dev/null +++ b/docs/models/platformtriggerlistresponse.md @@ -0,0 +1,11 @@ +# PlatformTriggerListResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `results` | List[[models.PlatformTrigger](../models/platformtrigger.md)] | :heavy_check_mark: | Triggers owned by the caller. | +| `has_more` | *bool* | :heavy_check_mark: | Whether additional results are available. | +| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | Cursor for the next page, or null when no more results are available. | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformtriggerpreset.md b/docs/models/platformtriggerpreset.md new file mode 100644 index 00000000..d3376914 --- /dev/null +++ b/docs/models/platformtriggerpreset.md @@ -0,0 +1,12 @@ +# PlatformTriggerPreset + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset. Pass this when creating a trigger. | jira_high_priority_bug | +| `datasource` | *str* | :heavy_check_mark: | Datasource the preset fires on. | jira | +| `display_name` | *str* | :heavy_check_mark: | Human-readable preset name. | High-priority Jira bugs | +| `description` | *Optional[str]* | :heavy_minus_sign: | Human-readable description of when the preset fires. | Fires when a high-priority bug is created. | +| `inputs` | List[[models.PlatformTriggerPresetInput](../models/platformtriggerpresetinput.md)] | :heavy_check_mark: | Inputs the caller may supply when creating a trigger from this preset. | | \ No newline at end of file diff --git a/docs/models/platformtriggerpreseteventsearchrequest.md b/docs/models/platformtriggerpreseteventsearchrequest.md new file mode 100644 index 00000000..3ae9d527 --- /dev/null +++ b/docs/models/platformtriggerpreseteventsearchrequest.md @@ -0,0 +1,9 @@ +# PlatformTriggerPresetEventSearchRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | +| `inputs` | Dict[str, *str*] | :heavy_minus_sign: | Values for the preset's input fields, keyed by field name.
| {
"TITLE": "checkout outage"
} | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return. | | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetgetresponse.md b/docs/models/platformtriggerpresetgetresponse.md new file mode 100644 index 00000000..cca8734b --- /dev/null +++ b/docs/models/platformtriggerpresetgetresponse.md @@ -0,0 +1,9 @@ +# PlatformTriggerPresetGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `trigger_preset` | [models.PlatformTriggerPreset](../models/platformtriggerpreset.md) | :heavy_check_mark: | N/A | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetinput.md b/docs/models/platformtriggerpresetinput.md new file mode 100644 index 00000000..aeb4fc2e --- /dev/null +++ b/docs/models/platformtriggerpresetinput.md @@ -0,0 +1,13 @@ +# PlatformTriggerPresetInput + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `field` | *str* | :heavy_check_mark: | Identifier of the input, supplied as a key in the trigger's `inputs`. | project | +| `type` | [models.PlatformTriggerPresetInputType](../models/platformtriggerpresetinputtype.md) | :heavy_check_mark: | Type of a preset input. | PICKLIST | +| `display_name` | *str* | :heavy_check_mark: | Human-readable name for the input. | Project | +| `is_required` | *bool* | :heavy_check_mark: | Whether the caller must supply a value for this input. | | +| `values` | List[[models.PlatformTriggerPresetInputValue](../models/platformtriggerpresetinputvalue.md)] | :heavy_minus_sign: | Bounded initial set of selectable values for a picklist input. Omitted entirely for free-text inputs.
| | +| `is_truncated` | *Optional[bool]* | :heavy_minus_sign: | Whether additional selectable values were omitted from `values`. When true, use GET /trigger-presets/{preset_id}/input-values with a query to narrow the result set.
| | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetinputtype.md b/docs/models/platformtriggerpresetinputtype.md new file mode 100644 index 00000000..4b454180 --- /dev/null +++ b/docs/models/platformtriggerpresetinputtype.md @@ -0,0 +1,22 @@ +# PlatformTriggerPresetInputType + +Type of a preset input. + +## Example Usage + +```python +from glean.api_client.models import PlatformTriggerPresetInputType + +value = PlatformTriggerPresetInputType.PICKLIST + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PICKLIST` | PICKLIST | +| `TEXT` | TEXT | +| `USER` | USER | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetinputvalue.md b/docs/models/platformtriggerpresetinputvalue.md new file mode 100644 index 00000000..cd559913 --- /dev/null +++ b/docs/models/platformtriggerpresetinputvalue.md @@ -0,0 +1,9 @@ +# PlatformTriggerPresetInputValue + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `value` | *str* | :heavy_check_mark: | The exact value to send in the trigger's `inputs` for this choice (e.g. a channel name, a user's email, etc).
| test.user@glean.com | +| `display_name` | *str* | :heavy_check_mark: | Human-readable name for this value. | Test User | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetinputvaluelistresponse.md b/docs/models/platformtriggerpresetinputvaluelistresponse.md new file mode 100644 index 00000000..f76e44bd --- /dev/null +++ b/docs/models/platformtriggerpresetinputvaluelistresponse.md @@ -0,0 +1,10 @@ +# PlatformTriggerPresetInputValueListResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformTriggerPresetInputValue](../models/platformtriggerpresetinputvalue.md)] | :heavy_check_mark: | The bounded set of selectable values matching the query. | +| `is_truncated` | *bool* | :heavy_check_mark: | Whether additional matches were omitted. When true, refine `query` to narrow the result set.
| +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetlistresponse.md b/docs/models/platformtriggerpresetlistresponse.md new file mode 100644 index 00000000..e83bf664 --- /dev/null +++ b/docs/models/platformtriggerpresetlistresponse.md @@ -0,0 +1,11 @@ +# PlatformTriggerPresetListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `results` | List[[models.PlatformTriggerPreset](../models/platformtriggerpreset.md)] | :heavy_check_mark: | Trigger presets available to the caller. | +| `has_more` | *bool* | :heavy_check_mark: | Whether additional results are available. | +| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | Cursor for the next page, or null when no more results are available. | +| `request_id` | *str* | :heavy_check_mark: | Platform-generated request ID for support correlation. | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetseventssearchrequest.md b/docs/models/platformtriggerpresetseventssearchrequest.md new file mode 100644 index 00000000..5b9b8544 --- /dev/null +++ b/docs/models/platformtriggerpresetseventssearchrequest.md @@ -0,0 +1,9 @@ +# PlatformTriggerPresetsEventsSearchRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset to preview. | +| `platform_trigger_preset_event_search_request` | [Optional[models.PlatformTriggerPresetEventSearchRequest]](../models/platformtriggerpreseteventsearchrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetsgetrequest.md b/docs/models/platformtriggerpresetsgetrequest.md new file mode 100644 index 00000000..3649388d --- /dev/null +++ b/docs/models/platformtriggerpresetsgetrequest.md @@ -0,0 +1,8 @@ +# PlatformTriggerPresetsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset to retrieve. | \ No newline at end of file diff --git a/docs/models/platformtriggerpresetsinputvalueslistrequest.md b/docs/models/platformtriggerpresetsinputvalueslistrequest.md new file mode 100644 index 00000000..cb4a01b8 --- /dev/null +++ b/docs/models/platformtriggerpresetsinputvalueslistrequest.md @@ -0,0 +1,10 @@ +# PlatformTriggerPresetsInputValuesListRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset the input belongs to. | +| `field` | *str* | :heavy_check_mark: | Field identifier of the input whose values to list. | +| `query` | *Optional[str]* | :heavy_minus_sign: | Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name.
| \ No newline at end of file diff --git a/docs/models/platformtriggerpresetslistrequest.md b/docs/models/platformtriggerpresetslistrequest.md new file mode 100644 index 00000000..8361b45a --- /dev/null +++ b/docs/models/platformtriggerpresetslistrequest.md @@ -0,0 +1,10 @@ +# PlatformTriggerPresetsListRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `datasource` | *Optional[str]* | :heavy_minus_sign: | Restrict results to presets for a single datasource (e.g. jira). | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of presets to return. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | \ No newline at end of file diff --git a/docs/models/platformtriggersdeleterequest.md b/docs/models/platformtriggersdeleterequest.md new file mode 100644 index 00000000..b31a34f2 --- /dev/null +++ b/docs/models/platformtriggersdeleterequest.md @@ -0,0 +1,8 @@ +# PlatformTriggersDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger to delete. | \ No newline at end of file diff --git a/docs/models/platformtriggerseventssearchrequest.md b/docs/models/platformtriggerseventssearchrequest.md new file mode 100644 index 00000000..940d83b9 --- /dev/null +++ b/docs/models/platformtriggerseventssearchrequest.md @@ -0,0 +1,9 @@ +# PlatformTriggersEventsSearchRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger whose events to search. | +| `platform_trigger_event_search_request` | [Optional[models.PlatformTriggerEventSearchRequest]](../models/platformtriggereventsearchrequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/platformtriggersgetrequest.md b/docs/models/platformtriggersgetrequest.md new file mode 100644 index 00000000..e0823c58 --- /dev/null +++ b/docs/models/platformtriggersgetrequest.md @@ -0,0 +1,8 @@ +# PlatformTriggersGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger to retrieve. | \ No newline at end of file diff --git a/docs/models/platformtriggerslistrequest.md b/docs/models/platformtriggerslistrequest.md new file mode 100644 index 00000000..8ca8fde1 --- /dev/null +++ b/docs/models/platformtriggerslistrequest.md @@ -0,0 +1,9 @@ +# PlatformTriggersListRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of triggers to return. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | \ No newline at end of file diff --git a/docs/models/platformtriggerstatus.md b/docs/models/platformtriggerstatus.md new file mode 100644 index 00000000..652a2371 --- /dev/null +++ b/docs/models/platformtriggerstatus.md @@ -0,0 +1,21 @@ +# PlatformTriggerStatus + +Current trigger lifecycle state. + +## Example Usage + +```python +from glean.api_client.models import PlatformTriggerStatus + +value = PlatformTriggerStatus.ENABLED + +# Open enum: unrecognized values are captured as UnrecognizedStr +``` + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ENABLED` | ENABLED | +| `DISABLED` | DISABLED | \ No newline at end of file diff --git a/docs/models/platformtriggersupdaterequest.md b/docs/models/platformtriggersupdaterequest.md new file mode 100644 index 00000000..8e9c286d --- /dev/null +++ b/docs/models/platformtriggersupdaterequest.md @@ -0,0 +1,9 @@ +# PlatformTriggersUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger to update. | +| `platform_trigger_update_request` | [models.PlatformTriggerUpdateRequest](../models/platformtriggerupdaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/platformtriggerupdaterequest.md b/docs/models/platformtriggerupdaterequest.md new file mode 100644 index 00000000..25295f38 --- /dev/null +++ b/docs/models/platformtriggerupdaterequest.md @@ -0,0 +1,13 @@ +# PlatformTriggerUpdateRequest + +Partial update. Only the supplied fields are changed. + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `status` | [Optional[models.PlatformTriggerStatus]](../models/platformtriggerstatus.md) | :heavy_minus_sign: | Current trigger lifecycle state. | ENABLED | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional note describing this trigger. | High-priority Jira bugs in the Engineering project | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"project": "ENG"
} | +| `delivery` | [Optional[models.PlatformTriggerDelivery]](../models/platformtriggerdelivery.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/platformtriggerwithsecret.md b/docs/models/platformtriggerwithsecret.md new file mode 100644 index 00000000..5b456f62 --- /dev/null +++ b/docs/models/platformtriggerwithsecret.md @@ -0,0 +1,16 @@ +# PlatformTriggerWithSecret + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger. | 2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset this trigger was created from. | jira_high_priority_bug | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional caller-supplied note describing this trigger. | High-priority Jira bugs in the Engineering project | +| `status` | [models.PlatformTriggerStatus](../models/platformtriggerstatus.md) | :heavy_check_mark: | Current trigger lifecycle state. | ENABLED | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values supplied for the preset's inputs. | {
"project": "ENG"
} | +| `delivery` | [models.PlatformTriggerDeliveryOutput](../models/platformtriggerdeliveryoutput.md) | :heavy_check_mark: | N/A | | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Time the trigger was created. | | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Time the trigger was last updated. | | +| `signing_secret` | *str* | :heavy_check_mark: | Secret for verifying webhook signatures. Returned only at creation. | whsec_xxx | \ No newline at end of file diff --git a/docs/sdks/chatsdk/README.md b/docs/sdks/chatsdk/README.md index 36fdb267..fbb19c8f 100644 --- a/docs/sdks/chatsdk/README.md +++ b/docs/sdks/chatsdk/README.md @@ -34,7 +34,7 @@ with Glean( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -| `input` | [models.Input](../../models/input.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`.
| +| `input` | [models.Input](../../models/input.md) | :heavy_check_mark: | Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`.
| | `stream` | *Optional[bool]* | :heavy_minus_sign: | When true, respond with `text/event-stream`. When false or omitted, respond with `application/json`.
| | `store` | *Optional[bool]* | :heavy_minus_sign: | When true (default), persist the interaction and return a `conversation_id`. When false, run ephemerally with no persistence.
| | `conversation_id` | *Optional[str]* | :heavy_minus_sign: | Continue an existing stored conversation. Incompatible with message-array `input` and with `store: false`.
| diff --git a/docs/sdks/skills/README.md b/docs/sdks/skills/README.md index f3f50714..8cdfbc33 100644 --- a/docs/sdks/skills/README.md +++ b/docs/sdks/skills/README.md @@ -6,8 +6,8 @@ * [create](#create) - Create skill * [list](#list) - List skills -* [validate](#validate) - Validate skill bundle * [import_](#import_) - Import skills from GitHub +* [validate](#validate) - Validate skill bundle * [preview_source](#preview_source) - Preview a GitHub skill source * [update](#update) - Update skill * [delete](#delete) - Delete skill @@ -109,14 +109,14 @@ with Glean( | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | -## validate +## import_ -Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. +Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. ### Example Usage - + ```python from glean.api_client import Glean import os @@ -126,10 +126,9 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - res = glean.skills.validate(file={ - "file_name": "example.file", - "content": open("example.file", "rb"), - }) + res = glean.skills.import_(source_urls=[ + "", + ]) # Handle response print(res) @@ -138,31 +137,31 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `file` | [models.PlatformSkillValidationRequestFile](../../models/platformskillvalidationrequestfile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to validate. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `source_urls` | List[*str*] | :heavy_check_mark: | Resolved GitHub skill URLs selected from a source preview. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.PlatformSkillValidationResponse](../../models/platformskillvalidationresponse.md)** +**[models.PlatformSkillImportResponse](../../models/platformskillimportresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | -| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 400, 401, 403, 408, 409, 413, 429 | application/problem+json | | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | -## import_ +## validate -Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. +Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. ### Example Usage - + ```python from glean.api_client import Glean import os @@ -172,9 +171,10 @@ with Glean( api_token=os.getenv("GLEAN_API_TOKEN", ""), ) as glean: - res = glean.skills.import_(source_urls=[ - "", - ]) + res = glean.skills.validate(file={ + "file_name": "example.file", + "content": open("example.file", "rb"), + }) # Handle response print(res) @@ -183,20 +183,20 @@ with Glean( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `source_urls` | List[*str*] | :heavy_check_mark: | Resolved GitHub skill URLs selected from a source preview. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `file` | [models.PlatformSkillValidationRequestFile](../../models/platformskillvalidationrequestfile.md) | :heavy_check_mark: | SKILL.md, .zip, or .skill bundle to validate. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.PlatformSkillImportResponse](../../models/platformskillimportresponse.md)** +**[models.PlatformSkillValidationResponse](../../models/platformskillvalidationresponse.md)** ### Errors | Error Type | Status Code | Content Type | | --------------------------------- | --------------------------------- | --------------------------------- | -| errors.PlatformProblemDetailError | 400, 401, 403, 408, 409, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 413, 429 | application/problem+json | | errors.PlatformProblemDetailError | 500, 503 | application/problem+json | | errors.GleanError | 4XX, 5XX | \*/\* | diff --git a/docs/sdks/tools/README.md b/docs/sdks/tools/README.md index 5481f3f8..8a336814 100644 --- a/docs/sdks/tools/README.md +++ b/docs/sdks/tools/README.md @@ -279,14 +279,15 @@ with Glean( ## get_tool_server_tools Returns the name, description and JSON input schema for the named tools on the -specified tool server. Works for both action packs and MCP servers. +specified tool server. Works for Glean's built-in tools, tool packs and MCP +servers. `toolNames` is required. Names that do not exist on the server are returned in `notFound` rather than failing the request, so a single bad name does not force callers into one-at-a-time retries. Matching is case-insensitive and treats `-` and `_` as equivalent. -Native tools are not served; `serverId=native` returns 404. +Use `serverId=native` for Glean's built-in tools. ### Example Usage diff --git a/docs/sdks/triggers/README.md b/docs/sdks/triggers/README.md new file mode 100644 index 00000000..08875d7d --- /dev/null +++ b/docs/sdks/triggers/README.md @@ -0,0 +1,474 @@ +# Triggers + +## Overview + +### Available Operations + +* [create](#create) - Create trigger +* [list](#list) - List triggers +* [get](#get) - Get trigger +* [update](#update) - Update trigger +* [delete](#delete) - Delete trigger +* [search_events](#search_events) - Search events for a trigger +* [list_presets](#list_presets) - List trigger presets +* [get_preset](#get_preset) - Get trigger preset +* [list_preset_input_values](#list_preset_input_values) - Search trigger preset input values +* [search_preset_events](#search_preset_events) - Search events for a trigger preset + +## create + +Create a trigger from a preset and return it with its signing secret. + + +### Example Usage + + +```python +from glean.api_client import Glean, models +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.create(preset_id="jira_high_priority_bug", delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "a8f5f167f44f4964e6c998dee827110c", + }, + }, description="High-priority Jira bugs in the Engineering project", inputs={ + "project": "ENG", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset to instantiate. | jira_high_priority_bug | +| `delivery` | [models.PlatformTriggerDelivery](../../models/platformtriggerdelivery.md) | :heavy_check_mark: | N/A | | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional note describing this trigger. | High-priority Jira bugs in the Engineering project | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"project": "ENG"
} | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.PlatformTriggerCreateResponse](../../models/platformtriggercreateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 404, 408, 409, 413, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## list + +List triggers owned by the authenticated caller. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.list(page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of triggers to return. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformTriggerListResponse](../../models/platformtriggerlistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## get + +Retrieve a trigger owned by the authenticated caller. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.get(trigger_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger to retrieve. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformTriggerGetResponse](../../models/platformtriggergetresponse.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 | \*/\* | + +## update + +Update a trigger. + + +### Example Usage + + +```python +from glean.api_client import Glean, models +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.update(trigger_id="", status=models.PlatformTriggerStatus.ENABLED, description="High-priority Jira bugs in the Engineering project", inputs={ + "project": "ENG", + }, delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "a8f5f167f44f4964e6c998dee827110c", + }, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger to update. | | +| `status` | [Optional[models.PlatformTriggerStatus]](../../models/platformtriggerstatus.md) | :heavy_minus_sign: | Current trigger lifecycle state. | ENABLED | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional note describing this trigger. | High-priority Jira bugs in the Engineering project | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"project": "ENG"
} | +| `delivery` | [Optional[models.PlatformTriggerDelivery]](../../models/platformtriggerdelivery.md) | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.PlatformTriggerGetResponse](../../models/platformtriggergetresponse.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 | \*/\* | + +## delete + +Delete a trigger. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + glean.triggers.delete(trigger_id="") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger to delete. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### 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 | \*/\* | + +## search_events + +Search recent content events an existing trigger matches. Read-only — no webhook delivery is made. Covers the last seven days. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.search_events(trigger_id="", page_size=10) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the trigger whose events to search. | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformTriggerEventSearchResponse](../../models/platformtriggereventsearchresponse.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 | \*/\* | + +## list_presets + +List the trigger presets available to the caller. A preset is a curated content-trigger template (e.g. a new Jira ticket) which is passed when creating a trigger. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.list_presets(page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `datasource` | *Optional[str]* | :heavy_minus_sign: | Restrict results to presets for a single datasource (e.g. jira). | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of presets to return. | +| `cursor` | *Optional[str]* | :heavy_minus_sign: | Opaque pagination cursor from a previous response. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformTriggerPresetListResponse](../../models/platformtriggerpresetlistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.PlatformProblemDetailError | 400, 401, 403, 408, 429 | application/problem+json | +| errors.PlatformProblemDetailError | 500, 503 | application/problem+json | +| errors.GleanError | 4XX, 5XX | \*/\* | + +## get_preset + +Retrieve a single trigger preset by id. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.get_preset(preset_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset to retrieve. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformTriggerPresetGetResponse](../../models/platformtriggerpresetgetresponse.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 | \*/\* | + +## list_preset_input_values + +Return up to 300 selectable values for a single picklist input on a preset. Results are intended for typeahead selection and are not cursor-paginated. When `is_truncated` is true, refine `query` to narrow the result set. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.list_preset_input_values(preset_id="", field="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset the input belongs to. | +| `field` | *str* | :heavy_check_mark: | Field identifier of the input whose values to list. | +| `query` | *Optional[str]* | :heavy_minus_sign: | Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name.
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PlatformTriggerPresetInputValueListResponse](../../models/platformtriggerpresetinputvaluelistresponse.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 | \*/\* | + +## search_preset_events + +Search recent content events an unsaved trigger built from this preset would match, to preview it before creating the trigger. Read-only — no trigger is created and no webhook delivery is made. Covers the last seven days. + + +### Example Usage + + +```python +from glean.api_client import Glean +import os + + +with Glean( + api_token=os.getenv("GLEAN_API_TOKEN", ""), +) as glean: + + res = glean.triggers.search_preset_events(preset_id="", inputs={ + "TITLE": "checkout outage", + }, page_size=10) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset to preview. | | +| `inputs` | Dict[str, *str*] | :heavy_minus_sign: | Values for the preset's input fields, keyed by field name.
| {
"TITLE": "checkout outage"
} | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.PlatformTriggerEventSearchResponse](../../models/platformtriggereventsearchresponse.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 | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0a9c335a..d391b6db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "glean-api-client" -version = "0.15.5" +version = "0.16.0" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Glean Technologies, Inc." },] readme = "README-PYPI.md" diff --git a/src/glean/api_client/_version.py b/src/glean/api_client/_version.py index c5dd907a..40d90d59 100644 --- a/src/glean/api_client/_version.py +++ b/src/glean/api_client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "glean-api-client" -__version__: str = "0.15.5" +__version__: str = "0.16.0" __openapi_doc_version__: str = "0.9.0" -__gen_version__: str = "2.927.0" -__user_agent__: str = "speakeasy-sdk/python 0.15.5 2.927.0 0.9.0 glean-api-client" +__gen_version__: str = "2.931.0" +__user_agent__: str = "speakeasy-sdk/python 0.16.0 2.931.0 0.9.0 glean-api-client" try: if __package__ is not None: diff --git a/src/glean/api_client/chat_sdk.py b/src/glean/api_client/chat_sdk.py index 4275af06..8d63acc6 100644 --- a/src/glean/api_client/chat_sdk.py +++ b/src/glean/api_client/chat_sdk.py @@ -34,7 +34,7 @@ def create( Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object. - :param input: Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. + :param input: Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. :param stream: When true, respond with `text/event-stream`. When false or omitted, respond with `application/json`. @@ -167,7 +167,7 @@ async def create_async( Run an assistant turn. Set `stream` to true to receive server-sent events; otherwise the response is a typed JSON response object. - :param input: Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. + :param input: Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. :param stream: When true, respond with `text/event-stream`. When false or omitted, respond with `application/json`. diff --git a/src/glean/api_client/models/__init__.py b/src/glean/api_client/models/__init__.py index 24f7f7a7..194a3892 100644 --- a/src/glean/api_client/models/__init__.py +++ b/src/glean/api_client/models/__init__.py @@ -285,6 +285,7 @@ CalendarEventEventType, CalendarEventTypedDict, ) + from .calendarroombookingstatus import CalendarRoomBookingStatus from .canonicalizingregextype import ( CanonicalizingRegexType, CanonicalizingRegexTypeTypedDict, @@ -1310,6 +1311,42 @@ PlatformSkillsUpdateRequest, PlatformSkillsUpdateRequestTypedDict, ) + from .platform_trigger_presets_events_searchop import ( + PlatformTriggerPresetsEventsSearchRequest, + PlatformTriggerPresetsEventsSearchRequestTypedDict, + ) + from .platform_trigger_presets_getop import ( + PlatformTriggerPresetsGetRequest, + PlatformTriggerPresetsGetRequestTypedDict, + ) + from .platform_trigger_presets_input_values_listop import ( + PlatformTriggerPresetsInputValuesListRequest, + PlatformTriggerPresetsInputValuesListRequestTypedDict, + ) + from .platform_trigger_presets_listop import ( + PlatformTriggerPresetsListRequest, + PlatformTriggerPresetsListRequestTypedDict, + ) + from .platform_triggers_deleteop import ( + PlatformTriggersDeleteRequest, + PlatformTriggersDeleteRequestTypedDict, + ) + from .platform_triggers_events_searchop import ( + PlatformTriggersEventsSearchRequest, + PlatformTriggersEventsSearchRequestTypedDict, + ) + from .platform_triggers_getop import ( + PlatformTriggersGetRequest, + PlatformTriggersGetRequestTypedDict, + ) + from .platform_triggers_listop import ( + PlatformTriggersListRequest, + PlatformTriggersListRequestTypedDict, + ) + from .platform_triggers_updateop import ( + PlatformTriggersUpdateRequest, + PlatformTriggersUpdateRequestTypedDict, + ) from .platformactionsummary import ( PlatformActionSummary, PlatformActionSummaryTypedDict, @@ -1566,6 +1603,90 @@ PlatformSkillVersionsListResponseTypedDict, ) from .platformtimerange import PlatformTimeRange, PlatformTimeRangeTypedDict + from .platformtrigger import PlatformTrigger, PlatformTriggerTypedDict + from .platformtriggerauth_output import ( + PlatformTriggerAuth, + PlatformTriggerAuthOutput, + PlatformTriggerAuthOutputTypedDict, + PlatformTriggerAuthType, + PlatformTriggerAuthTypedDict, + ) + from .platformtriggercreaterequest import ( + PlatformTriggerCreateRequest, + PlatformTriggerCreateRequestTypedDict, + ) + from .platformtriggercreateresponse import ( + PlatformTriggerCreateResponse, + PlatformTriggerCreateResponseTypedDict, + ) + from .platformtriggerdelivery import ( + PlatformTriggerDelivery, + PlatformTriggerDeliveryTypedDict, + ) + from .platformtriggerdelivery_output import ( + PlatformTriggerDeliveryOutput, + PlatformTriggerDeliveryOutputTypedDict, + ) + from .platformtriggerevent import ( + PlatformTriggerEvent, + PlatformTriggerEventTypedDict, + ) + from .platformtriggereventreason import PlatformTriggerEventReason + from .platformtriggereventsearchrequest import ( + PlatformTriggerEventSearchRequest, + PlatformTriggerEventSearchRequestTypedDict, + ) + from .platformtriggereventsearchresponse import ( + PlatformTriggerEventSearchResponse, + PlatformTriggerEventSearchResponseTypedDict, + ) + from .platformtriggereventtype import PlatformTriggerEventType + from .platformtriggergetresponse import ( + PlatformTriggerGetResponse, + PlatformTriggerGetResponseTypedDict, + ) + from .platformtriggerlistresponse import ( + PlatformTriggerListResponse, + PlatformTriggerListResponseTypedDict, + ) + from .platformtriggerpreset import ( + PlatformTriggerPreset, + PlatformTriggerPresetTypedDict, + ) + from .platformtriggerpreseteventsearchrequest import ( + PlatformTriggerPresetEventSearchRequest, + PlatformTriggerPresetEventSearchRequestTypedDict, + ) + from .platformtriggerpresetgetresponse import ( + PlatformTriggerPresetGetResponse, + PlatformTriggerPresetGetResponseTypedDict, + ) + from .platformtriggerpresetinput import ( + PlatformTriggerPresetInput, + PlatformTriggerPresetInputTypedDict, + ) + from .platformtriggerpresetinputtype import PlatformTriggerPresetInputType + from .platformtriggerpresetinputvalue import ( + PlatformTriggerPresetInputValue, + PlatformTriggerPresetInputValueTypedDict, + ) + from .platformtriggerpresetinputvaluelistresponse import ( + PlatformTriggerPresetInputValueListResponse, + PlatformTriggerPresetInputValueListResponseTypedDict, + ) + from .platformtriggerpresetlistresponse import ( + PlatformTriggerPresetListResponse, + PlatformTriggerPresetListResponseTypedDict, + ) + from .platformtriggerstatus import PlatformTriggerStatus + from .platformtriggerupdaterequest import ( + PlatformTriggerUpdateRequest, + PlatformTriggerUpdateRequestTypedDict, + ) + from .platformtriggerwithsecret import ( + PlatformTriggerWithSecret, + PlatformTriggerWithSecretTypedDict, + ) from .platformwarning import PlatformWarning, PlatformWarningTypedDict from .possiblevalue import PossibleValue, PossibleValueTypedDict from .post_api_index_v1_debug_datasource_document_eventsop import ( @@ -2134,6 +2255,7 @@ "CalendarEvent", "CalendarEventEventType", "CalendarEventTypedDict", + "CalendarRoomBookingStatus", "CanonicalizingRegexType", "CanonicalizingRegexTypeTypedDict", "CategoryToResultSize", @@ -3115,6 +3237,71 @@ "PlatformSkillsUpdateRequestTypedDict", "PlatformTimeRange", "PlatformTimeRangeTypedDict", + "PlatformTrigger", + "PlatformTriggerAuth", + "PlatformTriggerAuthOutput", + "PlatformTriggerAuthOutputTypedDict", + "PlatformTriggerAuthType", + "PlatformTriggerAuthTypedDict", + "PlatformTriggerCreateRequest", + "PlatformTriggerCreateRequestTypedDict", + "PlatformTriggerCreateResponse", + "PlatformTriggerCreateResponseTypedDict", + "PlatformTriggerDelivery", + "PlatformTriggerDeliveryOutput", + "PlatformTriggerDeliveryOutputTypedDict", + "PlatformTriggerDeliveryTypedDict", + "PlatformTriggerEvent", + "PlatformTriggerEventReason", + "PlatformTriggerEventSearchRequest", + "PlatformTriggerEventSearchRequestTypedDict", + "PlatformTriggerEventSearchResponse", + "PlatformTriggerEventSearchResponseTypedDict", + "PlatformTriggerEventType", + "PlatformTriggerEventTypedDict", + "PlatformTriggerGetResponse", + "PlatformTriggerGetResponseTypedDict", + "PlatformTriggerListResponse", + "PlatformTriggerListResponseTypedDict", + "PlatformTriggerPreset", + "PlatformTriggerPresetEventSearchRequest", + "PlatformTriggerPresetEventSearchRequestTypedDict", + "PlatformTriggerPresetGetResponse", + "PlatformTriggerPresetGetResponseTypedDict", + "PlatformTriggerPresetInput", + "PlatformTriggerPresetInputType", + "PlatformTriggerPresetInputTypedDict", + "PlatformTriggerPresetInputValue", + "PlatformTriggerPresetInputValueListResponse", + "PlatformTriggerPresetInputValueListResponseTypedDict", + "PlatformTriggerPresetInputValueTypedDict", + "PlatformTriggerPresetListResponse", + "PlatformTriggerPresetListResponseTypedDict", + "PlatformTriggerPresetTypedDict", + "PlatformTriggerPresetsEventsSearchRequest", + "PlatformTriggerPresetsEventsSearchRequestTypedDict", + "PlatformTriggerPresetsGetRequest", + "PlatformTriggerPresetsGetRequestTypedDict", + "PlatformTriggerPresetsInputValuesListRequest", + "PlatformTriggerPresetsInputValuesListRequestTypedDict", + "PlatformTriggerPresetsListRequest", + "PlatformTriggerPresetsListRequestTypedDict", + "PlatformTriggerStatus", + "PlatformTriggerTypedDict", + "PlatformTriggerUpdateRequest", + "PlatformTriggerUpdateRequestTypedDict", + "PlatformTriggerWithSecret", + "PlatformTriggerWithSecretTypedDict", + "PlatformTriggersDeleteRequest", + "PlatformTriggersDeleteRequestTypedDict", + "PlatformTriggersEventsSearchRequest", + "PlatformTriggersEventsSearchRequestTypedDict", + "PlatformTriggersGetRequest", + "PlatformTriggersGetRequestTypedDict", + "PlatformTriggersListRequest", + "PlatformTriggersListRequestTypedDict", + "PlatformTriggersUpdateRequest", + "PlatformTriggersUpdateRequestTypedDict", "PlatformWarning", "PlatformWarningTypedDict", "PossibleValue", @@ -3615,6 +3802,7 @@ "CalendarEvent": ".calendarevent", "CalendarEventEventType": ".calendarevent", "CalendarEventTypedDict": ".calendarevent", + "CalendarRoomBookingStatus": ".calendarroombookingstatus", "CanonicalizingRegexType": ".canonicalizingregextype", "CanonicalizingRegexTypeTypedDict": ".canonicalizingregextype", "Chat": ".chat", @@ -4391,6 +4579,24 @@ "PlatformSkillsSyncRequestTypedDict": ".platform_skills_syncop", "PlatformSkillsUpdateRequest": ".platform_skills_updateop", "PlatformSkillsUpdateRequestTypedDict": ".platform_skills_updateop", + "PlatformTriggerPresetsEventsSearchRequest": ".platform_trigger_presets_events_searchop", + "PlatformTriggerPresetsEventsSearchRequestTypedDict": ".platform_trigger_presets_events_searchop", + "PlatformTriggerPresetsGetRequest": ".platform_trigger_presets_getop", + "PlatformTriggerPresetsGetRequestTypedDict": ".platform_trigger_presets_getop", + "PlatformTriggerPresetsInputValuesListRequest": ".platform_trigger_presets_input_values_listop", + "PlatformTriggerPresetsInputValuesListRequestTypedDict": ".platform_trigger_presets_input_values_listop", + "PlatformTriggerPresetsListRequest": ".platform_trigger_presets_listop", + "PlatformTriggerPresetsListRequestTypedDict": ".platform_trigger_presets_listop", + "PlatformTriggersDeleteRequest": ".platform_triggers_deleteop", + "PlatformTriggersDeleteRequestTypedDict": ".platform_triggers_deleteop", + "PlatformTriggersEventsSearchRequest": ".platform_triggers_events_searchop", + "PlatformTriggersEventsSearchRequestTypedDict": ".platform_triggers_events_searchop", + "PlatformTriggersGetRequest": ".platform_triggers_getop", + "PlatformTriggersGetRequestTypedDict": ".platform_triggers_getop", + "PlatformTriggersListRequest": ".platform_triggers_listop", + "PlatformTriggersListRequestTypedDict": ".platform_triggers_listop", + "PlatformTriggersUpdateRequest": ".platform_triggers_updateop", + "PlatformTriggersUpdateRequestTypedDict": ".platform_triggers_updateop", "PlatformActionSummary": ".platformactionsummary", "PlatformActionSummaryTypedDict": ".platformactionsummary", "PlatformAgent": ".platformagent", @@ -4546,6 +4752,53 @@ "PlatformSkillVersionsListResponseTypedDict": ".platformskillversionslistresponse", "PlatformTimeRange": ".platformtimerange", "PlatformTimeRangeTypedDict": ".platformtimerange", + "PlatformTrigger": ".platformtrigger", + "PlatformTriggerTypedDict": ".platformtrigger", + "PlatformTriggerAuth": ".platformtriggerauth_output", + "PlatformTriggerAuthOutput": ".platformtriggerauth_output", + "PlatformTriggerAuthOutputTypedDict": ".platformtriggerauth_output", + "PlatformTriggerAuthType": ".platformtriggerauth_output", + "PlatformTriggerAuthTypedDict": ".platformtriggerauth_output", + "PlatformTriggerCreateRequest": ".platformtriggercreaterequest", + "PlatformTriggerCreateRequestTypedDict": ".platformtriggercreaterequest", + "PlatformTriggerCreateResponse": ".platformtriggercreateresponse", + "PlatformTriggerCreateResponseTypedDict": ".platformtriggercreateresponse", + "PlatformTriggerDelivery": ".platformtriggerdelivery", + "PlatformTriggerDeliveryTypedDict": ".platformtriggerdelivery", + "PlatformTriggerDeliveryOutput": ".platformtriggerdelivery_output", + "PlatformTriggerDeliveryOutputTypedDict": ".platformtriggerdelivery_output", + "PlatformTriggerEvent": ".platformtriggerevent", + "PlatformTriggerEventTypedDict": ".platformtriggerevent", + "PlatformTriggerEventReason": ".platformtriggereventreason", + "PlatformTriggerEventSearchRequest": ".platformtriggereventsearchrequest", + "PlatformTriggerEventSearchRequestTypedDict": ".platformtriggereventsearchrequest", + "PlatformTriggerEventSearchResponse": ".platformtriggereventsearchresponse", + "PlatformTriggerEventSearchResponseTypedDict": ".platformtriggereventsearchresponse", + "PlatformTriggerEventType": ".platformtriggereventtype", + "PlatformTriggerGetResponse": ".platformtriggergetresponse", + "PlatformTriggerGetResponseTypedDict": ".platformtriggergetresponse", + "PlatformTriggerListResponse": ".platformtriggerlistresponse", + "PlatformTriggerListResponseTypedDict": ".platformtriggerlistresponse", + "PlatformTriggerPreset": ".platformtriggerpreset", + "PlatformTriggerPresetTypedDict": ".platformtriggerpreset", + "PlatformTriggerPresetEventSearchRequest": ".platformtriggerpreseteventsearchrequest", + "PlatformTriggerPresetEventSearchRequestTypedDict": ".platformtriggerpreseteventsearchrequest", + "PlatformTriggerPresetGetResponse": ".platformtriggerpresetgetresponse", + "PlatformTriggerPresetGetResponseTypedDict": ".platformtriggerpresetgetresponse", + "PlatformTriggerPresetInput": ".platformtriggerpresetinput", + "PlatformTriggerPresetInputTypedDict": ".platformtriggerpresetinput", + "PlatformTriggerPresetInputType": ".platformtriggerpresetinputtype", + "PlatformTriggerPresetInputValue": ".platformtriggerpresetinputvalue", + "PlatformTriggerPresetInputValueTypedDict": ".platformtriggerpresetinputvalue", + "PlatformTriggerPresetInputValueListResponse": ".platformtriggerpresetinputvaluelistresponse", + "PlatformTriggerPresetInputValueListResponseTypedDict": ".platformtriggerpresetinputvaluelistresponse", + "PlatformTriggerPresetListResponse": ".platformtriggerpresetlistresponse", + "PlatformTriggerPresetListResponseTypedDict": ".platformtriggerpresetlistresponse", + "PlatformTriggerStatus": ".platformtriggerstatus", + "PlatformTriggerUpdateRequest": ".platformtriggerupdaterequest", + "PlatformTriggerUpdateRequestTypedDict": ".platformtriggerupdaterequest", + "PlatformTriggerWithSecret": ".platformtriggerwithsecret", + "PlatformTriggerWithSecretTypedDict": ".platformtriggerwithsecret", "PlatformWarning": ".platformwarning", "PlatformWarningTypedDict": ".platformwarning", "PossibleValue": ".possiblevalue", diff --git a/src/glean/api_client/models/calendarevent.py b/src/glean/api_client/models/calendarevent.py index c954de14..212954dc 100644 --- a/src/glean/api_client/models/calendarevent.py +++ b/src/glean/api_client/models/calendarevent.py @@ -2,13 +2,20 @@ from __future__ import annotations from .calendarattendees import CalendarAttendees, CalendarAttendeesTypedDict +from .calendarroombookingstatus import CalendarRoomBookingStatus from .conferencedata import ConferenceData, ConferenceDataTypedDict from .eventclassification import EventClassification, EventClassificationTypedDict from .generatedattachment import GeneratedAttachment, GeneratedAttachmentTypedDict from .timeinterval import TimeInterval, TimeIntervalTypedDict from enum import Enum from glean.api_client import models, utils -from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) import pydantic from pydantic import field_serializer, model_serializer from typing import List, Optional @@ -33,6 +40,12 @@ class CalendarEventTypedDict(TypedDict): event_type: NotRequired[CalendarEventEventType] r"""The nature of the event, for example \"out of office\".""" attendees: NotRequired[CalendarAttendeesTypedDict] + is_organizer: NotRequired[Nullable[bool]] + r"""Whether the requesting user is the organizer of this event.""" + room_booking_status: NotRequired[CalendarRoomBookingStatus] + r"""The current booking status of the room resource associated with an event.""" + room_name: NotRequired[str] + r"""The display name of the room resource associated with this event.""" location: NotRequired[str] r"""The location that this event is taking place at.""" conference_data: NotRequired[ConferenceDataTypedDict] @@ -66,6 +79,19 @@ class CalendarEvent(BaseModel): attendees: Optional[CalendarAttendees] = None + is_organizer: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="isOrganizer") + ] = UNSET + r"""Whether the requesting user is the organizer of this event.""" + + room_booking_status: Annotated[ + Optional[CalendarRoomBookingStatus], pydantic.Field(alias="roomBookingStatus") + ] = None + r"""The current booking status of the room resource associated with an event.""" + + room_name: Annotated[Optional[str], pydantic.Field(alias="roomName")] = None + r"""The display name of the room resource associated with this event.""" + location: Optional[str] = None r"""The location that this event is taking place at.""" @@ -105,6 +131,15 @@ def serialize_event_type(self, value): return value return value + @field_serializer("room_booking_status") + def serialize_room_booking_status(self, value): + if isinstance(value, str): + try: + return models.CalendarRoomBookingStatus(value) + except ValueError: + return value + return value + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -112,6 +147,9 @@ def serialize_model(self, handler): "time", "eventType", "attendees", + "isOrganizer", + "roomBookingStatus", + "roomName", "location", "conferenceData", "description", @@ -122,15 +160,24 @@ def serialize_model(self, handler): "generatedAttachments", ] ) + nullable_fields = set(["isOrganizer"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/glean/api_client/models/calendarroombookingstatus.py b/src/glean/api_client/models/calendarroombookingstatus.py new file mode 100644 index 00000000..908bd784 --- /dev/null +++ b/src/glean/api_client/models/calendarroombookingstatus.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import utils + + +class CalendarRoomBookingStatus(str, Enum, metaclass=utils.OpenEnumMeta): + r"""The current booking status of the room resource associated with an event.""" + + NONE = "NONE" + ACCEPTED = "ACCEPTED" + DECLINED = "DECLINED" + PENDING = "PENDING" diff --git a/src/glean/api_client/models/feedentry.py b/src/glean/api_client/models/feedentry.py index 03dd978e..9c0bc182 100644 --- a/src/glean/api_client/models/feedentry.py +++ b/src/glean/api_client/models/feedentry.py @@ -112,6 +112,7 @@ class JustificationType(str, Enum, metaclass=utils.OpenEnumMeta): STARTER_KIT_ORG_CHART = "STARTER_KIT_ORG_CHART" STARTER_KIT_ADD_DOC = "STARTER_KIT_ADD_DOC" MEETING_RECAP = "MEETING_RECAP" + MEETING_ROOM = "MEETING_ROOM" MEETING_PREP_AUTOMATION = "MEETING_PREP_AUTOMATION" ACTIVE_DISCUSSION = "ACTIVE_DISCUSSION" MID_DAY_CATCH_UP = "MID_DAY_CATCH_UP" @@ -128,6 +129,7 @@ class JustificationType(str, Enum, metaclass=utils.OpenEnumMeta): OOO_PLANNER = "OOO_PLANNER" OOO_CATCH_UP = "OOO_CATCH_UP" ADMIN_HEALTH_CENTER = "ADMIN_HEALTH_CENTER" + KNOWLEDGE_GAP = "KNOWLEDGE_GAP" class FeedEntryTypedDict(TypedDict): diff --git a/src/glean/api_client/models/feedrequest.py b/src/glean/api_client/models/feedrequest.py index 69d85fb7..d6d5f2d0 100644 --- a/src/glean/api_client/models/feedrequest.py +++ b/src/glean/api_client/models/feedrequest.py @@ -57,6 +57,7 @@ class FeedRequestCategory(str, Enum): OOO_PLANNER = "OOO_PLANNER" OOO_CATCH_UP = "OOO_CATCH_UP" ADMIN_HEALTH_CENTER = "ADMIN_HEALTH_CENTER" + KNOWLEDGE_GAP = "KNOWLEDGE_GAP" class FeedRequestTypedDict(TypedDict): diff --git a/src/glean/api_client/models/feedresult.py b/src/glean/api_client/models/feedresult.py index f5bc568a..548eedb0 100644 --- a/src/glean/api_client/models/feedresult.py +++ b/src/glean/api_client/models/feedresult.py @@ -59,13 +59,15 @@ class FeedResultCategory(str, Enum, metaclass=utils.OpenEnumMeta): OOO_PLANNER = "OOO_PLANNER" OOO_CATCH_UP = "OOO_CATCH_UP" ADMIN_HEALTH_CENTER = "ADMIN_HEALTH_CENTER" + KNOWLEDGE_GAP = "KNOWLEDGE_GAP" class PlacementReason(str, Enum, metaclass=utils.OpenEnumMeta): - r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework.""" + r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards).""" ORGANIC = "ORGANIC" PROMO = "PROMO" + PINNED = "PINNED" class FeedResultTypedDict(TypedDict): @@ -77,7 +79,7 @@ class FeedResultTypedDict(TypedDict): rank: NotRequired[int] r"""Rank of the result. Rank is suggested by server. Client side rank may differ.""" placement_reason: NotRequired[PlacementReason] - r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework.""" + r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards).""" class FeedResult(BaseModel): @@ -97,7 +99,7 @@ class FeedResult(BaseModel): placement_reason: Annotated[ Optional[PlacementReason], pydantic.Field(alias="placementReason") ] = None - r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework.""" + r"""Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards).""" @field_serializer("category") def serialize_category(self, value): diff --git a/src/glean/api_client/models/platform_trigger_presets_events_searchop.py b/src/glean/api_client/models/platform_trigger_presets_events_searchop.py new file mode 100644 index 00000000..79b57ae0 --- /dev/null +++ b/src/glean/api_client/models/platform_trigger_presets_events_searchop.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerpreseteventsearchrequest import ( + PlatformTriggerPresetEventSearchRequest, + PlatformTriggerPresetEventSearchRequestTypedDict, +) +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformTriggerPresetsEventsSearchRequestTypedDict(TypedDict): + preset_id: str + r"""ID of the preset to preview.""" + platform_trigger_preset_event_search_request: NotRequired[ + PlatformTriggerPresetEventSearchRequestTypedDict + ] + + +class PlatformTriggerPresetsEventsSearchRequest(BaseModel): + preset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the preset to preview.""" + + platform_trigger_preset_event_search_request: Annotated[ + Optional[PlatformTriggerPresetEventSearchRequest], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["PlatformTriggerPresetEventSearchRequest"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platform_trigger_presets_getop.py b/src/glean/api_client/models/platform_trigger_presets_getop.py new file mode 100644 index 00000000..3003dbdf --- /dev/null +++ b/src/glean/api_client/models/platform_trigger_presets_getop.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class PlatformTriggerPresetsGetRequestTypedDict(TypedDict): + preset_id: str + r"""ID of the preset to retrieve.""" + + +class PlatformTriggerPresetsGetRequest(BaseModel): + preset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the preset to retrieve.""" diff --git a/src/glean/api_client/models/platform_trigger_presets_input_values_listop.py b/src/glean/api_client/models/platform_trigger_presets_input_values_listop.py new file mode 100644 index 00000000..6579af39 --- /dev/null +++ b/src/glean/api_client/models/platform_trigger_presets_input_values_listop.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformTriggerPresetsInputValuesListRequestTypedDict(TypedDict): + preset_id: str + r"""ID of the preset the input belongs to.""" + field: str + r"""Field identifier of the input whose values to list.""" + query: NotRequired[str] + r"""Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name. + + """ + + +class PlatformTriggerPresetsInputValuesListRequest(BaseModel): + preset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the preset the input belongs to.""" + + field: Annotated[ + str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""Field identifier of the input whose values to list.""" + + query: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name. + + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["query"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platform_trigger_presets_listop.py b/src/glean/api_client/models/platform_trigger_presets_listop.py new file mode 100644 index 00000000..dee0141c --- /dev/null +++ b/src/glean/api_client/models/platform_trigger_presets_listop.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformTriggerPresetsListRequestTypedDict(TypedDict): + datasource: NotRequired[str] + r"""Restrict results to presets for a single datasource (e.g. jira).""" + page_size: NotRequired[int] + r"""Maximum number of presets to return.""" + cursor: NotRequired[str] + r"""Opaque pagination cursor from a previous response.""" + + +class PlatformTriggerPresetsListRequest(BaseModel): + datasource: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Restrict results to presets for a single datasource (e.g. jira).""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""Maximum number of presets to return.""" + + cursor: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Opaque pagination cursor from a previous response.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["datasource", "page_size", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platform_triggers_deleteop.py b/src/glean/api_client/models/platform_triggers_deleteop.py new file mode 100644 index 00000000..e3caabe5 --- /dev/null +++ b/src/glean/api_client/models/platform_triggers_deleteop.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class PlatformTriggersDeleteRequestTypedDict(TypedDict): + trigger_id: str + r"""ID of the trigger to delete.""" + + +class PlatformTriggersDeleteRequest(BaseModel): + trigger_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the trigger to delete.""" diff --git a/src/glean/api_client/models/platform_triggers_events_searchop.py b/src/glean/api_client/models/platform_triggers_events_searchop.py new file mode 100644 index 00000000..6ac07ec2 --- /dev/null +++ b/src/glean/api_client/models/platform_triggers_events_searchop.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggereventsearchrequest import ( + PlatformTriggerEventSearchRequest, + PlatformTriggerEventSearchRequestTypedDict, +) +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformTriggersEventsSearchRequestTypedDict(TypedDict): + trigger_id: str + r"""ID of the trigger whose events to search.""" + platform_trigger_event_search_request: NotRequired[ + PlatformTriggerEventSearchRequestTypedDict + ] + + +class PlatformTriggersEventsSearchRequest(BaseModel): + trigger_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the trigger whose events to search.""" + + platform_trigger_event_search_request: Annotated[ + Optional[PlatformTriggerEventSearchRequest], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["PlatformTriggerEventSearchRequest"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platform_triggers_getop.py b/src/glean/api_client/models/platform_triggers_getop.py new file mode 100644 index 00000000..892ee994 --- /dev/null +++ b/src/glean/api_client/models/platform_triggers_getop.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class PlatformTriggersGetRequestTypedDict(TypedDict): + trigger_id: str + r"""ID of the trigger to retrieve.""" + + +class PlatformTriggersGetRequest(BaseModel): + trigger_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the trigger to retrieve.""" diff --git a/src/glean/api_client/models/platform_triggers_listop.py b/src/glean/api_client/models/platform_triggers_listop.py new file mode 100644 index 00000000..4eb3df40 --- /dev/null +++ b/src/glean/api_client/models/platform_triggers_listop.py @@ -0,0 +1,45 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from glean.api_client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PlatformTriggersListRequestTypedDict(TypedDict): + page_size: NotRequired[int] + r"""Maximum number of triggers to return.""" + cursor: NotRequired[str] + r"""Opaque pagination cursor from a previous response.""" + + +class PlatformTriggersListRequest(BaseModel): + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""Maximum number of triggers to return.""" + + cursor: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Opaque pagination cursor from a previous response.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platform_triggers_updateop.py b/src/glean/api_client/models/platform_triggers_updateop.py new file mode 100644 index 00000000..c57697e4 --- /dev/null +++ b/src/glean/api_client/models/platform_triggers_updateop.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerupdaterequest import ( + PlatformTriggerUpdateRequest, + PlatformTriggerUpdateRequestTypedDict, +) +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PlatformTriggersUpdateRequestTypedDict(TypedDict): + trigger_id: str + r"""ID of the trigger to update.""" + platform_trigger_update_request: PlatformTriggerUpdateRequestTypedDict + + +class PlatformTriggersUpdateRequest(BaseModel): + trigger_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the trigger to update.""" + + platform_trigger_update_request: Annotated[ + PlatformTriggerUpdateRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/glean/api_client/models/platformchatcitationannotation.py b/src/glean/api_client/models/platformchatcitationannotation.py index e100f70c..5dd276ba 100644 --- a/src/glean/api_client/models/platformchatcitationannotation.py +++ b/src/glean/api_client/models/platformchatcitationannotation.py @@ -23,7 +23,7 @@ class PlatformChatCitationAnnotationType(str, Enum): - CITATION = "citation" + CITATION = "CITATION" class PlatformChatCitationAnnotationTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatcompletedresponse.py b/src/glean/api_client/models/platformchatcompletedresponse.py index 946d487c..4b32c84b 100644 --- a/src/glean/api_client/models/platformchatcompletedresponse.py +++ b/src/glean/api_client/models/platformchatcompletedresponse.py @@ -20,11 +20,11 @@ class Object(str, Enum): - RESPONSE = "response" + RESPONSE = "RESPONSE" class PlatformChatCompletedResponseStatus(str, Enum): - COMPLETED = "completed" + COMPLETED = "COMPLETED" class PlatformChatCompletedResponseTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatcreaterequest.py b/src/glean/api_client/models/platformchatcreaterequest.py index 252f07c1..b596efc5 100644 --- a/src/glean/api_client/models/platformchatcreaterequest.py +++ b/src/glean/api_client/models/platformchatcreaterequest.py @@ -14,20 +14,20 @@ InputTypedDict = TypeAliasType( "InputTypedDict", Union[str, List[PlatformChatInputMessageTypedDict]] ) -r"""Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. +r"""Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. """ Input = TypeAliasType("Input", Union[str, List[PlatformChatInputMessage]]) -r"""Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. +r"""Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. """ class PlatformChatCreateRequestTypedDict(TypedDict): input: InputTypedDict - r"""Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. + r"""Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. """ stream: NotRequired[bool] @@ -46,7 +46,7 @@ class PlatformChatCreateRequestTypedDict(TypedDict): class PlatformChatCreateRequest(BaseModel): input: Input - r"""Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. + r"""Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. """ diff --git a/src/glean/api_client/models/platformchatcustomentitysource.py b/src/glean/api_client/models/platformchatcustomentitysource.py index 76803768..f2ec133b 100644 --- a/src/glean/api_client/models/platformchatcustomentitysource.py +++ b/src/glean/api_client/models/platformchatcustomentitysource.py @@ -9,7 +9,7 @@ class PlatformChatCustomEntitySourceType(str, Enum): - CUSTOM_ENTITY = "custom_entity" + CUSTOM_ENTITY = "CUSTOM_ENTITY" class PlatformChatCustomEntitySourceTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatdocumentsource.py b/src/glean/api_client/models/platformchatdocumentsource.py index 0fa4f61a..73aad8d2 100644 --- a/src/glean/api_client/models/platformchatdocumentsource.py +++ b/src/glean/api_client/models/platformchatdocumentsource.py @@ -9,7 +9,7 @@ class PlatformChatDocumentSourceType2(str, Enum): - DOCUMENT = "document" + DOCUMENT = "DOCUMENT" class PlatformChatDocumentSourceDocument2TypedDict(TypedDict): @@ -49,7 +49,7 @@ def serialize_model(self, handler): class PlatformChatDocumentSourceType1(str, Enum): - DOCUMENT = "document" + DOCUMENT = "DOCUMENT" class PlatformChatDocumentSourceDocument1TypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatfilesource.py b/src/glean/api_client/models/platformchatfilesource.py index bde933e7..228194cb 100644 --- a/src/glean/api_client/models/platformchatfilesource.py +++ b/src/glean/api_client/models/platformchatfilesource.py @@ -9,7 +9,7 @@ class PlatformChatFileSourceType(str, Enum): - FILE = "file" + FILE = "FILE" class PlatformChatFileSourceTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatinputmessage.py b/src/glean/api_client/models/platformchatinputmessage.py index 1031b464..9d21d2a1 100644 --- a/src/glean/api_client/models/platformchatinputmessage.py +++ b/src/glean/api_client/models/platformchatinputmessage.py @@ -7,8 +7,8 @@ class PlatformChatInputMessageRole(str, Enum): - USER = "user" - ASSISTANT = "assistant" + USER = "USER" + ASSISTANT = "ASSISTANT" class PlatformChatInputMessageTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatoutputmessage.py b/src/glean/api_client/models/platformchatoutputmessage.py index 686a0c29..9082277a 100644 --- a/src/glean/api_client/models/platformchatoutputmessage.py +++ b/src/glean/api_client/models/platformchatoutputmessage.py @@ -12,11 +12,11 @@ class PlatformChatOutputMessageType(str, Enum): - MESSAGE = "message" + MESSAGE = "MESSAGE" class PlatformChatOutputMessageRole(str, Enum): - ASSISTANT = "assistant" + ASSISTANT = "ASSISTANT" class PlatformChatOutputMessageTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatoutputtextcontent.py b/src/glean/api_client/models/platformchatoutputtextcontent.py index 0d076b64..d3742527 100644 --- a/src/glean/api_client/models/platformchatoutputtextcontent.py +++ b/src/glean/api_client/models/platformchatoutputtextcontent.py @@ -13,7 +13,7 @@ class PlatformChatOutputTextContentType(str, Enum): - OUTPUT_TEXT = "output_text" + OUTPUT_TEXT = "OUTPUT_TEXT" class PlatformChatOutputTextContentTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformchatpersonsource.py b/src/glean/api_client/models/platformchatpersonsource.py index d2548486..a2e120b1 100644 --- a/src/glean/api_client/models/platformchatpersonsource.py +++ b/src/glean/api_client/models/platformchatpersonsource.py @@ -9,7 +9,7 @@ class PlatformChatPersonSourceType(str, Enum): - PERSON = "person" + PERSON = "PERSON" class PlatformChatPersonSourceTypedDict(TypedDict): diff --git a/src/glean/api_client/models/platformtrigger.py b/src/glean/api_client/models/platformtrigger.py new file mode 100644 index 00000000..c3542359 --- /dev/null +++ b/src/glean/api_client/models/platformtrigger.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerdelivery_output import ( + PlatformTriggerDeliveryOutput, + PlatformTriggerDeliveryOutputTypedDict, +) +from .platformtriggerstatus import PlatformTriggerStatus +from datetime import datetime +from glean.api_client import models +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import field_serializer, model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerTypedDict(TypedDict): + trigger_id: str + r"""ID of the trigger.""" + preset_id: str + r"""ID of the preset this trigger was created from.""" + status: PlatformTriggerStatus + r"""Current trigger lifecycle state.""" + delivery: PlatformTriggerDeliveryOutputTypedDict + created_at: datetime + r"""Time the trigger was created.""" + updated_at: datetime + r"""Time the trigger was last updated.""" + description: NotRequired[str] + r"""Optional caller-supplied note describing this trigger.""" + inputs: NotRequired[Dict[str, Any]] + r"""Values supplied for the preset's inputs.""" + + +class PlatformTrigger(BaseModel): + trigger_id: str + r"""ID of the trigger.""" + + preset_id: str + r"""ID of the preset this trigger was created from.""" + + status: PlatformTriggerStatus + r"""Current trigger lifecycle state.""" + + delivery: PlatformTriggerDeliveryOutput + + created_at: datetime + r"""Time the trigger was created.""" + + updated_at: datetime + r"""Time the trigger was last updated.""" + + description: Optional[str] = None + r"""Optional caller-supplied note describing this trigger.""" + + inputs: Optional[Dict[str, Any]] = None + r"""Values supplied for the preset's inputs.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.PlatformTriggerStatus(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description", "inputs"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerauth_output.py b/src/glean/api_client/models/platformtriggerauth_output.py new file mode 100644 index 00000000..0288980e --- /dev/null +++ b/src/glean/api_client/models/platformtriggerauth_output.py @@ -0,0 +1,45 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformTriggerAuthType(str, Enum): + r"""Credential scheme.""" + + BEARER = "BEARER" + + +class PlatformTriggerAuthOutputTypedDict(TypedDict): + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + type: PlatformTriggerAuthType + r"""Credential scheme.""" + + +class PlatformTriggerAuthOutput(BaseModel): + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + type: PlatformTriggerAuthType + r"""Credential scheme.""" + + +class PlatformTriggerAuthTypedDict(TypedDict): + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + type: PlatformTriggerAuthType + r"""Credential scheme.""" + secret: str + r"""Secret credential value. Write-only; never returned on reads.""" + + +class PlatformTriggerAuth(BaseModel): + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + type: PlatformTriggerAuthType + r"""Credential scheme.""" + + secret: str + r"""Secret credential value. Write-only; never returned on reads.""" diff --git a/src/glean/api_client/models/platformtriggercreaterequest.py b/src/glean/api_client/models/platformtriggercreaterequest.py new file mode 100644 index 00000000..d70686f2 --- /dev/null +++ b/src/glean/api_client/models/platformtriggercreaterequest.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerdelivery import ( + PlatformTriggerDelivery, + PlatformTriggerDeliveryTypedDict, +) +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerCreateRequestTypedDict(TypedDict): + preset_id: str + r"""ID of the preset to instantiate.""" + delivery: PlatformTriggerDeliveryTypedDict + description: NotRequired[str] + r"""Optional note describing this trigger.""" + inputs: NotRequired[Dict[str, Any]] + r"""Values for the preset's inputs.""" + + +class PlatformTriggerCreateRequest(BaseModel): + preset_id: str + r"""ID of the preset to instantiate.""" + + delivery: PlatformTriggerDelivery + + description: Optional[str] = None + r"""Optional note describing this trigger.""" + + inputs: Optional[Dict[str, Any]] = None + r"""Values for the preset's inputs.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description", "inputs"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggercreateresponse.py b/src/glean/api_client/models/platformtriggercreateresponse.py new file mode 100644 index 00000000..f0f1a850 --- /dev/null +++ b/src/glean/api_client/models/platformtriggercreateresponse.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerwithsecret import ( + PlatformTriggerWithSecret, + PlatformTriggerWithSecretTypedDict, +) +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformTriggerCreateResponseTypedDict(TypedDict): + trigger: PlatformTriggerWithSecretTypedDict + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformTriggerCreateResponse(BaseModel): + trigger: PlatformTriggerWithSecret + + request_id: str + r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformtriggerdelivery.py b/src/glean/api_client/models/platformtriggerdelivery.py new file mode 100644 index 00000000..fb8e5f02 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerdelivery.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerauth_output import ( + PlatformTriggerAuth, + PlatformTriggerAuthTypedDict, +) +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerDeliveryTypedDict(TypedDict): + webhook_url: str + r"""URL that signed events are delivered to.""" + auth: NotRequired[PlatformTriggerAuthTypedDict] + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + +class PlatformTriggerDelivery(BaseModel): + webhook_url: str + r"""URL that signed events are delivered to.""" + + auth: Optional[PlatformTriggerAuth] = None + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerdelivery_output.py b/src/glean/api_client/models/platformtriggerdelivery_output.py new file mode 100644 index 00000000..4e613755 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerdelivery_output.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerauth_output import ( + PlatformTriggerAuthOutput, + PlatformTriggerAuthOutputTypedDict, +) +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerDeliveryOutputTypedDict(TypedDict): + webhook_url: str + r"""URL that signed events are delivered to.""" + auth: NotRequired[PlatformTriggerAuthOutputTypedDict] + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + +class PlatformTriggerDeliveryOutput(BaseModel): + webhook_url: str + r"""URL that signed events are delivered to.""" + + auth: Optional[PlatformTriggerAuthOutput] = None + r"""Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerevent.py b/src/glean/api_client/models/platformtriggerevent.py new file mode 100644 index 00000000..63b745f8 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerevent.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggereventreason import PlatformTriggerEventReason +from .platformtriggereventtype import PlatformTriggerEventType +from datetime import datetime +from glean.api_client import models +from glean.api_client.types import BaseModel +from pydantic import field_serializer +from typing_extensions import TypedDict + + +class PlatformTriggerEventTypedDict(TypedDict): + r"""A content event a trigger can fire on.""" + + event_type: PlatformTriggerEventType + r"""The kind of event.""" + datasource: str + r"""Datasource the event originated from.""" + reason: PlatformTriggerEventReason + r"""Why the event fired.""" + doc_type: str + r"""Datasource-specific object type.""" + doc_id: str + r"""Identifier of the document the event is about.""" + view_url: str + r"""Link to the document in its source system.""" + title: str + r"""Title of the document, or the subject for email.""" + event_time: datetime + r"""When the event occurred.""" + + +class PlatformTriggerEvent(BaseModel): + r"""A content event a trigger can fire on.""" + + event_type: PlatformTriggerEventType + r"""The kind of event.""" + + datasource: str + r"""Datasource the event originated from.""" + + reason: PlatformTriggerEventReason + r"""Why the event fired.""" + + doc_type: str + r"""Datasource-specific object type.""" + + doc_id: str + r"""Identifier of the document the event is about.""" + + view_url: str + r"""Link to the document in its source system.""" + + title: str + r"""Title of the document, or the subject for email.""" + + event_time: datetime + r"""When the event occurred.""" + + @field_serializer("reason") + def serialize_reason(self, value): + if isinstance(value, str): + try: + return models.PlatformTriggerEventReason(value) + except ValueError: + return value + return value diff --git a/src/glean/api_client/models/platformtriggereventreason.py b/src/glean/api_client/models/platformtriggereventreason.py new file mode 100644 index 00000000..984437d8 --- /dev/null +++ b/src/glean/api_client/models/platformtriggereventreason.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import utils + + +class PlatformTriggerEventReason(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Why the event fired.""" + + # The document was created. + CREATED = "CREATED" + # The document was updated. + UPDATED = "UPDATED" + # The document was deleted. + DELETED = "DELETED" + # The document started matching the trigger's conditions. + MEETS_CONDITION = "MEETS_CONDITION" + # The item was assigned to someone. + ASSIGNED = "ASSIGNED" + # The item was unassigned. + UNASSIGNED = "UNASSIGNED" + # A label was added. + LABELED = "LABELED" + # A label was removed. + UNLABELED = "UNLABELED" + # A review was requested. + REVIEW_REQUESTED = "REVIEW_REQUESTED" + # A review request was withdrawn. + REVIEW_REQUEST_REMOVED = "REVIEW_REQUEST_REMOVED" + # A draft was marked ready for review. + READY_FOR_REVIEW = "READY_FOR_REVIEW" + # The item was converted back to a draft. + CONVERTED_TO_DRAFT = "CONVERTED_TO_DRAFT" + # The source system sent a webhook update. + WEBHOOK_UPDATED = "WEBHOOK_UPDATED" diff --git a/src/glean/api_client/models/platformtriggereventsearchrequest.py b/src/glean/api_client/models/platformtriggereventsearchrequest.py new file mode 100644 index 00000000..a8f990c2 --- /dev/null +++ b/src/glean/api_client/models/platformtriggereventsearchrequest.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerEventSearchRequestTypedDict(TypedDict): + page_size: NotRequired[int] + r"""Maximum number of events to return.""" + + +class PlatformTriggerEventSearchRequest(BaseModel): + page_size: Optional[int] = 10 + r"""Maximum number of events to return.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggereventsearchresponse.py b/src/glean/api_client/models/platformtriggereventsearchresponse.py new file mode 100644 index 00000000..11179d5b --- /dev/null +++ b/src/glean/api_client/models/platformtriggereventsearchresponse.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerevent import PlatformTriggerEvent, PlatformTriggerEventTypedDict +from glean.api_client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class PlatformTriggerEventSearchResponseTypedDict(TypedDict): + results: List[PlatformTriggerEventTypedDict] + r"""Matching events, most recent first.""" + has_more: bool + r"""Whether more events matched than were returned. Raise `page_size` to see more; cursor-based paging is not offered yet. + + """ + request_id: str + r"""Unique identifier for this request, for support and debugging.""" + + +class PlatformTriggerEventSearchResponse(BaseModel): + results: List[PlatformTriggerEvent] + r"""Matching events, most recent first.""" + + has_more: bool + r"""Whether more events matched than were returned. Raise `page_size` to see more; cursor-based paging is not offered yet. + + """ + + request_id: str + r"""Unique identifier for this request, for support and debugging.""" diff --git a/src/glean/api_client/models/platformtriggereventtype.py b/src/glean/api_client/models/platformtriggereventtype.py new file mode 100644 index 00000000..cef1d084 --- /dev/null +++ b/src/glean/api_client/models/platformtriggereventtype.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class PlatformTriggerEventType(str, Enum): + r"""The kind of event.""" + + # A document was created, updated, or deleted. + DOCUMENT_CHANGE = "DOCUMENT_CHANGE" diff --git a/src/glean/api_client/models/platformtriggergetresponse.py b/src/glean/api_client/models/platformtriggergetresponse.py new file mode 100644 index 00000000..ca171e8d --- /dev/null +++ b/src/glean/api_client/models/platformtriggergetresponse.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtrigger import PlatformTrigger, PlatformTriggerTypedDict +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformTriggerGetResponseTypedDict(TypedDict): + trigger: PlatformTriggerTypedDict + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformTriggerGetResponse(BaseModel): + trigger: PlatformTrigger + + request_id: str + r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformtriggerlistresponse.py b/src/glean/api_client/models/platformtriggerlistresponse.py new file mode 100644 index 00000000..16bdf27f --- /dev/null +++ b/src/glean/api_client/models/platformtriggerlistresponse.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtrigger import PlatformTrigger, PlatformTriggerTypedDict +from glean.api_client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class PlatformTriggerListResponseTypedDict(TypedDict): + results: List[PlatformTriggerTypedDict] + r"""Triggers owned by the caller.""" + has_more: bool + r"""Whether additional results are available.""" + next_cursor: Nullable[str] + r"""Cursor for the next page, or null when no more results are available.""" + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformTriggerListResponse(BaseModel): + results: List[PlatformTrigger] + r"""Triggers owned by the caller.""" + + has_more: bool + r"""Whether additional results are available.""" + + next_cursor: Nullable[str] + r"""Cursor for the next page, or null when no more results are available.""" + + request_id: str + r"""Platform-generated request ID for support correlation.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerpreset.py b/src/glean/api_client/models/platformtriggerpreset.py new file mode 100644 index 00000000..a7c372a8 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpreset.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerpresetinput import ( + PlatformTriggerPresetInput, + PlatformTriggerPresetInputTypedDict, +) +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerPresetTypedDict(TypedDict): + preset_id: str + r"""ID of the preset. Pass this when creating a trigger.""" + datasource: str + r"""Datasource the preset fires on.""" + display_name: str + r"""Human-readable preset name.""" + inputs: List[PlatformTriggerPresetInputTypedDict] + r"""Inputs the caller may supply when creating a trigger from this preset.""" + description: NotRequired[str] + r"""Human-readable description of when the preset fires.""" + + +class PlatformTriggerPreset(BaseModel): + preset_id: str + r"""ID of the preset. Pass this when creating a trigger.""" + + datasource: str + r"""Datasource the preset fires on.""" + + display_name: str + r"""Human-readable preset name.""" + + inputs: List[PlatformTriggerPresetInput] + r"""Inputs the caller may supply when creating a trigger from this preset.""" + + description: Optional[str] = None + r"""Human-readable description of when the preset fires.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerpreseteventsearchrequest.py b/src/glean/api_client/models/platformtriggerpreseteventsearchrequest.py new file mode 100644 index 00000000..ac214e06 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpreseteventsearchrequest.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerPresetEventSearchRequestTypedDict(TypedDict): + inputs: NotRequired[Dict[str, str]] + r"""Values for the preset's input fields, keyed by field name. + + """ + page_size: NotRequired[int] + r"""Maximum number of events to return.""" + + +class PlatformTriggerPresetEventSearchRequest(BaseModel): + inputs: Optional[Dict[str, str]] = None + r"""Values for the preset's input fields, keyed by field name. + + """ + + page_size: Optional[int] = 10 + r"""Maximum number of events to return.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["inputs", "page_size"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerpresetgetresponse.py b/src/glean/api_client/models/platformtriggerpresetgetresponse.py new file mode 100644 index 00000000..a5b185f3 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetgetresponse.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerpreset import PlatformTriggerPreset, PlatformTriggerPresetTypedDict +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformTriggerPresetGetResponseTypedDict(TypedDict): + trigger_preset: PlatformTriggerPresetTypedDict + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformTriggerPresetGetResponse(BaseModel): + trigger_preset: PlatformTriggerPreset + + request_id: str + r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformtriggerpresetinput.py b/src/glean/api_client/models/platformtriggerpresetinput.py new file mode 100644 index 00000000..ebe2f224 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetinput.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerpresetinputtype import PlatformTriggerPresetInputType +from .platformtriggerpresetinputvalue import ( + PlatformTriggerPresetInputValue, + PlatformTriggerPresetInputValueTypedDict, +) +from glean.api_client import models +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import field_serializer, model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerPresetInputTypedDict(TypedDict): + field: str + r"""Identifier of the input, supplied as a key in the trigger's `inputs`.""" + type: PlatformTriggerPresetInputType + r"""Type of a preset input.""" + display_name: str + r"""Human-readable name for the input.""" + is_required: bool + r"""Whether the caller must supply a value for this input.""" + values: NotRequired[List[PlatformTriggerPresetInputValueTypedDict]] + r"""Bounded initial set of selectable values for a picklist input. Omitted entirely for free-text inputs. + + """ + is_truncated: NotRequired[bool] + r"""Whether additional selectable values were omitted from `values`. When true, use GET /trigger-presets/{preset_id}/input-values with a query to narrow the result set. + + """ + + +class PlatformTriggerPresetInput(BaseModel): + field: str + r"""Identifier of the input, supplied as a key in the trigger's `inputs`.""" + + type: PlatformTriggerPresetInputType + r"""Type of a preset input.""" + + display_name: str + r"""Human-readable name for the input.""" + + is_required: bool + r"""Whether the caller must supply a value for this input.""" + + values: Optional[List[PlatformTriggerPresetInputValue]] = None + r"""Bounded initial set of selectable values for a picklist input. Omitted entirely for free-text inputs. + + """ + + is_truncated: Optional[bool] = None + r"""Whether additional selectable values were omitted from `values`. When true, use GET /trigger-presets/{preset_id}/input-values with a query to narrow the result set. + + """ + + @field_serializer("type") + def serialize_type(self, value): + if isinstance(value, str): + try: + return models.PlatformTriggerPresetInputType(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["values", "is_truncated"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerpresetinputtype.py b/src/glean/api_client/models/platformtriggerpresetinputtype.py new file mode 100644 index 00000000..2697c7d5 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetinputtype.py @@ -0,0 +1,13 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import utils + + +class PlatformTriggerPresetInputType(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Type of a preset input.""" + + PICKLIST = "PICKLIST" + TEXT = "TEXT" + USER = "USER" diff --git a/src/glean/api_client/models/platformtriggerpresetinputvalue.py b/src/glean/api_client/models/platformtriggerpresetinputvalue.py new file mode 100644 index 00000000..0e3bedde --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetinputvalue.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from glean.api_client.types import BaseModel +from typing_extensions import TypedDict + + +class PlatformTriggerPresetInputValueTypedDict(TypedDict): + value: str + r"""The exact value to send in the trigger's `inputs` for this choice (e.g. a channel name, a user's email, etc). + + """ + display_name: str + r"""Human-readable name for this value.""" + + +class PlatformTriggerPresetInputValue(BaseModel): + value: str + r"""The exact value to send in the trigger's `inputs` for this choice (e.g. a channel name, a user's email, etc). + + """ + + display_name: str + r"""Human-readable name for this value.""" diff --git a/src/glean/api_client/models/platformtriggerpresetinputvaluelistresponse.py b/src/glean/api_client/models/platformtriggerpresetinputvaluelistresponse.py new file mode 100644 index 00000000..d3a2336f --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetinputvaluelistresponse.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerpresetinputvalue import ( + PlatformTriggerPresetInputValue, + PlatformTriggerPresetInputValueTypedDict, +) +from glean.api_client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class PlatformTriggerPresetInputValueListResponseTypedDict(TypedDict): + results: List[PlatformTriggerPresetInputValueTypedDict] + r"""The bounded set of selectable values matching the query.""" + is_truncated: bool + r"""Whether additional matches were omitted. When true, refine `query` to narrow the result set. + + """ + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformTriggerPresetInputValueListResponse(BaseModel): + results: List[PlatformTriggerPresetInputValue] + r"""The bounded set of selectable values matching the query.""" + + is_truncated: bool + r"""Whether additional matches were omitted. When true, refine `query` to narrow the result set. + + """ + + request_id: str + r"""Platform-generated request ID for support correlation.""" diff --git a/src/glean/api_client/models/platformtriggerpresetlistresponse.py b/src/glean/api_client/models/platformtriggerpresetlistresponse.py new file mode 100644 index 00000000..f7c9c6ce --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetlistresponse.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerpreset import PlatformTriggerPreset, PlatformTriggerPresetTypedDict +from glean.api_client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class PlatformTriggerPresetListResponseTypedDict(TypedDict): + results: List[PlatformTriggerPresetTypedDict] + r"""Trigger presets available to the caller.""" + has_more: bool + r"""Whether additional results are available.""" + next_cursor: Nullable[str] + r"""Cursor for the next page, or null when no more results are available.""" + request_id: str + r"""Platform-generated request ID for support correlation.""" + + +class PlatformTriggerPresetListResponse(BaseModel): + results: List[PlatformTriggerPreset] + r"""Trigger presets available to the caller.""" + + has_more: bool + r"""Whether additional results are available.""" + + next_cursor: Nullable[str] + r"""Cursor for the next page, or null when no more results are available.""" + + request_id: str + r"""Platform-generated request ID for support correlation.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerstatus.py b/src/glean/api_client/models/platformtriggerstatus.py new file mode 100644 index 00000000..0c789c9a --- /dev/null +++ b/src/glean/api_client/models/platformtriggerstatus.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum +from glean.api_client import utils + + +class PlatformTriggerStatus(str, Enum, metaclass=utils.OpenEnumMeta): + r"""Current trigger lifecycle state.""" + + ENABLED = "ENABLED" + DISABLED = "DISABLED" diff --git a/src/glean/api_client/models/platformtriggerupdaterequest.py b/src/glean/api_client/models/platformtriggerupdaterequest.py new file mode 100644 index 00000000..7dcbd6a2 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerupdaterequest.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerdelivery import ( + PlatformTriggerDelivery, + PlatformTriggerDeliveryTypedDict, +) +from .platformtriggerstatus import PlatformTriggerStatus +from glean.api_client import models +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import field_serializer, model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerUpdateRequestTypedDict(TypedDict): + r"""Partial update. Only the supplied fields are changed.""" + + status: NotRequired[PlatformTriggerStatus] + r"""Current trigger lifecycle state.""" + description: NotRequired[str] + r"""Optional note describing this trigger.""" + inputs: NotRequired[Dict[str, Any]] + r"""Values for the preset's inputs.""" + delivery: NotRequired[PlatformTriggerDeliveryTypedDict] + + +class PlatformTriggerUpdateRequest(BaseModel): + r"""Partial update. Only the supplied fields are changed.""" + + status: Optional[PlatformTriggerStatus] = None + r"""Current trigger lifecycle state.""" + + description: Optional[str] = None + r"""Optional note describing this trigger.""" + + inputs: Optional[Dict[str, Any]] = None + r"""Values for the preset's inputs.""" + + delivery: Optional[PlatformTriggerDelivery] = None + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.PlatformTriggerStatus(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["status", "description", "inputs", "delivery"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/models/platformtriggerwithsecret.py b/src/glean/api_client/models/platformtriggerwithsecret.py new file mode 100644 index 00000000..380c1979 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerwithsecret.py @@ -0,0 +1,87 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerdelivery_output import ( + PlatformTriggerDeliveryOutput, + PlatformTriggerDeliveryOutputTypedDict, +) +from .platformtriggerstatus import PlatformTriggerStatus +from datetime import datetime +from glean.api_client import models +from glean.api_client.types import BaseModel, UNSET_SENTINEL +from pydantic import field_serializer, model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PlatformTriggerWithSecretTypedDict(TypedDict): + trigger_id: str + r"""ID of the trigger.""" + preset_id: str + r"""ID of the preset this trigger was created from.""" + status: PlatformTriggerStatus + r"""Current trigger lifecycle state.""" + delivery: PlatformTriggerDeliveryOutputTypedDict + created_at: datetime + r"""Time the trigger was created.""" + updated_at: datetime + r"""Time the trigger was last updated.""" + signing_secret: str + r"""Secret for verifying webhook signatures. Returned only at creation.""" + description: NotRequired[str] + r"""Optional caller-supplied note describing this trigger.""" + inputs: NotRequired[Dict[str, Any]] + r"""Values supplied for the preset's inputs.""" + + +class PlatformTriggerWithSecret(BaseModel): + trigger_id: str + r"""ID of the trigger.""" + + preset_id: str + r"""ID of the preset this trigger was created from.""" + + status: PlatformTriggerStatus + r"""Current trigger lifecycle state.""" + + delivery: PlatformTriggerDeliveryOutput + + created_at: datetime + r"""Time the trigger was created.""" + + updated_at: datetime + r"""Time the trigger was last updated.""" + + signing_secret: str + r"""Secret for verifying webhook signatures. Returned only at creation.""" + + description: Optional[str] = None + r"""Optional caller-supplied note describing this trigger.""" + + inputs: Optional[Dict[str, Any]] = None + r"""Values supplied for the preset's inputs.""" + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.PlatformTriggerStatus(value) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description", "inputs"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/glean/api_client/sdk.py b/src/glean/api_client/sdk.py index 484c68ff..4efe2dd7 100644 --- a/src/glean/api_client/sdk.py +++ b/src/glean/api_client/sdk.py @@ -21,6 +21,7 @@ from glean.api_client.indexing import Indexing from glean.api_client.search import Search from glean.api_client.skills import Skills + from glean.api_client.triggers import Triggers class Glean(BaseSDK): @@ -47,6 +48,7 @@ class Glean(BaseSDK): chat: "ChatSDK" skills: "Skills" search: "Search" + triggers: "Triggers" client: "Client" indexing: "Indexing" _sub_sdk_map = { @@ -54,6 +56,7 @@ class Glean(BaseSDK): "chat": ("glean.api_client.chat_sdk", "ChatSDK"), "skills": ("glean.api_client.skills", "Skills"), "search": ("glean.api_client.search", "Search"), + "triggers": ("glean.api_client.triggers", "Triggers"), "client": ("glean.api_client.client", "Client"), "indexing": ("glean.api_client.indexing", "Indexing"), } diff --git a/src/glean/api_client/skills.py b/src/glean/api_client/skills.py index d86ec8e3..89e97e10 100644 --- a/src/glean/api_client/skills.py +++ b/src/glean/api_client/skills.py @@ -466,24 +466,21 @@ async def list_async( raise errors.GleanError("Unexpected response received", http_res) - def validate( + def import_( self, *, - file: Union[ - models.PlatformSkillValidationRequestFile, - models.PlatformSkillValidationRequestFileTypedDict, - ], + source_urls: Iterable[str], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PlatformSkillValidationResponse: - r"""Validate skill bundle + ) -> models.PlatformSkillImportResponse: + r"""Import skills from GitHub - Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. - :param file: SKILL.md, .zip, or .skill bundle to validate. + :param source_urls: Resolved GitHub skill URLs selected from a source preview. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -499,15 +496,13 @@ def validate( else: base_url = self._get_url(base_url, url_variables) - request = models.PlatformSkillValidationRequest( - file=utils.get_pydantic_model( - file, models.PlatformSkillValidationRequestFile - ), + request = models.PlatformSkillImportRequest( + source_urls=utils.unmarshal(source_urls, List[str]), ) req = self._build_request( method="POST", - path="/api/skills/validation", + path="/api/skills/import", base_url=base_url, url_variables=url_variables, request=request, @@ -519,11 +514,7 @@ def validate( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, - False, - False, - "multipart", - models.PlatformSkillValidationRequest, + request, False, False, "json", models.PlatformSkillImportRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -541,16 +532,17 @@ def validate( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="platform-skills-validate", + operation_id="platform-skills-import", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), tags=["Skills"], extensions={ + "x-codegen-request-body-name": "request", "x-glean-experimental": { - "id": "0b086fa6-30f8-4279-8d11-10ab0059c14a", - "introduced": "2026-06-24", + "id": "9162d790-e101-437d-a9a0-25e4687d150b", + "introduced": "2026-07-28", }, "x-visibility": "Public", }, @@ -562,12 +554,10 @@ def validate( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.PlatformSkillValidationResponse, http_res - ) + return unmarshal_json_response(models.PlatformSkillImportResponse, http_res) if utils.match_response( http_res, - ["400", "401", "403", "404", "408", "413", "429"], + ["400", "401", "403", "408", "409", "413", "429"], "application/problem+json", ): response_data = unmarshal_json_response( @@ -588,24 +578,21 @@ def validate( raise errors.GleanError("Unexpected response received", http_res) - async def validate_async( + async def import__async( self, *, - file: Union[ - models.PlatformSkillValidationRequestFile, - models.PlatformSkillValidationRequestFileTypedDict, - ], + source_urls: Iterable[str], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PlatformSkillValidationResponse: - r"""Validate skill bundle + ) -> models.PlatformSkillImportResponse: + r"""Import skills from GitHub - Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. + Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. - :param file: SKILL.md, .zip, or .skill bundle to validate. + :param source_urls: Resolved GitHub skill URLs selected from a source preview. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -621,15 +608,13 @@ async def validate_async( else: base_url = self._get_url(base_url, url_variables) - request = models.PlatformSkillValidationRequest( - file=utils.get_pydantic_model( - file, models.PlatformSkillValidationRequestFile - ), + request = models.PlatformSkillImportRequest( + source_urls=utils.unmarshal(source_urls, List[str]), ) req = self._build_request_async( method="POST", - path="/api/skills/validation", + path="/api/skills/import", base_url=base_url, url_variables=url_variables, request=request, @@ -641,11 +626,7 @@ async def validate_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, - False, - False, - "multipart", - models.PlatformSkillValidationRequest, + request, False, False, "json", models.PlatformSkillImportRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -663,16 +644,17 @@ async def validate_async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="platform-skills-validate", + operation_id="platform-skills-import", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), tags=["Skills"], extensions={ + "x-codegen-request-body-name": "request", "x-glean-experimental": { - "id": "0b086fa6-30f8-4279-8d11-10ab0059c14a", - "introduced": "2026-06-24", + "id": "9162d790-e101-437d-a9a0-25e4687d150b", + "introduced": "2026-07-28", }, "x-visibility": "Public", }, @@ -684,12 +666,10 @@ async def validate_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.PlatformSkillValidationResponse, http_res - ) + return unmarshal_json_response(models.PlatformSkillImportResponse, http_res) if utils.match_response( http_res, - ["400", "401", "403", "404", "408", "413", "429"], + ["400", "401", "403", "408", "409", "413", "429"], "application/problem+json", ): response_data = unmarshal_json_response( @@ -710,21 +690,24 @@ async def validate_async( raise errors.GleanError("Unexpected response received", http_res) - def import_( + def validate( self, *, - source_urls: Iterable[str], + file: Union[ + models.PlatformSkillValidationRequestFile, + models.PlatformSkillValidationRequestFileTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PlatformSkillImportResponse: - r"""Import skills from GitHub + ) -> models.PlatformSkillValidationResponse: + r"""Validate skill bundle - Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. + Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. - :param source_urls: Resolved GitHub skill URLs selected from a source preview. + :param file: SKILL.md, .zip, or .skill bundle to validate. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -740,13 +723,15 @@ def import_( else: base_url = self._get_url(base_url, url_variables) - request = models.PlatformSkillImportRequest( - source_urls=utils.unmarshal(source_urls, List[str]), + request = models.PlatformSkillValidationRequest( + file=utils.get_pydantic_model( + file, models.PlatformSkillValidationRequestFile + ), ) req = self._build_request( method="POST", - path="/api/skills/import", + path="/api/skills/validation", base_url=base_url, url_variables=url_variables, request=request, @@ -758,7 +743,11 @@ def import_( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.PlatformSkillImportRequest + request, + False, + False, + "multipart", + models.PlatformSkillValidationRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -776,17 +765,16 @@ def import_( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="platform-skills-import", + operation_id="platform-skills-validate", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), tags=["Skills"], extensions={ - "x-codegen-request-body-name": "request", "x-glean-experimental": { - "id": "9162d790-e101-437d-a9a0-25e4687d150b", - "introduced": "2026-07-28", + "id": "0b086fa6-30f8-4279-8d11-10ab0059c14a", + "introduced": "2026-06-24", }, "x-visibility": "Public", }, @@ -798,10 +786,12 @@ def import_( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.PlatformSkillImportResponse, http_res) + return unmarshal_json_response( + models.PlatformSkillValidationResponse, http_res + ) if utils.match_response( http_res, - ["400", "401", "403", "408", "409", "413", "429"], + ["400", "401", "403", "404", "408", "413", "429"], "application/problem+json", ): response_data = unmarshal_json_response( @@ -822,21 +812,24 @@ def import_( raise errors.GleanError("Unexpected response received", http_res) - async def import__async( + async def validate_async( self, *, - source_urls: Iterable[str], + file: Union[ + models.PlatformSkillValidationRequestFile, + models.PlatformSkillValidationRequestFileTypedDict, + ], retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.PlatformSkillImportResponse: - r"""Import skills from GitHub + ) -> models.PlatformSkillValidationResponse: + r"""Validate skill bundle - Import one or more skills selected from a GitHub source preview. Each source URL is fetched and persisted as an independent skill with source provenance. This operation does not create a durable source resource. The import is atomic: if any source cannot be fetched, validated, or persisted, no skills are created. + Validate a skill bundle without persisting it. Accepts a SKILL.md, .zip, or .skill upload and returns parsed metadata plus the normalized file layout. - :param source_urls: Resolved GitHub skill URLs selected from a source preview. + :param file: SKILL.md, .zip, or .skill bundle to validate. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -852,13 +845,15 @@ async def import__async( else: base_url = self._get_url(base_url, url_variables) - request = models.PlatformSkillImportRequest( - source_urls=utils.unmarshal(source_urls, List[str]), + request = models.PlatformSkillValidationRequest( + file=utils.get_pydantic_model( + file, models.PlatformSkillValidationRequestFile + ), ) req = self._build_request_async( method="POST", - path="/api/skills/import", + path="/api/skills/validation", base_url=base_url, url_variables=url_variables, request=request, @@ -870,7 +865,11 @@ async def import__async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.PlatformSkillImportRequest + request, + False, + False, + "multipart", + models.PlatformSkillValidationRequest, ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -888,17 +887,16 @@ async def import__async( hook_ctx=HookContext( config=self.sdk_configuration, base_url=base_url or "", - operation_id="platform-skills-import", + operation_id="platform-skills-validate", oauth2_scopes=None, security_source=get_security_from_env( self.sdk_configuration.security, models.Security ), tags=["Skills"], extensions={ - "x-codegen-request-body-name": "request", "x-glean-experimental": { - "id": "9162d790-e101-437d-a9a0-25e4687d150b", - "introduced": "2026-07-28", + "id": "0b086fa6-30f8-4279-8d11-10ab0059c14a", + "introduced": "2026-06-24", }, "x-visibility": "Public", }, @@ -910,10 +908,12 @@ async def import__async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.PlatformSkillImportResponse, http_res) + return unmarshal_json_response( + models.PlatformSkillValidationResponse, http_res + ) if utils.match_response( http_res, - ["400", "401", "403", "408", "409", "413", "429"], + ["400", "401", "403", "404", "408", "413", "429"], "application/problem+json", ): response_data = unmarshal_json_response( diff --git a/src/glean/api_client/tools.py b/src/glean/api_client/tools.py index aa8b10a3..a9a8b100 100644 --- a/src/glean/api_client/tools.py +++ b/src/glean/api_client/tools.py @@ -1211,14 +1211,15 @@ def get_tool_server_tools( r"""Get tool definitions from a tool server. Returns the name, description and JSON input schema for the named tools on the - specified tool server. Works for both action packs and MCP servers. + specified tool server. Works for Glean's built-in tools, tool packs and MCP + servers. `toolNames` is required. Names that do not exist on the server are returned in `notFound` rather than failing the request, so a single bad name does not force callers into one-at-a-time retries. Matching is case-insensitive and treats `-` and `_` as equivalent. - Native tools are not served; `serverId=native` returns 404. + Use `serverId=native` for Glean's built-in tools. :param server_id: Unique identifier of the tool server. @@ -1315,14 +1316,15 @@ async def get_tool_server_tools_async( r"""Get tool definitions from a tool server. Returns the name, description and JSON input schema for the named tools on the - specified tool server. Works for both action packs and MCP servers. + specified tool server. Works for Glean's built-in tools, tool packs and MCP + servers. `toolNames` is required. Names that do not exist on the server are returned in `notFound` rather than failing the request, so a single bad name does not force callers into one-at-a-time retries. Matching is case-insensitive and treats `-` and `_` as equivalent. - Native tools are not served; `serverId=native` returns 404. + Use `serverId=native` for Glean's built-in tools. :param server_id: Unique identifier of the tool server. diff --git a/src/glean/api_client/triggers.py b/src/glean/api_client/triggers.py new file mode 100644 index 00000000..f72ca99d --- /dev/null +++ b/src/glean/api_client/triggers.py @@ -0,0 +1,2369 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from glean.api_client import errors, models, utils +from glean.api_client._hooks import HookContext +from glean.api_client.types import OptionalNullable, UNSET +from glean.api_client.utils import get_security_from_env +from glean.api_client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, Mapping, Optional, Union + + +class Triggers(BaseSDK): + def create( + self, + *, + preset_id: str, + delivery: Union[ + models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + ], + description: Optional[str] = None, + inputs: Optional[Mapping[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerCreateResponse: + r"""Create trigger + + Create a trigger from a preset and return it with its signing secret. + + + :param preset_id: ID of the preset to instantiate. + :param delivery: + :param description: Optional note describing this trigger. + :param inputs: Values for the preset's inputs. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerCreateRequest( + preset_id=preset_id, + description=description, + inputs=utils.unmarshal(inputs, Optional[Dict[str, Any]]), + delivery=utils.get_pydantic_model(delivery, models.PlatformTriggerDelivery), + ) + + req = self._build_request( + method="POST", + path="/api/triggers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.PlatformTriggerCreateRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-create", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-glean-experimental": { + "id": "eb175f18-74e6-4c9c-ba02-23bcc9018fc9", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerCreateResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "409", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def create_async( + self, + *, + preset_id: str, + delivery: Union[ + models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + ], + description: Optional[str] = None, + inputs: Optional[Mapping[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerCreateResponse: + r"""Create trigger + + Create a trigger from a preset and return it with its signing secret. + + + :param preset_id: ID of the preset to instantiate. + :param delivery: + :param description: Optional note describing this trigger. + :param inputs: Values for the preset's inputs. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerCreateRequest( + preset_id=preset_id, + description=description, + inputs=utils.unmarshal(inputs, Optional[Dict[str, Any]]), + delivery=utils.get_pydantic_model(delivery, models.PlatformTriggerDelivery), + ) + + req = self._build_request_async( + method="POST", + path="/api/triggers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.PlatformTriggerCreateRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-create", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-glean-experimental": { + "id": "eb175f18-74e6-4c9c-ba02-23bcc9018fc9", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerCreateResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "409", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def list( + self, + *, + page_size: Optional[int] = 50, + cursor: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerListResponse: + r"""List triggers + + List triggers owned by the authenticated caller. + + + :param page_size: Maximum number of triggers to return. + :param cursor: Opaque pagination cursor from a previous response. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersListRequest( + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request( + method="GET", + path="/api/triggers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "e3554987-e043-4561-889a-a1117b1bce06", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformTriggerListResponse, http_res) + if utils.match_response( + http_res, ["400", "401", "403", "408", "429"], "application/problem+json" + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def list_async( + self, + *, + page_size: Optional[int] = 50, + cursor: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerListResponse: + r"""List triggers + + List triggers owned by the authenticated caller. + + + :param page_size: Maximum number of triggers to return. + :param cursor: Opaque pagination cursor from a previous response. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersListRequest( + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request_async( + method="GET", + path="/api/triggers", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "e3554987-e043-4561-889a-a1117b1bce06", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformTriggerListResponse, http_res) + if utils.match_response( + http_res, ["400", "401", "403", "408", "429"], "application/problem+json" + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def get( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerGetResponse: + r"""Get trigger + + Retrieve a trigger owned by the authenticated caller. + + + :param trigger_id: ID of the trigger to retrieve. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersGetRequest( + trigger_id=trigger_id, + ) + + req = self._build_request( + method="GET", + path="/api/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "46de62cb-ba31-4f71-9646-649c1d604816", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformTriggerGetResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def get_async( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerGetResponse: + r"""Get trigger + + Retrieve a trigger owned by the authenticated caller. + + + :param trigger_id: ID of the trigger to retrieve. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersGetRequest( + trigger_id=trigger_id, + ) + + req = self._build_request_async( + method="GET", + path="/api/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "46de62cb-ba31-4f71-9646-649c1d604816", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformTriggerGetResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def update( + self, + *, + trigger_id: str, + status: Optional[models.PlatformTriggerStatus] = None, + description: Optional[str] = None, + inputs: Optional[Mapping[str, Any]] = None, + delivery: Optional[ + Union[ + models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerGetResponse: + r"""Update trigger + + Update a trigger. + + + :param trigger_id: ID of the trigger to update. + :param status: Current trigger lifecycle state. + :param description: Optional note describing this trigger. + :param inputs: Values for the preset's inputs. + :param delivery: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersUpdateRequest( + trigger_id=trigger_id, + platform_trigger_update_request=models.PlatformTriggerUpdateRequest( + status=status, + description=description, + inputs=utils.unmarshal(inputs, Optional[Dict[str, Any]]), + delivery=utils.get_pydantic_model( + delivery, Optional[models.PlatformTriggerDelivery] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/api/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_trigger_update_request, + False, + False, + "json", + models.PlatformTriggerUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-update", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-glean-experimental": { + "id": "3eb4c709-bd5c-4019-b913-0db36c766350", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformTriggerGetResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def update_async( + self, + *, + trigger_id: str, + status: Optional[models.PlatformTriggerStatus] = None, + description: Optional[str] = None, + inputs: Optional[Mapping[str, Any]] = None, + delivery: Optional[ + Union[ + models.PlatformTriggerDelivery, models.PlatformTriggerDeliveryTypedDict + ] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerGetResponse: + r"""Update trigger + + Update a trigger. + + + :param trigger_id: ID of the trigger to update. + :param status: Current trigger lifecycle state. + :param description: Optional note describing this trigger. + :param inputs: Values for the preset's inputs. + :param delivery: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersUpdateRequest( + trigger_id=trigger_id, + platform_trigger_update_request=models.PlatformTriggerUpdateRequest( + status=status, + description=description, + inputs=utils.unmarshal(inputs, Optional[Dict[str, Any]]), + delivery=utils.get_pydantic_model( + delivery, Optional[models.PlatformTriggerDelivery] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/api/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_trigger_update_request, + False, + False, + "json", + models.PlatformTriggerUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-update", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-codegen-request-body-name": "payload", + "x-glean-experimental": { + "id": "3eb4c709-bd5c-4019-b913-0db36c766350", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PlatformTriggerGetResponse, http_res) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def delete( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete trigger + + Delete a trigger. + + + :param trigger_id: ID of the trigger to delete. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersDeleteRequest( + trigger_id=trigger_id, + ) + + req = self._build_request( + method="DELETE", + path="/api/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/problem+json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "e6564ed7-8b4b-4708-918b-eed97110859f", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + trigger_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete trigger + + Delete a trigger. + + + :param trigger_id: ID of the trigger to delete. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersDeleteRequest( + trigger_id=trigger_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/api/triggers/{trigger_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/problem+json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "e6564ed7-8b4b-4708-918b-eed97110859f", + "introduced": "2026-07-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def search_events( + self, + *, + trigger_id: str, + page_size: Optional[int] = 10, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerEventSearchResponse: + r"""Search events for a trigger + + Search recent content events an existing trigger matches. Read-only — no webhook delivery is made. Covers the last seven days. + + + :param trigger_id: ID of the trigger whose events to search. + :param page_size: Maximum number of events to return. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersEventsSearchRequest( + trigger_id=trigger_id, + platform_trigger_event_search_request=models.PlatformTriggerEventSearchRequest( + page_size=page_size, + ), + ) + + req = self._build_request( + method="POST", + path="/api/triggers/{trigger_id}/events/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_trigger_event_search_request + if request is not None + else None, + False, + True, + "json", + Optional[models.PlatformTriggerEventSearchRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-events-search", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "c734a377-3dec-4ee2-9ec5-3848a8384f03", + "introduced": "2026-08-07", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerEventSearchResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def search_events_async( + self, + *, + trigger_id: str, + page_size: Optional[int] = 10, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerEventSearchResponse: + r"""Search events for a trigger + + Search recent content events an existing trigger matches. Read-only — no webhook delivery is made. Covers the last seven days. + + + :param trigger_id: ID of the trigger whose events to search. + :param page_size: Maximum number of events to return. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggersEventsSearchRequest( + trigger_id=trigger_id, + platform_trigger_event_search_request=models.PlatformTriggerEventSearchRequest( + page_size=page_size, + ), + ) + + req = self._build_request_async( + method="POST", + path="/api/triggers/{trigger_id}/events/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_trigger_event_search_request + if request is not None + else None, + False, + True, + "json", + Optional[models.PlatformTriggerEventSearchRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-triggers-events-search", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "c734a377-3dec-4ee2-9ec5-3848a8384f03", + "introduced": "2026-08-07", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerEventSearchResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def list_presets( + self, + *, + datasource: Optional[str] = None, + page_size: Optional[int] = 50, + cursor: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerPresetListResponse: + r"""List trigger presets + + List the trigger presets available to the caller. A preset is a curated content-trigger template (e.g. a new Jira ticket) which is passed when creating a trigger. + + + :param datasource: Restrict results to presets for a single datasource (e.g. jira). + :param page_size: Maximum number of presets to return. + :param cursor: Opaque pagination cursor from a previous response. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsListRequest( + datasource=datasource, + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request( + method="GET", + path="/api/trigger-presets", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "f5b16196-0d4c-42f0-89bf-40313398728e", + "introduced": "2026-07-22", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerPresetListResponse, http_res + ) + if utils.match_response( + http_res, ["400", "401", "403", "408", "429"], "application/problem+json" + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def list_presets_async( + self, + *, + datasource: Optional[str] = None, + page_size: Optional[int] = 50, + cursor: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerPresetListResponse: + r"""List trigger presets + + List the trigger presets available to the caller. A preset is a curated content-trigger template (e.g. a new Jira ticket) which is passed when creating a trigger. + + + :param datasource: Restrict results to presets for a single datasource (e.g. jira). + :param page_size: Maximum number of presets to return. + :param cursor: Opaque pagination cursor from a previous response. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsListRequest( + datasource=datasource, + page_size=page_size, + cursor=cursor, + ) + + req = self._build_request_async( + method="GET", + path="/api/trigger-presets", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "f5b16196-0d4c-42f0-89bf-40313398728e", + "introduced": "2026-07-22", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerPresetListResponse, http_res + ) + if utils.match_response( + http_res, ["400", "401", "403", "408", "429"], "application/problem+json" + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def get_preset( + self, + *, + preset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerPresetGetResponse: + r"""Get trigger preset + + Retrieve a single trigger preset by id. + + + :param preset_id: ID of the preset to retrieve. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsGetRequest( + preset_id=preset_id, + ) + + req = self._build_request( + method="GET", + path="/api/trigger-presets/{preset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "5277167d-909b-4eee-95d1-8958b07016bb", + "introduced": "2026-07-22", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerPresetGetResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def get_preset_async( + self, + *, + preset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerPresetGetResponse: + r"""Get trigger preset + + Retrieve a single trigger preset by id. + + + :param preset_id: ID of the preset to retrieve. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsGetRequest( + preset_id=preset_id, + ) + + req = self._build_request_async( + method="GET", + path="/api/trigger-presets/{preset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "5277167d-909b-4eee-95d1-8958b07016bb", + "introduced": "2026-07-22", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerPresetGetResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def list_preset_input_values( + self, + *, + preset_id: str, + field: str, + query: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerPresetInputValueListResponse: + r"""Search trigger preset input values + + Return up to 300 selectable values for a single picklist input on a preset. Results are intended for typeahead selection and are not cursor-paginated. When `is_truncated` is true, refine `query` to narrow the result set. + + + :param preset_id: ID of the preset the input belongs to. + :param field: Field identifier of the input whose values to list. + :param query: Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsInputValuesListRequest( + preset_id=preset_id, + field=field, + query=query, + ) + + req = self._build_request( + method="GET", + path="/api/trigger-presets/{preset_id}/input-values", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-input-values-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "24c5675d-a57a-48cb-9d71-3dece296f28c", + "introduced": "2026-08-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerPresetInputValueListResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def list_preset_input_values_async( + self, + *, + preset_id: str, + field: str, + query: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerPresetInputValueListResponse: + r"""Search trigger preset input values + + Return up to 300 selectable values for a single picklist input on a preset. Results are intended for typeahead selection and are not cursor-paginated. When `is_truncated` is true, refine `query` to narrow the result set. + + + :param preset_id: ID of the preset the input belongs to. + :param field: Field identifier of the input whose values to list. + :param query: Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsInputValuesListRequest( + preset_id=preset_id, + field=field, + query=query, + ) + + req = self._build_request_async( + method="GET", + path="/api/trigger-presets/{preset_id}/input-values", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-input-values-list", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "24c5675d-a57a-48cb-9d71-3dece296f28c", + "introduced": "2026-08-06", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerPresetInputValueListResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + def search_preset_events( + self, + *, + preset_id: str, + inputs: Optional[Mapping[str, str]] = None, + page_size: Optional[int] = 10, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerEventSearchResponse: + r"""Search events for a trigger preset + + Search recent content events an unsaved trigger built from this preset would match, to preview it before creating the trigger. Read-only — no trigger is created and no webhook delivery is made. Covers the last seven days. + + + :param preset_id: ID of the preset to preview. + :param inputs: Values for the preset's input fields, keyed by field name. + + :param page_size: Maximum number of events to return. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsEventsSearchRequest( + preset_id=preset_id, + platform_trigger_preset_event_search_request=models.PlatformTriggerPresetEventSearchRequest( + inputs=utils.unmarshal(inputs, Optional[Dict[str, str]]), + page_size=page_size, + ), + ) + + req = self._build_request( + method="POST", + path="/api/trigger-presets/{preset_id}/events/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_trigger_preset_event_search_request + if request is not None + else None, + False, + True, + "json", + Optional[models.PlatformTriggerPresetEventSearchRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-events-search", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "a48efd80-78d6-46de-9f23-5b8c63ecd157", + "introduced": "2026-08-12", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerEventSearchResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) + + async def search_preset_events_async( + self, + *, + preset_id: str, + inputs: Optional[Mapping[str, str]] = None, + page_size: Optional[int] = 10, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PlatformTriggerEventSearchResponse: + r"""Search events for a trigger preset + + Search recent content events an unsaved trigger built from this preset would match, to preview it before creating the trigger. Read-only — no trigger is created and no webhook delivery is made. Covers the last seven days. + + + :param preset_id: ID of the preset to preview. + :param inputs: Values for the preset's input fields, keyed by field name. + + :param page_size: Maximum number of events to return. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PlatformTriggerPresetsEventsSearchRequest( + preset_id=preset_id, + platform_trigger_preset_event_search_request=models.PlatformTriggerPresetEventSearchRequest( + inputs=utils.unmarshal(inputs, Optional[Dict[str, str]]), + page_size=page_size, + ), + ) + + req = self._build_request_async( + method="POST", + path="/api/trigger-presets/{preset_id}/events/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.platform_trigger_preset_event_search_request + if request is not None + else None, + False, + True, + "json", + Optional[models.PlatformTriggerPresetEventSearchRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="platform-trigger-presets-events-search", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + tags=["Triggers"], + extensions={ + "x-glean-experimental": { + "id": "a48efd80-78d6-46de-9f23-5b8c63ecd157", + "introduced": "2026-08-12", + }, + "x-visibility": "Public", + }, + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PlatformTriggerEventSearchResponse, http_res + ) + if utils.match_response( + http_res, + ["400", "401", "403", "404", "408", "413", "429"], + "application/problem+json", + ): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, ["500", "503"], "application/problem+json"): + response_data = unmarshal_json_response( + errors.PlatformProblemDetailErrorData, http_res + ) + raise errors.PlatformProblemDetailError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.GleanError("API error occurred", http_res, http_res_text) + + raise errors.GleanError("Unexpected response received", http_res) diff --git a/src/glean/api_client/utils/retries.py b/src/glean/api_client/utils/retries.py index ca7b59ef..c7418a62 100644 --- a/src/glean/api_client/utils/retries.py +++ b/src/glean/api_client/utils/retries.py @@ -109,6 +109,18 @@ def __init__(self, inner: Exception): self.inner = inner +_TRANSPORT_ERROR_NAMES = frozenset({"NetworkError", "TimeoutException"}) +_TRANSPORT_ERROR_BASES = frozenset({"TransportError", "RequestError", "HTTPError"}) + + +def _is_transport_error(exception: BaseException) -> bool: + """Report whether an exception is a connection or timeout failure.""" + if isinstance(exception, (httpx.NetworkError, httpx.TimeoutException)): + return True + names = {base.__name__ for base in type(exception).__mro__} + return bool(names & _TRANSPORT_ERROR_NAMES) and _TRANSPORT_ERROR_BASES <= names + + def _parse_retry_after_header(response: httpx.Response) -> Optional[int]: """Parse Retry-After header from response. @@ -207,14 +219,15 @@ def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except (httpx.NetworkError, httpx.TimeoutException) as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception except TemporaryError: raise except Exception as exception: + if ( + _is_transport_error(exception) + and retries.config.retry_connection_errors + ): + raise + raise PermanentError(exception) from exception return res @@ -252,14 +265,15 @@ async def do_request() -> httpx.Response: if res.status_code == parsed_code: raise TemporaryError(res) - except (httpx.NetworkError, httpx.TimeoutException) as exception: - if retries.config.retry_connection_errors: - raise - - raise PermanentError(exception) from exception except TemporaryError: raise except Exception as exception: + if ( + _is_transport_error(exception) + and retries.config.retry_connection_errors + ): + raise + raise PermanentError(exception) from exception return res diff --git a/src/glean/api_client/utils/values.py b/src/glean/api_client/utils/values.py index dae01a44..ac217f47 100644 --- a/src/glean/api_client/utils/values.py +++ b/src/glean/api_client/utils/values.py @@ -52,9 +52,11 @@ def match_status_codes(status_codes: List[str], status_code: int) -> bool: T = TypeVar("T") + def cast_partial(typ): return partial(cast, typ) + def get_global_from_env( value: Optional[T], env_key: str, type_cast: Callable[[str], T] ) -> Optional[T]: diff --git a/tests/mockserver/internal/handler/generated_handlers.go b/tests/mockserver/internal/handler/generated_handlers.go index 1ea7cd1d..8e541a71 100644 --- a/tests/mockserver/internal/handler/generated_handlers.go +++ b/tests/mockserver/internal/handler/generated_handlers.go @@ -23,6 +23,11 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}/versions", pathGetAPISkillsSkillIDVersions(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}/versions/{version}", pathGetAPISkillsSkillIDVersionsVersion(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/api/skills/{skill_id}/versions/{version}/content", pathGetAPISkillsSkillIDVersionsVersionContent(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/trigger-presets", pathGetAPITriggerPresets(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/trigger-presets/{preset_id}", pathGetAPITriggerPresetsPresetID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/trigger-presets/{preset_id}/input-values", pathGetAPITriggerPresetsPresetIDInputValues(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/triggers", pathGetAPITriggers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodGet, "/api/triggers/{trigger_id}", pathGetAPITriggersTriggerID(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/index/custom-metadata/schema/{groupName}", pathGetRestAPIIndexCustomMetadataSchemaGroupName(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/actions/actionpack/{actionPackId}/auth", pathGetRestAPIV1ActionsActionpackActionPackIDAuth(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/agents/{agent_id}", pathGetRestAPIV1AgentsAgentID(dir, rt)), @@ -38,6 +43,7 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tool-servers/{serverId}/tools", pathGetRestAPIV1ToolServersServerIDTools(dir, rt)), NewGeneratedHandler(ctx, http.MethodGet, "/rest/api/v1/tools/list", pathGetRestAPIV1ToolsList(dir, rt)), NewGeneratedHandler(ctx, http.MethodPatch, "/api/skills/{skill_id}", pathPatchAPISkillsSkillID(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPatch, "/api/triggers/{trigger_id}", pathPatchAPITriggersTriggerID(dir, rt)), NewGeneratedHandler(ctx, http.MethodPatch, "/rest/api/v1/configure/datasources/{datasourceId}/instances/{instanceId}", pathPatchRestAPIV1ConfigureDatasourcesDatasourceIDInstancesInstanceID(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/search", pathPostAPIAgentsSearch(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/agents/{agent_id}/runs", pathPostAPIAgentsAgentIDRuns(dir, rt)), @@ -78,6 +84,9 @@ func GeneratedHandlers(ctx context.Context, dir *logging.HTTPFileDirectory, rt * NewGeneratedHandler(ctx, http.MethodPost, "/api/skills/validation", pathPostAPISkillsValidation(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/skills/{skill_id}/sync", pathPostAPISkillsSkillIDSync(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/api/skills/{skill_id}/versions", pathPostAPISkillsSkillIDVersions(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/trigger-presets/{preset_id}/events/search", pathPostAPITriggerPresetsPresetIDEventsSearch(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/triggers", pathPostAPITriggers(dir, rt)), + NewGeneratedHandler(ctx, http.MethodPost, "/api/triggers/{trigger_id}/events/search", pathPostAPITriggersTriggerIDEventsSearch(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/index/submissions/{datasourceInstance}/{type}", pathPostRestAPIIndexSubmissionsDatasourceInstanceType(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/actions/actionpack/{actionPackId}/auth", pathPostRestAPIV1ActionsActionpackActionPackIDAuth(dir, rt)), NewGeneratedHandler(ctx, http.MethodPost, "/rest/api/v1/activity", pathPostRestAPIV1Activity(dir, rt)), diff --git a/tests/mockserver/internal/handler/pathgetapitriggerpresets.go b/tests/mockserver/internal/handler/pathgetapitriggerpresets.go new file mode 100644 index 00000000..bf480d62 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetapitriggerpresets.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathGetAPITriggerPresets(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-trigger-presets-list[0]": + dir.HandlerFunc("platform-trigger-presets-list", testPlatformTriggerPresetsListPlatformTriggerPresetsList0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggerPresetsListPlatformTriggerPresetsList0(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.PlatformTriggerPresetListResponse = &components.PlatformTriggerPresetListResponse{ + Results: []components.PlatformTriggerPreset{}, + HasMore: false, + NextCursor: nil, + 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/tests/mockserver/internal/handler/pathgetapitriggerpresetspresetid.go b/tests/mockserver/internal/handler/pathgetapitriggerpresetspresetid.go new file mode 100644 index 00000000..87f98a9e --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetapitriggerpresetspresetid.go @@ -0,0 +1,72 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathGetAPITriggerPresetsPresetID(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-trigger-presets-get[0]": + dir.HandlerFunc("platform-trigger-presets-get", testPlatformTriggerPresetsGetPlatformTriggerPresetsGet0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggerPresetsGetPlatformTriggerPresetsGet0(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.PlatformTriggerPresetGetResponse = &components.PlatformTriggerPresetGetResponse{ + TriggerPreset: components.PlatformTriggerPreset{ + PresetID: "jira_high_priority_bug", + Datasource: "jira", + DisplayName: "High-priority Jira bugs", + Description: types.String("Fires when a high-priority bug is created."), + Inputs: []components.PlatformTriggerPresetInput{}, + }, + 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/tests/mockserver/internal/handler/pathgetapitriggerpresetspresetidinputvalues.go b/tests/mockserver/internal/handler/pathgetapitriggerpresetspresetidinputvalues.go new file mode 100644 index 00000000..92c4e663 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetapitriggerpresetspresetidinputvalues.go @@ -0,0 +1,71 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathGetAPITriggerPresetsPresetIDInputValues(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-trigger-presets-input-values-list[0]": + dir.HandlerFunc("platform-trigger-presets-input-values-list", testPlatformTriggerPresetsInputValuesListPlatformTriggerPresetsInputValuesList0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggerPresetsInputValuesListPlatformTriggerPresetsInputValuesList0(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.PlatformTriggerPresetInputValueListResponse = &components.PlatformTriggerPresetInputValueListResponse{ + Results: []components.PlatformTriggerPresetInputValue{ + components.PlatformTriggerPresetInputValue{ + Value: "test.user@glean.com", + DisplayName: "Test User", + }, + }, + IsTruncated: 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/tests/mockserver/internal/handler/pathgetapitriggers.go b/tests/mockserver/internal/handler/pathgetapitriggers.go new file mode 100644 index 00000000..04c4bdc1 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetapitriggers.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathGetAPITriggers(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-triggers-list[0]": + dir.HandlerFunc("platform-triggers-list", testPlatformTriggersListPlatformTriggersList0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggersListPlatformTriggersList0(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.PlatformTriggerListResponse = &components.PlatformTriggerListResponse{ + Results: []components.PlatformTrigger{}, + HasMore: true, + NextCursor: types.String(""), + 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/tests/mockserver/internal/handler/pathgetapitriggerstriggerid.go b/tests/mockserver/internal/handler/pathgetapitriggerstriggerid.go new file mode 100644 index 00000000..3f4515d9 --- /dev/null +++ b/tests/mockserver/internal/handler/pathgetapitriggerstriggerid.go @@ -0,0 +1,79 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathGetAPITriggersTriggerID(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-triggers-get[0]": + dir.HandlerFunc("platform-triggers-get", testPlatformTriggersGetPlatformTriggersGet0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggersGetPlatformTriggersGet0(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.PlatformTriggerGetResponse = &components.PlatformTriggerGetResponse{ + Trigger: components.PlatformTrigger{ + TriggerID: "2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c", + PresetID: "jira_high_priority_bug", + Description: types.String("High-priority Jira bugs in the Engineering project"), + Status: components.PlatformTriggerStatusEnabled, + Inputs: map[string]any{ + "project": "ENG", + }, + Delivery: components.PlatformTriggerDeliveryOutput{ + WebhookURL: "https://customer.app/webhook", + }, + CreatedAt: types.MustTimeFromString("2024-01-06T01:37:37.232Z"), + UpdatedAt: types.MustTimeFromString("2025-07-02T01:19:47.126Z"), + }, + 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/tests/mockserver/internal/handler/pathpatchapitriggerstriggerid.go b/tests/mockserver/internal/handler/pathpatchapitriggerstriggerid.go new file mode 100644 index 00000000..a5b44ba2 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpatchapitriggerstriggerid.go @@ -0,0 +1,84 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathPatchAPITriggersTriggerID(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-triggers-update[0]": + dir.HandlerFunc("platform-triggers-update", testPlatformTriggersUpdatePlatformTriggersUpdate0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggersUpdatePlatformTriggersUpdate0(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.PlatformTriggerGetResponse = &components.PlatformTriggerGetResponse{ + Trigger: components.PlatformTrigger{ + TriggerID: "2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c", + PresetID: "jira_high_priority_bug", + Description: types.String("High-priority Jira bugs in the Engineering project"), + Status: components.PlatformTriggerStatusEnabled, + Inputs: map[string]any{ + "project": "ENG", + }, + Delivery: components.PlatformTriggerDeliveryOutput{ + WebhookURL: "https://customer.app/webhook", + }, + CreatedAt: types.MustTimeFromString("2026-09-03T11:57:47.699Z"), + UpdatedAt: types.MustTimeFromString("2026-01-25T02:15:09.513Z"), + }, + 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/tests/mockserver/internal/handler/pathpostapitriggerpresetspresetideventssearch.go b/tests/mockserver/internal/handler/pathpostapitriggerpresetspresetideventssearch.go new file mode 100644 index 00000000..11d7757c --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapitriggerpresetspresetideventssearch.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathPostAPITriggerPresetsPresetIDEventsSearch(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-trigger-presets-events-search[0]": + dir.HandlerFunc("platform-trigger-presets-events-search", testPlatformTriggerPresetsEventsSearchPlatformTriggerPresetsEventsSearch0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggerPresetsEventsSearchPlatformTriggerPresetsEventsSearch0(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", false); 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.PlatformTriggerEventSearchResponse = &components.PlatformTriggerEventSearchResponse{ + Results: []components.PlatformTriggerEvent{ + components.PlatformTriggerEvent{ + EventType: components.PlatformTriggerEventTypeDocumentChange, + Datasource: "GITHUB", + Reason: components.PlatformTriggerEventReasonCreated, + DocType: "Ticket", + DocID: "", + ViewURL: "https://prickly-cutover.info/", + Title: "", + EventTime: types.MustTimeFromString("2025-04-15T15:45:31.544Z"), + }, + }, + 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/tests/mockserver/internal/handler/pathpostapitriggers.go b/tests/mockserver/internal/handler/pathpostapitriggers.go new file mode 100644 index 00000000..f1277b4b --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapitriggers.go @@ -0,0 +1,85 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathPostAPITriggers(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-triggers-create[0]": + dir.HandlerFunc("platform-triggers-create", testPlatformTriggersCreatePlatformTriggersCreate0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggersCreatePlatformTriggersCreate0(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.PlatformTriggerCreateResponse = &components.PlatformTriggerCreateResponse{ + Trigger: components.PlatformTriggerWithSecret{ + TriggerID: "2f8a9b0c1d2e4f5a6b7c8d9e0f1a2b3c", + PresetID: "jira_high_priority_bug", + Description: types.String("High-priority Jira bugs in the Engineering project"), + Status: components.PlatformTriggerStatusEnabled, + Inputs: map[string]any{ + "project": "ENG", + }, + Delivery: components.PlatformTriggerDeliveryOutput{ + WebhookURL: "https://customer.app/webhook", + }, + CreatedAt: types.MustTimeFromString("2025-08-17T18:19:46.877Z"), + UpdatedAt: types.MustTimeFromString("2024-09-14T03:27:40.201Z"), + SigningSecret: "whsec_xxx", + }, + 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/tests/mockserver/internal/handler/pathpostapitriggerstriggerideventssearch.go b/tests/mockserver/internal/handler/pathpostapitriggerstriggerideventssearch.go new file mode 100644 index 00000000..31c524e0 --- /dev/null +++ b/tests/mockserver/internal/handler/pathpostapitriggerstriggerideventssearch.go @@ -0,0 +1,83 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +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 pathPostAPITriggersTriggerIDEventsSearch(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-triggers-events-search[0]": + dir.HandlerFunc("platform-triggers-events-search", testPlatformTriggersEventsSearchPlatformTriggersEventsSearch0)(w, req) + default: + http.Error(w, fmt.Sprintf("Unknown test: %s[%d]", test, count), http.StatusBadRequest) + } + } +} + +func testPlatformTriggersEventsSearchPlatformTriggersEventsSearch0(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", false); 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.PlatformTriggerEventSearchResponse = &components.PlatformTriggerEventSearchResponse{ + Results: []components.PlatformTriggerEvent{ + components.PlatformTriggerEvent{ + EventType: components.PlatformTriggerEventTypeDocumentChange, + Datasource: "GITHUB", + Reason: components.PlatformTriggerEventReasonCreated, + DocType: "Ticket", + DocID: "", + ViewURL: "https://silent-omelet.biz", + Title: "", + EventTime: types.MustTimeFromString("2024-06-12T22:23:25.274Z"), + }, + }, + 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/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go index 96d4127e..87401958 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -628,8 +628,8 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { Roles: []components.UserRoleSpecification{}, SourceDocumentSpec: types.Pointer(components.CreateDocumentSpecUnionDocumentSpec3( components.DocumentSpec3{ - UgcType: components.DocumentSpecUgcType1Announcements, - ContentID: 848009, + UgcType: components.DocumentSpecUgcType1Shortcuts, + ContentID: 602763, }, )), SourceType: components.AnswerSourceTypeAssistant.ToPointer(), diff --git a/tests/mockserver/internal/sdk/models/components/calendarevent.go b/tests/mockserver/internal/sdk/models/components/calendarevent.go index 33ac7433..9086716f 100644 --- a/tests/mockserver/internal/sdk/models/components/calendarevent.go +++ b/tests/mockserver/internal/sdk/models/components/calendarevent.go @@ -5,6 +5,7 @@ package components import ( "encoding/json" "fmt" + "mockserver/internal/sdk/optionalnullable" ) // CalendarEventEventType - The nature of the event, for example "out of office". @@ -44,6 +45,12 @@ type CalendarEvent struct { // A permalink for this calendar event URL string `json:"url"` Attendees *CalendarAttendees `json:"attendees,omitempty"` + // Whether the requesting user is the organizer of this event. + IsOrganizer optionalnullable.OptionalNullable[bool] `json:"isOrganizer,omitempty"` + // The current booking status of the room resource associated with an event. + RoomBookingStatus *CalendarRoomBookingStatus `json:"roomBookingStatus,omitempty"` + // The display name of the room resource associated with this event. + RoomName *string `json:"roomName,omitempty"` // The location that this event is taking place at. Location *string `json:"location,omitempty"` ConferenceData *ConferenceData `json:"conferenceData,omitempty"` @@ -94,6 +101,27 @@ func (o *CalendarEvent) GetAttendees() *CalendarAttendees { return o.Attendees } +func (o *CalendarEvent) GetIsOrganizer() optionalnullable.OptionalNullable[bool] { + if o == nil { + return nil + } + return o.IsOrganizer +} + +func (o *CalendarEvent) GetRoomBookingStatus() *CalendarRoomBookingStatus { + if o == nil { + return nil + } + return o.RoomBookingStatus +} + +func (o *CalendarEvent) GetRoomName() *string { + if o == nil { + return nil + } + return o.RoomName +} + func (o *CalendarEvent) GetLocation() *string { if o == nil { return nil diff --git a/tests/mockserver/internal/sdk/models/components/calendarroombookingstatus.go b/tests/mockserver/internal/sdk/models/components/calendarroombookingstatus.go new file mode 100644 index 00000000..1f0d7819 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/calendarroombookingstatus.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// CalendarRoomBookingStatus - The current booking status of the room resource associated with an event. +type CalendarRoomBookingStatus string + +const ( + CalendarRoomBookingStatusNone CalendarRoomBookingStatus = "NONE" + CalendarRoomBookingStatusAccepted CalendarRoomBookingStatus = "ACCEPTED" + CalendarRoomBookingStatusDeclined CalendarRoomBookingStatus = "DECLINED" + CalendarRoomBookingStatusPending CalendarRoomBookingStatus = "PENDING" +) + +func (e CalendarRoomBookingStatus) ToPointer() *CalendarRoomBookingStatus { + return &e +} +func (e *CalendarRoomBookingStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "NONE": + fallthrough + case "ACCEPTED": + fallthrough + case "DECLINED": + fallthrough + case "PENDING": + *e = CalendarRoomBookingStatus(v) + return nil + default: + return fmt.Errorf("invalid value for CalendarRoomBookingStatus: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/feedentry.go b/tests/mockserver/internal/sdk/models/components/feedentry.go index 75c2030f..19beb02f 100644 --- a/tests/mockserver/internal/sdk/models/components/feedentry.go +++ b/tests/mockserver/internal/sdk/models/components/feedentry.go @@ -98,6 +98,7 @@ const ( JustificationTypeStarterKitOrgChart JustificationType = "STARTER_KIT_ORG_CHART" JustificationTypeStarterKitAddDoc JustificationType = "STARTER_KIT_ADD_DOC" JustificationTypeMeetingRecap JustificationType = "MEETING_RECAP" + JustificationTypeMeetingRoom JustificationType = "MEETING_ROOM" JustificationTypeMeetingPrepAutomation JustificationType = "MEETING_PREP_AUTOMATION" JustificationTypeActiveDiscussion JustificationType = "ACTIVE_DISCUSSION" JustificationTypeMidDayCatchUp JustificationType = "MID_DAY_CATCH_UP" @@ -114,6 +115,7 @@ const ( JustificationTypeOooPlanner JustificationType = "OOO_PLANNER" JustificationTypeOooCatchUp JustificationType = "OOO_CATCH_UP" JustificationTypeAdminHealthCenter JustificationType = "ADMIN_HEALTH_CENTER" + JustificationTypeKnowledgeGap JustificationType = "KNOWLEDGE_GAP" ) func (e JustificationType) ToPointer() *JustificationType { @@ -209,6 +211,8 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { fallthrough case "MEETING_RECAP": fallthrough + case "MEETING_ROOM": + fallthrough case "MEETING_PREP_AUTOMATION": fallthrough case "ACTIVE_DISCUSSION": @@ -240,6 +244,8 @@ func (e *JustificationType) UnmarshalJSON(data []byte) error { case "OOO_CATCH_UP": fallthrough case "ADMIN_HEALTH_CENTER": + fallthrough + case "KNOWLEDGE_GAP": *e = JustificationType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/feedrequest.go b/tests/mockserver/internal/sdk/models/components/feedrequest.go index 854c8390..97365eff 100644 --- a/tests/mockserver/internal/sdk/models/components/feedrequest.go +++ b/tests/mockserver/internal/sdk/models/components/feedrequest.go @@ -55,6 +55,7 @@ const ( FeedRequestCategoryOooPlanner FeedRequestCategory = "OOO_PLANNER" FeedRequestCategoryOooCatchUp FeedRequestCategory = "OOO_CATCH_UP" FeedRequestCategoryAdminHealthCenter FeedRequestCategory = "ADMIN_HEALTH_CENTER" + FeedRequestCategoryKnowledgeGap FeedRequestCategory = "KNOWLEDGE_GAP" ) func (e FeedRequestCategory) ToPointer() *FeedRequestCategory { @@ -155,6 +156,8 @@ func (e *FeedRequestCategory) UnmarshalJSON(data []byte) error { case "OOO_CATCH_UP": fallthrough case "ADMIN_HEALTH_CENTER": + fallthrough + case "KNOWLEDGE_GAP": *e = FeedRequestCategory(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/feedresult.go b/tests/mockserver/internal/sdk/models/components/feedresult.go index 158c7428..cc69740a 100644 --- a/tests/mockserver/internal/sdk/models/components/feedresult.go +++ b/tests/mockserver/internal/sdk/models/components/feedresult.go @@ -56,6 +56,7 @@ const ( FeedResultCategoryOooPlanner FeedResultCategory = "OOO_PLANNER" FeedResultCategoryOooCatchUp FeedResultCategory = "OOO_CATCH_UP" FeedResultCategoryAdminHealthCenter FeedResultCategory = "ADMIN_HEALTH_CENTER" + FeedResultCategoryKnowledgeGap FeedResultCategory = "KNOWLEDGE_GAP" ) func (e FeedResultCategory) ToPointer() *FeedResultCategory { @@ -156,6 +157,8 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { case "OOO_CATCH_UP": fallthrough case "ADMIN_HEALTH_CENTER": + fallthrough + case "KNOWLEDGE_GAP": *e = FeedResultCategory(v) return nil default: @@ -163,12 +166,13 @@ func (e *FeedResultCategory) UnmarshalJSON(data []byte) error { } } -// PlacementReason - Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. +// PlacementReason - Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). type PlacementReason string const ( PlacementReasonOrganic PlacementReason = "ORGANIC" PlacementReasonPromo PlacementReason = "PROMO" + PlacementReasonPinned PlacementReason = "PINNED" ) func (e PlacementReason) ToPointer() *PlacementReason { @@ -183,6 +187,8 @@ func (e *PlacementReason) UnmarshalJSON(data []byte) error { case "ORGANIC": fallthrough case "PROMO": + fallthrough + case "PINNED": *e = PlacementReason(v) return nil default: @@ -198,7 +204,7 @@ type FeedResult struct { SecondaryEntries []FeedEntry `json:"secondaryEntries,omitempty"` // Rank of the result. Rank is suggested by server. Client side rank may differ. Rank *int64 `json:"rank,omitempty"` - // Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. + // Placement source for ranked feed results. ORGANIC means the card was emitted by normal feed ranking. PROMO means the card was inserted by the homepage cards promo framework. PINNED means the card was moved to the head of the ranked stack (e.g. knowledge-gap pilot cards). PlacementReason *PlacementReason `json:"placementReason,omitempty"` } diff --git a/tests/mockserver/internal/sdk/models/components/platformchatcitationannotation.go b/tests/mockserver/internal/sdk/models/components/platformchatcitationannotation.go index eb920c41..64b253ab 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatcitationannotation.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatcitationannotation.go @@ -11,7 +11,7 @@ import ( type PlatformChatCitationAnnotationType string const ( - PlatformChatCitationAnnotationTypeCitation PlatformChatCitationAnnotationType = "citation" + PlatformChatCitationAnnotationTypeCitation PlatformChatCitationAnnotationType = "CITATION" ) func (e PlatformChatCitationAnnotationType) ToPointer() *PlatformChatCitationAnnotationType { @@ -23,7 +23,7 @@ func (e *PlatformChatCitationAnnotationType) UnmarshalJSON(data []byte) error { return err } switch v { - case "citation": + case "CITATION": *e = PlatformChatCitationAnnotationType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatcompletedresponse.go b/tests/mockserver/internal/sdk/models/components/platformchatcompletedresponse.go index 36264777..be4e3712 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatcompletedresponse.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatcompletedresponse.go @@ -13,7 +13,7 @@ import ( type Object string const ( - ObjectResponse Object = "response" + ObjectResponse Object = "RESPONSE" ) func (e Object) ToPointer() *Object { @@ -25,7 +25,7 @@ func (e *Object) UnmarshalJSON(data []byte) error { return err } switch v { - case "response": + case "RESPONSE": *e = Object(v) return nil default: @@ -36,7 +36,7 @@ func (e *Object) UnmarshalJSON(data []byte) error { type PlatformChatCompletedResponseStatus string const ( - PlatformChatCompletedResponseStatusCompleted PlatformChatCompletedResponseStatus = "completed" + PlatformChatCompletedResponseStatusCompleted PlatformChatCompletedResponseStatus = "COMPLETED" ) func (e PlatformChatCompletedResponseStatus) ToPointer() *PlatformChatCompletedResponseStatus { @@ -48,7 +48,7 @@ func (e *PlatformChatCompletedResponseStatus) UnmarshalJSON(data []byte) error { return err } switch v { - case "completed": + case "COMPLETED": *e = PlatformChatCompletedResponseStatus(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatcreaterequest.go b/tests/mockserver/internal/sdk/models/components/platformchatcreaterequest.go index ff12189e..a5b50b89 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatcreaterequest.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatcreaterequest.go @@ -15,7 +15,7 @@ const ( InputTypeArrayOfPlatformChatInputMessage InputType = "arrayOfPlatformChatInputMessage" ) -// Input - Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. +// Input - Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. type Input struct { Str *string `queryParam:"inline"` ArrayOfPlatformChatInputMessage []PlatformChatInputMessage `queryParam:"inline"` @@ -73,7 +73,7 @@ func (u Input) MarshalJSON() ([]byte, error) { } type PlatformChatCreateRequest struct { - // Either a plain string (single user turn) or a chronological array of `user`/`assistant` messages. The final array message must be `user`. + // Either a plain string (single user turn) or a chronological array of `USER`/`ASSISTANT` messages. The final array message must be `USER`. // Input Input `json:"input"` // When true, respond with `text/event-stream`. When false or omitted, respond with `application/json`. diff --git a/tests/mockserver/internal/sdk/models/components/platformchatcustomentitysource.go b/tests/mockserver/internal/sdk/models/components/platformchatcustomentitysource.go index a935970d..ccd6eac3 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatcustomentitysource.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatcustomentitysource.go @@ -11,7 +11,7 @@ import ( type PlatformChatCustomEntitySourceType string const ( - PlatformChatCustomEntitySourceTypeCustomEntity PlatformChatCustomEntitySourceType = "custom_entity" + PlatformChatCustomEntitySourceTypeCustomEntity PlatformChatCustomEntitySourceType = "CUSTOM_ENTITY" ) func (e PlatformChatCustomEntitySourceType) ToPointer() *PlatformChatCustomEntitySourceType { @@ -23,7 +23,7 @@ func (e *PlatformChatCustomEntitySourceType) UnmarshalJSON(data []byte) error { return err } switch v { - case "custom_entity": + case "CUSTOM_ENTITY": *e = PlatformChatCustomEntitySourceType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatdocumentsource.go b/tests/mockserver/internal/sdk/models/components/platformchatdocumentsource.go index 9dd42aa5..63d8078f 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatdocumentsource.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatdocumentsource.go @@ -12,7 +12,7 @@ import ( type PlatformChatDocumentSourceType2 string const ( - PlatformChatDocumentSourceType2Document PlatformChatDocumentSourceType2 = "document" + PlatformChatDocumentSourceType2Document PlatformChatDocumentSourceType2 = "DOCUMENT" ) func (e PlatformChatDocumentSourceType2) ToPointer() *PlatformChatDocumentSourceType2 { @@ -24,7 +24,7 @@ func (e *PlatformChatDocumentSourceType2) UnmarshalJSON(data []byte) error { return err } switch v { - case "document": + case "DOCUMENT": *e = PlatformChatDocumentSourceType2(v) return nil default: @@ -89,7 +89,7 @@ func (o *PlatformChatDocumentSourceDocument2) GetDatasource() *string { type PlatformChatDocumentSourceType1 string const ( - PlatformChatDocumentSourceType1Document PlatformChatDocumentSourceType1 = "document" + PlatformChatDocumentSourceType1Document PlatformChatDocumentSourceType1 = "DOCUMENT" ) func (e PlatformChatDocumentSourceType1) ToPointer() *PlatformChatDocumentSourceType1 { @@ -101,7 +101,7 @@ func (e *PlatformChatDocumentSourceType1) UnmarshalJSON(data []byte) error { return err } switch v { - case "document": + case "DOCUMENT": *e = PlatformChatDocumentSourceType1(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatfilesource.go b/tests/mockserver/internal/sdk/models/components/platformchatfilesource.go index ad39a1de..67147189 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatfilesource.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatfilesource.go @@ -11,7 +11,7 @@ import ( type PlatformChatFileSourceType string const ( - PlatformChatFileSourceTypeFile PlatformChatFileSourceType = "file" + PlatformChatFileSourceTypeFile PlatformChatFileSourceType = "FILE" ) func (e PlatformChatFileSourceType) ToPointer() *PlatformChatFileSourceType { @@ -23,7 +23,7 @@ func (e *PlatformChatFileSourceType) UnmarshalJSON(data []byte) error { return err } switch v { - case "file": + case "FILE": *e = PlatformChatFileSourceType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatinputmessage.go b/tests/mockserver/internal/sdk/models/components/platformchatinputmessage.go index 5989ab25..97c1e067 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatinputmessage.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatinputmessage.go @@ -11,8 +11,8 @@ import ( type PlatformChatInputMessageRole string const ( - PlatformChatInputMessageRoleUser PlatformChatInputMessageRole = "user" - PlatformChatInputMessageRoleAssistant PlatformChatInputMessageRole = "assistant" + PlatformChatInputMessageRoleUser PlatformChatInputMessageRole = "USER" + PlatformChatInputMessageRoleAssistant PlatformChatInputMessageRole = "ASSISTANT" ) func (e PlatformChatInputMessageRole) ToPointer() *PlatformChatInputMessageRole { @@ -24,9 +24,9 @@ func (e *PlatformChatInputMessageRole) UnmarshalJSON(data []byte) error { return err } switch v { - case "user": + case "USER": fallthrough - case "assistant": + case "ASSISTANT": *e = PlatformChatInputMessageRole(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatoutputmessage.go b/tests/mockserver/internal/sdk/models/components/platformchatoutputmessage.go index c7ccd4be..69218f0e 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatoutputmessage.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatoutputmessage.go @@ -10,7 +10,7 @@ import ( type PlatformChatOutputMessageType string const ( - PlatformChatOutputMessageTypeMessage PlatformChatOutputMessageType = "message" + PlatformChatOutputMessageTypeMessage PlatformChatOutputMessageType = "MESSAGE" ) func (e PlatformChatOutputMessageType) ToPointer() *PlatformChatOutputMessageType { @@ -22,7 +22,7 @@ func (e *PlatformChatOutputMessageType) UnmarshalJSON(data []byte) error { return err } switch v { - case "message": + case "MESSAGE": *e = PlatformChatOutputMessageType(v) return nil default: @@ -33,7 +33,7 @@ func (e *PlatformChatOutputMessageType) UnmarshalJSON(data []byte) error { type PlatformChatOutputMessageRole string const ( - PlatformChatOutputMessageRoleAssistant PlatformChatOutputMessageRole = "assistant" + PlatformChatOutputMessageRoleAssistant PlatformChatOutputMessageRole = "ASSISTANT" ) func (e PlatformChatOutputMessageRole) ToPointer() *PlatformChatOutputMessageRole { @@ -45,7 +45,7 @@ func (e *PlatformChatOutputMessageRole) UnmarshalJSON(data []byte) error { return err } switch v { - case "assistant": + case "ASSISTANT": *e = PlatformChatOutputMessageRole(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go b/tests/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go index fedd3f28..d5020f5c 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatoutputtextcontent.go @@ -10,7 +10,7 @@ import ( type PlatformChatOutputTextContentType string const ( - PlatformChatOutputTextContentTypeOutputText PlatformChatOutputTextContentType = "output_text" + PlatformChatOutputTextContentTypeOutputText PlatformChatOutputTextContentType = "OUTPUT_TEXT" ) func (e PlatformChatOutputTextContentType) ToPointer() *PlatformChatOutputTextContentType { @@ -22,7 +22,7 @@ func (e *PlatformChatOutputTextContentType) UnmarshalJSON(data []byte) error { return err } switch v { - case "output_text": + case "OUTPUT_TEXT": *e = PlatformChatOutputTextContentType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformchatpersonsource.go b/tests/mockserver/internal/sdk/models/components/platformchatpersonsource.go index 1e969fb9..9576e866 100644 --- a/tests/mockserver/internal/sdk/models/components/platformchatpersonsource.go +++ b/tests/mockserver/internal/sdk/models/components/platformchatpersonsource.go @@ -11,7 +11,7 @@ import ( type PlatformChatPersonSourceType string const ( - PlatformChatPersonSourceTypePerson PlatformChatPersonSourceType = "person" + PlatformChatPersonSourceTypePerson PlatformChatPersonSourceType = "PERSON" ) func (e PlatformChatPersonSourceType) ToPointer() *PlatformChatPersonSourceType { @@ -23,7 +23,7 @@ func (e *PlatformChatPersonSourceType) UnmarshalJSON(data []byte) error { return err } switch v { - case "person": + case "PERSON": *e = PlatformChatPersonSourceType(v) return nil default: diff --git a/tests/mockserver/internal/sdk/models/components/platformtrigger.go b/tests/mockserver/internal/sdk/models/components/platformtrigger.go new file mode 100644 index 00000000..f4ff0336 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtrigger.go @@ -0,0 +1,93 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PlatformTrigger struct { + // ID of the trigger. + TriggerID string `json:"trigger_id"` + // ID of the preset this trigger was created from. + PresetID string `json:"preset_id"` + // Optional caller-supplied note describing this trigger. + Description *string `json:"description,omitempty"` + // Current trigger lifecycle state. + Status PlatformTriggerStatus `json:"status"` + // Values supplied for the preset's inputs. + Inputs map[string]any `json:"inputs,omitempty"` + Delivery PlatformTriggerDeliveryOutput `json:"delivery"` + // Time the trigger was created. + CreatedAt time.Time `json:"created_at"` + // Time the trigger was last updated. + UpdatedAt time.Time `json:"updated_at"` +} + +func (p PlatformTrigger) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformTrigger) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"trigger_id", "preset_id", "status", "delivery", "created_at", "updated_at"}); err != nil { + return err + } + return nil +} + +func (o *PlatformTrigger) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +func (o *PlatformTrigger) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +func (o *PlatformTrigger) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformTrigger) GetStatus() PlatformTriggerStatus { + if o == nil { + return PlatformTriggerStatus("") + } + return o.Status +} + +func (o *PlatformTrigger) GetInputs() map[string]any { + if o == nil { + return nil + } + return o.Inputs +} + +func (o *PlatformTrigger) GetDelivery() PlatformTriggerDeliveryOutput { + if o == nil { + return PlatformTriggerDeliveryOutput{} + } + return o.Delivery +} + +func (o *PlatformTrigger) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *PlatformTrigger) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerauthoutput.go b/tests/mockserver/internal/sdk/models/components/platformtriggerauthoutput.go new file mode 100644 index 00000000..b72ecabb --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerauthoutput.go @@ -0,0 +1,67 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformTriggerAuthType - Credential scheme. +type PlatformTriggerAuthType string + +const ( + PlatformTriggerAuthTypeBearer PlatformTriggerAuthType = "BEARER" +) + +func (e PlatformTriggerAuthType) ToPointer() *PlatformTriggerAuthType { + return &e +} +func (e *PlatformTriggerAuthType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "BEARER": + *e = PlatformTriggerAuthType(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformTriggerAuthType: %v", v) + } +} + +// PlatformTriggerAuthOutput - Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. +type PlatformTriggerAuthOutput struct { + // Credential scheme. + Type PlatformTriggerAuthType `json:"type"` +} + +func (o *PlatformTriggerAuthOutput) GetType() PlatformTriggerAuthType { + if o == nil { + return PlatformTriggerAuthType("") + } + return o.Type +} + +// PlatformTriggerAuth - Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. +type PlatformTriggerAuth struct { + // Credential scheme. + Type PlatformTriggerAuthType `json:"type"` + // Secret credential value. Write-only; never returned on reads. + Secret string `json:"secret"` +} + +func (o *PlatformTriggerAuth) GetType() PlatformTriggerAuthType { + if o == nil { + return PlatformTriggerAuthType("") + } + return o.Type +} + +func (o *PlatformTriggerAuth) GetSecret() string { + if o == nil { + return "" + } + return o.Secret +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggercreaterequest.go b/tests/mockserver/internal/sdk/models/components/platformtriggercreaterequest.go new file mode 100644 index 00000000..f0b4f7f1 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggercreaterequest.go @@ -0,0 +1,41 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerCreateRequest struct { + // ID of the preset to instantiate. + PresetID string `json:"preset_id"` + // Optional note describing this trigger. + Description *string `json:"description,omitempty"` + // Values for the preset's inputs. + Inputs map[string]any `json:"inputs,omitempty"` + Delivery PlatformTriggerDelivery `json:"delivery"` +} + +func (o *PlatformTriggerCreateRequest) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +func (o *PlatformTriggerCreateRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformTriggerCreateRequest) GetInputs() map[string]any { + if o == nil { + return nil + } + return o.Inputs +} + +func (o *PlatformTriggerCreateRequest) GetDelivery() PlatformTriggerDelivery { + if o == nil { + return PlatformTriggerDelivery{} + } + return o.Delivery +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggercreateresponse.go b/tests/mockserver/internal/sdk/models/components/platformtriggercreateresponse.go new file mode 100644 index 00000000..2bc53014 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggercreateresponse.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerCreateResponse struct { + Trigger PlatformTriggerWithSecret `json:"trigger"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformTriggerCreateResponse) GetTrigger() PlatformTriggerWithSecret { + if o == nil { + return PlatformTriggerWithSecret{} + } + return o.Trigger +} + +func (o *PlatformTriggerCreateResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerdelivery.go b/tests/mockserver/internal/sdk/models/components/platformtriggerdelivery.go new file mode 100644 index 00000000..7f8b8cbf --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerdelivery.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerDelivery struct { + // URL that signed events are delivered to. + WebhookURL string `json:"webhook_url"` + // Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. + Auth *PlatformTriggerAuth `json:"auth,omitempty"` +} + +func (o *PlatformTriggerDelivery) GetWebhookURL() string { + if o == nil { + return "" + } + return o.WebhookURL +} + +func (o *PlatformTriggerDelivery) GetAuth() *PlatformTriggerAuth { + if o == nil { + return nil + } + return o.Auth +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerdeliveryoutput.go b/tests/mockserver/internal/sdk/models/components/platformtriggerdeliveryoutput.go new file mode 100644 index 00000000..9bf09b45 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerdeliveryoutput.go @@ -0,0 +1,24 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerDeliveryOutput struct { + // URL that signed events are delivered to. + WebhookURL string `json:"webhook_url"` + // Optional caller credential sent as an HTTP auth header on each delivery, in addition to the HMAC signature. Lets the receiving endpoint authenticate the request. On update, omit `auth` to preserve the existing credential; there is no in-place removal — recreate the trigger to remove auth. + Auth *PlatformTriggerAuthOutput `json:"auth,omitempty"` +} + +func (o *PlatformTriggerDeliveryOutput) GetWebhookURL() string { + if o == nil { + return "" + } + return o.WebhookURL +} + +func (o *PlatformTriggerDeliveryOutput) GetAuth() *PlatformTriggerAuthOutput { + if o == nil { + return nil + } + return o.Auth +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerevent.go b/tests/mockserver/internal/sdk/models/components/platformtriggerevent.go new file mode 100644 index 00000000..c75c1db0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerevent.go @@ -0,0 +1,95 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +// PlatformTriggerEvent - A content event a trigger can fire on. +type PlatformTriggerEvent struct { + // The kind of event. + EventType PlatformTriggerEventType `json:"event_type"` + // Datasource the event originated from. + Datasource string `json:"datasource"` + // Why the event fired. + Reason PlatformTriggerEventReason `json:"reason"` + // Datasource-specific object type. + DocType string `json:"doc_type"` + // Identifier of the document the event is about. + DocID string `json:"doc_id"` + // Link to the document in its source system. + ViewURL string `json:"view_url"` + // Title of the document, or the subject for email. + Title string `json:"title"` + // When the event occurred. + EventTime time.Time `json:"event_time"` +} + +func (p PlatformTriggerEvent) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformTriggerEvent) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"event_type", "datasource", "reason", "doc_type", "doc_id", "view_url", "title", "event_time"}); err != nil { + return err + } + return nil +} + +func (o *PlatformTriggerEvent) GetEventType() PlatformTriggerEventType { + if o == nil { + return PlatformTriggerEventType("") + } + return o.EventType +} + +func (o *PlatformTriggerEvent) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PlatformTriggerEvent) GetReason() PlatformTriggerEventReason { + if o == nil { + return PlatformTriggerEventReason("") + } + return o.Reason +} + +func (o *PlatformTriggerEvent) GetDocType() string { + if o == nil { + return "" + } + return o.DocType +} + +func (o *PlatformTriggerEvent) GetDocID() string { + if o == nil { + return "" + } + return o.DocID +} + +func (o *PlatformTriggerEvent) GetViewURL() string { + if o == nil { + return "" + } + return o.ViewURL +} + +func (o *PlatformTriggerEvent) GetTitle() string { + if o == nil { + return "" + } + return o.Title +} + +func (o *PlatformTriggerEvent) GetEventTime() time.Time { + if o == nil { + return time.Time{} + } + return o.EventTime +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggereventreason.go b/tests/mockserver/internal/sdk/models/components/platformtriggereventreason.go new file mode 100644 index 00000000..7f0bda2d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggereventreason.go @@ -0,0 +1,68 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformTriggerEventReason - Why the event fired. +type PlatformTriggerEventReason string + +const ( + PlatformTriggerEventReasonCreated PlatformTriggerEventReason = "CREATED" + PlatformTriggerEventReasonUpdated PlatformTriggerEventReason = "UPDATED" + PlatformTriggerEventReasonDeleted PlatformTriggerEventReason = "DELETED" + PlatformTriggerEventReasonMeetsCondition PlatformTriggerEventReason = "MEETS_CONDITION" + PlatformTriggerEventReasonAssigned PlatformTriggerEventReason = "ASSIGNED" + PlatformTriggerEventReasonUnassigned PlatformTriggerEventReason = "UNASSIGNED" + PlatformTriggerEventReasonLabeled PlatformTriggerEventReason = "LABELED" + PlatformTriggerEventReasonUnlabeled PlatformTriggerEventReason = "UNLABELED" + PlatformTriggerEventReasonReviewRequested PlatformTriggerEventReason = "REVIEW_REQUESTED" + PlatformTriggerEventReasonReviewRequestRemoved PlatformTriggerEventReason = "REVIEW_REQUEST_REMOVED" + PlatformTriggerEventReasonReadyForReview PlatformTriggerEventReason = "READY_FOR_REVIEW" + PlatformTriggerEventReasonConvertedToDraft PlatformTriggerEventReason = "CONVERTED_TO_DRAFT" + PlatformTriggerEventReasonWebhookUpdated PlatformTriggerEventReason = "WEBHOOK_UPDATED" +) + +func (e PlatformTriggerEventReason) ToPointer() *PlatformTriggerEventReason { + return &e +} +func (e *PlatformTriggerEventReason) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "CREATED": + fallthrough + case "UPDATED": + fallthrough + case "DELETED": + fallthrough + case "MEETS_CONDITION": + fallthrough + case "ASSIGNED": + fallthrough + case "UNASSIGNED": + fallthrough + case "LABELED": + fallthrough + case "UNLABELED": + fallthrough + case "REVIEW_REQUESTED": + fallthrough + case "REVIEW_REQUEST_REMOVED": + fallthrough + case "READY_FOR_REVIEW": + fallthrough + case "CONVERTED_TO_DRAFT": + fallthrough + case "WEBHOOK_UPDATED": + *e = PlatformTriggerEventReason(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformTriggerEventReason: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggereventsearchrequest.go b/tests/mockserver/internal/sdk/models/components/platformtriggereventsearchrequest.go new file mode 100644 index 00000000..dd4df12a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggereventsearchrequest.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" +) + +type PlatformTriggerEventSearchRequest struct { + // Maximum number of events to return. + PageSize *int64 `default:"10" json:"page_size"` +} + +func (p PlatformTriggerEventSearchRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformTriggerEventSearchRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (o *PlatformTriggerEventSearchRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggereventsearchresponse.go b/tests/mockserver/internal/sdk/models/components/platformtriggereventsearchresponse.go new file mode 100644 index 00000000..052cac3b --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggereventsearchresponse.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerEventSearchResponse struct { + // Matching events, most recent first. + Results []PlatformTriggerEvent `json:"results"` + // Whether more events matched than were returned. Raise `page_size` to see more; cursor-based paging is not offered yet. + // + HasMore bool `json:"has_more"` + // Unique identifier for this request, for support and debugging. + RequestID string `json:"request_id"` +} + +func (o *PlatformTriggerEventSearchResponse) GetResults() []PlatformTriggerEvent { + if o == nil { + return []PlatformTriggerEvent{} + } + return o.Results +} + +func (o *PlatformTriggerEventSearchResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformTriggerEventSearchResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggereventtype.go b/tests/mockserver/internal/sdk/models/components/platformtriggereventtype.go new file mode 100644 index 00000000..01a90c18 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggereventtype.go @@ -0,0 +1,32 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformTriggerEventType - The kind of event. +type PlatformTriggerEventType string + +const ( + PlatformTriggerEventTypeDocumentChange PlatformTriggerEventType = "DOCUMENT_CHANGE" +) + +func (e PlatformTriggerEventType) ToPointer() *PlatformTriggerEventType { + return &e +} +func (e *PlatformTriggerEventType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "DOCUMENT_CHANGE": + *e = PlatformTriggerEventType(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformTriggerEventType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggergetresponse.go b/tests/mockserver/internal/sdk/models/components/platformtriggergetresponse.go new file mode 100644 index 00000000..bf48ffae --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggergetresponse.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerGetResponse struct { + Trigger PlatformTrigger `json:"trigger"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformTriggerGetResponse) GetTrigger() PlatformTrigger { + if o == nil { + return PlatformTrigger{} + } + return o.Trigger +} + +func (o *PlatformTriggerGetResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerlistresponse.go b/tests/mockserver/internal/sdk/models/components/platformtriggerlistresponse.go new file mode 100644 index 00000000..ee21c824 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerlistresponse.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerListResponse struct { + // Triggers owned by the caller. + Results []PlatformTrigger `json:"results"` + // Whether additional results are available. + HasMore bool `json:"has_more"` + // Cursor for the next page, or null when no more results are available. + NextCursor *string `json:"next_cursor"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformTriggerListResponse) GetResults() []PlatformTrigger { + if o == nil { + return []PlatformTrigger{} + } + return o.Results +} + +func (o *PlatformTriggerListResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformTriggerListResponse) GetNextCursor() *string { + if o == nil { + return nil + } + return o.NextCursor +} + +func (o *PlatformTriggerListResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpreset.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpreset.go new file mode 100644 index 00000000..8ec754d7 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpreset.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerPreset struct { + // ID of the preset. Pass this when creating a trigger. + PresetID string `json:"preset_id"` + // Datasource the preset fires on. + Datasource string `json:"datasource"` + // Human-readable preset name. + DisplayName string `json:"display_name"` + // Human-readable description of when the preset fires. + Description *string `json:"description,omitempty"` + // Inputs the caller may supply when creating a trigger from this preset. + Inputs []PlatformTriggerPresetInput `json:"inputs"` +} + +func (o *PlatformTriggerPreset) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +func (o *PlatformTriggerPreset) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PlatformTriggerPreset) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformTriggerPreset) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformTriggerPreset) GetInputs() []PlatformTriggerPresetInput { + if o == nil { + return []PlatformTriggerPresetInput{} + } + return o.Inputs +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpreseteventsearchrequest.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpreseteventsearchrequest.go new file mode 100644 index 00000000..e461aefd --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpreseteventsearchrequest.go @@ -0,0 +1,40 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" +) + +type PlatformTriggerPresetEventSearchRequest struct { + // Values for the preset's input fields, keyed by field name. + // + Inputs map[string]string `json:"inputs,omitempty"` + // Maximum number of events to return. + PageSize *int64 `default:"10" json:"page_size"` +} + +func (p PlatformTriggerPresetEventSearchRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformTriggerPresetEventSearchRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (o *PlatformTriggerPresetEventSearchRequest) GetInputs() map[string]string { + if o == nil { + return nil + } + return o.Inputs +} + +func (o *PlatformTriggerPresetEventSearchRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpresetgetresponse.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetgetresponse.go new file mode 100644 index 00000000..75202b87 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetgetresponse.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerPresetGetResponse struct { + TriggerPreset PlatformTriggerPreset `json:"trigger_preset"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformTriggerPresetGetResponse) GetTriggerPreset() PlatformTriggerPreset { + if o == nil { + return PlatformTriggerPreset{} + } + return o.TriggerPreset +} + +func (o *PlatformTriggerPresetGetResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinput.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinput.go new file mode 100644 index 00000000..674722ca --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinput.go @@ -0,0 +1,62 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerPresetInput struct { + // Identifier of the input, supplied as a key in the trigger's `inputs`. + Field string `json:"field"` + // Type of a preset input. + Type PlatformTriggerPresetInputType `json:"type"` + // Human-readable name for the input. + DisplayName string `json:"display_name"` + // Whether the caller must supply a value for this input. + IsRequired bool `json:"is_required"` + // Bounded initial set of selectable values for a picklist input. Omitted entirely for free-text inputs. + // + Values []PlatformTriggerPresetInputValue `json:"values,omitempty"` + // Whether additional selectable values were omitted from `values`. When true, use GET /trigger-presets/{preset_id}/input-values with a query to narrow the result set. + // + IsTruncated *bool `json:"is_truncated,omitempty"` +} + +func (o *PlatformTriggerPresetInput) GetField() string { + if o == nil { + return "" + } + return o.Field +} + +func (o *PlatformTriggerPresetInput) GetType() PlatformTriggerPresetInputType { + if o == nil { + return PlatformTriggerPresetInputType("") + } + return o.Type +} + +func (o *PlatformTriggerPresetInput) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformTriggerPresetInput) GetIsRequired() bool { + if o == nil { + return false + } + return o.IsRequired +} + +func (o *PlatformTriggerPresetInput) GetValues() []PlatformTriggerPresetInputValue { + if o == nil { + return nil + } + return o.Values +} + +func (o *PlatformTriggerPresetInput) GetIsTruncated() *bool { + if o == nil { + return nil + } + return o.IsTruncated +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputtype.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputtype.go new file mode 100644 index 00000000..b51f9eac --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputtype.go @@ -0,0 +1,38 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformTriggerPresetInputType - Type of a preset input. +type PlatformTriggerPresetInputType string + +const ( + PlatformTriggerPresetInputTypePicklist PlatformTriggerPresetInputType = "PICKLIST" + PlatformTriggerPresetInputTypeText PlatformTriggerPresetInputType = "TEXT" + PlatformTriggerPresetInputTypeUser PlatformTriggerPresetInputType = "USER" +) + +func (e PlatformTriggerPresetInputType) ToPointer() *PlatformTriggerPresetInputType { + return &e +} +func (e *PlatformTriggerPresetInputType) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "PICKLIST": + fallthrough + case "TEXT": + fallthrough + case "USER": + *e = PlatformTriggerPresetInputType(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformTriggerPresetInputType: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvalue.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvalue.go new file mode 100644 index 00000000..53487dfa --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvalue.go @@ -0,0 +1,25 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerPresetInputValue struct { + // The exact value to send in the trigger's `inputs` for this choice (e.g. a channel name, a user's email, etc). + // + Value string `json:"value"` + // Human-readable name for this value. + DisplayName string `json:"display_name"` +} + +func (o *PlatformTriggerPresetInputValue) GetValue() string { + if o == nil { + return "" + } + return o.Value +} + +func (o *PlatformTriggerPresetInputValue) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvaluelistresponse.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvaluelistresponse.go new file mode 100644 index 00000000..bc923be0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetinputvaluelistresponse.go @@ -0,0 +1,34 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerPresetInputValueListResponse struct { + // The bounded set of selectable values matching the query. + Results []PlatformTriggerPresetInputValue `json:"results"` + // Whether additional matches were omitted. When true, refine `query` to narrow the result set. + // + IsTruncated bool `json:"is_truncated"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformTriggerPresetInputValueListResponse) GetResults() []PlatformTriggerPresetInputValue { + if o == nil { + return []PlatformTriggerPresetInputValue{} + } + return o.Results +} + +func (o *PlatformTriggerPresetInputValueListResponse) GetIsTruncated() bool { + if o == nil { + return false + } + return o.IsTruncated +} + +func (o *PlatformTriggerPresetInputValueListResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerpresetlistresponse.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetlistresponse.go new file mode 100644 index 00000000..3555da2c --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetlistresponse.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerPresetListResponse struct { + // Trigger presets available to the caller. + Results []PlatformTriggerPreset `json:"results"` + // Whether additional results are available. + HasMore bool `json:"has_more"` + // Cursor for the next page, or null when no more results are available. + NextCursor *string `json:"next_cursor"` + // Platform-generated request ID for support correlation. + RequestID string `json:"request_id"` +} + +func (o *PlatformTriggerPresetListResponse) GetResults() []PlatformTriggerPreset { + if o == nil { + return []PlatformTriggerPreset{} + } + return o.Results +} + +func (o *PlatformTriggerPresetListResponse) GetHasMore() bool { + if o == nil { + return false + } + return o.HasMore +} + +func (o *PlatformTriggerPresetListResponse) GetNextCursor() *string { + if o == nil { + return nil + } + return o.NextCursor +} + +func (o *PlatformTriggerPresetListResponse) GetRequestID() string { + if o == nil { + return "" + } + return o.RequestID +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerstatus.go b/tests/mockserver/internal/sdk/models/components/platformtriggerstatus.go new file mode 100644 index 00000000..ac192ac6 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerstatus.go @@ -0,0 +1,35 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "encoding/json" + "fmt" +) + +// PlatformTriggerStatus - Current trigger lifecycle state. +type PlatformTriggerStatus string + +const ( + PlatformTriggerStatusEnabled PlatformTriggerStatus = "ENABLED" + PlatformTriggerStatusDisabled PlatformTriggerStatus = "DISABLED" +) + +func (e PlatformTriggerStatus) ToPointer() *PlatformTriggerStatus { + return &e +} +func (e *PlatformTriggerStatus) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "ENABLED": + fallthrough + case "DISABLED": + *e = PlatformTriggerStatus(v) + return nil + default: + return fmt.Errorf("invalid value for PlatformTriggerStatus: %v", v) + } +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerupdaterequest.go b/tests/mockserver/internal/sdk/models/components/platformtriggerupdaterequest.go new file mode 100644 index 00000000..872cf555 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerupdaterequest.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +// PlatformTriggerUpdateRequest - Partial update. Only the supplied fields are changed. +type PlatformTriggerUpdateRequest struct { + // Current trigger lifecycle state. + Status *PlatformTriggerStatus `json:"status,omitempty"` + // Optional note describing this trigger. + Description *string `json:"description,omitempty"` + // Values for the preset's inputs. + Inputs map[string]any `json:"inputs,omitempty"` + Delivery *PlatformTriggerDelivery `json:"delivery,omitempty"` +} + +func (o *PlatformTriggerUpdateRequest) GetStatus() *PlatformTriggerStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *PlatformTriggerUpdateRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformTriggerUpdateRequest) GetInputs() map[string]any { + if o == nil { + return nil + } + return o.Inputs +} + +func (o *PlatformTriggerUpdateRequest) GetDelivery() *PlatformTriggerDelivery { + if o == nil { + return nil + } + return o.Delivery +} diff --git a/tests/mockserver/internal/sdk/models/components/platformtriggerwithsecret.go b/tests/mockserver/internal/sdk/models/components/platformtriggerwithsecret.go new file mode 100644 index 00000000..d97036ef --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerwithsecret.go @@ -0,0 +1,102 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PlatformTriggerWithSecret struct { + // ID of the trigger. + TriggerID string `json:"trigger_id"` + // ID of the preset this trigger was created from. + PresetID string `json:"preset_id"` + // Optional caller-supplied note describing this trigger. + Description *string `json:"description,omitempty"` + // Current trigger lifecycle state. + Status PlatformTriggerStatus `json:"status"` + // Values supplied for the preset's inputs. + Inputs map[string]any `json:"inputs,omitempty"` + Delivery PlatformTriggerDeliveryOutput `json:"delivery"` + // Time the trigger was created. + CreatedAt time.Time `json:"created_at"` + // Time the trigger was last updated. + UpdatedAt time.Time `json:"updated_at"` + // Secret for verifying webhook signatures. Returned only at creation. + SigningSecret string `json:"signing_secret"` +} + +func (p PlatformTriggerWithSecret) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformTriggerWithSecret) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"trigger_id", "preset_id", "status", "delivery", "created_at", "updated_at", "signing_secret"}); err != nil { + return err + } + return nil +} + +func (o *PlatformTriggerWithSecret) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +func (o *PlatformTriggerWithSecret) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +func (o *PlatformTriggerWithSecret) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *PlatformTriggerWithSecret) GetStatus() PlatformTriggerStatus { + if o == nil { + return PlatformTriggerStatus("") + } + return o.Status +} + +func (o *PlatformTriggerWithSecret) GetInputs() map[string]any { + if o == nil { + return nil + } + return o.Inputs +} + +func (o *PlatformTriggerWithSecret) GetDelivery() PlatformTriggerDeliveryOutput { + if o == nil { + return PlatformTriggerDeliveryOutput{} + } + return o.Delivery +} + +func (o *PlatformTriggerWithSecret) GetCreatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.CreatedAt +} + +func (o *PlatformTriggerWithSecret) GetUpdatedAt() time.Time { + if o == nil { + return time.Time{} + } + return o.UpdatedAt +} + +func (o *PlatformTriggerWithSecret) GetSigningSecret() string { + if o == nil { + return "" + } + return o.SigningSecret +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetseventssearch.go b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetseventssearch.go new file mode 100644 index 00000000..37c7771e --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetseventssearch.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggerPresetsEventsSearchRequest struct { + // ID of the preset to preview. + PresetID string `pathParam:"style=simple,explode=false,name=preset_id"` + Body *components.PlatformTriggerPresetEventSearchRequest `request:"mediaType=application/json"` +} + +func (o *PlatformTriggerPresetsEventsSearchRequest) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +func (o *PlatformTriggerPresetsEventsSearchRequest) GetBody() *components.PlatformTriggerPresetEventSearchRequest { + if o == nil { + return nil + } + return o.Body +} + +type PlatformTriggerPresetsEventsSearchResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformTriggerEventSearchResponse *components.PlatformTriggerEventSearchResponse +} + +func (o *PlatformTriggerPresetsEventsSearchResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggerPresetsEventsSearchResponse) GetPlatformTriggerEventSearchResponse() *components.PlatformTriggerEventSearchResponse { + if o == nil { + return nil + } + return o.PlatformTriggerEventSearchResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsget.go b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsget.go new file mode 100644 index 00000000..b6d75f2a --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsget.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggerPresetsGetRequest struct { + // ID of the preset to retrieve. + PresetID string `pathParam:"style=simple,explode=false,name=preset_id"` +} + +func (o *PlatformTriggerPresetsGetRequest) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +type PlatformTriggerPresetsGetResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformTriggerPresetGetResponse *components.PlatformTriggerPresetGetResponse +} + +func (o *PlatformTriggerPresetsGetResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggerPresetsGetResponse) GetPlatformTriggerPresetGetResponse() *components.PlatformTriggerPresetGetResponse { + if o == nil { + return nil + } + return o.PlatformTriggerPresetGetResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsinputvalueslist.go b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsinputvalueslist.go new file mode 100644 index 00000000..f177d8a9 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetsinputvalueslist.go @@ -0,0 +1,58 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggerPresetsInputValuesListRequest struct { + // ID of the preset the input belongs to. + PresetID string `pathParam:"style=simple,explode=false,name=preset_id"` + // Field identifier of the input whose values to list. + Field string `queryParam:"style=form,explode=true,name=field"` + // Prefix filter over the input's option values, for typeahead. Matching is on the option value, not its display name. + // + Query *string `queryParam:"style=form,explode=true,name=query"` +} + +func (o *PlatformTriggerPresetsInputValuesListRequest) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +func (o *PlatformTriggerPresetsInputValuesListRequest) GetField() string { + if o == nil { + return "" + } + return o.Field +} + +func (o *PlatformTriggerPresetsInputValuesListRequest) GetQuery() *string { + if o == nil { + return nil + } + return o.Query +} + +type PlatformTriggerPresetsInputValuesListResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformTriggerPresetInputValueListResponse *components.PlatformTriggerPresetInputValueListResponse +} + +func (o *PlatformTriggerPresetsInputValuesListResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggerPresetsInputValuesListResponse) GetPlatformTriggerPresetInputValueListResponse() *components.PlatformTriggerPresetInputValueListResponse { + if o == nil { + return nil + } + return o.PlatformTriggerPresetInputValueListResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetslist.go b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetslist.go new file mode 100644 index 00000000..24cd563d --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggerpresetslist.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type PlatformTriggerPresetsListRequest struct { + // Restrict results to presets for a single datasource (e.g. jira). + Datasource *string `queryParam:"style=form,explode=true,name=datasource"` + // Maximum number of presets to return. + PageSize *int64 `default:"50" queryParam:"style=form,explode=true,name=page_size"` + // Opaque pagination cursor from a previous response. + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` +} + +func (p PlatformTriggerPresetsListRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformTriggerPresetsListRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (o *PlatformTriggerPresetsListRequest) GetDatasource() *string { + if o == nil { + return nil + } + return o.Datasource +} + +func (o *PlatformTriggerPresetsListRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformTriggerPresetsListRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +type PlatformTriggerPresetsListResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformTriggerPresetListResponse *components.PlatformTriggerPresetListResponse +} + +func (o *PlatformTriggerPresetsListResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggerPresetsListResponse) GetPlatformTriggerPresetListResponse() *components.PlatformTriggerPresetListResponse { + if o == nil { + return nil + } + return o.PlatformTriggerPresetListResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggerscreate.go b/tests/mockserver/internal/sdk/models/operations/platformtriggerscreate.go new file mode 100644 index 00000000..664f9c97 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggerscreate.go @@ -0,0 +1,27 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggersCreateResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Trigger created. + PlatformTriggerCreateResponse *components.PlatformTriggerCreateResponse +} + +func (o *PlatformTriggersCreateResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggersCreateResponse) GetPlatformTriggerCreateResponse() *components.PlatformTriggerCreateResponse { + if o == nil { + return nil + } + return o.PlatformTriggerCreateResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggersdelete.go b/tests/mockserver/internal/sdk/models/operations/platformtriggersdelete.go new file mode 100644 index 00000000..58a202ca --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggersdelete.go @@ -0,0 +1,30 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggersDeleteRequest struct { + // ID of the trigger to delete. + TriggerID string `pathParam:"style=simple,explode=false,name=trigger_id"` +} + +func (o *PlatformTriggersDeleteRequest) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +type PlatformTriggersDeleteResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PlatformTriggersDeleteResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggerseventssearch.go b/tests/mockserver/internal/sdk/models/operations/platformtriggerseventssearch.go new file mode 100644 index 00000000..bfcff574 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggerseventssearch.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggersEventsSearchRequest struct { + // ID of the trigger whose events to search. + TriggerID string `pathParam:"style=simple,explode=false,name=trigger_id"` + Body *components.PlatformTriggerEventSearchRequest `request:"mediaType=application/json"` +} + +func (o *PlatformTriggersEventsSearchRequest) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +func (o *PlatformTriggersEventsSearchRequest) GetBody() *components.PlatformTriggerEventSearchRequest { + if o == nil { + return nil + } + return o.Body +} + +type PlatformTriggersEventsSearchResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformTriggerEventSearchResponse *components.PlatformTriggerEventSearchResponse +} + +func (o *PlatformTriggersEventsSearchResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggersEventsSearchResponse) GetPlatformTriggerEventSearchResponse() *components.PlatformTriggerEventSearchResponse { + if o == nil { + return nil + } + return o.PlatformTriggerEventSearchResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggersget.go b/tests/mockserver/internal/sdk/models/operations/platformtriggersget.go new file mode 100644 index 00000000..548dcbf0 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggersget.go @@ -0,0 +1,39 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggersGetRequest struct { + // ID of the trigger to retrieve. + TriggerID string `pathParam:"style=simple,explode=false,name=trigger_id"` +} + +func (o *PlatformTriggersGetRequest) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +type PlatformTriggersGetResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformTriggerGetResponse *components.PlatformTriggerGetResponse +} + +func (o *PlatformTriggersGetResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggersGetResponse) GetPlatformTriggerGetResponse() *components.PlatformTriggerGetResponse { + if o == nil { + return nil + } + return o.PlatformTriggerGetResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggerslist.go b/tests/mockserver/internal/sdk/models/operations/platformtriggerslist.go new file mode 100644 index 00000000..24df6582 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggerslist.go @@ -0,0 +1,60 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" + "mockserver/internal/sdk/utils" +) + +type PlatformTriggersListRequest struct { + // Maximum number of triggers to return. + PageSize *int64 `default:"50" queryParam:"style=form,explode=true,name=page_size"` + // Opaque pagination cursor from a previous response. + Cursor *string `queryParam:"style=form,explode=true,name=cursor"` +} + +func (p PlatformTriggersListRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformTriggersListRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, nil); err != nil { + return err + } + return nil +} + +func (o *PlatformTriggersListRequest) GetPageSize() *int64 { + if o == nil { + return nil + } + return o.PageSize +} + +func (o *PlatformTriggersListRequest) GetCursor() *string { + if o == nil { + return nil + } + return o.Cursor +} + +type PlatformTriggersListResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Successful response. + PlatformTriggerListResponse *components.PlatformTriggerListResponse +} + +func (o *PlatformTriggersListResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggersListResponse) GetPlatformTriggerListResponse() *components.PlatformTriggerListResponse { + if o == nil { + return nil + } + return o.PlatformTriggerListResponse +} diff --git a/tests/mockserver/internal/sdk/models/operations/platformtriggersupdate.go b/tests/mockserver/internal/sdk/models/operations/platformtriggersupdate.go new file mode 100644 index 00000000..0c16788f --- /dev/null +++ b/tests/mockserver/internal/sdk/models/operations/platformtriggersupdate.go @@ -0,0 +1,47 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggersUpdateRequest struct { + // ID of the trigger to update. + TriggerID string `pathParam:"style=simple,explode=false,name=trigger_id"` + Body components.PlatformTriggerUpdateRequest `request:"mediaType=application/json"` +} + +func (o *PlatformTriggersUpdateRequest) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +func (o *PlatformTriggersUpdateRequest) GetBody() components.PlatformTriggerUpdateRequest { + if o == nil { + return components.PlatformTriggerUpdateRequest{} + } + return o.Body +} + +type PlatformTriggersUpdateResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Trigger updated. + PlatformTriggerGetResponse *components.PlatformTriggerGetResponse +} + +func (o *PlatformTriggersUpdateResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +func (o *PlatformTriggersUpdateResponse) GetPlatformTriggerGetResponse() *components.PlatformTriggerGetResponse { + if o == nil { + return nil + } + return o.PlatformTriggerGetResponse +} diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 2cfa3243..176748ca 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -1,6 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from glean.api_client import Glean +from glean.api_client import Glean, models import os from tests.test_client import create_test_http_client @@ -18,10 +18,11 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "url": "https://livid-velocity.net", + "id": "", }, { - "url": "https://livid-velocity.net", + "ugc_type": models.DocumentSpecUgcType1.ANSWERS, + "content_id": 141216, }, ] ) diff --git a/tests/test_triggers.py b/tests/test_triggers.py new file mode 100644 index 00000000..191b2c6b --- /dev/null +++ b/tests/test_triggers.py @@ -0,0 +1,166 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from glean.api_client import Glean, models +import os +from tests.test_client import create_test_http_client + + +def test_triggers_platform_triggers_create(): + test_http_client = create_test_http_client("platform-triggers-create") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.create( + preset_id="jira_high_priority_bug", + delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "a8f5f167f44f4964e6c998dee827110c", + }, + }, + description="High-priority Jira bugs in the Engineering project", + inputs={ + "project": "ENG", + }, + ) + assert res is not None + + +def test_triggers_platform_triggers_list(): + test_http_client = create_test_http_client("platform-triggers-list") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.list(page_size=50) + assert res is not None + + +def test_triggers_platform_triggers_get(): + test_http_client = create_test_http_client("platform-triggers-get") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.get(trigger_id="") + assert res is not None + + +def test_triggers_platform_triggers_update(): + test_http_client = create_test_http_client("platform-triggers-update") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.update( + trigger_id="", + status=models.PlatformTriggerStatus.ENABLED, + description="High-priority Jira bugs in the Engineering project", + inputs={ + "project": "ENG", + }, + delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "a8f5f167f44f4964e6c998dee827110c", + }, + }, + ) + assert res is not None + + +def test_triggers_platform_triggers_events_search(): + test_http_client = create_test_http_client("platform-triggers-events-search") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.search_events(trigger_id="", page_size=10) + assert res is not None + + +def test_triggers_platform_trigger_presets_list(): + test_http_client = create_test_http_client("platform-trigger-presets-list") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.list_presets(page_size=50) + assert res is not None + + +def test_triggers_platform_trigger_presets_get(): + test_http_client = create_test_http_client("platform-trigger-presets-get") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.get_preset(preset_id="") + assert res is not None + + +def test_triggers_platform_trigger_presets_input_values_list(): + test_http_client = create_test_http_client( + "platform-trigger-presets-input-values-list" + ) + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.list_preset_input_values(preset_id="", field="") + assert res is not None + + +def test_triggers_platform_trigger_presets_events_search(): + test_http_client = create_test_http_client("platform-trigger-presets-events-search") + + with Glean( + server_url=os.getenv("TEST_SERVER_URL", "http://localhost:18080"), + client=test_http_client, + api_token=os.getenv("GLEAN_API_TOKEN", "value"), + ) as glean: + assert glean is not None + + res = glean.triggers.search_preset_events( + preset_id="", + inputs={ + "TITLE": "checkout outage", + }, + page_size=10, + ) + assert res is not None