diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 49e59a2b..cb23681e 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,27 +1,28 @@ lockVersion: 2.0.0 id: 3e3290ca-0ee8-4981-b1bc-14536048fa63 management: - docChecksum: 1d1c4c798b764226bfeeae4268f907c1 + docChecksum: e8d6776cbfa20476c9f04a0c02c1a9f7 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: c486811e-2d5c-43bb-a3bd-3412d9379257 + pristine_commit_hash: 4abb7d0973d5ae277d31001e5c14fa89f41696a9 + pristine_tree_hash: 6df442103fc8a4be2faccf20c49b85e8bcb66085 features: python: acceptHeaders: 3.0.0 additionalDependencies: 1.1.0 additionalProperties: 1.0.2 + callbacks: 2.0.0 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 +37,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 +45,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 +461,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 +1409,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 +1425,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 +1817,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 +1877,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 +2089,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 +2209,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 +2281,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 +2297,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 +2313,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 +2329,60 @@ 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/platformcontentschedulewebhookevent.md: + id: 7cf591a2907e + last_write_checksum: sha1:3df88866a52033aa4555602e8b7128abdb1f6d14 + pristine_git_object: 403b249230a395d50920d788361f0bdd6bb89ae7 docs/models/platformcontenttype.md: id: a9175ad4799d last_write_checksum: sha1:abb012a639cead86824ed11e596bda3632e2fddb @@ -2381,6 +2391,10 @@ trackedFiles: id: 61ae1a6d6454 last_write_checksum: sha1:41734266d612f710490590c79d1104b15e165291 pristine_git_object: 8119fc5d60b5afc43b6fa6c91205061bbd9a9b3b + docs/models/platformdocumentchangewebhookevent.md: + id: 6a7d5eaea3c5 + last_write_checksum: sha1:980bca6d1b189a0a14969236485ffdd8a6673f6b + pristine_git_object: 926494c10c4e191a01e7fc879c0888742c8b593d docs/models/platformfilter.md: id: 4e97760ae8b9 last_write_checksum: sha1:c331962f750f8e583ea3f50d70027a2a23225ad3 @@ -2633,6 +2647,158 @@ trackedFiles: id: c37b2e815a8d last_write_checksum: sha1:31db2f83dba4ccb6d0a5e7b80edbeff356529101 pristine_git_object: ff19123b19a2dd81301974a38d793afff935e9aa + docs/models/platformtrigger.md: + id: 63c7d9d07b1e + last_write_checksum: sha1:18e23ba6d629d537791ae6298a996d4662c7755d + pristine_git_object: d4597f36d50c8e12101edb29f2e2b82af7dcecad + docs/models/platformtriggerauth.md: + id: 1f1c930b21ad + last_write_checksum: sha1:d5b83fa4dc803f60a923bfa4db5c7d42f570ea26 + pristine_git_object: bbe340e20879ab9b6016441d47d84e233a6b687d + 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:0c62b37bcfd6512f39899cc5addc3b5022aabae2 + pristine_git_object: cad7c614683b2bc6989d06ff01907f25090863d9 + 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:6e0d71577fe5a5eba7f743eb5299e80e7b8e62eb + pristine_git_object: cb603d9075a8598f677ff749f63167bfb1b870d4 + docs/models/platformtriggerdeliveryoutput.md: + id: 8c7a53433836 + last_write_checksum: sha1:05a77a885cb535b3d7321111a3ff8e867f2933f7 + pristine_git_object: d99b2ca062342cdb032d7fa5202a73b9e02780bb + docs/models/platformtriggerevent.md: + id: 8c1265454530 + last_write_checksum: sha1:8eae3dbce44ec9c7725c1603af0ea89a7084148f + pristine_git_object: b576bda6a9b1cd7bd2fc8821fd1d84fb23739652 + 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:5edd922dceb47dcf6cb099dddfdaef404d3a0625 + pristine_git_object: 2dc6db1f0e974147e8c2ecc3e489615121884c2e + docs/models/platformtriggerpreseteventsearchrequest.md: + id: 1a8922142a34 + last_write_checksum: sha1:90fe81443a1c03519799365b8f6ae5688f3133a1 + pristine_git_object: 81d8fb8383e38a327e0ef646af42afa3837c8057 + 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:1cb064b4f8de7a4be7787f4141de78bfb4526779 + pristine_git_object: 9e232561a4f8b56e2615ae8ae2e58107bd9e2d11 + 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:f7c6b5b521f745fbdc8afba0731382f7158729c1 + pristine_git_object: 7fb2c9f91312b70e9386d04fba53f069c599a16b + 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:775259e97c30cc1220d06977757b4d49f0276d40 + pristine_git_object: 7d87f18317503d689665ebb8b63a87d8a09d0c11 + 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:8da57825e3ef677c1f4432a7dbf99b76966606e1 + pristine_git_object: 5a300603fb4f7b0936482c6ef35d8c180f532be8 + docs/models/platformtriggerpresetsummary.md: + id: 49e61c3cb246 + last_write_checksum: sha1:1dd894066b32655618a84df683c508e3c95e5f5b + pristine_git_object: 18f731cec9feffa5a98950af3d06d382d4a25235 + docs/models/platformtriggerscreatetriggerwebhookeventrequest.md: + id: 51329437110b + last_write_checksum: sha1:433e4f235014d616bd151298a67e8d7a00296448 + pristine_git_object: 9a28c2e881fa9f5cc97c2f97a6a4192f7800beb9 + 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:e7f1120c91320965dd299da24583d92c107ead58 + pristine_git_object: 9965fdb657014590ba08608b922d6c3df6793fec + docs/models/platformtriggerwebhookevent.md: + id: 21cf14d09338 + last_write_checksum: sha1:d3f4047e843eb39bccff965930195099d0719f6f + pristine_git_object: a7a76198cef7466cee17462cdeb5e8a6a24a37da + docs/models/platformtriggerwithsecret.md: + id: ba7807f1bd05 + last_write_checksum: sha1:5c7268369788dbb8b7d4a573dceeada489dba02c + pristine_git_object: c79b1eab1799d245a50c04c3180fd8f73192459a docs/models/platformwarning.md: id: 458ffec7aa61 last_write_checksum: sha1:b70d5a767413fd7559601eb8e1e9728ad8b15773 @@ -3431,8 +3597,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 +3705,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:5ccf393241166fe268abc6b5f56c0239856a1659 + pristine_git_object: 762c1d86c47f284ad8d7e237bfe4bba0a1b96bf7 docs/sdks/visibilityoverrides/README.md: id: c7d003d6a68f last_write_checksum: sha1:738c52c3b0964cfb441542710e10c51ca226f177 @@ -3563,8 +3733,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 +3761,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 +3781,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 +3945,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:1485ad45398c1a3eda7aac940a6a475c752feb0e + pristine_git_object: 83bc0af354dfdb9d29ed4465f29dbb8e5a26d7df src/glean/api_client/models/accessrequestpermissiondeniedresponse_error.py: id: 22a2fa0d5899 last_write_checksum: sha1:f7dd6f906a4dd7433992f77395f9fb491fa5ac5c @@ -4039,8 +4209,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 +4993,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 +5013,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 +5683,46 @@ 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:c0cb25954c13f3c2d00795112192102731c513bf + pristine_git_object: 5b040fdcd13d1c1df02d7fce7ab52b21644542d1 + src/glean/api_client/models/platform_triggers_createop.py: + id: c89b2acac97f + last_write_checksum: sha1:b5ecf9194888ec6b2761507bee941377a1784438 + pristine_git_object: bcea934ce9297a83f9c2dea64b85a7028d79090f + 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 +5773,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 +5785,44 @@ 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/platformcontentschedulewebhookevent.py: + id: 9967e953a04e + last_write_checksum: sha1:c4967523e69ff60285e770e785059a415498409f + pristine_git_object: 0b1d4cff05ff8c5e659537e4510b572f763e2855 src/glean/api_client/models/platformcontenttype.py: id: 87e6bc168e08 last_write_checksum: sha1:97548628abf68b0b2727ba126ce363000e8d2882 @@ -5613,6 +5831,10 @@ trackedFiles: id: 30d2d116afc7 last_write_checksum: sha1:fe1bb6ad44d39ce794c56869d659333ac4fe5ade pristine_git_object: cd2ba67fa39dab5eb8b2490daa3872fcff56719e + src/glean/api_client/models/platformdocumentchangewebhookevent.py: + id: 9fcc235e9237 + last_write_checksum: sha1:b3b267d4ea3fcd6b46dc447e2e0dae3fda859ff7 + pristine_git_object: a1eb453df5bc9f744651211e88c82dc25a7037d6 src/glean/api_client/models/platformfilter.py: id: e0719ea40cc5 last_write_checksum: sha1:a56bda496c9eb473d9aaa08426e077e2694216d9 @@ -5793,6 +6015,110 @@ 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:7101828ee6e750ae16350234e8972ec27d267378 + pristine_git_object: 84e4fb283dc8a9fc998f19e8751e9af46fb7647d + src/glean/api_client/models/platformtriggerdelivery_output.py: + id: d3848fcf9e21 + last_write_checksum: sha1:bd2442a31eb90c9bad87fd19fa4f0e31a71df14c + pristine_git_object: 5ba108c1651a0a7c257c467b9ba189076343a9ac + src/glean/api_client/models/platformtriggerevent.py: + id: 9da9f24676df + last_write_checksum: sha1:407d67c37846f17d827efd14e2b54bb112dc4e74 + pristine_git_object: 816d5babd8dff44296255e09ef674223e6cab07e + 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:e2f8f394fc704ffdf8ee91507b2120f83da24b0b + pristine_git_object: 60c4d72bc4382f3a95396e971584a25c7c528610 + src/glean/api_client/models/platformtriggerpresetsummary.py: + id: 3ea0384dca13 + last_write_checksum: sha1:e536d737c0b5493b1db48616119348b957ae1d66 + pristine_git_object: 64917154f171a2b1c4a617599d8e0cb220f0a8de + 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/platformtriggerwebhookevent.py: + id: 54052878b616 + last_write_checksum: sha1:428f80de9227e51b10b0969e45386152ddd8d369 + pristine_git_object: b35bd478f357910b90af03982a3d1fe57f77d352 + src/glean/api_client/models/platformtriggerwithsecret.py: + id: e0f28c4af07a + last_write_checksum: sha1:e1035b1e52647d0cba1a2d784e92e70ac9ecd425 + pristine_git_object: 43b0b789a24961eaf150cd49ac1fc4aedeff3281 src/glean/api_client/models/platformwarning.py: id: b99ca6ee1c74 last_write_checksum: sha1:4e82a608e924c72338481e61b2e51fec9e447605 @@ -6427,8 +6753,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 +6765,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:d69e3d7a3d4cc92b7ee4a37e61c976bf6b36351b + pristine_git_object: d05463361ba35042adb30f476181c9eb36ad4d5c src/glean/api_client/types/__init__.py: id: f63c790831ee last_write_checksum: sha1:f9ad14217f832e74f594285960125add50324be9 @@ -6507,8 +6837,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 +6857,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 +6925,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 +6971,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:d1508970c69b2c338ebd88f1f474ef851d2b026e + pristine_git_object: ef94fda9e99ee96829abc36b3973ba6bd208e8a9 + tests/mockserver/internal/handler/pathgetapitriggerpresetspresetid.go: + id: a571f52cc5d7 + last_write_checksum: sha1:9abf84a6696f4d8677df48c4f3d88169285a19cf + pristine_git_object: d7ae3c3545243b585b280e4db808ac0882387666 + tests/mockserver/internal/handler/pathgetapitriggerpresetspresetidinputvalues.go: + id: "352313839387" + last_write_checksum: sha1:b11f22dc25535e0b230d96b0cb951fab9997ddf0 + pristine_git_object: 78b89ebbe2b2919ebadb4f752c0d431dd3c03cda + 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:d0a4340ac6287dd0ffc9e84723ee95f72f2f661d + pristine_git_object: 0ad3c036c63130546598a4ed5a6c497d980eccaf tests/mockserver/internal/handler/pathgetrestapiindexcustommetadataschemagroupname.go: id: a14a30d0e377 last_write_checksum: sha1:83a992c70c3b7d010928d89a52f70db1042dd186 @@ -6701,6 +7051,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:e444fbfab92b77e23c98fd0e33531018450185ed + pristine_git_object: 8f7f27440e39e082d0fbaba7428bbc0d714fbdf8 tests/mockserver/internal/handler/pathpatchrestapiv1configuredatasourcesdatasourceidinstancesinstanceid.go: id: 24dd79d2c474 last_write_checksum: sha1:14d3e93a3f37b61145188a9e6544398fcfc200e4 @@ -6861,6 +7215,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:ea8dacd262eea49ea165e976a53c541f95d1e4a6 + pristine_git_object: 83a0e25f7929c89d20f8acc0b44e4060a4d0abc0 + tests/mockserver/internal/handler/pathpostapitriggers.go: + id: 85f970d314eb + last_write_checksum: sha1:2a52d5045d727e7b181decdc82315f9656900203 + pristine_git_object: 7a0ab74b9f4d357c051e2ea5138111c83359ae0a + tests/mockserver/internal/handler/pathpostapitriggerstriggerideventssearch.go: + id: e27c1d4cb373 + last_write_checksum: sha1:0af9ebb63a29cdd0b59d7ebb82a02f6bf24f3a20 + pristine_git_object: f356922816acb43e8b460878976b761b424fea2f tests/mockserver/internal/handler/pathpostrestapiindexsubmissionsdatasourceinstancetype.go: id: 1a5daf7874ce last_write_checksum: sha1:b5b37f0b5a7b4d9a4c69ab523e831f1702301118 @@ -6991,8 +7357,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 @@ -7149,6 +7515,10 @@ trackedFiles: id: f49866e79383 last_write_checksum: sha1:1ec2244b5fc171dfe7e4e339420b2b17f0df48c9 pristine_git_object: beb05908cf58a7b8b46d739ee51a5aba54c5bf7c + tests/mockserver/internal/sdk/models/callbacks/platformtriggerscreate.go: + id: ec899b2c8ce2 + last_write_checksum: sha1:bae78af1f1626632db7f012cdc8903f9a18985f8 + pristine_git_object: 94995cae1d68954802143a4cd5ddec72e130552c tests/mockserver/internal/sdk/models/components/accessrequestpermissiondeniedresponseerror.go: id: bfda76349972 last_write_checksum: sha1:e32d7171635a47a47a09980f63a968d8d3c67499 @@ -7387,8 +7757,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 +8433,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 +8449,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 +8961,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 +8973,44 @@ 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/platformcontentschedulewebhookevent.go: + id: aa997737c72e + last_write_checksum: sha1:cf082854fbef3c2fb99b4415f333e65a3e97950a + pristine_git_object: 1bd0c5a424091a348602510d34d92195d7fad553 tests/mockserver/internal/sdk/models/components/platformcontenttype.go: id: d1a02baa3621 last_write_checksum: sha1:b552f26421544664b54a4423c8335c90b09480c6 @@ -8641,6 +9019,10 @@ trackedFiles: id: a1eb3b7148bf last_write_checksum: sha1:094bff06100193f57b6766f2f42139c2e5bcd8b8 pristine_git_object: e577fb7f7b9c911e698ec560181abbe596be0416 + tests/mockserver/internal/sdk/models/components/platformdocumentchangewebhookevent.go: + id: 14cae8b8b46f + last_write_checksum: sha1:eeef00ef9e08df054c9f0b37881495b3ddc400c6 + pristine_git_object: 790da9be746c8ffb31da4ddd45e70435cae25c20 tests/mockserver/internal/sdk/models/components/platformfilter.go: id: 1762bf95c464 last_write_checksum: sha1:9a4357e8b4ccf75dd97072960321efb36dcf13a1 @@ -8821,6 +9203,110 @@ 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:38fcc9df98884c844c2941ce93d2ee97158ad1ba + pristine_git_object: 07fb9833a35cbe88d27a7cae28ea31753a7ef6a9 + tests/mockserver/internal/sdk/models/components/platformtriggerdeliveryoutput.go: + id: 14b6c01c5556 + last_write_checksum: sha1:6e6e34fda2ed2be606b4d9e517a68c5ff9d27ad4 + pristine_git_object: eae6a26f4f3a957a0d218c03b6191bd1dc067dd4 + tests/mockserver/internal/sdk/models/components/platformtriggerevent.go: + id: 40ac7d97e87d + last_write_checksum: sha1:822fac0c20d77d4fc8421f5a5af4c7642298340d + pristine_git_object: 30f4d2fcf79274a8c8d20ec7d7882bd53c47ee37 + 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:f02617594b8b63afca7ec2a0c693bf9245e7e4dc + pristine_git_object: 6e6cc206c13a6ff8d8fc89e12dbc05d06d0ce0d9 + tests/mockserver/internal/sdk/models/components/platformtriggerpresetsummary.go: + id: b63774bbc4d9 + last_write_checksum: sha1:86bc54973e616a741100d42ca2913459230b581d + pristine_git_object: 101983d34b786e1af0e01a7c227ae162f7f5a68d + 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/platformtriggerwebhookevent.go: + id: 7701b82f4ba0 + last_write_checksum: sha1:5390bc7d0fb8c0e7ee7ebae1c9a37dfb8e435f8d + pristine_git_object: e5ffab605dd0f0bf2726cec05e6b51648bfaf8d7 + tests/mockserver/internal/sdk/models/components/platformtriggerwithsecret.go: + id: 5b5f73675f76 + last_write_checksum: sha1:83a4692d9abc1ee07e343eabf32e5cce4c3c7ad9 + pristine_git_object: 0a610553debaa7ab04e12b3f81dae01bd59c721c tests/mockserver/internal/sdk/models/components/platformwarning.go: id: bf3a0578fb90 last_write_checksum: sha1:4f58e985f8592a928bb3d605f1a8538a5e611d2a @@ -9761,6 +10247,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:d0374ca3b589ec6d36146b33becfde936441192f + pristine_git_object: d73911f3ef9f79a15739e0a0ffc168a335d7eb27 + 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 @@ -10207,8 +10733,8 @@ trackedFiles: pristine_git_object: 6cc8aeec3c52329d389081db0a27f10f53f214b9 tests/test_messages.py: id: be23089b1f8b - last_write_checksum: sha1:2404e23964ef6a1f5ddc900402b34e597d2d9617 - pristine_git_object: 132005ec7d1e35f805b6a8c28e07e043bce22f0a + last_write_checksum: sha1:b7415512608102fa07b1990a350a7da66946fe46 + pristine_git_object: 636f01d348f30db3ee81985044634511b615af16 tests/test_people.py: id: 37c243940039 last_write_checksum: sha1:2b78b1c5ea17f267895188b1b48ff9fe2bc19f17 @@ -10235,12 +10761,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:4f50b660d414adea1d509dfc957eb74a12654ee4 + pristine_git_object: 63b4eb8541c2b110dab6dda746fef9ac074611f1 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:663b063eb9d7b716af9949c73f61abedb078310f + pristine_git_object: 35ec4a2bd7923d0aea72d213f691f3627003abcf tests/test_troubleshooting.py: id: 784c409f631e last_write_checksum: sha1:5af30befb8fffd54210e313bf98c24a64a685c50 @@ -11390,7 +11920,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 +12016,129 @@ examples: responses: "200": application/json: {"tools": [{"serverId": "", "name": ""}]} + platform-triggers-create: + speakeasy-default-platform-triggers-create: + requestBody: + application/json: {"preset_id": "GITHUB_1", "description": "Reviews I am tagged on, sent to my team's review channel", "inputs": {"repository": "acme/payments-api"}, "delivery": {"webhook_url": "https://customer.app/webhook", "auth": {"type": "BEARER", "secret": "secret_test_123"}}} + responses: + "201": + application/json: {"trigger": {"trigger_id": "trigger_test_123", "preset_id": "GITHUB_1", "description": "Reviews I am tagged on, sent to my team's review channel", "status": "ENABLED", "inputs": {"repository": "acme/payments-api"}, "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": "trigger_test_123", "preset_id": "GITHUB_1", "description": "Reviews I am tagged on, sent to my team's review channel", "status": "ENABLED", "inputs": {"repository": "acme/payments-api"}, "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": "Reviews I am tagged on, sent to my team's review channel", "inputs": {"repository": "acme/payments-api"}, "delivery": {"webhook_url": "https://customer.app/webhook", "auth": {"type": "BEARER", "secret": "secret_test_123"}}} + responses: + "200": + application/json: {"trigger": {"trigger_id": "trigger_test_123", "preset_id": "GITHUB_1", "description": "Reviews I am tagged on, sent to my team's review channel", "status": "ENABLED", "inputs": {"repository": "acme/payments-api"}, "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": "REVIEW_REQUESTED", "doc_type": "pull", "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": "GITHUB_1", "datasource": "github", "display_name": "Review requested from me", "description": "A review is requested from the trigger creator on a pull request", "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": "acme/payments-api", "display_name": "acme/payments-api"}], "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": {"repository": "acme/payments-api"}, "page_size": 10} + responses: + "200": + application/json: {"results": [{"event_type": "DOCUMENT_CHANGE", "datasource": "GITHUB", "reason": "REVIEW_REQUESTED", "doc_type": "pull", "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 +12330,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-19T17:52:35Z" + platform-triggers-list: "2026-08-19T17:52:35Z" + platform-triggers-get: "2026-08-19T17:52:35Z" + platform-triggers-update: "2026-08-19T17:52:35Z" + platform-triggers-events-search: "2026-08-19T17:52:35Z" + platform-trigger-presets-list: "2026-08-19T17:52:35Z" + platform-trigger-presets-get: "2026-08-19T17:52:35Z" + platform-trigger-presets-input-values-list: "2026-08-19T17:52:35Z" + platform-trigger-presets-events-search: "2026-08-19T17:52:35Z" +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..04980527 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: a612d513ddd97dce2c612d0d7490adf579df1c87 + x-open-api-commit-sha: ae24ab21e364fe99f6473f57bb9072c3d4f258a7 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: @@ -1177,453 +1186,715 @@ paths: x-speakeasy-name-override: listFilters security: - APIToken: [] - /rest/api/v1/activity: + /api/triggers: post: - operationId: activity - summary: Report document activity - description: Report user activity that occurs on indexed documents such as viewing or editing. This signal improves search quality. tags: - - Activity - security: - - APIToken: [] + - 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/Activity' - required: true - x-exportParamName: Activity + $ref: "#/components/schemas/PlatformTriggerCreateRequest" + callbacks: + triggerEvent: + "{$request.body#/delivery/webhook_url}": + post: + tags: + - Triggers + summary: Receive a trigger event + description: Delivery uses at-least-once semantics, so the same event can be sent more than once. Return any 2xx status after accepting the event. Network failures, 408, 429, and 5xx responses are retried; other non-2xx responses, including redirects, are terminal. The `webhook-id` remains stable across attempts and can be used for deduplication, while `webhook-timestamp` and `webhook-signature` are generated for each attempt. + operationId: trigger-webhook-event + security: + - {} + - TriggerWebhookBearerAuth: [] + parameters: + - $ref: "#/components/parameters/TriggerWebhookId" + - $ref: "#/components/parameters/TriggerWebhookTimestamp" + - $ref: "#/components/parameters/TriggerWebhookSignature" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerWebhookEvent" + responses: + "408": + description: Request timeout. Glean retries the delivery. + "429": + description: Rate limited. Glean retries the delivery. + 2XX: + description: Event accepted. Glean does not retry the delivery. + 3XX: + description: Redirects are not followed and the delivery is not retried. + 4XX: + description: Client error other than 408 or 429. Glean does not retry. + 5XX: + description: Server error. Glean retries the delivery. responses: - "200": - description: OK + "201": + description: Trigger created. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerCreateResponse" "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $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": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: report - x-speakeasy-group: client.activity - /rest/api/v1/feedback: - post: - operationId: feedback - summary: Report client activity - description: Report events that happen to results within a Glean client UI, such as search result views and clicks. This signal improves search quality. - tags: - - Activity + $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: - - name: feedback - in: query - description: A URL encoded versions of Feedback. This is useful for requests. + - 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 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Feedback' - x-exportParamName: Feedback + minLength: 1 responses: "200": - description: OK + description: Successful response. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerListResponse" "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" "429": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-group: client.activity - /rest/api/v1/createannouncement: - post: - operationId: createannouncement - summary: Create Announcement - description: Create a textual announcement visible to some set of users based on department and location. - tags: - - Announcements + $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: - - $ref: '#/components/parameters/locale' - requestBody: - description: Announcement content - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAnnouncementRequest' - required: true - x-exportParamName: Request + - in: path + name: trigger_id + description: ID of the trigger to retrieve. + required: true + schema: + type: string + minLength: 1 responses: "200": - description: OK + description: Successful response. content: application/json: schema: - $ref: '#/components/schemas/Announcement' + $ref: "#/components/schemas/PlatformTriggerGetResponse" "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" "429": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: create - x-speakeasy-group: client.announcements - /rest/api/v1/deleteannouncement: - post: - operationId: deleteannouncement - summary: Delete Announcement - description: Delete an existing user-generated announcement. - tags: - - Announcements + $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: - - $ref: '#/components/parameters/locale' + - in: path + name: trigger_id + description: ID of the trigger to update. + required: true + schema: + type: string + minLength: 1 requestBody: - description: Delete announcement request + required: true content: application/json: schema: - $ref: '#/components/schemas/DeleteAnnouncementRequest' - required: true - x-exportParamName: Request + $ref: "#/components/schemas/PlatformTriggerUpdateRequest" responses: "200": - description: OK + description: Trigger updated. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerGetResponse" "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $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": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: delete - x-speakeasy-group: client.announcements - /rest/api/v1/updateannouncement: - post: - operationId: updateannouncement - summary: Update Announcement - description: Update a textual announcement visible to some set of users based on department and location. - tags: - - Announcements + $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: - - $ref: '#/components/parameters/locale' - requestBody: - description: Announcement content. Id need to be specified for the announcement. - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateAnnouncementRequest' - required: true - x-exportParamName: Request + - in: path + name: trigger_id + description: ID of the trigger to delete. + required: true + schema: + type: string + minLength: 1 responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Announcement' + "204": + description: Trigger deleted. No content. "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" "429": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: update - x-speakeasy-group: client.announcements - /rest/api/v1/createanswer: - post: - operationId: createanswer - summary: Create Answer - description: Create a user-generated Answer that contains a question and answer. - tags: - - Answers + $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: c734a377-3dec-4ee2-9ec5-3848a8384f03 + introduced: "2026-08-07" parameters: - - $ref: '#/components/parameters/locale' + - in: path + name: trigger_id + description: ID of the trigger whose events to search. + required: true + schema: + type: string + minLength: 1 requestBody: - description: CreateAnswer request + required: false content: application/json: schema: - $ref: '#/components/schemas/CreateAnswerRequest' - required: true - x-exportParamName: Request + $ref: "#/components/schemas/PlatformTriggerEventSearchRequest" responses: "200": - description: OK + description: Successful response. content: application/json: schema: - $ref: '#/components/schemas/Answer' + $ref: "#/components/schemas/PlatformTriggerEventSearchResponse" "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $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": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: create - x-speakeasy-group: client.answers - /rest/api/v1/deleteanswer: - post: - operationId: deleteanswer - summary: Delete Answer - description: Delete an existing user-generated Answer. - tags: - - Answers + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: triggers + x-speakeasy-name-override: searchEvents security: - APIToken: [] - parameters: - - $ref: '#/components/parameters/locale' - requestBody: - description: DeleteAnswer request - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteAnswerRequest' - required: true - x-exportParamName: Request - responses: - "200": - description: OK - "400": - description: Invalid request - "401": - description: Not Authorized - "429": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: delete - x-speakeasy-group: client.answers - /rest/api/v1/editanswer: - post: - operationId: editanswer - summary: Update Answer - description: Update an existing user-generated Answer. + /api/trigger-presets: + get: tags: - - Answers - security: - - APIToken: [] + - Triggers + summary: List trigger presets + description: | + 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: f5b16196-0d4c-42f0-89bf-40313398728e + introduced: "2026-07-22" parameters: - - $ref: '#/components/parameters/locale' - requestBody: - description: EditAnswer request - content: - application/json: - schema: - $ref: '#/components/schemas/EditAnswerRequest' - required: true - x-exportParamName: Request + - in: query + name: datasource + description: Restrict results to presets for a single datasource (e.g. github). + required: false + schema: + type: string + minLength: 1 + - in: query + name: page_size + 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. + required: false + schema: + type: string + minLength: 1 responses: "200": - description: OK + description: Successful response. content: application/json: schema: - $ref: '#/components/schemas/Answer' + $ref: "#/components/schemas/PlatformTriggerPresetListResponse" "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" "429": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: update - x-speakeasy-group: client.answers - /rest/api/v1/getanswer: - post: - operationId: getanswer - summary: Read Answer - description: Read the details of a particular Answer given its ID. - tags: - - Answers + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: triggers + x-speakeasy-name-override: listPresets security: - APIToken: [] + /api/trigger-presets/{preset_id}: + get: + tags: + - Triggers + summary: Get trigger preset + description: | + Retrieve a single trigger preset by id. + operationId: platform-trigger-presets-get + x-visibility: Public + x-glean-experimental: + id: 5277167d-909b-4eee-95d1-8958b07016bb + introduced: "2026-07-22" parameters: - - $ref: '#/components/parameters/locale' - requestBody: - description: GetAnswer request - content: - application/json: - schema: - $ref: '#/components/schemas/GetAnswerRequest' - required: true - x-exportParamName: Request + - in: path + name: preset_id + description: ID of the preset to retrieve. + required: true + schema: + type: string + minLength: 1 responses: "200": - description: OK + description: Successful response. content: application/json: schema: - $ref: '#/components/schemas/GetAnswerResponse' + $ref: "#/components/schemas/PlatformTriggerPresetGetResponse" "400": - description: Invalid request + $ref: "#/components/responses/PlatformBadRequest" "401": - description: Not Authorized + $ref: "#/components/responses/PlatformUnauthorized" + "403": + $ref: "#/components/responses/PlatformForbidden" + "404": + $ref: "#/components/responses/PlatformNotFound" + "408": + $ref: "#/components/responses/PlatformRequestTimeout" "429": - description: Too Many Requests - x-visibility: Public - x-codegen-request-body-name: payload - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.answers - /rest/api/v1/listanswers: - post: - operationId: listanswers - summary: List Answers - description: List Answers created by the current user. - tags: - - Answers + $ref: "#/components/responses/PlatformTooManyRequests" + "500": + $ref: "#/components/responses/PlatformInternalServerError" + "503": + $ref: "#/components/responses/PlatformServiceUnavailable" + x-speakeasy-group: triggers + x-speakeasy-name-override: getPreset security: - APIToken: [] - parameters: - - $ref: '#/components/parameters/locale' - requestBody: - description: ListAnswers request + /api/trigger-presets/{preset_id}/input-values: + get: + tags: + - Triggers + summary: Search trigger preset input values + description: | + 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: 24c5675d-a57a-48cb-9d71-3dece296f28c + introduced: "2026-08-06" + parameters: + - in: path + name: preset_id + description: ID of the preset the input belongs to. + required: true + schema: + type: string + minLength: 1 + - in: query + name: field + description: Field identifier of the input whose values to list. + required: true + schema: + 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. + content: + application/json: + schema: + $ref: "#/components/schemas/PlatformTriggerPresetInputValueListResponse" + "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: listPresetInputValues + security: + - APIToken: [] + /api/trigger-presets/{preset_id}/events/search: + post: + tags: + - Triggers + summary: Search events for a trigger preset + description: | + 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: 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: false content: application/json: schema: - $ref: '#/components/schemas/ListAnswersRequest' - required: true - x-exportParamName: Request + $ref: "#/components/schemas/PlatformTriggerPresetEventSearchRequest" responses: "200": - description: OK + description: Successful response. content: application/json: schema: - $ref: '#/components/schemas/ListAnswersResponse' + $ref: "#/components/schemas/PlatformTriggerEventSearchResponse" + "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: searchPresetEvents + security: + - APIToken: [] + /rest/api/v1/activity: + post: + operationId: activity + summary: Report document activity + description: Report user activity that occurs on indexed documents such as viewing or editing. This signal improves search quality. + tags: + - Activity + security: + - APIToken: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Activity' + required: true + x-exportParamName: Activity + responses: + "200": + description: OK "400": description: Invalid request "401": description: Not Authorized "429": description: Too Many Requests - deprecated: true x-visibility: Public x-codegen-request-body-name: payload - x-glean-deprecated: - id: 4c0923bd-64c7-45b9-99a5-b36f2705e618 - introduced: "2026-01-21" - message: Answer boards have been removed and this endpoint no longer serves a purpose - removal: "2026-10-15" - x-speakeasy-deprecation-message: "Deprecated on 2026-01-21, removal scheduled for 2026-10-15: Answer boards have been removed and this endpoint no longer serves a purpose" - x-speakeasy-name-override: list - x-speakeasy-group: client.answers - /rest/api/v1/checkdatasourceauth: + x-speakeasy-name-override: report + x-speakeasy-group: client.activity + /rest/api/v1/feedback: post: - operationId: checkdatasourceauth - summary: Check datasource authorization - description: | - Returns all datasource instances that require per-user OAuth authorization - for the authenticated user, along with a transient auth token that can be - appended to auth URLs to complete OAuth flows. - - Clients construct the full OAuth URL by combining the backend base URL, - the `authUrlRelativePath` from each instance, and the transient auth token: - `/?transient_auth_token=`. + operationId: feedback + summary: Report client activity + description: Report events that happen to results within a Glean client UI, such as search result views and clicks. This signal improves search quality. tags: - - Authentication + - Activity security: - APIToken: [] - parameters: [] + parameters: + - name: feedback + in: query + description: A URL encoded versions of Feedback. This is useful for requests. + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Feedback' + x-exportParamName: Feedback responses: "200": description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CheckDatasourceAuthResponse' + "400": + description: Invalid request "401": description: Not Authorized "429": description: Too Many Requests x-visibility: Public - x-speakeasy-name-override: checkDatasourceAuth - x-speakeasy-group: client.authentication - /rest/api/v1/createauthtoken: + x-codegen-request-body-name: payload + x-speakeasy-group: client.activity + /rest/api/v1/createannouncement: post: - operationId: createauthtoken - summary: Create authentication token - description: | - Creates an authentication token for the authenticated user. These are - specifically intended to be used with the [Web SDK](https://developers.glean.com/web). - - Note: The tokens generated from this endpoint are **not** valid tokens - for use with the Client API (e.g. `/rest/api/v1/*`). + operationId: createannouncement + summary: Create Announcement + description: Create a textual announcement visible to some set of users based on department and location. tags: - - Authentication + - Announcements security: - APIToken: [] - parameters: [] + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + description: Announcement content + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAnnouncementRequest' + required: true + x-exportParamName: Request responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/CreateAuthTokenResponse' + $ref: '#/components/schemas/Announcement' "400": - description: Invalid Request + description: Invalid request "401": description: Not Authorized "429": description: Too Many Requests x-visibility: Public - x-speakeasy-name-override: createToken - x-speakeasy-group: client.authentication - /rest/api/v1/chat: + x-codegen-request-body-name: payload + x-speakeasy-name-override: create + x-speakeasy-group: client.announcements + /rest/api/v1/deleteannouncement: post: - operationId: chat - summary: Chat - description: Have a conversation with Glean AI. + operationId: deleteannouncement + summary: Delete Announcement + description: Delete an existing user-generated announcement. tags: - - Chat + - Announcements security: - APIToken: [] parameters: - $ref: '#/components/parameters/locale' - - $ref: '#/components/parameters/timezoneOffset' requestBody: - description: Includes chat history for Glean AI to respond to. + description: Delete announcement request content: application/json: schema: - $ref: '#/components/schemas/ChatRequest' - examples: - defaultExample: - value: - messages: - - author: USER - messageType: CONTENT - fragments: - - text: What are the company holidays this year? - gptAgentExample: - value: - agentConfig: - agent: GPT - messages: - - author: USER - messageType: CONTENT - fragments: - - text: Who was the first person to land on the moon? + $ref: '#/components/schemas/DeleteAnnouncementRequest' + required: true + x-exportParamName: Request + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-visibility: Public + x-codegen-request-body-name: payload + x-speakeasy-name-override: delete + x-speakeasy-group: client.announcements + /rest/api/v1/updateannouncement: + post: + operationId: updateannouncement + summary: Update Announcement + description: Update a textual announcement visible to some set of users based on department and location. + tags: + - Announcements + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/locale' + requestBody: + description: Announcement content. Id need to be specified for the announcement. + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAnnouncementRequest' required: true x-exportParamName: Request responses: @@ -1632,163 +1903,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ChatResponse' - examples: - defaultExample: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - hasMoreFragments: false - agentConfig: - agent: DEFAULT - mode: DEFAULT - fragments: - - text: There are no holidays! - streamingExample: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: null - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: null - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: - - text: e are - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: true - fragments: - - text: no hol - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - hasMoreFragments: false - fragments: - - text: idays! - updateResponse: - value: - messages: - - author: GLEAN_AI - messageType: UPDATE - agentConfig: - agent: DEFAULT - mode: DEFAULT - fragments: - - text: '**Reading:**' - - structuredResults: - - document: - id: '123' - title: Company Handbook - citationResponse: - value: - messages: - - author: GLEAN_AI - messageType: CONTENT - agentConfig: - agent: DEFAULT - mode: DEFAULT - citations: - - sourceDocument: - id: '123' - title: Company Handbook - referenceRanges: - - textRange: - startIndex: 0 - endIndex: 12 - type: CITATION - "202": - description: | - Request accepted but not yet processed. Returned when another - in-flight request is already running for the same chat session; - the body's `queuedRequestId` identifies the deferred run and - output will be persisted to the chat session referenced by - `chatId`. - content: - application/json: - schema: - $ref: '#/components/schemas/ChatResponse' - examples: - queuedExample: - value: - chatId: abc123 - queuedRequestId: qr-xyz - isSavedToChatHistory: true + $ref: '#/components/schemas/Announcement' "400": description: Invalid request "401": description: Not Authorized - "408": - description: Request Timeout "429": description: Too Many Requests x-visibility: Public x-codegen-request-body-name: payload - x-speakeasy-group: client.chat - x-speakeasy-name-override: create - x-speakeasy-usage-example: true - /rest/api/v1/deleteallchats: + x-speakeasy-name-override: update + x-speakeasy-group: client.announcements + /rest/api/v1/createanswer: post: - operationId: deleteallchats - summary: Deletes all saved Chats owned by a user - description: Deletes all saved Chats a user has had and all their contained conversational content. + operationId: createanswer + summary: Create Answer + description: Create a user-generated Answer that contains a question and answer. tags: - - Chat + - Answers security: - APIToken: [] parameters: - $ref: '#/components/parameters/locale' - - $ref: '#/components/parameters/timezoneOffset' + requestBody: + description: CreateAnswer request + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAnswerRequest' + required: true + x-exportParamName: Request responses: "200": description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Answer' "400": description: Invalid request "401": description: Not Authorized - "403": - description: Forbidden + "429": + description: Too Many Requests x-visibility: Public x-codegen-request-body-name: payload - x-speakeasy-name-override: deleteAll - x-speakeasy-group: client.chat - /rest/api/v1/deletechats: + x-speakeasy-name-override: create + x-speakeasy-group: client.answers + /rest/api/v1/deleteanswer: post: - operationId: deletechats - summary: Deletes saved Chats - description: Deletes saved Chats and all their contained conversational content. + operationId: deleteanswer + summary: Delete Answer + description: Delete an existing user-generated Answer. tags: - - Chat + - Answers security: - APIToken: [] parameters: - $ref: '#/components/parameters/locale' - - $ref: '#/components/parameters/timezoneOffset' requestBody: + description: DeleteAnswer request content: application/json: schema: - $ref: '#/components/schemas/DeleteChatsRequest' + $ref: '#/components/schemas/DeleteAnswerRequest' required: true x-exportParamName: Request responses: @@ -1798,31 +1976,29 @@ paths: description: Invalid request "401": description: Not Authorized - "403": - description: Forbidden "429": description: Too Many Requests x-visibility: Public x-codegen-request-body-name: payload x-speakeasy-name-override: delete - x-speakeasy-group: client.chat - /rest/api/v1/getchat: + x-speakeasy-group: client.answers + /rest/api/v1/editanswer: post: - operationId: getchat - summary: Retrieves a Chat - description: Retrieves the chat history between Glean Assistant and the user for a given Chat. + operationId: editanswer + summary: Update Answer + description: Update an existing user-generated Answer. tags: - - Chat + - Answers security: - APIToken: [] parameters: - $ref: '#/components/parameters/locale' - - $ref: '#/components/parameters/timezoneOffset' requestBody: + description: EditAnswer request content: application/json: schema: - $ref: '#/components/schemas/GetChatRequest' + $ref: '#/components/schemas/EditAnswerRequest' required: true x-exportParamName: Request responses: @@ -1831,69 +2007,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GetChatResponse' + $ref: '#/components/schemas/Answer' "400": description: Invalid request "401": description: Not Authorized - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/AccessRequestPermissionDeniedResponse' "429": description: Too Many Requests x-visibility: Public x-codegen-request-body-name: payload - x-speakeasy-name-override: retrieve - x-speakeasy-group: client.chat - /rest/api/v1/listchats: + x-speakeasy-name-override: update + x-speakeasy-group: client.answers + /rest/api/v1/getanswer: post: - operationId: listchats - summary: Retrieves all saved Chats - description: Retrieves all the saved Chats between Glean Assistant and the user. The returned Chats contain only metadata and no conversational content. + operationId: getanswer + summary: Read Answer + description: Read the details of a particular Answer given its ID. tags: - - Chat + - Answers security: - APIToken: [] parameters: - $ref: '#/components/parameters/locale' - - $ref: '#/components/parameters/timezoneOffset' + requestBody: + description: GetAnswer request + content: + application/json: + schema: + $ref: '#/components/schemas/GetAnswerRequest' + required: true + x-exportParamName: Request responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/ListChatsResponse' + $ref: '#/components/schemas/GetAnswerResponse' + "400": + description: Invalid request "401": description: Not Authorized - "403": - description: Forbidden "429": description: Too Many Requests x-visibility: Public x-codegen-request-body-name: payload - x-speakeasy-name-override: list - x-speakeasy-group: client.chat - /rest/api/v1/getchatapplication: + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.answers + /rest/api/v1/listanswers: post: - operationId: getchatapplication - summary: Gets the metadata for a custom Chat application - description: Gets the Chat application details for the specified application ID. + operationId: listanswers + summary: List Answers + description: List Answers created by the current user. tags: - - Chat + - Answers security: - APIToken: [] parameters: - $ref: '#/components/parameters/locale' - - $ref: '#/components/parameters/timezoneOffset' requestBody: + description: ListAnswers request content: application/json: schema: - $ref: '#/components/schemas/GetChatApplicationRequest' + $ref: '#/components/schemas/ListAnswersRequest' required: true x-exportParamName: Request responses: @@ -1902,59 +2079,91 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GetChatApplicationResponse' + $ref: '#/components/schemas/ListAnswersResponse' "400": description: Invalid request "401": description: Not Authorized - "403": - description: Forbidden - x-visibility: Preview + "429": + description: Too Many Requests + deprecated: true + x-visibility: Public x-codegen-request-body-name: payload - x-speakeasy-name-override: retrieveApplication - x-speakeasy-group: client.chat - /rest/api/v1/uploadchatfiles: + x-glean-deprecated: + id: 4c0923bd-64c7-45b9-99a5-b36f2705e618 + introduced: "2026-01-21" + message: Answer boards have been removed and this endpoint no longer serves a purpose + removal: "2026-10-15" + x-speakeasy-deprecation-message: "Deprecated on 2026-01-21, removal scheduled for 2026-10-15: Answer boards have been removed and this endpoint no longer serves a purpose" + x-speakeasy-name-override: list + x-speakeasy-group: client.answers + /rest/api/v1/checkdatasourceauth: post: - operationId: uploadchatfiles - summary: Upload files for Chat - description: Upload files for Chat. - tags: - - Chat - security: - - APIToken: [] - parameters: - - $ref: '#/components/parameters/locale' - - $ref: '#/components/parameters/timezoneOffset' - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/UploadChatFilesRequest' - required: true - x-exportParamName: Request + operationId: checkdatasourceauth + summary: Check datasource authorization + description: | + Returns all datasource instances that require per-user OAuth authorization + for the authenticated user, along with a transient auth token that can be + appended to auth URLs to complete OAuth flows. + + Clients construct the full OAuth URL by combining the backend base URL, + the `authUrlRelativePath` from each instance, and the transient auth token: + `/?transient_auth_token=`. + tags: + - Authentication + security: + - APIToken: [] + parameters: [] responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/UploadChatFilesResponse' + $ref: '#/components/schemas/CheckDatasourceAuthResponse' + "401": + description: Not Authorized + "429": + description: Too Many Requests + x-visibility: Public + x-speakeasy-name-override: checkDatasourceAuth + x-speakeasy-group: client.authentication + /rest/api/v1/createauthtoken: + post: + operationId: createauthtoken + summary: Create authentication token + description: | + Creates an authentication token for the authenticated user. These are + specifically intended to be used with the [Web SDK](https://developers.glean.com/web). + + Note: The tokens generated from this endpoint are **not** valid tokens + for use with the Client API (e.g. `/rest/api/v1/*`). + tags: + - Authentication + security: + - APIToken: [] + parameters: [] + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAuthTokenResponse' "400": - description: Invalid request + description: Invalid Request "401": description: Not Authorized - "403": - description: Forbidden "429": description: Too Many Requests x-visibility: Public - x-speakeasy-name-override: uploadFiles - x-speakeasy-group: client.chat - /rest/api/v1/getchatfiles: + x-speakeasy-name-override: createToken + x-speakeasy-group: client.authentication + /rest/api/v1/chat: post: - operationId: getchatfiles - summary: Get files uploaded by a user for Chat - description: Get files uploaded by a user for Chat. + operationId: chat + summary: Chat + description: Have a conversation with Glean AI. tags: - Chat security: @@ -1963,10 +2172,28 @@ paths: - $ref: '#/components/parameters/locale' - $ref: '#/components/parameters/timezoneOffset' requestBody: + description: Includes chat history for Glean AI to respond to. content: application/json: schema: - $ref: '#/components/schemas/GetChatFilesRequest' + $ref: '#/components/schemas/ChatRequest' + examples: + defaultExample: + value: + messages: + - author: USER + messageType: CONTENT + fragments: + - text: What are the company holidays this year? + gptAgentExample: + value: + agentConfig: + agent: GPT + messages: + - author: USER + messageType: CONTENT + fragments: + - text: Who was the first person to land on the moon? required: true x-exportParamName: Request responses: @@ -1975,23 +2202,151 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/GetChatFilesResponse' + $ref: '#/components/schemas/ChatResponse' + examples: + defaultExample: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + hasMoreFragments: false + agentConfig: + agent: DEFAULT + mode: DEFAULT + fragments: + - text: There are no holidays! + streamingExample: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: null + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: null + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: + - text: e are + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: true + fragments: + - text: no hol + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + hasMoreFragments: false + fragments: + - text: idays! + updateResponse: + value: + messages: + - author: GLEAN_AI + messageType: UPDATE + agentConfig: + agent: DEFAULT + mode: DEFAULT + fragments: + - text: '**Reading:**' + - structuredResults: + - document: + id: '123' + title: Company Handbook + citationResponse: + value: + messages: + - author: GLEAN_AI + messageType: CONTENT + agentConfig: + agent: DEFAULT + mode: DEFAULT + citations: + - sourceDocument: + id: '123' + title: Company Handbook + referenceRanges: + - textRange: + startIndex: 0 + endIndex: 12 + type: CITATION + "202": + description: | + Request accepted but not yet processed. Returned when another + in-flight request is already running for the same chat session; + the body's `queuedRequestId` identifies the deferred run and + output will be persisted to the chat session referenced by + `chatId`. + content: + application/json: + schema: + $ref: '#/components/schemas/ChatResponse' + examples: + queuedExample: + value: + chatId: abc123 + queuedRequestId: qr-xyz + isSavedToChatHistory: true "400": description: Invalid request "401": description: Not Authorized - "403": - description: Forbidden + "408": + description: Request Timeout "429": description: Too Many Requests x-visibility: Public - x-speakeasy-name-override: retrieveFiles + x-codegen-request-body-name: payload x-speakeasy-group: client.chat - /rest/api/v1/deletechatfiles: + x-speakeasy-name-override: create + x-speakeasy-usage-example: true + /rest/api/v1/deleteallchats: post: - operationId: deletechatfiles - summary: Delete files uploaded by a user for chat - description: Delete files uploaded by a user for Chat. + operationId: deleteallchats + summary: Deletes all saved Chats owned by a user + description: Deletes all saved Chats a user has had and all their contained conversational content. + tags: + - Chat + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/timezoneOffset' + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + x-visibility: Public + x-codegen-request-body-name: payload + x-speakeasy-name-override: deleteAll + x-speakeasy-group: client.chat + /rest/api/v1/deletechats: + post: + operationId: deletechats + summary: Deletes saved Chats + description: Deletes saved Chats and all their contained conversational content. tags: - Chat security: @@ -2003,8 +2358,9 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DeleteChatFilesRequest' + $ref: '#/components/schemas/DeleteChatsRequest' required: true + x-exportParamName: Request responses: "200": description: OK @@ -2017,23 +2373,237 @@ paths: "429": description: Too Many Requests x-visibility: Public - x-speakeasy-name-override: deleteFiles + x-codegen-request-body-name: payload + x-speakeasy-name-override: delete x-speakeasy-group: client.chat - /rest/api/v1/chat-files/{fileId}: - get: - operationId: getChatFile - summary: Download a chat file - description: | - Download the raw content of a file generated or uploaded during a chat session (for example, an image produced by the assistant). Returns the file bytes with a Content-Type header matching the file's MIME type. + /rest/api/v1/getchat: + post: + operationId: getchat + summary: Retrieves a Chat + description: Retrieves the chat history between Glean Assistant and the user for a given Chat. tags: - Chat security: - APIToken: [] parameters: - - name: fileId - in: path - description: Identifier of the chat file to download. - required: true + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/timezoneOffset' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetChatRequest' + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetChatResponse' + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/AccessRequestPermissionDeniedResponse' + "429": + description: Too Many Requests + x-visibility: Public + x-codegen-request-body-name: payload + x-speakeasy-name-override: retrieve + x-speakeasy-group: client.chat + /rest/api/v1/listchats: + post: + operationId: listchats + summary: Retrieves all saved Chats + description: Retrieves all the saved Chats between Glean Assistant and the user. The returned Chats contain only metadata and no conversational content. + tags: + - Chat + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/timezoneOffset' + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ListChatsResponse' + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-visibility: Public + x-codegen-request-body-name: payload + x-speakeasy-name-override: list + x-speakeasy-group: client.chat + /rest/api/v1/getchatapplication: + post: + operationId: getchatapplication + summary: Gets the metadata for a custom Chat application + description: Gets the Chat application details for the specified application ID. + tags: + - Chat + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/timezoneOffset' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetChatApplicationRequest' + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetChatApplicationResponse' + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + x-visibility: Preview + x-codegen-request-body-name: payload + x-speakeasy-name-override: retrieveApplication + x-speakeasy-group: client.chat + /rest/api/v1/uploadchatfiles: + post: + operationId: uploadchatfiles + summary: Upload files for Chat + description: Upload files for Chat. + tags: + - Chat + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/timezoneOffset' + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/UploadChatFilesRequest' + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UploadChatFilesResponse' + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-visibility: Public + x-speakeasy-name-override: uploadFiles + x-speakeasy-group: client.chat + /rest/api/v1/getchatfiles: + post: + operationId: getchatfiles + summary: Get files uploaded by a user for Chat + description: Get files uploaded by a user for Chat. + tags: + - Chat + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/timezoneOffset' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GetChatFilesRequest' + required: true + x-exportParamName: Request + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/GetChatFilesResponse' + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-visibility: Public + x-speakeasy-name-override: retrieveFiles + x-speakeasy-group: client.chat + /rest/api/v1/deletechatfiles: + post: + operationId: deletechatfiles + summary: Delete files uploaded by a user for chat + description: Delete files uploaded by a user for Chat. + tags: + - Chat + security: + - APIToken: [] + parameters: + - $ref: '#/components/parameters/locale' + - $ref: '#/components/parameters/timezoneOffset' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteChatFilesRequest' + required: true + responses: + "200": + description: OK + "400": + description: Invalid request + "401": + description: Not Authorized + "403": + description: Forbidden + "429": + description: Too Many Requests + x-visibility: Public + x-speakeasy-name-override: deleteFiles + x-speakeasy-group: client.chat + /rest/api/v1/chat-files/{fileId}: + get: + operationId: getChatFile + summary: Download a chat file + description: | + Download the raw content of a file generated or uploaded during a chat session (for example, an image produced by the assistant). Returns the file bytes with a Content-Type header matching the file's MIME type. + tags: + - Chat + security: + - APIToken: [] + parameters: + - name: fileId + in: path + description: Identifier of the chat file to download. + required: true schema: type: string - name: preview @@ -3999,14 +4569,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 +6585,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 +7176,8 @@ components: role: type: string enum: - - user - - assistant + - USER + - ASSISTANT content: type: string minLength: 1 @@ -6616,7 +7189,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 +7227,7 @@ components: type: type: string enum: - - document + - DOCUMENT document_id: type: string minLength: 1 @@ -6680,7 +7253,7 @@ components: type: type: string enum: - - person + - PERSON person_id: type: string minLength: 1 @@ -6698,7 +7271,7 @@ components: type: type: string enum: - - file + - FILE file_id: type: string minLength: 1 @@ -6718,7 +7291,7 @@ components: type: type: string enum: - - custom_entity + - CUSTOM_ENTITY entity_id: type: string minLength: 1 @@ -6740,10 +7313,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 +7339,7 @@ components: type: type: string enum: - - citation + - CITATION sources: type: array minItems: 1 @@ -6795,7 +7368,7 @@ components: type: type: string enum: - - output_text + - OUTPUT_TEXT text: type: string annotations: @@ -6813,11 +7386,11 @@ components: type: type: string enum: - - message + - MESSAGE role: type: string enum: - - assistant + - ASSISTANT content: type: array minItems: 1 @@ -6841,7 +7414,7 @@ components: object: type: string enum: - - response + - RESPONSE created_at: type: string format: date-time @@ -6849,7 +7422,7 @@ components: status: type: string enum: - - completed + - COMPLETED output: type: array minItems: 1 @@ -7008,26 +7581,57 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. - PlatformSkillValidationRequest: + PlatformSkillImportRequest: type: object additionalProperties: false required: - - file + - source_urls properties: - file: - type: string - format: binary - description: SKILL.md, .zip, or .skill bundle to validate. - PlatformSkillValidationMetadata: + 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: - - display_name - - description + - skills + - request_id properties: - display_name: - type: string - description: Skill name parsed from SKILL.md frontmatter. - description: + 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 + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to validate. + PlatformSkillValidationMetadata: + type: object + required: + - display_name + - description + properties: + display_name: + type: string + description: Skill name parsed from SKILL.md frontmatter. + description: type: string description: Skill description parsed from SKILL.md frontmatter. PlatformSkillValidationFile: @@ -7069,37 +7673,6 @@ 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. PlatformSkillSourcePreviewRequest: type: object additionalProperties: false @@ -7155,165 +7728,557 @@ components: description: SKILL.md content fetched as part of the preview. files: type: array - description: Supporting files fetched with the skill. + description: Supporting files fetched with the skill. + items: + $ref: "#/components/schemas/PlatformSkillSourcePreviewFile" + file_tree: + type: array + description: Relative paths discovered for the skill. + items: + type: string + PlatformSkillSourcePreviewFailureCode: + type: string + enum: + - INVALID_SKILL + - SKILL_FETCH_FAILED + description: Stable machine-readable reason a discovered entry was excluded. + PlatformSkillSourcePreviewFailure: + type: object + required: + - source_url + - code + - detail + properties: + source_url: + type: string + description: Resolved URL for the entry that could not be previewed. + code: + $ref: "#/components/schemas/PlatformSkillSourcePreviewFailureCode" + detail: + type: string + description: Safe explanation of why the entry was excluded. + PlatformSkillSourcePreviewResponse: + type: object + required: + - skills + - failures + - request_id + properties: + skills: + type: array + minItems: 1 + description: Valid skills discovered at the source URL. + items: + $ref: "#/components/schemas/PlatformSkillSourcePreview" + failures: + type: array + description: Discovered entries that could not be included in the preview. + items: + $ref: "#/components/schemas/PlatformSkillSourcePreviewFailure" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillGetResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillUpdateStatus: + type: string + enum: + - ENABLED + - DISABLED + description: New status for the skill. + PlatformSkillUpdateRequest: + type: object + additionalProperties: false + required: + - status + properties: + status: + $ref: "#/components/schemas/PlatformSkillUpdateStatus" + PlatformSkillUpdateResponse: + type: object + required: + - skill + - request_id + properties: + skill: + $ref: "#/components/schemas/PlatformSkill" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillSyncResultStatus: + type: string + enum: + - UP_TO_DATE + description: Synchronization status after a successful refresh. + PlatformSkillSyncResponse: + type: object + required: + - sync_status + - commit_sha + - updated + - request_id + properties: + sync_status: + $ref: "#/components/schemas/PlatformSkillSyncResultStatus" + commit_sha: + type: string + minLength: 1 + description: Git commit SHA now associated with the skill. + updated: + type: boolean + description: Whether this request created a new skill version. + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillVersion: + type: object + required: + - skill_id + - version + - minor_version + - is_latest + - created_by + - created_at + - updated_at + properties: + skill_id: + type: string + description: Glean skill ID. + version: + type: integer + description: Major version number. + minor_version: + type: integer + description: Minor version number. + is_latest: + type: boolean + description: Whether this is the latest version of the skill. + created_by: + $ref: "#/components/schemas/PlatformPersonReference" + created_at: + type: string + format: date-time + description: Time this version was created. + updated_at: + type: string + format: date-time + description: Time this version was last updated. + source_provenance: + $ref: "#/components/schemas/PlatformSkillSourceProvenance" + PlatformSkillVersionsListResponse: + type: object + required: + - versions + - has_more + - next_cursor + - request_id + properties: + versions: + type: array + description: Versions available for the skill. + items: + $ref: "#/components/schemas/PlatformSkillVersion" + 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. + PlatformSkillVersionCreateRequest: + type: object + additionalProperties: false + required: + - file + properties: + file: + type: string + format: binary + description: SKILL.md, .zip, or .skill bundle to store as a new version. + PlatformSkillVersionCreateResponse: + type: object + required: + - version + - request_id + properties: + version: + $ref: "#/components/schemas/PlatformSkillVersion" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformSkillVersionGetResponse: + type: object + required: + - version + - request_id + properties: + version: + $ref: "#/components/schemas/PlatformSkillVersion" + request_id: + type: string + description: Platform-generated request ID for support correlation. + PlatformFilterOperator: + type: string + description: Supported filter operator. + enum: + - EQUALS + - NOT_EQUALS + - GT + - GTE + - LT + - LTE + PlatformFilter: + type: object + additionalProperties: false + required: + - field + - values + description: | + A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd; for `NOT_EQUALS`, listed values are excluded. Separate filters are AND'd with each other and with inline operators in `query`. Repeated same-field `EQUALS` filters are rejected. + properties: + field: + type: string + minLength: 1 + description: | + Filter field name. Built-in names (case-sensitive, lowercase only): `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`. Built-ins accept only `EQUALS` and `NOT_EQUALS`. Any other nonblank name is accepted as a custom filter without spelling, existence, or type checks; behavior depends on your connected sources. + example: type + values: + type: array + minItems: 1 + items: + type: string + minLength: 1 + description: | + One or more values to match. Prefer values returned by filter discovery unchanged. For people (`USER`) fields, values may be email addresses or display names. + example: + - spreadsheet + - presentation + operator: + allOf: + - $ref: "#/components/schemas/PlatformFilterOperator" + description: | + Comparison operator. Defaults to `EQUALS`. Built-in fields support only `EQUALS` and `NOT_EQUALS`. Range operators (`GT`, `GTE`, `LT`, `LTE`) require exactly one value; express ranges with multiple filters on the same field. Custom fields may support different operators depending on the data source. + PlatformTimeRange: + type: object + additionalProperties: false + description: Filter results to those last updated within this range. + properties: + start: + type: string + format: date-time + description: Inclusive lower bound in ISO 8601 format. + end: + type: string + format: date-time + description: Exclusive upper bound in ISO 8601 format. + PlatformSearchRequest: + type: object + additionalProperties: false + required: + - query + example: + query: quarterly planning 2026 + datasources: + - confluence + - google_drive + filters: + - field: type + values: + - spreadsheet + - presentation + properties: + query: + type: string + minLength: 1 + description: | + The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. + page_size: + type: integer + minimum: 1 + maximum: 100 + default: 10 + description: Number of results to return per page. + cursor: + type: string + nullable: true + description: | + Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. + example: "" + datasources: + type: array + minItems: 1 + items: + type: string + minLength: 1 + description: | + Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. + filters: + type: array + minItems: 1 + items: + $ref: "#/components/schemas/PlatformFilter" + description: | + Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. + time_range: + $ref: "#/components/schemas/PlatformTimeRange" + PlatformResult: + type: object + additionalProperties: false + required: + - url + - title + - datasource + properties: + url: + type: string + format: uri + minLength: 1 + description: Canonical URL of the result. + example: https://company.atlassian.net/wiki/spaces/ENG/pages/12345 + title: + type: string + minLength: 1 + description: Result title. + example: Q2 2026 Platform Roadmap + snippets: + type: array + items: + type: string + minLength: 1 + description: Query-relevant plain-text excerpts from the result body. + example: + - The platform team will focus on API stability and... + datasource: + type: string + minLength: 1 + description: The datasource this result originates from. + example: confluence + document_type: + type: string + nullable: true + minLength: 1 + description: The document type within the datasource. + example: page + creator: + $ref: "#/components/schemas/PlatformPersonReference" + owner: + $ref: "#/components/schemas/PlatformPersonReference" + updated_at: + type: string + format: date-time + nullable: true + description: When the result was last modified. + created_at: + type: string + format: date-time + nullable: true + description: When the result was created. + PlatformSearchResponse: + type: object + additionalProperties: false + required: + - results + - has_more + - next_cursor + - request_id + - warnings + properties: + results: + type: array + items: + $ref: "#/components/schemas/PlatformResult" + description: | + Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. + has_more: + type: boolean + description: Indicates whether additional pages of results are available. + next_cursor: + type: string + nullable: true + description: Opaque token to pass as `cursor` in the next request. + request_id: + type: string + minLength: 1 + description: Platform-generated request ID for support correlation. + warnings: + type: array + description: | + Non-blocking warnings for this response. Required; use `[]` when there are none. Clients must tolerate unknown warning codes. `results_incomplete` means some results may be unavailable for the requested datasource scope while `results`, `has_more`, and `next_cursor` remain present. Warning messages are generic and do not include query text or internal identifiers. + items: + $ref: "#/components/schemas/PlatformWarning" + PlatformFilterFieldInfo: + type: object + additionalProperties: false + required: + - field + - type + - operators + properties: + field: + type: string + minLength: 1 + description: Field name usable in the `filters` array for `POST /api/search`. + example: status + type: + type: string + minLength: 1 + description: | + Open field-type string. Current values are `STRING` for text and keyword fields and `USER` for people fields (`owner`, `from`, `author`, `assignee`, `reporter`, `mentions`). Clients must tolerate unknown values. + example: STRING + operators: + type: array + minItems: 1 + description: | + Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. items: - $ref: "#/components/schemas/PlatformSkillSourcePreviewFile" - file_tree: + $ref: "#/components/schemas/PlatformFilterOperator" + values: type: array - description: Relative paths discovered for the skill. + description: | + Suggested filter values observed for the supplied `query`. Omitted in catalog-only responses. Present as an array, including `[]`, when `query` is provided. Values are a bounded, non-exhaustive sample in search-provider order and may include duplicates; blank values are omitted. No additional endpoint-specific truncation is applied. Grouping in the search UI is not preserved; each value applies to the field broadly. An empty array does not mean no valid value exists. Availability varies by data source; federated and MCP integrations may return page-derived values or none at all. Reusing a suggested value in `POST /api/search` does not guarantee matching results or identical filter behavior. For `USER` fields, values may be email addresses or display names. items: type: string - PlatformSkillSourcePreviewFailureCode: - type: string - enum: - - INVALID_SKILL - - SKILL_FETCH_FAILED - description: Stable machine-readable reason a discovered entry was excluded. - PlatformSkillSourcePreviewFailure: + minLength: 1 + PlatformDatasourceFilterInfo: type: object + additionalProperties: false required: - - source_url - - code - - detail + - datasource + - filters properties: - source_url: - type: string - description: Resolved URL for the entry that could not be previewed. - code: - $ref: "#/components/schemas/PlatformSkillSourcePreviewFailureCode" - detail: + datasource: type: string - description: Safe explanation of why the entry was excluded. - PlatformSkillSourcePreviewResponse: - type: object - required: - - skills - - failures - - request_id - properties: - skills: - type: array - minItems: 1 - description: Valid skills discovered at the source URL. - items: - $ref: "#/components/schemas/PlatformSkillSourcePreview" - failures: + minLength: 1 + description: | + Datasource identifier usable in `POST /api/search` `datasources`. + example: jira + filters: type: array - description: Discovered entries that could not be included in the preview. + description: | + Common built-in filter fields for this datasource. May be empty. A built-in omitted here can still be valid in `POST /api/search`; see `Filter.field` for the full built-in name list. items: - $ref: "#/components/schemas/PlatformSkillSourcePreviewFailure" - request_id: - type: string - description: Platform-generated request ID for support correlation. - PlatformSkillGetResponse: + $ref: "#/components/schemas/PlatformFilterFieldInfo" + PlatformSearchFiltersResponse: type: object + additionalProperties: false required: - - skill + - datasources - request_id properties: - skill: - $ref: "#/components/schemas/PlatformSkill" + datasources: + type: array + description: | + Datasources visible to the authenticated user. Each `datasource` is an identifier you can pass to `POST /api/search` `datasources`. An empty array means no visible datasources. + items: + $ref: "#/components/schemas/PlatformDatasourceFilterInfo" request_id: type: string + minLength: 1 description: Platform-generated request ID for support correlation. - PlatformSkillUpdateStatus: + PlatformTriggerStatus: type: string + description: Current trigger lifecycle state. + example: ENABLED enum: - ENABLED - DISABLED - description: New status for the skill. - PlatformSkillUpdateRequest: + PlatformTriggerAuth: type: object additionalProperties: false required: - - status - properties: - status: - $ref: "#/components/schemas/PlatformSkillUpdateStatus" - PlatformSkillUpdateResponse: - type: object - required: - - skill - - request_id + - 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: - skill: - $ref: "#/components/schemas/PlatformSkill" - request_id: + type: type: string - description: Platform-generated request ID for support correlation. - PlatformSkillSyncResultStatus: - type: string - enum: - - UP_TO_DATE - description: Synchronization status after a successful refresh. - PlatformSkillSyncResponse: + description: Credential scheme. + enum: + - BEARER + secret: + type: string + writeOnly: true + description: Secret credential value. Write-only; never returned on reads. + example: secret_test_123 + PlatformTriggerDelivery: type: object + additionalProperties: false required: - - sync_status - - commit_sha - - updated - - request_id + - webhook_url properties: - sync_status: - $ref: "#/components/schemas/PlatformSkillSyncResultStatus" - commit_sha: - type: string - minLength: 1 - description: Git commit SHA now associated with the skill. - updated: - type: boolean - description: Whether this request created a new skill version. - request_id: + webhook_url: type: string - description: Platform-generated request ID for support correlation. - PlatformSkillVersion: + format: uri + pattern: ^https:// + description: HTTPS URL that signed events are delivered to. + example: https://customer.app/webhook + auth: + $ref: "#/components/schemas/PlatformTriggerAuth" + PlatformTrigger: type: object required: - - skill_id - - version - - minor_version - - is_latest - - created_by + - trigger_id + - preset_id + - status + - delivery - created_at - updated_at properties: - skill_id: + trigger_id: type: string - description: Glean skill ID. - version: - type: integer - description: Major version number. - minor_version: - type: integer - description: Minor version number. - is_latest: - type: boolean - description: Whether this is the latest version of the skill. - created_by: - $ref: "#/components/schemas/PlatformPersonReference" + description: ID of the trigger. + example: trigger_test_123 + preset_id: + type: string + description: ID of the preset this trigger was created from. + example: GITHUB_1 + description: + type: string + description: Optional caller-supplied note describing this trigger. + example: Reviews I am tagged on, sent to my team's review channel + status: + $ref: "#/components/schemas/PlatformTriggerStatus" + inputs: + type: object + additionalProperties: true + description: Values supplied for the preset's inputs. + example: + repository: acme/payments-api + delivery: + $ref: "#/components/schemas/PlatformTriggerDelivery" created_at: type: string format: date-time - description: Time this version was created. + description: Time the trigger was created. updated_at: type: string format: date-time - description: Time this version was last updated. - source_provenance: - $ref: "#/components/schemas/PlatformSkillSourceProvenance" - PlatformSkillVersionsListResponse: + description: Time the trigger was last updated. + PlatformTriggerListResponse: type: object required: - - versions + - results - has_more - next_cursor - request_id properties: - versions: + results: type: array - description: Versions available for the skill. + description: Triggers owned by the caller. items: - $ref: "#/components/schemas/PlatformSkillVersion" + $ref: "#/components/schemas/PlatformTrigger" has_more: type: boolean description: Whether additional results are available. @@ -7324,296 +8289,481 @@ components: request_id: type: string description: Platform-generated request ID for support correlation. - PlatformSkillVersionCreateRequest: + PlatformTriggerCreateRequest: type: object additionalProperties: false required: - - file + - preset_id + - delivery properties: - file: + preset_id: type: string - format: binary - description: SKILL.md, .zip, or .skill bundle to store as a new version. - PlatformSkillVersionCreateResponse: + description: ID of the preset to instantiate. + example: GITHUB_1 + description: + type: string + description: Optional note describing this trigger. + example: Reviews I am tagged on, sent to my team's review channel + inputs: + type: object + additionalProperties: true + description: Values for the preset's inputs. + example: + repository: acme/payments-api + delivery: + $ref: "#/components/schemas/PlatformTriggerDelivery" + PlatformTriggerWithSecret: + allOf: + - $ref: "#/components/schemas/PlatformTrigger" + - type: object + required: + - signing_secret + properties: + signing_secret: + type: string + pattern: ^whsec_[A-Za-z0-9+/=]+$ + example: whsec_xxx + description: Secret for verifying webhook signatures, serialized as `whsec_` following Standard Webhooks. Returned only when the trigger is created and cannot be retrieved later. Store it securely. + PlatformTriggerCreateResponse: type: object required: - - version + - trigger - request_id properties: - version: - $ref: "#/components/schemas/PlatformSkillVersion" + trigger: + $ref: "#/components/schemas/PlatformTriggerWithSecret" request_id: type: string description: Platform-generated request ID for support correlation. - PlatformSkillVersionGetResponse: + PlatformTriggerWebhookEventBase: type: object required: - version - - request_id + - trigger_id + - event_type + - datasource + - reason + - doc_type + - doc_id + - view_url + - title properties: version: - $ref: "#/components/schemas/PlatformSkillVersion" - request_id: type: string - description: Platform-generated request ID for support correlation. - PlatformFilterOperator: - type: string - description: Supported filter operator. - enum: - - EQUALS - - NOT_EQUALS - - GT - - GTE - - LT - - LTE - PlatformFilter: + description: Webhook payload schema version. + pattern: ^1$ + trigger_id: + type: string + description: ID of the Platform trigger that produced the event. + example: trigger_test_123 + event_type: + type: string + description: Kind of trigger event. + datasource: + type: string + description: Datasource the event originated from. + example: GITHUB + reason: + type: string + description: Why the event fired. + example: REVIEW_REQUESTED + doc_type: + type: string + description: Datasource-specific object type. + example: pull + doc_id: + type: string + description: Identifier of the document the event is about. + example: GITHUB_pull_123 + view_url: + type: string + description: Link to the document in its source system. + example: https://github.com/acme/payments-api/pull/123 + title: + type: string + description: Title of the document, or the subject for email. + example: "Bug: login fails on Safari" + event_time: + type: string + format: date-time + description: Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available. + PlatformDocumentChangeWebhookEvent: + allOf: + - $ref: "#/components/schemas/PlatformTriggerWebhookEventBase" + - type: object + required: + - event_type + properties: + event_type: + type: string + pattern: ^DOCUMENT_CHANGE$ + content: + type: string + description: Email body content when the event is for an email document. + content_truncated: + type: boolean + description: Present and true when source content exceeded the delivery size limit. + example: + version: "1" + trigger_id: trigger_test_123 + event_type: DOCUMENT_CHANGE + datasource: GITHUB + reason: REVIEW_REQUESTED + doc_type: pull + doc_id: GITHUB_pull_123 + view_url: https://github.com/acme/payments-api/pull/123 + title: Add retry backoff to the crawler + event_time: "2025-04-23T11:00:00Z" + PlatformContentScheduleWebhookEvent: + allOf: + - $ref: "#/components/schemas/PlatformTriggerWebhookEventBase" + - type: object + required: + - event_type + - time_offset_seconds + properties: + event_type: + type: string + pattern: ^CONTENT_SCHEDULE$ + time_offset_seconds: + type: integer + format: int32 + description: Offset in seconds from the scheduled time at which the trigger fired. + example: + version: "1" + trigger_id: trigger_test_123 + event_type: CONTENT_SCHEDULE + datasource: GOOGLECALENDAR + reason: CONTENT_SCHEDULE + doc_type: event + doc_id: GCAL_event_123 + view_url: https://calendar.google.com/event?eid=abc + title: Weekly Sync + event_time: "2025-04-23T12:00:00Z" + time_offset_seconds: 1800 + PlatformTriggerWebhookEvent: + description: Every delivered webhook is one of these two variants. A trigger with a cron schedule carries no document and so cannot be delivered over a webhook. + oneOf: + - $ref: "#/components/schemas/PlatformDocumentChangeWebhookEvent" + - $ref: "#/components/schemas/PlatformContentScheduleWebhookEvent" + discriminator: + propertyName: event_type + mapping: + DOCUMENT_CHANGE: "#/components/schemas/DocumentChangeWebhookEvent" + CONTENT_SCHEDULE: "#/components/schemas/ContentScheduleWebhookEvent" + PlatformTriggerGetResponse: type: object - additionalProperties: false required: - - field - - values - description: | - A single filter criterion. For `EQUALS`, multiple values within a filter are OR'd; for `NOT_EQUALS`, listed values are excluded. Separate filters are AND'd with each other and with inline operators in `query`. Repeated same-field `EQUALS` filters are rejected. + - trigger + - request_id properties: - field: + trigger: + $ref: "#/components/schemas/PlatformTrigger" + request_id: type: string - minLength: 1 - description: | - Filter field name. Built-in names (case-sensitive, lowercase only): `type`, `owner`, `from`, `author`, `channel`, `status`, `assignee`, `reporter`, `component`, `mentions`, and `collection`. Built-ins accept only `EQUALS` and `NOT_EQUALS`. Any other nonblank name is accepted as a custom filter without spelling, existence, or type checks; behavior depends on your connected sources. - example: type - values: - type: array - minItems: 1 - items: - type: string - minLength: 1 - description: | - One or more values to match. Prefer values returned by filter discovery unchanged. For people (`USER`) fields, values may be email addresses or display names. - example: - - spreadsheet - - presentation - operator: - allOf: - - $ref: "#/components/schemas/PlatformFilterOperator" - description: | - Comparison operator. Defaults to `EQUALS`. Built-in fields support only `EQUALS` and `NOT_EQUALS`. Range operators (`GT`, `GTE`, `LT`, `LTE`) require exactly one value; express ranges with multiple filters on the same field. Custom fields may support different operators depending on the data source. - PlatformTimeRange: + description: Platform-generated request ID for support correlation. + PlatformTriggerUpdateRequest: type: object additionalProperties: false - description: Filter results to those last updated within this range. + description: Partial update. Only the supplied fields are changed. properties: - start: - type: string - format: date-time - description: Inclusive lower bound in ISO 8601 format. - end: + status: + $ref: "#/components/schemas/PlatformTriggerStatus" + description: type: string - format: date-time - description: Exclusive upper bound in ISO 8601 format. - PlatformSearchRequest: + description: Optional note describing this trigger. + example: Reviews I am tagged on, sent to my team's review channel + inputs: + type: object + additionalProperties: true + description: Values for the preset's inputs. + example: + repository: acme/payments-api + delivery: + $ref: "#/components/schemas/PlatformTriggerDelivery" + PlatformTriggerEventSearchRequest: type: object additionalProperties: false - required: - - query - example: - query: quarterly planning 2026 - datasources: - - confluence - - google_drive - filters: - - field: type - values: - - spreadsheet - - presentation properties: - query: - type: string - minLength: 1 - description: | - The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`. page_size: type: integer + description: Maximum number of events to return. minimum: 1 maximum: 100 default: 10 - description: Number of results to return per page. - cursor: - type: string - nullable: true - description: | - Opaque pagination token from a previous response's `next_cursor` field. Omit on the first request. - example: "" - datasources: - type: array - minItems: 1 - items: - type: string - minLength: 1 - description: | - Restrict results to specific datasource identifiers returned by `GET /api/search/filters`. Scopes by datasource type and may include results from multiple instances of that type. - filters: - type: array - minItems: 1 - items: - $ref: "#/components/schemas/PlatformFilter" - description: | - Structured filters applied to search results. Multiple values within a filter with `EQUALS` are OR'd; separate filters are AND'd. Conflicting constraints on the same field (for example, `type:document` in `query` and `type:spreadsheet` in a filter) return an empty result set. See `Filter.field` for built-in field names and operators. Other nonblank field names are accepted as custom filters without validation; behavior depends on your connected sources. - time_range: - $ref: "#/components/schemas/PlatformTimeRange" - PlatformResult: + 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: REVIEW_REQUESTED + 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 - additionalProperties: false required: - - url - - title + - event_type + - doc_id - datasource + - doc_type + - view_url + - title + - reason + - event_time + description: A content event a trigger can fire on. properties: - url: + event_type: + $ref: "#/components/schemas/PlatformTriggerEventType" + datasource: type: string - format: uri - minLength: 1 - description: Canonical URL of the result. - example: https://company.atlassian.net/wiki/spaces/ENG/pages/12345 + description: Datasource the event originated from. + example: GITHUB + reason: + $ref: "#/components/schemas/PlatformTriggerEventReason" + doc_type: + type: string + description: Datasource-specific object type. + example: pull + 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 - minLength: 1 - description: Result title. - example: Q2 2026 Platform Roadmap - snippets: + description: Title of the document, or the subject for email. + event_time: + type: string + format: date-time + description: "When the event happened at the source: the document's own change timestamp for a document change, and the scheduled time for a content schedule. Omitted when the source did not supply one." + PlatformTriggerEventSearchResponse: + type: object + required: + - results + - has_more + - request_id + properties: + results: type: array + description: Matching events, most recent first. items: - type: string - minLength: 1 - description: Query-relevant plain-text excerpts from the result body. - example: - - The platform team will focus on API stability and... - datasource: + $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 - minLength: 1 - description: The datasource this result originates from. - example: confluence - document_type: + description: Unique identifier for this request, for support and debugging. + PlatformTriggerPresetSummary: + type: object + required: + - preset_id + - datasource + - display_name + properties: + preset_id: type: string - nullable: true - minLength: 1 - description: The document type within the datasource. - example: page - creator: - $ref: "#/components/schemas/PlatformPersonReference" - owner: - $ref: "#/components/schemas/PlatformPersonReference" - updated_at: + description: ID of the preset. Pass this when creating a trigger. + example: GITHUB_1 + datasource: type: string - format: date-time - nullable: true - description: When the result was last modified. - created_at: + description: Datasource the preset fires on. + example: github + display_name: type: string - format: date-time - nullable: true - description: When the result was created. - PlatformSearchResponse: + description: Human-readable preset name. + example: Review requested from me + description: + type: string + description: Human-readable description of when the preset fires. + example: A review is requested from the trigger creator on a pull request + PlatformTriggerPresetListResponse: type: object - additionalProperties: false required: - results - has_more - next_cursor - request_id - - warnings properties: results: type: array + description: Trigger presets available to the caller. items: - $ref: "#/components/schemas/PlatformResult" - description: | - Ordered list of ranked document results. People cards, Q&A blocks, and other UI-only result types are not included. + $ref: "#/components/schemas/PlatformTriggerPresetSummary" has_more: type: boolean - description: Indicates whether additional pages of results are available. + description: Whether additional results are available. next_cursor: type: string nullable: true - description: Opaque token to pass as `cursor` in the next request. + description: Cursor for the next page, or null when no more results are available. request_id: type: string - minLength: 1 description: Platform-generated request ID for support correlation. - warnings: - type: array + 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: | - Non-blocking warnings for this response. Required; use `[]` when there are none. Clients must tolerate unknown warning codes. `results_incomplete` means some results may be unavailable for the requested datasource scope while `results`, `has_more`, and `next_cursor` remain present. Warning messages are generic and do not include query text or internal identifiers. - items: - $ref: "#/components/schemas/PlatformWarning" - PlatformFilterFieldInfo: + The exact value to send in the trigger's `inputs` for this choice (e.g. a channel name, a user's email, etc). + example: acme/payments-api + display_name: + type: string + description: Human-readable name for this value. + example: acme/payments-api + PlatformTriggerPresetInput: type: object - additionalProperties: false required: - field - type - - operators + - display_name + - is_required properties: field: type: string - minLength: 1 - description: Field name usable in the `filters` array for `POST /api/search`. - example: status + description: Identifier of the input, supplied as a key in the trigger's `inputs`. + example: repository type: + $ref: "#/components/schemas/PlatformTriggerPresetInputType" + display_name: type: string - minLength: 1 - description: | - Open field-type string. Current values are `STRING` for text and keyword fields and `USER` for people fields (`owner`, `from`, `author`, `assignee`, `reporter`, `mentions`). Clients must tolerate unknown values. - example: STRING - operators: - type: array - minItems: 1 - description: | - Comparison operators supported for this field. Built-in fields expose `EQUALS` and `NOT_EQUALS`. - items: - $ref: "#/components/schemas/PlatformFilterOperator" + description: Human-readable name for the input. + example: Repository + is_required: + type: boolean + description: Whether the caller must supply a value for this input. values: type: array description: | - Suggested filter values observed for the supplied `query`. Omitted in catalog-only responses. Present as an array, including `[]`, when `query` is provided. Values are a bounded, non-exhaustive sample in search-provider order and may include duplicates; blank values are omitted. No additional endpoint-specific truncation is applied. Grouping in the search UI is not preserved; each value applies to the field broadly. An empty array does not mean no valid value exists. Availability varies by data source; federated and MCP integrations may return page-derived values or none at all. Reusing a suggested value in `POST /api/search` does not guarantee matching results or identical filter behavior. For `USER` fields, values may be email addresses or display names. + Bounded initial set of selectable values for a picklist input. Omitted entirely for free-text inputs. items: - type: string - minLength: 1 - PlatformDatasourceFilterInfo: + $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: + allOf: + - $ref: "#/components/schemas/PlatformTriggerPresetSummary" + - type: object + required: + - inputs + properties: + inputs: + type: array + description: Inputs the caller may supply when creating a trigger from this preset. + items: + $ref: "#/components/schemas/PlatformTriggerPresetInput" + PlatformTriggerPresetGetResponse: type: object - additionalProperties: false required: - - datasource - - filters + - trigger_preset + - request_id properties: - datasource: + trigger_preset: + $ref: "#/components/schemas/PlatformTriggerPreset" + request_id: type: string - minLength: 1 - description: | - Datasource identifier usable in `POST /api/search` `datasources`. - example: jira - filters: - type: array - description: | - Common built-in filter fields for this datasource. May be empty. A built-in omitted here can still be valid in `POST /api/search`; see `Filter.field` for the full built-in name list. - items: - $ref: "#/components/schemas/PlatformFilterFieldInfo" - PlatformSearchFiltersResponse: + description: Platform-generated request ID for support correlation. + PlatformTriggerPresetInputValueListResponse: type: object - additionalProperties: false required: - - datasources + - results + - is_truncated - request_id properties: - datasources: + results: type: array - description: | - Datasources visible to the authenticated user. Each `datasource` is an identifier you can pass to `POST /api/search` `datasources`. An empty array means no visible datasources. + description: The bounded set of selectable values matching the query. items: - $ref: "#/components/schemas/PlatformDatasourceFilterInfo" + $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 - minLength: 1 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: + repository: acme/payments-api + page_size: + type: integer + description: Maximum number of events to return. + minimum: 1 + maximum: 100 + default: 10 ActivityEventParams: properties: bodyContent: @@ -9189,6 +10339,7 @@ components: properties: count: type: integer + format: int64 description: The counter value period: $ref: '#/components/schemas/Period' @@ -14344,6 +15495,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 +15521,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 +15638,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 +15947,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 +15964,7 @@ components: - OOO_PLANNER - OOO_CATCH_UP - ADMIN_HEALTH_CENTER + - KNOWLEDGE_GAP description: Type of the justification. justification: type: string @@ -14880,6 +16056,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 +16073,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 @@ -18387,6 +19565,46 @@ components: schema: $ref: '#/components/schemas/ErrorInfoResponse' parameters: + TriggerWebhookId: + name: webhook-id + in: header + required: true + description: Opaque delivery ID. It remains stable across retries of the same event and can be used as an idempotency key. + schema: + type: string + minLength: 1 + example: msg_test_123 + TriggerWebhookTimestamp: + name: webhook-timestamp + in: header + required: true + description: Unix time in seconds when this delivery attempt was signed. + schema: + type: integer + format: int64 + example: 1700000000 + TriggerWebhookSignature: + name: webhook-signature + in: header + required: true + description: | + `v1,` followed by the standard Base64-encoded HMAC-SHA256 digest. To verify it, remove the + `whsec_` prefix from `signing_secret`, standard-Base64-decode the remainder, and use those + bytes as the HMAC key. Sign the UTF-8 bytes of `webhook-id + "." + webhook-timestamp + "." + + raw request body`. Verify the signature against the unmodified request body before + parsing JSON, and use a constant-time comparison. + + Fixed test vector (the raw body is one line with no trailing newline): + + - decoded signing key bytes (UTF-8; test only): `test_webhook_signing_secret_1234` + - `webhook-id`: `81e6dc877ac553ef96ecbc939c1e46431159491991ba55cd131fbd0e3746c6bc` + - `webhook-timestamp`: `1700000000` + - `raw request body`: `{"version":"1","trigger_id":"trigger_test_123","datasource":"GITHUB","reason":"REVIEW_REQUESTED","doc_type":"pull","event_type":"DOCUMENT_CHANGE","doc_id":"GITHUB_pull_123","view_url":"https://github.com/acme/payments-api/pull/123","title":"Add retry backoff to the crawler","event_time":"2025-04-23T11:00:00Z"}` + - `webhook-signature`: `v1,JqvHW0dwAOSLndiwQdXLUS/P+2RvOO8x4sOWgA/w0Gs=` + schema: + type: string + pattern: ^v1,[A-Za-z0-9+/=]+$ + example: v1,xxx locale: name: locale in: query diff --git a/.speakeasy/tests.arazzo.yaml b/.speakeasy/tests.arazzo.yaml index bbf00bc2..17668422 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: secret_test_123 + type: BEARER + webhook_url: https://customer.app/webhook + description: Reviews I am tagged on, sent to my team's review channel + inputs: + repository: acme/payments-api + preset_id: GITHUB_1 + successCriteria: + - condition: $statusCode == 201 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"trigger":{"trigger_id":"trigger_test_123","preset_id":"GITHUB_1","description":"Reviews I am tagged on, sent to my team's review channel","status":"ENABLED","inputs":{"repository":"acme/payments-api"},"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":"trigger_test_123","preset_id":"GITHUB_1","description":"Reviews I am tagged on, sent to my team's review channel","status":"ENABLED","inputs":{"repository":"acme/payments-api"},"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: secret_test_123 + type: BEARER + webhook_url: https://customer.app/webhook + description: Reviews I am tagged on, sent to my team's review channel + inputs: + repository: acme/payments-api + status: ENABLED + successCriteria: + - condition: $statusCode == 200 + - condition: $response.header.Content-Type == application/json + - context: $response.body + condition: | + {"trigger":{"trigger_id":"trigger_test_123","preset_id":"GITHUB_1","description":"Reviews I am tagged on, sent to my team's review channel","status":"ENABLED","inputs":{"repository":"acme/payments-api"},"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":"REVIEW_REQUESTED","doc_type":"pull","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":"GITHUB_1","datasource":"github","display_name":"Review requested from me","description":"A review is requested from the trigger creator on a pull request","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":"acme/payments-api","display_name":"acme/payments-api"}],"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: + repository: acme/payments-api + 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":"REVIEW_REQUESTED","doc_type":"pull","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..5dc67af2 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:7590acf97cd954f21cc18c002b6bd70d1fa7a3791189a7588aa01394b165f027 + sourceBlobDigest: sha256:01e99ca22489a7c7e609b1a95ca2cf2b4cade6a60cc28019dc2a40731a69dad9 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:7590acf97cd954f21cc18c002b6bd70d1fa7a3791189a7588aa01394b165f027 + sourceBlobDigest: sha256:01e99ca22489a7c7e609b1a95ca2cf2b4cade6a60cc28019dc2a40731a69dad9 codeSamplesNamespace: glean-api-specs-python-code-samples - codeSamplesRevisionDigest: sha256:2c3560eb6c6ea1afdbbf7fd64c9e27673ca3ae028fb784f30ecd9151553898f8 + codeSamplesRevisionDigest: sha256:985280ee4fe1f57740b53a8a893bbcd79361460bcc2ab8b2696bb0f81e6350f4 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..90b763b8 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 17:51:39 +### 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/platformcontentschedulewebhookevent.md b/docs/models/platformcontentschedulewebhookevent.md new file mode 100644 index 00000000..403b2492 --- /dev/null +++ b/docs/models/platformcontentschedulewebhookevent.md @@ -0,0 +1,18 @@ +# PlatformContentScheduleWebhookEvent + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | Webhook payload schema version. | | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the Platform trigger that produced the event. | trigger_test_123 | +| `event_type` | *str* | :heavy_check_mark: | N/A | | +| `datasource` | *str* | :heavy_check_mark: | Datasource the event originated from. | GITHUB | +| `reason` | *str* | :heavy_check_mark: | Why the event fired. | REVIEW_REQUESTED | +| `doc_type` | *str* | :heavy_check_mark: | Datasource-specific object type. | pull | +| `doc_id` | *str* | :heavy_check_mark: | Identifier of the document the event is about. | GITHUB_pull_123 | +| `view_url` | *str* | :heavy_check_mark: | Link to the document in its source system. | https://github.com/acme/payments-api/pull/123 | +| `title` | *str* | :heavy_check_mark: | Title of the document, or the subject for email. | Bug: login fails on Safari | +| `event_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available. | | +| `time_offset_seconds` | *int* | :heavy_check_mark: | Offset in seconds from the scheduled time at which the trigger fired. | | \ No newline at end of file diff --git a/docs/models/platformdocumentchangewebhookevent.md b/docs/models/platformdocumentchangewebhookevent.md new file mode 100644 index 00000000..926494c1 --- /dev/null +++ b/docs/models/platformdocumentchangewebhookevent.md @@ -0,0 +1,19 @@ +# PlatformDocumentChangeWebhookEvent + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `version` | *str* | :heavy_check_mark: | Webhook payload schema version. | | +| `trigger_id` | *str* | :heavy_check_mark: | ID of the Platform trigger that produced the event. | trigger_test_123 | +| `event_type` | *str* | :heavy_check_mark: | N/A | | +| `datasource` | *str* | :heavy_check_mark: | Datasource the event originated from. | GITHUB | +| `reason` | *str* | :heavy_check_mark: | Why the event fired. | REVIEW_REQUESTED | +| `doc_type` | *str* | :heavy_check_mark: | Datasource-specific object type. | pull | +| `doc_id` | *str* | :heavy_check_mark: | Identifier of the document the event is about. | GITHUB_pull_123 | +| `view_url` | *str* | :heavy_check_mark: | Link to the document in its source system. | https://github.com/acme/payments-api/pull/123 | +| `title` | *str* | :heavy_check_mark: | Title of the document, or the subject for email. | Bug: login fails on Safari | +| `event_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available. | | +| `content` | *Optional[str]* | :heavy_minus_sign: | Email body content when the event is for an email document. | | +| `content_truncated` | *Optional[bool]* | :heavy_minus_sign: | Present and true when source content exceeded the delivery size limit. | | \ No newline at end of file diff --git a/docs/models/platformtrigger.md b/docs/models/platformtrigger.md new file mode 100644 index 00000000..d4597f36 --- /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. | trigger_test_123 | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset this trigger was created from. | GITHUB_1 | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional caller-supplied note describing this trigger. | Reviews I am tagged on, sent to my team's review channel | +| `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. | {
"repository": "acme/payments-api"
} | +| `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..bbe340e2 --- /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. | secret_test_123 | \ 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..cad7c614 --- /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. | GITHUB_1 | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional note describing this trigger. | Reviews I am tagged on, sent to my team's review channel | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"repository": "acme/payments-api"
} | +| `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..cb603d90 --- /dev/null +++ b/docs/models/platformtriggerdelivery.md @@ -0,0 +1,9 @@ +# PlatformTriggerDelivery + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `webhook_url` | *str* | :heavy_check_mark: | HTTPS 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..d99b2ca0 --- /dev/null +++ b/docs/models/platformtriggerdeliveryoutput.md @@ -0,0 +1,9 @@ +# PlatformTriggerDeliveryOutput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `webhook_url` | *str* | :heavy_check_mark: | HTTPS 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..b576bda6 --- /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. | REVIEW_REQUESTED | +| `doc_type` | *str* | :heavy_check_mark: | Datasource-specific object type. | pull | +| `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 happened at the source: the document's own change timestamp for a document change, and the scheduled time for a content schedule. Omitted when the source did not supply one. | | \ 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..2dc6db1f --- /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. | GITHUB_1 | +| `datasource` | *str* | :heavy_check_mark: | Datasource the preset fires on. | github | +| `display_name` | *str* | :heavy_check_mark: | Human-readable preset name. | Review requested from me | +| `description` | *Optional[str]* | :heavy_minus_sign: | Human-readable description of when the preset fires. | A review is requested from the trigger creator on a pull request | +| `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..81d8fb83 --- /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.
| {
"repository": "acme/payments-api"
} | +| `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..9e232561 --- /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`. | repository | +| `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. | Repository | +| `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..7fb2c9f9 --- /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).
| acme/payments-api | +| `display_name` | *str* | :heavy_check_mark: | Human-readable name for this value. | acme/payments-api | \ 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..7d87f183 --- /dev/null +++ b/docs/models/platformtriggerpresetlistresponse.md @@ -0,0 +1,11 @@ +# PlatformTriggerPresetListResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `results` | List[[models.PlatformTriggerPresetSummary](../models/platformtriggerpresetsummary.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..5a300603 --- /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. github). | +| `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/platformtriggerpresetsummary.md b/docs/models/platformtriggerpresetsummary.md new file mode 100644 index 00000000..18f731ce --- /dev/null +++ b/docs/models/platformtriggerpresetsummary.md @@ -0,0 +1,11 @@ +# PlatformTriggerPresetSummary + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset. Pass this when creating a trigger. | GITHUB_1 | +| `datasource` | *str* | :heavy_check_mark: | Datasource the preset fires on. | github | +| `display_name` | *str* | :heavy_check_mark: | Human-readable preset name. | Review requested from me | +| `description` | *Optional[str]* | :heavy_minus_sign: | Human-readable description of when the preset fires. | A review is requested from the trigger creator on a pull request | \ No newline at end of file diff --git a/docs/models/platformtriggerscreatetriggerwebhookeventrequest.md b/docs/models/platformtriggerscreatetriggerwebhookeventrequest.md new file mode 100644 index 00000000..9a28c2e8 --- /dev/null +++ b/docs/models/platformtriggerscreatetriggerwebhookeventrequest.md @@ -0,0 +1,11 @@ +# PlatformTriggersCreateTriggerWebhookEventRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `webhook_id` | *str* | :heavy_check_mark: | Opaque delivery ID. It remains stable across retries of the same event and can be used as an idempotency key. | msg_test_123 | +| `webhook_timestamp` | *int* | :heavy_check_mark: | Unix time in seconds when this delivery attempt was signed. | 1700000000 | +| `webhook_signature` | *str* | :heavy_check_mark: | `v1,` followed by the standard Base64-encoded HMAC-SHA256 digest. To verify it, remove the
`whsec_` prefix from `signing_secret`, standard-Base64-decode the remainder, and use those
bytes as the HMAC key. Sign the UTF-8 bytes of `webhook-id + "." + webhook-timestamp + "."
+ raw request body`. Verify the signature against the unmodified request body before
parsing JSON, and use a constant-time comparison.

Fixed test vector (the raw body is one line with no trailing newline):

- decoded signing key bytes (UTF-8; test only): `test_webhook_signing_secret_1234`
- `webhook-id`: `81e6dc877ac553ef96ecbc939c1e46431159491991ba55cd131fbd0e3746c6bc`
- `webhook-timestamp`: `1700000000`
- `raw request body`: `{"version":"1","trigger_id":"trigger_test_123","datasource":"GITHUB","reason":"REVIEW_REQUESTED","doc_type":"pull","event_type":"DOCUMENT_CHANGE","doc_id":"GITHUB_pull_123","view_url":"https://github.com/acme/payments-api/pull/123","title":"Add retry backoff to the crawler","event_time":"2025-04-23T11:00:00Z"}`
- `webhook-signature`: `v1,JqvHW0dwAOSLndiwQdXLUS/P+2RvOO8x4sOWgA/w0Gs=`
| v1,xxx | +| `platform_trigger_webhook_event` | [models.PlatformTriggerWebhookEvent](../models/platformtriggerwebhookevent.md) | :heavy_check_mark: | N/A | | \ 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..9965fdb6 --- /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. | Reviews I am tagged on, sent to my team's review channel | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"repository": "acme/payments-api"
} | +| `delivery` | [Optional[models.PlatformTriggerDelivery]](../models/platformtriggerdelivery.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/platformtriggerwebhookevent.md b/docs/models/platformtriggerwebhookevent.md new file mode 100644 index 00000000..a7a76198 --- /dev/null +++ b/docs/models/platformtriggerwebhookevent.md @@ -0,0 +1,19 @@ +# PlatformTriggerWebhookEvent + +Every delivered webhook is one of these two variants. A trigger with a cron schedule carries no document and so cannot be delivered over a webhook. + + +## Supported Types + +### `models.PlatformDocumentChangeWebhookEvent` + +```python +value: models.PlatformDocumentChangeWebhookEvent = /* values here */ +``` + +### `models.PlatformContentScheduleWebhookEvent` + +```python +value: models.PlatformContentScheduleWebhookEvent = /* values here */ +``` + diff --git a/docs/models/platformtriggerwithsecret.md b/docs/models/platformtriggerwithsecret.md new file mode 100644 index 00000000..c79b1eab --- /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. | trigger_test_123 | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset this trigger was created from. | GITHUB_1 | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional caller-supplied note describing this trigger. | Reviews I am tagged on, sent to my team's review channel | +| `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. | {
"repository": "acme/payments-api"
} | +| `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, serialized as `whsec_` following Standard Webhooks. Returned only when the trigger is created and cannot be retrieved later. Store it securely. | 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..762c1d86 --- /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="GITHUB_1", delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "secret_test_123", + }, + }, description="Reviews I am tagged on, sent to my team's review channel", inputs={ + "repository": "acme/payments-api", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `preset_id` | *str* | :heavy_check_mark: | ID of the preset to instantiate. | GITHUB_1 | +| `delivery` | [models.PlatformTriggerDelivery](../../models/platformtriggerdelivery.md) | :heavy_check_mark: | N/A | | +| `description` | *Optional[str]* | :heavy_minus_sign: | Optional note describing this trigger. | Reviews I am tagged on, sent to my team's review channel | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"repository": "acme/payments-api"
} | +| `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="Reviews I am tagged on, sent to my team's review channel", inputs={ + "repository": "acme/payments-api", + }, delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "secret_test_123", + }, + }) + + # 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. | Reviews I am tagged on, sent to my team's review channel | +| `inputs` | Dict[str, *Any*] | :heavy_minus_sign: | Values for the preset's inputs. | {
"repository": "acme/payments-api"
} | +| `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. github). | +| `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={ + "repository": "acme/payments-api", + }, 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.
| {
"repository": "acme/payments-api"
} | +| `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..83bc0af3 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,46 @@ 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_createop import ( + PlatformTriggersCreateTriggerWebhookEventRequest, + PlatformTriggersCreateTriggerWebhookEventRequestTypedDict, + ) + 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, @@ -1415,11 +1456,19 @@ PlatformChatPersonSourceType, PlatformChatPersonSourceTypedDict, ) + from .platformcontentschedulewebhookevent import ( + PlatformContentScheduleWebhookEvent, + PlatformContentScheduleWebhookEventTypedDict, + ) from .platformcontenttype import PlatformContentType from .platformdatasourcefilterinfo import ( PlatformDatasourceFilterInfo, PlatformDatasourceFilterInfoTypedDict, ) + from .platformdocumentchangewebhookevent import ( + PlatformDocumentChangeWebhookEvent, + PlatformDocumentChangeWebhookEventTypedDict, + ) from .platformfilter import PlatformFilter, PlatformFilterTypedDict from .platformfilterfieldinfo import ( PlatformFilterFieldInfo, @@ -1566,6 +1615,98 @@ 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 .platformtriggerpresetsummary import ( + PlatformTriggerPresetSummary, + PlatformTriggerPresetSummaryTypedDict, + ) + from .platformtriggerstatus import PlatformTriggerStatus + from .platformtriggerupdaterequest import ( + PlatformTriggerUpdateRequest, + PlatformTriggerUpdateRequestTypedDict, + ) + from .platformtriggerwebhookevent import ( + PlatformTriggerWebhookEvent, + PlatformTriggerWebhookEventTypedDict, + ) + 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 +2275,7 @@ "CalendarEvent", "CalendarEventEventType", "CalendarEventTypedDict", + "CalendarRoomBookingStatus", "CanonicalizingRegexType", "CanonicalizingRegexTypeTypedDict", "CategoryToResultSize", @@ -2995,9 +3137,13 @@ "PlatformChatPersonSource", "PlatformChatPersonSourceType", "PlatformChatPersonSourceTypedDict", + "PlatformContentScheduleWebhookEvent", + "PlatformContentScheduleWebhookEventTypedDict", "PlatformContentType", "PlatformDatasourceFilterInfo", "PlatformDatasourceFilterInfoTypedDict", + "PlatformDocumentChangeWebhookEvent", + "PlatformDocumentChangeWebhookEventTypedDict", "PlatformFilter", "PlatformFilterFieldInfo", "PlatformFilterFieldInfoTypedDict", @@ -3115,6 +3261,77 @@ "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", + "PlatformTriggerPresetSummary", + "PlatformTriggerPresetSummaryTypedDict", + "PlatformTriggerPresetTypedDict", + "PlatformTriggerPresetsEventsSearchRequest", + "PlatformTriggerPresetsEventsSearchRequestTypedDict", + "PlatformTriggerPresetsGetRequest", + "PlatformTriggerPresetsGetRequestTypedDict", + "PlatformTriggerPresetsInputValuesListRequest", + "PlatformTriggerPresetsInputValuesListRequestTypedDict", + "PlatformTriggerPresetsListRequest", + "PlatformTriggerPresetsListRequestTypedDict", + "PlatformTriggerStatus", + "PlatformTriggerTypedDict", + "PlatformTriggerUpdateRequest", + "PlatformTriggerUpdateRequestTypedDict", + "PlatformTriggerWebhookEvent", + "PlatformTriggerWebhookEventTypedDict", + "PlatformTriggerWithSecret", + "PlatformTriggerWithSecretTypedDict", + "PlatformTriggersCreateTriggerWebhookEventRequest", + "PlatformTriggersCreateTriggerWebhookEventRequestTypedDict", + "PlatformTriggersDeleteRequest", + "PlatformTriggersDeleteRequestTypedDict", + "PlatformTriggersEventsSearchRequest", + "PlatformTriggersEventsSearchRequestTypedDict", + "PlatformTriggersGetRequest", + "PlatformTriggersGetRequestTypedDict", + "PlatformTriggersListRequest", + "PlatformTriggersListRequestTypedDict", + "PlatformTriggersUpdateRequest", + "PlatformTriggersUpdateRequestTypedDict", "PlatformWarning", "PlatformWarningTypedDict", "PossibleValue", @@ -3615,6 +3832,7 @@ "CalendarEvent": ".calendarevent", "CalendarEventEventType": ".calendarevent", "CalendarEventTypedDict": ".calendarevent", + "CalendarRoomBookingStatus": ".calendarroombookingstatus", "CanonicalizingRegexType": ".canonicalizingregextype", "CanonicalizingRegexTypeTypedDict": ".canonicalizingregextype", "Chat": ".chat", @@ -4391,6 +4609,26 @@ "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", + "PlatformTriggersCreateTriggerWebhookEventRequest": ".platform_triggers_createop", + "PlatformTriggersCreateTriggerWebhookEventRequestTypedDict": ".platform_triggers_createop", + "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", @@ -4456,9 +4694,13 @@ "PlatformChatPersonSource": ".platformchatpersonsource", "PlatformChatPersonSourceType": ".platformchatpersonsource", "PlatformChatPersonSourceTypedDict": ".platformchatpersonsource", + "PlatformContentScheduleWebhookEvent": ".platformcontentschedulewebhookevent", + "PlatformContentScheduleWebhookEventTypedDict": ".platformcontentschedulewebhookevent", "PlatformContentType": ".platformcontenttype", "PlatformDatasourceFilterInfo": ".platformdatasourcefilterinfo", "PlatformDatasourceFilterInfoTypedDict": ".platformdatasourcefilterinfo", + "PlatformDocumentChangeWebhookEvent": ".platformdocumentchangewebhookevent", + "PlatformDocumentChangeWebhookEventTypedDict": ".platformdocumentchangewebhookevent", "PlatformFilter": ".platformfilter", "PlatformFilterTypedDict": ".platformfilter", "PlatformFilterFieldInfo": ".platformfilterfieldinfo", @@ -4546,6 +4788,57 @@ "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", + "PlatformTriggerPresetSummary": ".platformtriggerpresetsummary", + "PlatformTriggerPresetSummaryTypedDict": ".platformtriggerpresetsummary", + "PlatformTriggerStatus": ".platformtriggerstatus", + "PlatformTriggerUpdateRequest": ".platformtriggerupdaterequest", + "PlatformTriggerUpdateRequestTypedDict": ".platformtriggerupdaterequest", + "PlatformTriggerWebhookEvent": ".platformtriggerwebhookevent", + "PlatformTriggerWebhookEventTypedDict": ".platformtriggerwebhookevent", + "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..5b040fdc --- /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. github).""" + 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. github).""" + + 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_createop.py b/src/glean/api_client/models/platform_triggers_createop.py new file mode 100644 index 00000000..bcea934c --- /dev/null +++ b/src/glean/api_client/models/platform_triggers_createop.py @@ -0,0 +1,77 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerwebhookevent import ( + PlatformTriggerWebhookEvent, + PlatformTriggerWebhookEventTypedDict, +) +from glean.api_client.types import BaseModel +from glean.api_client.utils import FieldMetadata, HeaderMetadata, RequestMetadata +import pydantic +from typing_extensions import Annotated, TypedDict + + +class PlatformTriggersCreateTriggerWebhookEventRequestTypedDict(TypedDict): + webhook_id: str + r"""Opaque delivery ID. It remains stable across retries of the same event and can be used as an idempotency key.""" + webhook_timestamp: int + r"""Unix time in seconds when this delivery attempt was signed.""" + webhook_signature: str + r"""`v1,` followed by the standard Base64-encoded HMAC-SHA256 digest. To verify it, remove the + `whsec_` prefix from `signing_secret`, standard-Base64-decode the remainder, and use those + bytes as the HMAC key. Sign the UTF-8 bytes of `webhook-id + \".\" + webhook-timestamp + \".\" + + raw request body`. Verify the signature against the unmodified request body before + parsing JSON, and use a constant-time comparison. + + Fixed test vector (the raw body is one line with no trailing newline): + + - decoded signing key bytes (UTF-8; test only): `test_webhook_signing_secret_1234` + - `webhook-id`: `81e6dc877ac553ef96ecbc939c1e46431159491991ba55cd131fbd0e3746c6bc` + - `webhook-timestamp`: `1700000000` + - `raw request body`: `{\"version\":\"1\",\"trigger_id\":\"trigger_test_123\",\"datasource\":\"GITHUB\",\"reason\":\"REVIEW_REQUESTED\",\"doc_type\":\"pull\",\"event_type\":\"DOCUMENT_CHANGE\",\"doc_id\":\"GITHUB_pull_123\",\"view_url\":\"https://github.com/acme/payments-api/pull/123\",\"title\":\"Add retry backoff to the crawler\",\"event_time\":\"2025-04-23T11:00:00Z\"}` + - `webhook-signature`: `v1,JqvHW0dwAOSLndiwQdXLUS/P+2RvOO8x4sOWgA/w0Gs=` + + """ + platform_trigger_webhook_event: PlatformTriggerWebhookEventTypedDict + + +class PlatformTriggersCreateTriggerWebhookEventRequest(BaseModel): + webhook_id: Annotated[ + str, + pydantic.Field(alias="webhook-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] + r"""Opaque delivery ID. It remains stable across retries of the same event and can be used as an idempotency key.""" + + webhook_timestamp: Annotated[ + int, + pydantic.Field(alias="webhook-timestamp"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] + r"""Unix time in seconds when this delivery attempt was signed.""" + + webhook_signature: Annotated[ + str, + pydantic.Field(alias="webhook-signature"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] + r"""`v1,` followed by the standard Base64-encoded HMAC-SHA256 digest. To verify it, remove the + `whsec_` prefix from `signing_secret`, standard-Base64-decode the remainder, and use those + bytes as the HMAC key. Sign the UTF-8 bytes of `webhook-id + \".\" + webhook-timestamp + \".\" + + raw request body`. Verify the signature against the unmodified request body before + parsing JSON, and use a constant-time comparison. + + Fixed test vector (the raw body is one line with no trailing newline): + + - decoded signing key bytes (UTF-8; test only): `test_webhook_signing_secret_1234` + - `webhook-id`: `81e6dc877ac553ef96ecbc939c1e46431159491991ba55cd131fbd0e3746c6bc` + - `webhook-timestamp`: `1700000000` + - `raw request body`: `{\"version\":\"1\",\"trigger_id\":\"trigger_test_123\",\"datasource\":\"GITHUB\",\"reason\":\"REVIEW_REQUESTED\",\"doc_type\":\"pull\",\"event_type\":\"DOCUMENT_CHANGE\",\"doc_id\":\"GITHUB_pull_123\",\"view_url\":\"https://github.com/acme/payments-api/pull/123\",\"title\":\"Add retry backoff to the crawler\",\"event_time\":\"2025-04-23T11:00:00Z\"}` + - `webhook-signature`: `v1,JqvHW0dwAOSLndiwQdXLUS/P+2RvOO8x4sOWgA/w0Gs=` + + """ + + platform_trigger_webhook_event: Annotated[ + PlatformTriggerWebhookEvent, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] 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/platformcontentschedulewebhookevent.py b/src/glean/api_client/models/platformcontentschedulewebhookevent.py new file mode 100644 index 00000000..0b1d4cff --- /dev/null +++ b/src/glean/api_client/models/platformcontentschedulewebhookevent.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +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 PlatformContentScheduleWebhookEventTypedDict(TypedDict): + version: str + r"""Webhook payload schema version.""" + trigger_id: str + r"""ID of the Platform trigger that produced the event.""" + event_type: str + datasource: str + r"""Datasource the event originated from.""" + reason: str + 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.""" + time_offset_seconds: int + r"""Offset in seconds from the scheduled time at which the trigger fired.""" + event_time: NotRequired[datetime] + r"""Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available.""" + + +class PlatformContentScheduleWebhookEvent(BaseModel): + version: str + r"""Webhook payload schema version.""" + + trigger_id: str + r"""ID of the Platform trigger that produced the event.""" + + event_type: str + + datasource: str + r"""Datasource the event originated from.""" + + reason: str + 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.""" + + time_offset_seconds: int + r"""Offset in seconds from the scheduled time at which the trigger fired.""" + + event_time: Optional[datetime] = None + r"""Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_time"]) + 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/platformdocumentchangewebhookevent.py b/src/glean/api_client/models/platformdocumentchangewebhookevent.py new file mode 100644 index 00000000..a1eb453d --- /dev/null +++ b/src/glean/api_client/models/platformdocumentchangewebhookevent.py @@ -0,0 +1,87 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +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 PlatformDocumentChangeWebhookEventTypedDict(TypedDict): + version: str + r"""Webhook payload schema version.""" + trigger_id: str + r"""ID of the Platform trigger that produced the event.""" + event_type: str + datasource: str + r"""Datasource the event originated from.""" + reason: str + 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: NotRequired[datetime] + r"""Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available.""" + content: NotRequired[str] + r"""Email body content when the event is for an email document.""" + content_truncated: NotRequired[bool] + r"""Present and true when source content exceeded the delivery size limit.""" + + +class PlatformDocumentChangeWebhookEvent(BaseModel): + version: str + r"""Webhook payload schema version.""" + + trigger_id: str + r"""ID of the Platform trigger that produced the event.""" + + event_type: str + + datasource: str + r"""Datasource the event originated from.""" + + reason: str + 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: Optional[datetime] = None + r"""Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available.""" + + content: Optional[str] = None + r"""Email body content when the event is for an email document.""" + + content_truncated: Optional[bool] = None + r"""Present and true when source content exceeded the delivery size limit.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_time", "content", "content_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/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..84e4fb28 --- /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"""HTTPS 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"""HTTPS 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..5ba108c1 --- /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"""HTTPS 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"""HTTPS 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..816d5bab --- /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 happened at the source: the document's own change timestamp for a document change, and the scheduled time for a content schedule. Omitted when the source did not supply one.""" + + +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 happened at the source: the document's own change timestamp for a document change, and the scheduled time for a content schedule. Omitted when the source did not supply one.""" + + @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..60c4d72b --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetlistresponse.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformtriggerpresetsummary import ( + PlatformTriggerPresetSummary, + PlatformTriggerPresetSummaryTypedDict, +) +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[PlatformTriggerPresetSummaryTypedDict] + 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[PlatformTriggerPresetSummary] + 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/platformtriggerpresetsummary.py b/src/glean/api_client/models/platformtriggerpresetsummary.py new file mode 100644 index 00000000..64917154 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerpresetsummary.py @@ -0,0 +1,48 @@ +"""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 PlatformTriggerPresetSummaryTypedDict(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.""" + description: NotRequired[str] + r"""Human-readable description of when the preset fires.""" + + +class PlatformTriggerPresetSummary(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.""" + + 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/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/platformtriggerwebhookevent.py b/src/glean/api_client/models/platformtriggerwebhookevent.py new file mode 100644 index 00000000..b35bd478 --- /dev/null +++ b/src/glean/api_client/models/platformtriggerwebhookevent.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .platformcontentschedulewebhookevent import ( + PlatformContentScheduleWebhookEvent, + PlatformContentScheduleWebhookEventTypedDict, +) +from .platformdocumentchangewebhookevent import ( + PlatformDocumentChangeWebhookEvent, + PlatformDocumentChangeWebhookEventTypedDict, +) +from typing import Union +from typing_extensions import TypeAliasType + + +PlatformTriggerWebhookEventTypedDict = TypeAliasType( + "PlatformTriggerWebhookEventTypedDict", + Union[ + PlatformContentScheduleWebhookEventTypedDict, + PlatformDocumentChangeWebhookEventTypedDict, + ], +) +r"""Every delivered webhook is one of these two variants. A trigger with a cron schedule carries no document and so cannot be delivered over a webhook.""" + + +PlatformTriggerWebhookEvent = TypeAliasType( + "PlatformTriggerWebhookEvent", + Union[PlatformContentScheduleWebhookEvent, PlatformDocumentChangeWebhookEvent], +) +r"""Every delivered webhook is one of these two variants. A trigger with a cron schedule carries no document and so cannot be delivered over a webhook.""" diff --git a/src/glean/api_client/models/platformtriggerwithsecret.py b/src/glean/api_client/models/platformtriggerwithsecret.py new file mode 100644 index 00000000..43b0b789 --- /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, serialized as `whsec_` following Standard Webhooks. Returned only when the trigger is created and cannot be retrieved later. Store it securely.""" + 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, serialized as `whsec_` following Standard Webhooks. Returned only when the trigger is created and cannot be retrieved later. Store it securely.""" + + 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..d0546336 --- /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. github). + :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. github). + :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..ef94fda9 --- /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.PlatformTriggerPresetSummary{}, + 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..d7ae3c35 --- /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: "GITHUB_1", + Datasource: "github", + DisplayName: "Review requested from me", + Description: types.String("A review is requested from the trigger creator on a pull request"), + 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..78b89ebb --- /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: "acme/payments-api", + DisplayName: "acme/payments-api", + }, + }, + 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..0ad3c036 --- /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: "trigger_test_123", + PresetID: "GITHUB_1", + Description: types.String("Reviews I am tagged on, sent to my team's review channel"), + Status: components.PlatformTriggerStatusEnabled, + Inputs: map[string]any{ + "repository": "acme/payments-api", + }, + 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..8f7f2744 --- /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: "trigger_test_123", + PresetID: "GITHUB_1", + Description: types.String("Reviews I am tagged on, sent to my team's review channel"), + Status: components.PlatformTriggerStatusEnabled, + Inputs: map[string]any{ + "repository": "acme/payments-api", + }, + 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..83a0e25f --- /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.PlatformTriggerEventReasonReviewRequested, + DocType: "pull", + 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..7a0ab74b --- /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: "trigger_test_123", + PresetID: "GITHUB_1", + Description: types.String("Reviews I am tagged on, sent to my team's review channel"), + Status: components.PlatformTriggerStatusEnabled, + Inputs: map[string]any{ + "repository": "acme/payments-api", + }, + 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..f3569228 --- /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.PlatformTriggerEventReasonReviewRequested, + DocType: "pull", + 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/callbacks/platformtriggerscreate.go b/tests/mockserver/internal/sdk/models/callbacks/platformtriggerscreate.go new file mode 100644 index 00000000..94995cae --- /dev/null +++ b/tests/mockserver/internal/sdk/models/callbacks/platformtriggerscreate.go @@ -0,0 +1,69 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package callbacks + +import ( + "mockserver/internal/sdk/models/components" +) + +type PlatformTriggersCreateTriggerWebhookEventResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` +} + +func (o *PlatformTriggersCreateTriggerWebhookEventResponse) GetHTTPMeta() components.HTTPMetadata { + if o == nil { + return components.HTTPMetadata{} + } + return o.HTTPMeta +} + +type PlatformTriggersCreateTriggerWebhookEventRequest struct { + // Opaque delivery ID. It remains stable across retries of the same event and can be used as an idempotency key. + WebhookID string `header:"style=simple,explode=false,name=webhook-id"` + // Unix time in seconds when this delivery attempt was signed. + WebhookTimestamp int64 `header:"style=simple,explode=false,name=webhook-timestamp"` + // `v1,` followed by the standard Base64-encoded HMAC-SHA256 digest. To verify it, remove the + // `whsec_` prefix from `signing_secret`, standard-Base64-decode the remainder, and use those + // bytes as the HMAC key. Sign the UTF-8 bytes of `webhook-id + "." + webhook-timestamp + "." + // + raw request body`. Verify the signature against the unmodified request body before + // parsing JSON, and use a constant-time comparison. + // + // Fixed test vector (the raw body is one line with no trailing newline): + // + // - decoded signing key bytes (UTF-8; test only): `test_webhook_signing_secret_1234` + // - `webhook-id`: `81e6dc877ac553ef96ecbc939c1e46431159491991ba55cd131fbd0e3746c6bc` + // - `webhook-timestamp`: `1700000000` + // - `raw request body`: `{"version":"1","trigger_id":"trigger_test_123","datasource":"GITHUB","reason":"REVIEW_REQUESTED","doc_type":"pull","event_type":"DOCUMENT_CHANGE","doc_id":"GITHUB_pull_123","view_url":"https://github.com/acme/payments-api/pull/123","title":"Add retry backoff to the crawler","event_time":"2025-04-23T11:00:00Z"}` + // - `webhook-signature`: `v1,JqvHW0dwAOSLndiwQdXLUS/P+2RvOO8x4sOWgA/w0Gs=` + // + WebhookSignature string `header:"style=simple,explode=false,name=webhook-signature"` + Body components.PlatformTriggerWebhookEvent `request:"mediaType=application/json"` +} + +func (o *PlatformTriggersCreateTriggerWebhookEventRequest) GetWebhookID() string { + if o == nil { + return "" + } + return o.WebhookID +} + +func (o *PlatformTriggersCreateTriggerWebhookEventRequest) GetWebhookTimestamp() int64 { + if o == nil { + return 0 + } + return o.WebhookTimestamp +} + +func (o *PlatformTriggersCreateTriggerWebhookEventRequest) GetWebhookSignature() string { + if o == nil { + return "" + } + return o.WebhookSignature +} + +func (o *PlatformTriggersCreateTriggerWebhookEventRequest) GetBody() components.PlatformTriggerWebhookEvent { + if o == nil { + return components.PlatformTriggerWebhookEvent{} + } + return o.Body +} 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/platformcontentschedulewebhookevent.go b/tests/mockserver/internal/sdk/models/components/platformcontentschedulewebhookevent.go new file mode 100644 index 00000000..1bd0c5a4 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformcontentschedulewebhookevent.go @@ -0,0 +1,120 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PlatformContentScheduleWebhookEvent struct { + // Webhook payload schema version. + Version string `json:"version"` + // ID of the Platform trigger that produced the event. + TriggerID string `json:"trigger_id"` + EventType string `json:"event_type"` + // Datasource the event originated from. + Datasource string `json:"datasource"` + // Why the event fired. + Reason string `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"` + // Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available. + EventTime *time.Time `json:"event_time,omitempty"` + // Offset in seconds from the scheduled time at which the trigger fired. + TimeOffsetSeconds int `json:"time_offset_seconds"` +} + +func (p PlatformContentScheduleWebhookEvent) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformContentScheduleWebhookEvent) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"version", "trigger_id", "event_type", "datasource", "reason", "doc_type", "doc_id", "view_url", "title", "time_offset_seconds"}); err != nil { + return err + } + return nil +} + +func (o *PlatformContentScheduleWebhookEvent) GetVersion() string { + if o == nil { + return "" + } + return o.Version +} + +func (o *PlatformContentScheduleWebhookEvent) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +func (o *PlatformContentScheduleWebhookEvent) GetEventType() string { + if o == nil { + return "" + } + return o.EventType +} + +func (o *PlatformContentScheduleWebhookEvent) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PlatformContentScheduleWebhookEvent) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +func (o *PlatformContentScheduleWebhookEvent) GetDocType() string { + if o == nil { + return "" + } + return o.DocType +} + +func (o *PlatformContentScheduleWebhookEvent) GetDocID() string { + if o == nil { + return "" + } + return o.DocID +} + +func (o *PlatformContentScheduleWebhookEvent) GetViewURL() string { + if o == nil { + return "" + } + return o.ViewURL +} + +func (o *PlatformContentScheduleWebhookEvent) GetTitle() string { + if o == nil { + return "" + } + return o.Title +} + +func (o *PlatformContentScheduleWebhookEvent) GetEventTime() *time.Time { + if o == nil { + return nil + } + return o.EventTime +} + +func (o *PlatformContentScheduleWebhookEvent) GetTimeOffsetSeconds() int { + if o == nil { + return 0 + } + return o.TimeOffsetSeconds +} diff --git a/tests/mockserver/internal/sdk/models/components/platformdocumentchangewebhookevent.go b/tests/mockserver/internal/sdk/models/components/platformdocumentchangewebhookevent.go new file mode 100644 index 00000000..790da9be --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformdocumentchangewebhookevent.go @@ -0,0 +1,129 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "mockserver/internal/sdk/utils" + "time" +) + +type PlatformDocumentChangeWebhookEvent struct { + // Webhook payload schema version. + Version string `json:"version"` + // ID of the Platform trigger that produced the event. + TriggerID string `json:"trigger_id"` + EventType string `json:"event_type"` + // Datasource the event originated from. + Datasource string `json:"datasource"` + // Why the event fired. + Reason string `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"` + // Relevant event time. Document changes use the source-observed time when available and otherwise the document ingestion time; content schedules use the scheduled time. Omitted when no timestamp is available. + EventTime *time.Time `json:"event_time,omitempty"` + // Email body content when the event is for an email document. + Content *string `json:"content,omitempty"` + // Present and true when source content exceeded the delivery size limit. + ContentTruncated *bool `json:"content_truncated,omitempty"` +} + +func (p PlatformDocumentChangeWebhookEvent) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(p, "", false) +} + +func (p *PlatformDocumentChangeWebhookEvent) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &p, "", false, []string{"version", "trigger_id", "event_type", "datasource", "reason", "doc_type", "doc_id", "view_url", "title"}); err != nil { + return err + } + return nil +} + +func (o *PlatformDocumentChangeWebhookEvent) GetVersion() string { + if o == nil { + return "" + } + return o.Version +} + +func (o *PlatformDocumentChangeWebhookEvent) GetTriggerID() string { + if o == nil { + return "" + } + return o.TriggerID +} + +func (o *PlatformDocumentChangeWebhookEvent) GetEventType() string { + if o == nil { + return "" + } + return o.EventType +} + +func (o *PlatformDocumentChangeWebhookEvent) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PlatformDocumentChangeWebhookEvent) GetReason() string { + if o == nil { + return "" + } + return o.Reason +} + +func (o *PlatformDocumentChangeWebhookEvent) GetDocType() string { + if o == nil { + return "" + } + return o.DocType +} + +func (o *PlatformDocumentChangeWebhookEvent) GetDocID() string { + if o == nil { + return "" + } + return o.DocID +} + +func (o *PlatformDocumentChangeWebhookEvent) GetViewURL() string { + if o == nil { + return "" + } + return o.ViewURL +} + +func (o *PlatformDocumentChangeWebhookEvent) GetTitle() string { + if o == nil { + return "" + } + return o.Title +} + +func (o *PlatformDocumentChangeWebhookEvent) GetEventTime() *time.Time { + if o == nil { + return nil + } + return o.EventTime +} + +func (o *PlatformDocumentChangeWebhookEvent) GetContent() *string { + if o == nil { + return nil + } + return o.Content +} + +func (o *PlatformDocumentChangeWebhookEvent) GetContentTruncated() *bool { + if o == nil { + return nil + } + return o.ContentTruncated +} 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..07fb9833 --- /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 { + // HTTPS 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..eae6a26f --- /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 { + // HTTPS 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..30f4d2fc --- /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 happened at the source: the document's own change timestamp for a document change, and the scheduled time for a content schedule. Omitted when the source did not supply one. + 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..6e6cc206 --- /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 []PlatformTriggerPresetSummary `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() []PlatformTriggerPresetSummary { + if o == nil { + return []PlatformTriggerPresetSummary{} + } + 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/platformtriggerpresetsummary.go b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetsummary.go new file mode 100644 index 00000000..101983d3 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerpresetsummary.go @@ -0,0 +1,42 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type PlatformTriggerPresetSummary 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"` +} + +func (o *PlatformTriggerPresetSummary) GetPresetID() string { + if o == nil { + return "" + } + return o.PresetID +} + +func (o *PlatformTriggerPresetSummary) GetDatasource() string { + if o == nil { + return "" + } + return o.Datasource +} + +func (o *PlatformTriggerPresetSummary) GetDisplayName() string { + if o == nil { + return "" + } + return o.DisplayName +} + +func (o *PlatformTriggerPresetSummary) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} 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/platformtriggerwebhookevent.go b/tests/mockserver/internal/sdk/models/components/platformtriggerwebhookevent.go new file mode 100644 index 00000000..e5ffab60 --- /dev/null +++ b/tests/mockserver/internal/sdk/models/components/platformtriggerwebhookevent.go @@ -0,0 +1,73 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "errors" + "fmt" + "mockserver/internal/sdk/utils" +) + +type PlatformTriggerWebhookEventType string + +const ( + PlatformTriggerWebhookEventTypePlatformDocumentChangeWebhookEvent PlatformTriggerWebhookEventType = "PlatformDocumentChangeWebhookEvent" + PlatformTriggerWebhookEventTypePlatformContentScheduleWebhookEvent PlatformTriggerWebhookEventType = "PlatformContentScheduleWebhookEvent" +) + +// PlatformTriggerWebhookEvent - Every delivered webhook is one of these two variants. A trigger with a cron schedule carries no document and so cannot be delivered over a webhook. +type PlatformTriggerWebhookEvent struct { + PlatformDocumentChangeWebhookEvent *PlatformDocumentChangeWebhookEvent `queryParam:"inline"` + PlatformContentScheduleWebhookEvent *PlatformContentScheduleWebhookEvent `queryParam:"inline"` + + Type PlatformTriggerWebhookEventType +} + +func CreatePlatformTriggerWebhookEventPlatformDocumentChangeWebhookEvent(platformDocumentChangeWebhookEvent PlatformDocumentChangeWebhookEvent) PlatformTriggerWebhookEvent { + typ := PlatformTriggerWebhookEventTypePlatformDocumentChangeWebhookEvent + + return PlatformTriggerWebhookEvent{ + PlatformDocumentChangeWebhookEvent: &platformDocumentChangeWebhookEvent, + Type: typ, + } +} + +func CreatePlatformTriggerWebhookEventPlatformContentScheduleWebhookEvent(platformContentScheduleWebhookEvent PlatformContentScheduleWebhookEvent) PlatformTriggerWebhookEvent { + typ := PlatformTriggerWebhookEventTypePlatformContentScheduleWebhookEvent + + return PlatformTriggerWebhookEvent{ + PlatformContentScheduleWebhookEvent: &platformContentScheduleWebhookEvent, + Type: typ, + } +} + +func (u *PlatformTriggerWebhookEvent) UnmarshalJSON(data []byte) error { + + var platformContentScheduleWebhookEvent PlatformContentScheduleWebhookEvent = PlatformContentScheduleWebhookEvent{} + if err := utils.UnmarshalJSON(data, &platformContentScheduleWebhookEvent, "", true, nil); err == nil { + u.PlatformContentScheduleWebhookEvent = &platformContentScheduleWebhookEvent + u.Type = PlatformTriggerWebhookEventTypePlatformContentScheduleWebhookEvent + return nil + } + + var platformDocumentChangeWebhookEvent PlatformDocumentChangeWebhookEvent = PlatformDocumentChangeWebhookEvent{} + if err := utils.UnmarshalJSON(data, &platformDocumentChangeWebhookEvent, "", true, nil); err == nil { + u.PlatformDocumentChangeWebhookEvent = &platformDocumentChangeWebhookEvent + u.Type = PlatformTriggerWebhookEventTypePlatformDocumentChangeWebhookEvent + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for PlatformTriggerWebhookEvent", string(data)) +} + +func (u PlatformTriggerWebhookEvent) MarshalJSON() ([]byte, error) { + if u.PlatformDocumentChangeWebhookEvent != nil { + return utils.MarshalJSON(u.PlatformDocumentChangeWebhookEvent, "", true) + } + + if u.PlatformContentScheduleWebhookEvent != nil { + return utils.MarshalJSON(u.PlatformContentScheduleWebhookEvent, "", true) + } + + return nil, errors.New("could not marshal union type PlatformTriggerWebhookEvent: all fields are null") +} 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..0a610553 --- /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, serialized as `whsec_` following Standard Webhooks. Returned only when the trigger is created and cannot be retrieved later. Store it securely. + 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..d73911f3 --- /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. github). + 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_messages.py b/tests/test_messages.py index 132005ec..636f01d3 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -18,7 +18,7 @@ def test_messages_messages(): res = glean.client.messages.retrieve( id_type=models.IDType.CONVERSATION_ID, id="", - datasource=models.Datasource.FACEBOOKWORKPLACE, + datasource=models.Datasource.GCHAT, timestamp_millis=558834, ) assert res is not None diff --git a/tests/test_summarize.py b/tests/test_summarize.py index 2cfa3243..63b4eb85 100644 --- a/tests/test_summarize.py +++ b/tests/test_summarize.py @@ -18,10 +18,10 @@ def test_summarize_summarize(): res = glean.client.documents.summarize( document_specs=[ { - "url": "https://livid-velocity.net", + "url": "https://dim-glider.com/", }, { - "url": "https://livid-velocity.net", + "id": "", }, ] ) diff --git a/tests/test_triggers.py b/tests/test_triggers.py new file mode 100644 index 00000000..35ec4a2b --- /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="GITHUB_1", + delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "secret_test_123", + }, + }, + description="Reviews I am tagged on, sent to my team's review channel", + inputs={ + "repository": "acme/payments-api", + }, + ) + 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="Reviews I am tagged on, sent to my team's review channel", + inputs={ + "repository": "acme/payments-api", + }, + delivery={ + "webhook_url": "https://customer.app/webhook", + "auth": { + "type": models.PlatformTriggerAuthType.BEARER, + "secret": "secret_test_123", + }, + }, + ) + 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={ + "repository": "acme/payments-api", + }, + page_size=10, + ) + assert res is not None