cdk-serverless 3.0.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RestApiProps | cdk-serverless</title><meta name="description" content="Documentation for cdk-serverless"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">cdk-serverless</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">RestApiProps</a></li></ul><h1>Interface RestApiProps&lt;OPS&gt;</h1></div><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">RestApiProps</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#ops">OPS</a><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#additionalenv">additionalEnv</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#apihostname">apiHostname</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#apiname">apiName</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#assetcdn">assetCdn</a><span class="tsd-signature-symbol">?:</span> <a href="../classes/AssetCdn.html" class="tsd-signature-type tsd-kind-class">AssetCdn</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#authentication">authentication</a><span class="tsd-signature-symbol">?:</span> <a href="IJwtAuthentication.html" class="tsd-signature-type tsd-kind-interface">IJwtAuthentication</a> <span class="tsd-signature-symbol">|</span> <a href="ICognitoAuthentication.html" class="tsd-signature-type tsd-kind-interface">ICognitoAuthentication</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#autogenerateroutes">autoGenerateRoutes</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#cors">cors</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#definitionfilename">definitionFileName</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#domainname">domainName</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#hostedzone">hostedZone</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">IHostedZone</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#lambdaoptions">lambdaOptions</a><span class="tsd-signature-symbol">?:</span> <a href="../types/LambdaOptions.html" class="tsd-signature-type tsd-kind-type-alias">LambdaOptions</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#lambdaoptionsbyoperation">lambdaOptionsByOperation</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">operationId</span> <span class="tsd-signature-keyword">in</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">?:</span> <a href="../types/LambdaOptions.html" class="tsd-signature-type tsd-kind-type-alias">LambdaOptions</a><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#lambdatracing">lambdaTracing</a><span class="tsd-signature-symbol">?:</span> <a href="LambdaTracingOptions.html" class="tsd-signature-type tsd-kind-interface">LambdaTracingOptions</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#monitoring">monitoring</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#restapiprops">restApiProps</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">RestApiBaseProps</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#singletabledatastore">singleTableDatastore</a><span class="tsd-signature-symbol">?:</span> <a href="ISingleTableDatastore.html" class="tsd-signature-type tsd-kind-interface">ISingleTableDatastore</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#stagename">stageName</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="ops"><span class="tsd-kind-type-parameter">OPS</span></span></li></ul></section><section class="tsd-panel tsd-hierarchy" data-refl="508"><h4>Hierarchy (<a href="../hierarchy.html#RestApiProps">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="BaseApiProps.html" class="tsd-signature-type tsd-kind-interface">BaseApiProps</a><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">RestApiProps</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#additionalenv" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>additional<wbr/>Env?</span></a>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>RestApiProps | cdk-serverless</title><meta name="description" content="Documentation for cdk-serverless"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">cdk-serverless</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">RestApiProps</a></li></ul><h1>Interface RestApiProps&lt;OPS&gt;</h1></div><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">RestApiProps</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#ops">OPS</a><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#additionalenv">additionalEnv</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#anonymousoperations">anonymousOperations</a><span class="tsd-signature-symbol">?:</span> (<span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#ops">OPS</a>)<span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#apihostname">apiHostname</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#apiname">apiName</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#assetcdn">assetCdn</a><span class="tsd-signature-symbol">?:</span> <a href="../classes/AssetCdn.html" class="tsd-signature-type tsd-kind-class">AssetCdn</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#authentication">authentication</a><span class="tsd-signature-symbol">?:</span> <a href="IJwtAuthentication.html" class="tsd-signature-type tsd-kind-interface">IJwtAuthentication</a> <span class="tsd-signature-symbol">|</span> <a href="ICognitoAuthentication.html" class="tsd-signature-type tsd-kind-interface">ICognitoAuthentication</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#autogenerateroutes">autoGenerateRoutes</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#cors">cors</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#definitionfilename">definitionFileName</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#domainname">domainName</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#hostedzone">hostedZone</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">IHostedZone</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#jwtauthorizertype">jwtAuthorizerType</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;token&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;request&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#lambdaoptions">lambdaOptions</a><span class="tsd-signature-symbol">?:</span> <a href="../types/LambdaOptions.html" class="tsd-signature-type tsd-kind-type-alias">LambdaOptions</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#lambdaoptionsbyoperation">lambdaOptionsByOperation</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">operationId</span> <span class="tsd-signature-keyword">in</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">?:</span> <a href="../types/LambdaOptions.html" class="tsd-signature-type tsd-kind-type-alias">LambdaOptions</a><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#lambdatracing">lambdaTracing</a><span class="tsd-signature-symbol">?:</span> <a href="LambdaTracingOptions.html" class="tsd-signature-type tsd-kind-interface">LambdaTracingOptions</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#monitoring">monitoring</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#restapiprops">restApiProps</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">RestApiBaseProps</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#singletabledatastore">singleTableDatastore</a><span class="tsd-signature-symbol">?:</span> <a href="ISingleTableDatastore.html" class="tsd-signature-type tsd-kind-interface">ISingleTableDatastore</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#stagename">stageName</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="ops"><span class="tsd-kind-type-parameter">OPS</span></span></li></ul></section><section class="tsd-panel tsd-hierarchy" data-refl="508"><h4>Hierarchy (<a href="../hierarchy.html#RestApiProps">View Summary</a>)</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><a href="BaseApiProps.html" class="tsd-signature-type tsd-kind-interface">BaseApiProps</a><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">RestApiProps</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#additionalenv" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>additional<wbr/>Env?</span></a>
2
+ <a href="#anonymousoperations" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>anonymous<wbr/>Operations?</span></a>
2
3
  <a href="#apihostname" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>api<wbr/>Hostname?</span></a>
3
4
  <a href="#apiname" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>api<wbr/>Name</span></a>
4
5
  <a href="#assetcdn" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>asset<wbr/>Cdn?</span></a>
@@ -8,6 +9,7 @@
8
9
  <a href="#definitionfilename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>definition<wbr/>File<wbr/>Name</span></a>
9
10
  <a href="#domainname" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>domain<wbr/>Name?</span></a>
10
11
  <a href="#hostedzone" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>hosted<wbr/>Zone?</span></a>
12
+ <a href="#jwtauthorizertype" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>jwt<wbr/>Authorizer<wbr/>Type?</span></a>
11
13
  <a href="#lambdaoptions" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Options?</span></a>
12
14
  <a href="#lambdaoptionsbyoperation" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Options<wbr/>By<wbr/>Operation?</span></a>
13
15
  <a href="#lambdatracing" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Tracing?</span></a>
@@ -16,51 +18,74 @@
16
18
  <a href="#singletabledatastore" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>single<wbr/>Table<wbr/>Datastore?</span></a>
17
19
  <a href="#stagename" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>stage<wbr/>Name</span></a>
18
20
  </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="additionalenv"><code class="tsd-tag">Optional</code><span>additional<wbr/>Env</span><a href="#additionalenv" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">additionalEnv</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-index-signature">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>Additional environment variables of all Lambda functions</p>
19
- </div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#additionalenv">additionalEnv</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="apihostname"><code class="tsd-tag">Optional</code><span>api<wbr/>Hostname</span><a href="#apihostname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">apiHostname</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Hostname of the API if a domain name is specified</p>
20
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default">Default<a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">api</span>
21
+ </div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#additionalenv">additionalEnv</a></p></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="anonymousoperations"><code class="tsd-tag">Optional</code><span>anonymous<wbr/>Operations</span><a href="#anonymousoperations" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">anonymousOperations</span><span class="tsd-signature-symbol">?:</span> (<span class="tsd-signature-keyword">keyof</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#ops">OPS</a>)<span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>A list of operation IDs that should skip the authorizer entirely.
22
+ These operations will have <code>security: []</code> in the OpenAPI spec, meaning
23
+ they are publicly accessible without authentication.</p>
24
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default">Default<a href="#default" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-4">no</span><span class="hl-1"> </span><span class="hl-4">anonymous</span><span class="hl-1"> </span><span class="hl-4">operations</span>
25
+ </code><button type="button">Copy</button></pre>
26
+
27
+ </div></div></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="apihostname"><code class="tsd-tag">Optional</code><span>api<wbr/>Hostname</span><a href="#apihostname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">apiHostname</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Hostname of the API if a domain name is specified</p>
28
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-1">Default<a href="#default-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">api</span>
21
29
  </code><button type="button">Copy</button></pre>
22
30
 
23
31
  </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#apihostname">apiHostname</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="apiname"><span>api<wbr/>Name</span><a href="#apiname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">apiName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Name of the API</p>
24
32
  </div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#apiname">apiName</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="assetcdn"><code class="tsd-tag">Optional</code><span>asset<wbr/>Cdn</span><a href="#assetcdn" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">assetCdn</span><span class="tsd-signature-symbol">?:</span> <a href="../classes/AssetCdn.html" class="tsd-signature-type tsd-kind-class">AssetCdn</a></div><div class="tsd-comment tsd-typography"><p>Configure a content delivery network for static assets</p>
25
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-1">Default<a href="#default-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">none</span>
33
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-2">Default<a href="#default-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">none</span>
26
34
  </code><button type="button">Copy</button></pre>
27
35
 
28
36
  </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#assetcdn">assetCdn</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="authentication"><code class="tsd-tag">Optional</code><span>authentication</span><a href="#authentication" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">authentication</span><span class="tsd-signature-symbol">?:</span> <a href="IJwtAuthentication.html" class="tsd-signature-type tsd-kind-interface">IJwtAuthentication</a> <span class="tsd-signature-symbol">|</span> <a href="ICognitoAuthentication.html" class="tsd-signature-type tsd-kind-interface">ICognitoAuthentication</a></div><div class="tsd-comment tsd-typography"><p>Use a Cognito user pool for authorization.
29
37
  Alternatively supply a JWT issuer and audience
30
38
  to use any other JWT-based authorization service.</p>
31
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-2">Default<a href="#default-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">none</span>
39
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-3">Default<a href="#default-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">none</span>
32
40
  </code><button type="button">Copy</button></pre>
33
41
 
34
42
  </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#authentication">authentication</a></p></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="autogenerateroutes"><code class="tsd-tag">Optional</code><span>auto<wbr/>Generate<wbr/>Routes</span><a href="#autogenerateroutes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">autoGenerateRoutes</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Generate routes for all endpoints configured in the openapi.yaml file</p>
35
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-3">Default<a href="#default-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">true</span>
43
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-4">Default<a href="#default-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">true</span>
36
44
  </code><button type="button">Copy</button></pre>
37
45
 
38
46
  </div></div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="cors"><span>cors</span><a href="#cors" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">cors</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="definitionfilename"><span>definition<wbr/>File<wbr/>Name</span><a href="#definitionfilename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">definitionFileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="domainname"><code class="tsd-tag">Optional</code><span>domain<wbr/>Name</span><a href="#domainname" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">domainName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Domain name of the API (e.g. <a href="http://example.com">example.com</a>)</p>
39
47
  <p>only one of hostedZone and domainName can be specified</p>
40
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-4">Default<a href="#default-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-4">No</span><span class="hl-1"> </span><span class="hl-4">custom</span><span class="hl-1"> </span><span class="hl-4">domain</span><span class="hl-1"> </span><span class="hl-4">is</span><span class="hl-1"> </span><span class="hl-4">configured</span>
48
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-5">Default<a href="#default-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-4">No</span><span class="hl-1"> </span><span class="hl-4">custom</span><span class="hl-1"> </span><span class="hl-4">domain</span><span class="hl-1"> </span><span class="hl-4">is</span><span class="hl-1"> </span><span class="hl-4">configured</span>
41
49
  </code><button type="button">Copy</button></pre>
42
50
 
43
51
  </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#domainname">domainName</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="hostedzone"><code class="tsd-tag">Optional</code><span>hosted<wbr/>Zone</span><a href="#hostedzone" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">hostedZone</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">IHostedZone</span></div><div class="tsd-comment tsd-typography"><p>Hosted Zone of the API (e.g. <a href="http://example.com">example.com</a>)</p>
44
52
  <p>only one of hostedZone and domainName can be specified</p>
45
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-5">Default<a href="#default-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-4">No</span><span class="hl-1"> </span><span class="hl-4">custom</span><span class="hl-1"> </span><span class="hl-4">domain</span><span class="hl-1"> </span><span class="hl-4">is</span><span class="hl-1"> </span><span class="hl-4">configured</span>
53
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-6">Default<a href="#default-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">- </span><span class="hl-4">No</span><span class="hl-1"> </span><span class="hl-4">custom</span><span class="hl-1"> </span><span class="hl-4">domain</span><span class="hl-1"> </span><span class="hl-4">is</span><span class="hl-1"> </span><span class="hl-4">configured</span>
54
+ </code><button type="button">Copy</button></pre>
55
+
56
+ </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#hostedzone">hostedZone</a></p></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="jwtauthorizertype"><code class="tsd-tag">Optional</code><span>jwt<wbr/>Authorizer<wbr/>Type</span><a href="#jwtauthorizertype" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">jwtAuthorizerType</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;token&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;request&quot;</span></div><div class="tsd-comment tsd-typography"><p>Controls whether the JWT Lambda authorizer uses the TOKEN or REQUEST type.</p>
57
+ <p><strong>token (default):</strong> The API Gateway validates that the Authorization header is present
58
+ before invoking the Lambda authorizer. If the header is missing, API Gateway immediately
59
+ returns 401 without invoking the Lambda. This is cheaper for unauthenticated requests
60
+ because no Lambda invocation occurs, but it does not support optional authentication
61
+ (every request must carry a token or be rejected).</p>
62
+ <p><strong>request:</strong> The API Gateway always invokes the Lambda authorizer regardless of whether
63
+ the Authorization header is present. This enables optional authentication: the Lambda
64
+ can inspect the request, return Allow with an anonymous principal when no token is
65
+ provided, and return Allow with user claims when a valid token is present. The trade-off
66
+ is that you pay for a Lambda invocation on every request, including unauthenticated ones.</p>
67
+ <p>Use 'request' when you need endpoints that behave differently for authenticated vs
68
+ anonymous users (e.g., personalized responses for logged-in users, generic responses
69
+ for guests) without splitting them into separate operations.</p>
70
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-7">Default<a href="#default-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-2">&#39;token&#39;</span>
46
71
  </code><button type="button">Copy</button></pre>
47
72
 
48
- </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#hostedzone">hostedZone</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="lambdaoptions"><code class="tsd-tag">Optional</code><span>lambda<wbr/>Options</span><a href="#lambdaoptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">lambdaOptions</span><span class="tsd-signature-symbol">?:</span> <a href="../types/LambdaOptions.html" class="tsd-signature-type tsd-kind-type-alias">LambdaOptions</a></div><div class="tsd-comment tsd-typography"><p>additional options for the underlying Lambda function construct</p>
73
+ </div></div></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="lambdaoptions"><code class="tsd-tag">Optional</code><span>lambda<wbr/>Options</span><a href="#lambdaoptions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">lambdaOptions</span><span class="tsd-signature-symbol">?:</span> <a href="../types/LambdaOptions.html" class="tsd-signature-type tsd-kind-type-alias">LambdaOptions</a></div><div class="tsd-comment tsd-typography"><p>additional options for the underlying Lambda function construct</p>
49
74
  </div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#lambdaoptions">lambdaOptions</a></p></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="lambdaoptionsbyoperation"><code class="tsd-tag">Optional</code><span>lambda<wbr/>Options<wbr/>By<wbr/>Operation</span><a href="#lambdaoptionsbyoperation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">lambdaOptionsByOperation</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">operationId</span> <span class="tsd-signature-keyword">in</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">?:</span> <a href="../types/LambdaOptions.html" class="tsd-signature-type tsd-kind-type-alias">LambdaOptions</a><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>additional options for the underlying Lambda function construct per operationId</p>
50
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-6">Default<a href="#default-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">-</span>
75
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-8">Default<a href="#default-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">-</span>
51
76
  </code><button type="button">Copy</button></pre>
52
77
 
53
78
  </div></div></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="lambdatracing"><code class="tsd-tag">Optional</code><span>lambda<wbr/>Tracing</span><a href="#lambdatracing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">lambdaTracing</span><span class="tsd-signature-symbol">?:</span> <a href="LambdaTracingOptions.html" class="tsd-signature-type tsd-kind-interface">LambdaTracingOptions</a></div><div class="tsd-comment tsd-typography"><p>Tracing config for the generated Lambda functions</p>
54
79
  </div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#lambdatracing">lambdaTracing</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="monitoring"><code class="tsd-tag">Optional</code><span>monitoring</span><a href="#monitoring" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">monitoring</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Configure CloudWatch Dashboard for the API and the Lambda functions</p>
55
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-7">Default<a href="#default-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">true</span>
80
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-9">Default<a href="#default-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">true</span>
56
81
  </code><button type="button">Copy</button></pre>
57
82
 
58
83
  </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#monitoring">monitoring</a></p></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="restapiprops"><code class="tsd-tag">Optional</code><span>rest<wbr/>Api<wbr/>Props</span><a href="#restapiprops" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">restApiProps</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">RestApiBaseProps</span></div><div class="tsd-comment tsd-typography"><p>custom options for the created HttpApi</p>
59
- </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-8">Default<a href="#default-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">-</span>
84
+ </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-10">Default<a href="#default-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-1">-</span>
60
85
  </code><button type="button">Copy</button></pre>
61
86
 
62
- </div></div></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="singletabledatastore"><code class="tsd-tag">Optional</code><span>single<wbr/>Table<wbr/>Datastore</span><a href="#singletabledatastore" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">singleTableDatastore</span><span class="tsd-signature-symbol">?:</span> <a href="ISingleTableDatastore.html" class="tsd-signature-type tsd-kind-interface">ISingleTableDatastore</a></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-9">Default<a href="#default-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">none</span>
87
+ </div></div></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="singletabledatastore"><code class="tsd-tag">Optional</code><span>single<wbr/>Table<wbr/>Datastore</span><a href="#singletabledatastore" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">singleTableDatastore</span><span class="tsd-signature-symbol">?:</span> <a href="ISingleTableDatastore.html" class="tsd-signature-type tsd-kind-interface">ISingleTableDatastore</a></div><div class="tsd-comment tsd-typography"><div class="tsd-tag-default"><h4 class="tsd-anchor-link" id="default-11">Default<a href="#default-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">none</span>
63
88
  </code><button type="button">Copy</button></pre>
64
89
 
65
90
  </div></div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#singletabledatastore">singleTableDatastore</a></p></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="stagename"><span>stage<wbr/>Name</span><a href="#stagename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">stageName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Deployment stage (e.g. dev)</p>
66
- </div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#stagename">stageName</a></p></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#additionalenv" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>additional<wbr/>Env</span></a><a href="#apihostname" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>api<wbr/>Hostname</span></a><a href="#apiname" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>api<wbr/>Name</span></a><a href="#assetcdn" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>asset<wbr/>Cdn</span></a><a href="#authentication" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authentication</span></a><a href="#autogenerateroutes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>auto<wbr/>Generate<wbr/>Routes</span></a><a href="#cors"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cors</span></a><a href="#definitionfilename"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>definition<wbr/>File<wbr/>Name</span></a><a href="#domainname" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>domain<wbr/>Name</span></a><a href="#hostedzone" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>hosted<wbr/>Zone</span></a><a href="#lambdaoptions" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Options</span></a><a href="#lambdaoptionsbyoperation"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Options<wbr/>By<wbr/>Operation</span></a><a href="#lambdatracing" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Tracing</span></a><a href="#monitoring" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>monitoring</span></a><a href="#restapiprops"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>rest<wbr/>Api<wbr/>Props</span></a><a href="#singletabledatastore" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>single<wbr/>Table<wbr/>Datastore</span></a><a href="#stagename" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>stage<wbr/>Name</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">cdk-serverless</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
91
+ </div><aside class="tsd-sources"><p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#stagename">stageName</a></p></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#additionalenv" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>additional<wbr/>Env</span></a><a href="#anonymousoperations"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>anonymous<wbr/>Operations</span></a><a href="#apihostname" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>api<wbr/>Hostname</span></a><a href="#apiname" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>api<wbr/>Name</span></a><a href="#assetcdn" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>asset<wbr/>Cdn</span></a><a href="#authentication" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authentication</span></a><a href="#autogenerateroutes"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>auto<wbr/>Generate<wbr/>Routes</span></a><a href="#cors"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cors</span></a><a href="#definitionfilename"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>definition<wbr/>File<wbr/>Name</span></a><a href="#domainname" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>domain<wbr/>Name</span></a><a href="#hostedzone" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>hosted<wbr/>Zone</span></a><a href="#jwtauthorizertype"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>jwt<wbr/>Authorizer<wbr/>Type</span></a><a href="#lambdaoptions" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Options</span></a><a href="#lambdaoptionsbyoperation"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Options<wbr/>By<wbr/>Operation</span></a><a href="#lambdatracing" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lambda<wbr/>Tracing</span></a><a href="#monitoring" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>monitoring</span></a><a href="#restapiprops"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>rest<wbr/>Api<wbr/>Props</span></a><a href="#singletabledatastore" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>single<wbr/>Table<wbr/>Datastore</span></a><a href="#stagename" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>stage<wbr/>Name</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">cdk-serverless</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -26,6 +26,36 @@ export interface RestApiProps<OPS> extends BaseApiProps {
26
26
  };
27
27
  definitionFileName: string;
28
28
  cors: boolean;
29
+ /**
30
+ * A list of operation IDs that should skip the authorizer entirely.
31
+ * These operations will have `security: []` in the OpenAPI spec, meaning
32
+ * they are publicly accessible without authentication.
33
+ *
34
+ * @default - no anonymous operations
35
+ */
36
+ anonymousOperations?: (keyof OPS)[];
37
+ /**
38
+ * Controls whether the JWT Lambda authorizer uses the TOKEN or REQUEST type.
39
+ *
40
+ * **token (default):** The API Gateway validates that the Authorization header is present
41
+ * before invoking the Lambda authorizer. If the header is missing, API Gateway immediately
42
+ * returns 401 without invoking the Lambda. This is cheaper for unauthenticated requests
43
+ * because no Lambda invocation occurs, but it does not support optional authentication
44
+ * (every request must carry a token or be rejected).
45
+ *
46
+ * **request:** The API Gateway always invokes the Lambda authorizer regardless of whether
47
+ * the Authorization header is present. This enables optional authentication: the Lambda
48
+ * can inspect the request, return Allow with an anonymous principal when no token is
49
+ * provided, and return Allow with user claims when a valid token is present. The trade-off
50
+ * is that you pay for a Lambda invocation on every request, including unauthenticated ones.
51
+ *
52
+ * Use 'request' when you need endpoints that behave differently for authenticated vs
53
+ * anonymous users (e.g., personalized responses for logged-in users, generic responses
54
+ * for guests) without splitting them into separate operations.
55
+ *
56
+ * @default 'token'
57
+ */
58
+ jwtAuthorizerType?: 'token' | 'request';
29
59
  }
30
60
  /**
31
61
  * The RestApi construct sets up an AWS API Gateway REST API using OpenAPI specification.
@@ -66,6 +96,25 @@ export declare class RestApi<PATHS, OPS> extends BaseApi {
66
96
  * @private
67
97
  */
68
98
  private _functions;
99
+ private readonly apiMethods;
100
+ /**
101
+ * The JWT authorizer Lambda function, if JWT authentication is configured.
102
+ * Stored so the invoke permission can be granted after the SpecRestApi is created.
103
+ * @private
104
+ */
105
+ private _authorizerFn?;
106
+ /**
107
+ * Set of operationIds that should have security disabled (security: []).
108
+ * @private
109
+ */
110
+ private _anonymousOperations;
111
+ /**
112
+ * Stores the original per-operation security arrays as assigned by patchSecurity,
113
+ * keyed by operationId. Used by setAnonymousOperations to restore security on
114
+ * operations removed from the anonymous set.
115
+ * @private
116
+ */
117
+ private _originalOperationSecurity;
69
118
  /**
70
119
  * Creates an instance of RestApi.
71
120
  *
@@ -94,9 +143,60 @@ export declare class RestApi<PATHS, OPS> extends BaseApi {
94
143
  * @param op the function to call for every function
95
144
  */
96
145
  modifyOperationFunctions(operationIds: (keyof OPS)[], op: (fn: LambdaFunction) => void): void;
146
+ /**
147
+ * Replace the full set of anonymous operations.
148
+ * Anonymous operations will have `security: []` applied in the OpenAPI spec,
149
+ * making them publicly accessible without authentication.
150
+ *
151
+ * Since CDK serializes the OpenAPI spec at synth time (fromInline stores the
152
+ * object reference), mutations after SpecRestApi construction still take effect.
153
+ *
154
+ * @param operationIds - The operation IDs to mark as anonymous. Replaces any previously set anonymous operations.
155
+ */
156
+ setAnonymousOperations(operationIds: (keyof OPS)[]): void;
157
+ /**
158
+ * Add additional operations to the set of anonymous operations.
159
+ * Newly added operations will have `security: []` applied in the OpenAPI spec.
160
+ *
161
+ * Since CDK serializes the OpenAPI spec at synth time (fromInline stores the
162
+ * object reference), mutations after SpecRestApi construction still take effect.
163
+ *
164
+ * @param operationIds - The operation IDs to add to the anonymous set.
165
+ */
166
+ addAnonymousOperations(operationIds: (keyof OPS)[]): void;
167
+ /**
168
+ * Re-applies security settings to all operations based on the current anonymous set.
169
+ * Operations in the anonymous set get `security: []`; operations removed from the set
170
+ * have their original security restored.
171
+ * @private
172
+ */
173
+ private applyAnonymousSecurity;
174
+ /**
175
+ * Applies `security: []` only to the specified operations.
176
+ * @private
177
+ */
178
+ private applyAnonymousSecurityForOps;
97
179
  addRestResource<P extends keyof PATHS>(path: P, method: keyof PATHS[P]): LambdaFunction | undefined;
98
180
  addCustomRestResource(operation: OperationObject, method: string, description: string, additionalLambdaOptions?: LambdaOptions): LambdaFunction | undefined;
99
181
  private tableWriteAccessForMethod;
182
+ /**
183
+ * Injects the authorizer security scheme into the OpenAPI spec based on the
184
+ * authentication type, placing it where API Gateway expects it for the spec
185
+ * version: `components.securitySchemes` for OpenAPI 3.x, or the root
186
+ * `securityDefinitions` for Swagger 2.0. An authorizer written to the wrong
187
+ * location is silently ignored on import, deploying an unauthenticated API.
188
+ *
189
+ * For Cognito: adds a cognito_user_pools authorizer referencing the user pool ARN.
190
+ * For JWT: creates a Lambda authorizer function and adds a token authorizer referencing its ARN.
191
+ */
192
+ protected patchSecuritySchemes(spec: OpenAPI3): void;
193
+ /**
194
+ * Returns the security-scheme container for the spec, creating it if needed.
195
+ * OpenAPI 3.x stores schemes under `components.securitySchemes`; Swagger 2.0
196
+ * uses the root `securityDefinitions`. API Gateway reads only the location that
197
+ * matches the document's declared version, so the authorizer must go there.
198
+ */
199
+ private securitySchemeContainer;
100
200
  /**
101
201
  * AWS does not properly apply the 'security' option to every single path-method.
102
202
  * According to documentation, global security gets applied, if there is no security