cdk-serverless 2.11.23 → 2.11.25

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.
Files changed (66) hide show
  1. package/README.md +39 -0
  2. package/docs/constructs/assets/highlight.css +12 -12
  3. package/docs/constructs/classes/AssetCdn.html +31 -7
  4. package/docs/constructs/classes/BaseApi.html +4 -0
  5. package/docs/constructs/classes/CognitoAuthentication.html +35 -9
  6. package/docs/constructs/classes/GraphQlApi.html +47 -11
  7. package/docs/constructs/classes/LambdaFunction.html +34 -12
  8. package/docs/constructs/classes/RestApi.html +47 -11
  9. package/docs/constructs/classes/SingleTableDatastore.html +26 -5
  10. package/docs/constructs/classes/Workflow.html +34 -7
  11. package/docs/constructs/index.html +13 -0
  12. package/docs/constructs/interfaces/AssetCdnProps.html +4 -0
  13. package/docs/constructs/interfaces/BaseApiProps.html +7 -7
  14. package/docs/constructs/interfaces/CognitoAuthenticationProps.html +3 -3
  15. package/docs/constructs/interfaces/GraphQlApiProps.html +7 -7
  16. package/docs/constructs/interfaces/JsResolverOptions.html +2 -2
  17. package/docs/constructs/interfaces/LambdaFunctionProps.html +2 -2
  18. package/docs/constructs/interfaces/LambdaTracingOptions.html +1 -1
  19. package/docs/constructs/interfaces/RestApiProps.html +8 -8
  20. package/docs/constructs/interfaces/SingleTableDatastoreProps.html +1 -1
  21. package/docs/constructs/interfaces/SingleTableDesign.html +1 -1
  22. package/docs/constructs/interfaces/VtlResolverOptions.html +1 -1
  23. package/docs/lambda/assets/highlight.css +35 -0
  24. package/docs/lambda/classes/errors.BadRequestError.html +15 -3
  25. package/docs/lambda/classes/errors.ForbiddenError.html +15 -3
  26. package/docs/lambda/classes/errors.HttpError.html +18 -4
  27. package/docs/lambda/classes/errors.NotFoundError.html +15 -3
  28. package/docs/lambda/classes/errors.UnauthenticatedError.html +15 -3
  29. package/docs/lambda/index.html +13 -0
  30. package/docs/projen/assets/highlight.css +19 -12
  31. package/docs/projen/classes/Datastore.html +9 -0
  32. package/docs/projen/classes/GraphQlApi.html +9 -0
  33. package/docs/projen/classes/RestApi.html +79 -19
  34. package/docs/projen/classes/ServerlessProject.html +16 -2
  35. package/docs/projen/classes/Workflow.html +46 -10
  36. package/docs/projen/index.html +13 -0
  37. package/docs/projen/interfaces/ServerlessProjectOptions.html +74 -74
  38. package/lib/constructs/asset-cdn.d.ts +24 -0
  39. package/lib/constructs/asset-cdn.js +13 -1
  40. package/lib/constructs/authentication.d.ts +26 -0
  41. package/lib/constructs/authentication.js +12 -1
  42. package/lib/constructs/base-api.d.ts +3 -0
  43. package/lib/constructs/base-api.js +4 -1
  44. package/lib/constructs/func.d.ts +31 -0
  45. package/lib/constructs/func.js +32 -1
  46. package/lib/constructs/graphql.d.ts +41 -0
  47. package/lib/constructs/graphql.js +33 -1
  48. package/lib/constructs/rest-api.d.ts +41 -0
  49. package/lib/constructs/rest-api.js +36 -1
  50. package/lib/constructs/table.d.ts +40 -0
  51. package/lib/constructs/table.js +38 -1
  52. package/lib/constructs/workflow.d.ts +46 -0
  53. package/lib/constructs/workflow.js +38 -1
  54. package/lib/lambda/errors.d.ts +41 -0
  55. package/lib/lambda/errors.js +42 -1
  56. package/lib/projen/core.d.ts +19 -0
  57. package/lib/projen/core.js +21 -1
  58. package/lib/projen/datastore.d.ts +11 -0
  59. package/lib/projen/datastore.js +12 -1
  60. package/lib/projen/graphql.d.ts +11 -0
  61. package/lib/projen/graphql.js +12 -1
  62. package/lib/projen/rest-api.d.ts +52 -0
  63. package/lib/projen/rest-api.js +53 -1
  64. package/lib/projen/workflow.d.ts +34 -0
  65. package/lib/projen/workflow.js +35 -1
  66. package/package.json +1 -1
@@ -71,7 +71,7 @@
71
71
  <div class="tsd-comment tsd-typography"><p>Hostname of the API if a domain name is specified</p>
72
72
  </div>
73
73
  <div class="tsd-comment tsd-typography">
74
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-6">api</span>
74
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-4">api</span>
75
75
  </code><button>Copy</button></pre>
76
76
  </div><aside class="tsd-sources">
77
77
  <p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#apiHostname">apiHostname</a></p></aside></section>
@@ -88,7 +88,7 @@
88
88
  <div class="tsd-comment tsd-typography"><p>Configure a content delivery network for static assets</p>
89
89
  </div>
90
90
  <div class="tsd-comment tsd-typography">
91
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-6">none</span>
91
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-4">none</span>
92
92
  </code><button>Copy</button></pre>
93
93
  </div><aside class="tsd-sources">
94
94
  <p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#assetCdn">assetCdn</a></p></aside></section>
@@ -100,7 +100,7 @@ Alternatively supply a JWT issuer and audience
100
100
  to use any other JWT-based authorization service.</p>
101
101
  </div>
102
102
  <div class="tsd-comment tsd-typography">
103
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-6">none</span>
103
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-4">none</span>
104
104
  </code><button>Copy</button></pre>
105
105
  </div><aside class="tsd-sources">
106
106
  <p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#authentication">authentication</a></p></aside></section>
@@ -110,7 +110,7 @@ to use any other JWT-based authorization service.</p>
110
110
  <div class="tsd-comment tsd-typography"><p>Generate routes for all endpoints configured in the openapi.yaml file</p>
111
111
  </div>
112
112
  <div class="tsd-comment tsd-typography">
113
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-3">true</span>
113
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-5">true</span>
114
114
  </code><button>Copy</button></pre>
115
115
  </div></section>
116
116
  <section class="tsd-panel tsd-member"><a id="cors" class="tsd-anchor"></a>
@@ -126,7 +126,7 @@ to use any other JWT-based authorization service.</p>
126
126
  <p>only one of hostedZone and domainName can be specified</p>
127
127
  </div>
128
128
  <div class="tsd-comment tsd-typography">
129
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-1">- </span><span class="hl-6">No</span><span class="hl-1"> </span><span class="hl-6">custom</span><span class="hl-1"> </span><span class="hl-6">domain</span><span class="hl-1"> </span><span class="hl-6">is</span><span class="hl-1"> </span><span class="hl-6">configured</span>
129
+ <h4>Default</h4><pre><code class="language-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>
130
130
  </code><button>Copy</button></pre>
131
131
  </div><aside class="tsd-sources">
132
132
  <p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#domainName">domainName</a></p></aside></section>
@@ -137,7 +137,7 @@ to use any other JWT-based authorization service.</p>
137
137
  <p>only one of hostedZone and domainName can be specified</p>
138
138
  </div>
139
139
  <div class="tsd-comment tsd-typography">
140
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-1">- </span><span class="hl-6">No</span><span class="hl-1"> </span><span class="hl-6">custom</span><span class="hl-1"> </span><span class="hl-6">domain</span><span class="hl-1"> </span><span class="hl-6">is</span><span class="hl-1"> </span><span class="hl-6">configured</span>
140
+ <h4>Default</h4><pre><code class="language-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>
141
141
  </code><button>Copy</button></pre>
142
142
  </div><aside class="tsd-sources">
143
143
  <p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#hostedZone">hostedZone</a></p></aside></section>
@@ -170,7 +170,7 @@ to use any other JWT-based authorization service.</p>
170
170
  <div class="tsd-comment tsd-typography"><p>Configure CloudWatch Dashboard for the API and the Lambda functions</p>
171
171
  </div>
172
172
  <div class="tsd-comment tsd-typography">
173
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-3">true</span>
173
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-5">true</span>
174
174
  </code><button>Copy</button></pre>
175
175
  </div><aside class="tsd-sources">
176
176
  <p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#monitoring">monitoring</a></p></aside></section>
@@ -187,7 +187,7 @@ to use any other JWT-based authorization service.</p>
187
187
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">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"><use href="#icon-anchor"></use></svg></a></h3>
188
188
  <div class="tsd-signature"><span class="tsd-kind-property">single<wbr/>Table<wbr/>Datastore</span><span class="tsd-signature-symbol">?:</span> <a href="../classes/SingleTableDatastore.html" class="tsd-signature-type tsd-kind-class">SingleTableDatastore</a></div>
189
189
  <div class="tsd-comment tsd-typography">
190
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-6">none</span>
190
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-4">none</span>
191
191
  </code><button>Copy</button></pre>
192
192
  </div><aside class="tsd-sources">
193
193
  <p>Inherited from <a href="BaseApiProps.html">BaseApiProps</a>.<a href="BaseApiProps.html#singleTableDatastore">singleTableDatastore</a></p></aside></section>
@@ -44,7 +44,7 @@
44
44
  <div class="tsd-comment tsd-typography"><p>Whether server-side encryption with an AWS managed customer master key is enabled.</p>
45
45
  </div>
46
46
  <div class="tsd-comment tsd-typography">
47
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-1">- </span><span class="hl-6">server</span><span class="hl-1">-</span><span class="hl-6">side</span><span class="hl-1"> </span><span class="hl-6">encryption</span><span class="hl-1"> </span><span class="hl-6">is</span><span class="hl-1"> </span><span class="hl-6">enabled</span><span class="hl-1"> </span><span class="hl-9">with</span><span class="hl-1"> </span><span class="hl-6">an</span><span class="hl-1"> </span><span class="hl-4">AWS</span><span class="hl-1"> </span><span class="hl-6">owned</span><span class="hl-1"> </span><span class="hl-6">customer</span><span class="hl-1"> </span><span class="hl-6">master</span><span class="hl-1"> </span><span class="hl-6">key</span>
47
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-1">- </span><span class="hl-4">server</span><span class="hl-1">-</span><span class="hl-4">side</span><span class="hl-1"> </span><span class="hl-4">encryption</span><span class="hl-1"> </span><span class="hl-4">is</span><span class="hl-1"> </span><span class="hl-4">enabled</span><span class="hl-1"> </span><span class="hl-3">with</span><span class="hl-1"> </span><span class="hl-4">an</span><span class="hl-1"> </span><span class="hl-7">AWS</span><span class="hl-1"> </span><span class="hl-4">owned</span><span class="hl-1"> </span><span class="hl-4">customer</span><span class="hl-1"> </span><span class="hl-4">master</span><span class="hl-1"> </span><span class="hl-4">key</span>
48
48
  </code><button>Copy</button></pre>
49
49
 
50
50
  <h4>Stability</h4><p>stable</p>
@@ -64,7 +64,7 @@
64
64
  <div class="tsd-comment tsd-typography"><p>The name of TTL attribute.</p>
65
65
  </div>
66
66
  <div class="tsd-comment tsd-typography">
67
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-1">- </span><span class="hl-4">TTL</span><span class="hl-1"> </span><span class="hl-6">is</span><span class="hl-1"> </span><span class="hl-6">disabled</span>
67
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-1">- </span><span class="hl-7">TTL</span><span class="hl-1"> </span><span class="hl-4">is</span><span class="hl-1"> </span><span class="hl-4">disabled</span>
68
68
  </code><button>Copy</button></pre>
69
69
  </div></section></section></div>
70
70
  <div class="col-sidebar">
@@ -48,7 +48,7 @@
48
48
  <li class="tsd-parameter-index-signature">
49
49
  <h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></h5></li></ul></div>
50
50
  <div class="tsd-comment tsd-typography">
51
- <h4>Default</h4><pre><code class="language-ts"><span class="hl-6">no</span><span class="hl-1"> </span><span class="hl-6">variable</span><span class="hl-1"> </span><span class="hl-6">expansions</span>
51
+ <h4>Default</h4><pre><code class="language-ts"><span class="hl-4">no</span><span class="hl-1"> </span><span class="hl-4">variable</span><span class="hl-1"> </span><span class="hl-4">expansions</span>
52
52
  </code><button>Copy</button></pre>
53
53
  </div></section></section></div>
54
54
  <div class="col-sidebar">
@@ -5,6 +5,16 @@
5
5
  --dark-hl-1: #D4D4D4;
6
6
  --light-hl-2: #A31515;
7
7
  --dark-hl-2: #CE9178;
8
+ --light-hl-3: #AF00DB;
9
+ --dark-hl-3: #C586C0;
10
+ --light-hl-4: #001080;
11
+ --dark-hl-4: #9CDCFE;
12
+ --light-hl-5: #0000FF;
13
+ --dark-hl-5: #569CD6;
14
+ --light-hl-6: #008000;
15
+ --dark-hl-6: #6A9955;
16
+ --light-hl-7: #0070C1;
17
+ --dark-hl-7: #4FC1FF;
8
18
  --light-code-background: #FFFFFF;
9
19
  --dark-code-background: #1E1E1E;
10
20
  }
@@ -13,6 +23,11 @@
13
23
  --hl-0: var(--light-hl-0);
14
24
  --hl-1: var(--light-hl-1);
15
25
  --hl-2: var(--light-hl-2);
26
+ --hl-3: var(--light-hl-3);
27
+ --hl-4: var(--light-hl-4);
28
+ --hl-5: var(--light-hl-5);
29
+ --hl-6: var(--light-hl-6);
30
+ --hl-7: var(--light-hl-7);
16
31
  --code-background: var(--light-code-background);
17
32
  } }
18
33
 
@@ -20,6 +35,11 @@
20
35
  --hl-0: var(--dark-hl-0);
21
36
  --hl-1: var(--dark-hl-1);
22
37
  --hl-2: var(--dark-hl-2);
38
+ --hl-3: var(--dark-hl-3);
39
+ --hl-4: var(--dark-hl-4);
40
+ --hl-5: var(--dark-hl-5);
41
+ --hl-6: var(--dark-hl-6);
42
+ --hl-7: var(--dark-hl-7);
23
43
  --code-background: var(--dark-code-background);
24
44
  } }
25
45
 
@@ -27,6 +47,11 @@
27
47
  --hl-0: var(--light-hl-0);
28
48
  --hl-1: var(--light-hl-1);
29
49
  --hl-2: var(--light-hl-2);
50
+ --hl-3: var(--light-hl-3);
51
+ --hl-4: var(--light-hl-4);
52
+ --hl-5: var(--light-hl-5);
53
+ --hl-6: var(--light-hl-6);
54
+ --hl-7: var(--light-hl-7);
30
55
  --code-background: var(--light-code-background);
31
56
  }
32
57
 
@@ -34,10 +59,20 @@
34
59
  --hl-0: var(--dark-hl-0);
35
60
  --hl-1: var(--dark-hl-1);
36
61
  --hl-2: var(--dark-hl-2);
62
+ --hl-3: var(--dark-hl-3);
63
+ --hl-4: var(--dark-hl-4);
64
+ --hl-5: var(--dark-hl-5);
65
+ --hl-6: var(--dark-hl-6);
66
+ --hl-7: var(--dark-hl-7);
37
67
  --code-background: var(--dark-code-background);
38
68
  }
39
69
 
40
70
  .hl-0 { color: var(--hl-0); }
41
71
  .hl-1 { color: var(--hl-1); }
42
72
  .hl-2 { color: var(--hl-2); }
73
+ .hl-3 { color: var(--hl-3); }
74
+ .hl-4 { color: var(--hl-4); }
75
+ .hl-5 { color: var(--hl-5); }
76
+ .hl-6 { color: var(--hl-6); }
77
+ .hl-7 { color: var(--hl-7); }
43
78
  pre, code { background: var(--code-background); }
@@ -16,6 +16,10 @@
16
16
  <li><a href="../modules/errors.html">errors</a></li>
17
17
  <li><a href="errors.BadRequestError.html">BadRequestError</a></li></ul>
18
18
  <h1>Class BadRequestError</h1></div>
19
+ <section class="tsd-panel tsd-comment">
20
+ <div class="tsd-comment tsd-typography"><p>Represents a 400 Bad Request error.</p>
21
+ </div>
22
+ <div class="tsd-comment tsd-typography"></div></section>
19
23
  <section class="tsd-panel tsd-hierarchy">
20
24
  <h4>Hierarchy</h4>
21
25
  <ul class="tsd-hierarchy">
@@ -51,12 +55,17 @@
51
55
  <ul class="tsd-signatures">
52
56
  <li class="tsd-signature tsd-anchor-link" id="constructor.new_BadRequestError"><span class="tsd-kind-constructor-signature">new <wbr/>Bad<wbr/>Request<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="errors.BadRequestError.html" class="tsd-signature-type tsd-kind-class">BadRequestError</a><a href="#constructor.new_BadRequestError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
53
57
  <li class="tsd-description">
58
+ <div class="tsd-comment tsd-typography"><p>Creates an instance of BadRequestError.</p>
59
+ </div>
54
60
  <div class="tsd-parameters">
55
61
  <h4 class="tsd-parameters-title">Parameters</h4>
56
62
  <ul class="tsd-parameter-list">
57
63
  <li>
58
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
59
- <h4 class="tsd-returns-title">Returns <a href="errors.BadRequestError.html" class="tsd-signature-type tsd-kind-class">BadRequestError</a></h4><aside class="tsd-sources">
64
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5>
65
+ <div class="tsd-comment tsd-typography"><p>The error message.</p>
66
+ </div><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
67
+ <h4 class="tsd-returns-title">Returns <a href="errors.BadRequestError.html" class="tsd-signature-type tsd-kind-class">BadRequestError</a></h4>
68
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
60
69
  <p>Overrides <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#constructor">constructor</a></p></aside></li></ul></section></section>
61
70
  <section class="tsd-panel-group tsd-member-group">
62
71
  <h2>Properties</h2>
@@ -74,7 +83,10 @@
74
83
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#stack">stack</a></p></aside></section>
75
84
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="statusCode" class="tsd-anchor"></a>
76
85
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>status<wbr/>Code</span><a href="#statusCode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
77
- <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
86
+ <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
87
+ <div class="tsd-comment tsd-typography"><p>The HTTP status code for the error.</p>
88
+ </div>
89
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
78
90
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#statusCode">statusCode</a></p></aside></section>
79
91
  <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prepareStackTrace" class="tsd-anchor"></a>
80
92
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagOptional">Optional</code> <span>prepare<wbr/>Stack<wbr/>Trace</span><a href="#prepareStackTrace" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
@@ -16,6 +16,10 @@
16
16
  <li><a href="../modules/errors.html">errors</a></li>
17
17
  <li><a href="errors.ForbiddenError.html">ForbiddenError</a></li></ul>
18
18
  <h1>Class ForbiddenError</h1></div>
19
+ <section class="tsd-panel tsd-comment">
20
+ <div class="tsd-comment tsd-typography"><p>Represents a 403 Forbidden error.</p>
21
+ </div>
22
+ <div class="tsd-comment tsd-typography"></div></section>
19
23
  <section class="tsd-panel tsd-hierarchy">
20
24
  <h4>Hierarchy</h4>
21
25
  <ul class="tsd-hierarchy">
@@ -51,12 +55,17 @@
51
55
  <ul class="tsd-signatures">
52
56
  <li class="tsd-signature tsd-anchor-link" id="constructor.new_ForbiddenError"><span class="tsd-kind-constructor-signature">new <wbr/>Forbidden<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="errors.ForbiddenError.html" class="tsd-signature-type tsd-kind-class">ForbiddenError</a><a href="#constructor.new_ForbiddenError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
53
57
  <li class="tsd-description">
58
+ <div class="tsd-comment tsd-typography"><p>Creates an instance of ForbiddenError.</p>
59
+ </div>
54
60
  <div class="tsd-parameters">
55
61
  <h4 class="tsd-parameters-title">Parameters</h4>
56
62
  <ul class="tsd-parameter-list">
57
63
  <li>
58
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
59
- <h4 class="tsd-returns-title">Returns <a href="errors.ForbiddenError.html" class="tsd-signature-type tsd-kind-class">ForbiddenError</a></h4><aside class="tsd-sources">
64
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5>
65
+ <div class="tsd-comment tsd-typography"><p>The error message.</p>
66
+ </div><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
67
+ <h4 class="tsd-returns-title">Returns <a href="errors.ForbiddenError.html" class="tsd-signature-type tsd-kind-class">ForbiddenError</a></h4>
68
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
60
69
  <p>Overrides <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#constructor">constructor</a></p></aside></li></ul></section></section>
61
70
  <section class="tsd-panel-group tsd-member-group">
62
71
  <h2>Properties</h2>
@@ -74,7 +83,10 @@
74
83
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#stack">stack</a></p></aside></section>
75
84
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="statusCode" class="tsd-anchor"></a>
76
85
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>status<wbr/>Code</span><a href="#statusCode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
77
- <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
86
+ <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
87
+ <div class="tsd-comment tsd-typography"><p>The HTTP status code for the error.</p>
88
+ </div>
89
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
78
90
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#statusCode">statusCode</a></p></aside></section>
79
91
  <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prepareStackTrace" class="tsd-anchor"></a>
80
92
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagOptional">Optional</code> <span>prepare<wbr/>Stack<wbr/>Trace</span><a href="#prepareStackTrace" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
@@ -16,6 +16,10 @@
16
16
  <li><a href="../modules/errors.html">errors</a></li>
17
17
  <li><a href="errors.HttpError.html">HttpError</a></li></ul>
18
18
  <h1>Class HttpError</h1></div>
19
+ <section class="tsd-panel tsd-comment">
20
+ <div class="tsd-comment tsd-typography"><p>A base class for HTTP errors.</p>
21
+ </div>
22
+ <div class="tsd-comment tsd-typography"></div></section>
19
23
  <section class="tsd-panel tsd-hierarchy">
20
24
  <h4>Hierarchy</h4>
21
25
  <ul class="tsd-hierarchy">
@@ -56,14 +60,21 @@
56
60
  <ul class="tsd-signatures">
57
61
  <li class="tsd-signature tsd-anchor-link" id="constructor.new_HttpError"><span class="tsd-kind-constructor-signature">new <wbr/>Http<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">statusCode</span>, <span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="errors.HttpError.html" class="tsd-signature-type tsd-kind-class">HttpError</a><a href="#constructor.new_HttpError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
58
62
  <li class="tsd-description">
63
+ <div class="tsd-comment tsd-typography"><p>Creates an instance of HttpError.</p>
64
+ </div>
59
65
  <div class="tsd-parameters">
60
66
  <h4 class="tsd-parameters-title">Parameters</h4>
61
67
  <ul class="tsd-parameter-list">
62
68
  <li>
63
- <h5><span class="tsd-kind-parameter">statusCode</span>: <span class="tsd-signature-type">number</span></h5></li>
69
+ <h5><span class="tsd-kind-parameter">statusCode</span>: <span class="tsd-signature-type">number</span></h5>
70
+ <div class="tsd-comment tsd-typography"><p>The HTTP status code for the error.</p>
71
+ </div></li>
64
72
  <li>
65
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
66
- <h4 class="tsd-returns-title">Returns <a href="errors.HttpError.html" class="tsd-signature-type tsd-kind-class">HttpError</a></h4><aside class="tsd-sources">
73
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5>
74
+ <div class="tsd-comment tsd-typography"><p>The error message.</p>
75
+ </div><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
76
+ <h4 class="tsd-returns-title">Returns <a href="errors.HttpError.html" class="tsd-signature-type tsd-kind-class">HttpError</a></h4>
77
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
67
78
  <p>Overrides Error.constructor</p></aside></li></ul></section></section>
68
79
  <section class="tsd-panel-group tsd-member-group">
69
80
  <h2>Properties</h2>
@@ -81,7 +92,10 @@
81
92
  <p>Inherited from Error.stack</p></aside></section>
82
93
  <section class="tsd-panel tsd-member"><a id="statusCode" class="tsd-anchor"></a>
83
94
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>status<wbr/>Code</span><a href="#statusCode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
84
- <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div></section>
95
+ <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
96
+ <div class="tsd-comment tsd-typography"><p>The HTTP status code for the error.</p>
97
+ </div>
98
+ <div class="tsd-comment tsd-typography"></div></section>
85
99
  <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prepareStackTrace" class="tsd-anchor"></a>
86
100
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagOptional">Optional</code> <span>prepare<wbr/>Stack<wbr/>Trace</span><a href="#prepareStackTrace" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
87
101
  <div class="tsd-signature"><span class="tsd-kind-property">prepare<wbr/>Stack<wbr/>Trace</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span>, <span class="tsd-kind-parameter">stackTraces</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></div>
@@ -16,6 +16,10 @@
16
16
  <li><a href="../modules/errors.html">errors</a></li>
17
17
  <li><a href="errors.NotFoundError.html">NotFoundError</a></li></ul>
18
18
  <h1>Class NotFoundError</h1></div>
19
+ <section class="tsd-panel tsd-comment">
20
+ <div class="tsd-comment tsd-typography"><p>Represents a 404 Not Found error.</p>
21
+ </div>
22
+ <div class="tsd-comment tsd-typography"></div></section>
19
23
  <section class="tsd-panel tsd-hierarchy">
20
24
  <h4>Hierarchy</h4>
21
25
  <ul class="tsd-hierarchy">
@@ -51,12 +55,17 @@
51
55
  <ul class="tsd-signatures">
52
56
  <li class="tsd-signature tsd-anchor-link" id="constructor.new_NotFoundError"><span class="tsd-kind-constructor-signature">new <wbr/>Not<wbr/>Found<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="errors.NotFoundError.html" class="tsd-signature-type tsd-kind-class">NotFoundError</a><a href="#constructor.new_NotFoundError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
53
57
  <li class="tsd-description">
58
+ <div class="tsd-comment tsd-typography"><p>Creates an instance of NotFoundError.</p>
59
+ </div>
54
60
  <div class="tsd-parameters">
55
61
  <h4 class="tsd-parameters-title">Parameters</h4>
56
62
  <ul class="tsd-parameter-list">
57
63
  <li>
58
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
59
- <h4 class="tsd-returns-title">Returns <a href="errors.NotFoundError.html" class="tsd-signature-type tsd-kind-class">NotFoundError</a></h4><aside class="tsd-sources">
64
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5>
65
+ <div class="tsd-comment tsd-typography"><p>The error message.</p>
66
+ </div><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
67
+ <h4 class="tsd-returns-title">Returns <a href="errors.NotFoundError.html" class="tsd-signature-type tsd-kind-class">NotFoundError</a></h4>
68
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
60
69
  <p>Overrides <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#constructor">constructor</a></p></aside></li></ul></section></section>
61
70
  <section class="tsd-panel-group tsd-member-group">
62
71
  <h2>Properties</h2>
@@ -74,7 +83,10 @@
74
83
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#stack">stack</a></p></aside></section>
75
84
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="statusCode" class="tsd-anchor"></a>
76
85
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>status<wbr/>Code</span><a href="#statusCode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
77
- <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
86
+ <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
87
+ <div class="tsd-comment tsd-typography"><p>The HTTP status code for the error.</p>
88
+ </div>
89
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
78
90
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#statusCode">statusCode</a></p></aside></section>
79
91
  <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prepareStackTrace" class="tsd-anchor"></a>
80
92
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagOptional">Optional</code> <span>prepare<wbr/>Stack<wbr/>Trace</span><a href="#prepareStackTrace" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
@@ -16,6 +16,10 @@
16
16
  <li><a href="../modules/errors.html">errors</a></li>
17
17
  <li><a href="errors.UnauthenticatedError.html">UnauthenticatedError</a></li></ul>
18
18
  <h1>Class UnauthenticatedError</h1></div>
19
+ <section class="tsd-panel tsd-comment">
20
+ <div class="tsd-comment tsd-typography"><p>Represents a 401 Unauthenticated error.</p>
21
+ </div>
22
+ <div class="tsd-comment tsd-typography"></div></section>
19
23
  <section class="tsd-panel tsd-hierarchy">
20
24
  <h4>Hierarchy</h4>
21
25
  <ul class="tsd-hierarchy">
@@ -51,12 +55,17 @@
51
55
  <ul class="tsd-signatures">
52
56
  <li class="tsd-signature tsd-anchor-link" id="constructor.new_UnauthenticatedError"><span class="tsd-kind-constructor-signature">new <wbr/>Unauthenticated<wbr/>Error</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="errors.UnauthenticatedError.html" class="tsd-signature-type tsd-kind-class">UnauthenticatedError</a><a href="#constructor.new_UnauthenticatedError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
53
57
  <li class="tsd-description">
58
+ <div class="tsd-comment tsd-typography"><p>Creates an instance of UnauthenticatedError.</p>
59
+ </div>
54
60
  <div class="tsd-parameters">
55
61
  <h4 class="tsd-parameters-title">Parameters</h4>
56
62
  <ul class="tsd-parameter-list">
57
63
  <li>
58
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
59
- <h4 class="tsd-returns-title">Returns <a href="errors.UnauthenticatedError.html" class="tsd-signature-type tsd-kind-class">UnauthenticatedError</a></h4><aside class="tsd-sources">
64
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-type">string</span></h5>
65
+ <div class="tsd-comment tsd-typography"><p>The error message.</p>
66
+ </div><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
67
+ <h4 class="tsd-returns-title">Returns <a href="errors.UnauthenticatedError.html" class="tsd-signature-type tsd-kind-class">UnauthenticatedError</a></h4>
68
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
60
69
  <p>Overrides <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#constructor">constructor</a></p></aside></li></ul></section></section>
61
70
  <section class="tsd-panel-group tsd-member-group">
62
71
  <h2>Properties</h2>
@@ -74,7 +83,10 @@
74
83
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#stack">stack</a></p></aside></section>
75
84
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="statusCode" class="tsd-anchor"></a>
76
85
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>status<wbr/>Code</span><a href="#statusCode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
77
- <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
86
+ <div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
87
+ <div class="tsd-comment tsd-typography"><p>The HTTP status code for the error.</p>
88
+ </div>
89
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
78
90
  <p>Inherited from <a href="errors.HttpError.html">HttpError</a>.<a href="errors.HttpError.html#statusCode">statusCode</a></p></aside></section>
79
91
  <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prepareStackTrace" class="tsd-anchor"></a>
80
92
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagOptional">Optional</code> <span>prepare<wbr/>Stack<wbr/>Trace</span><a href="#prepareStackTrace" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
@@ -33,6 +33,15 @@
33
33
  <li>Add &#39;cdk-serverless&#39; as a dependency to your project</li>
34
34
  <li>Run <code>npx projen</code> to install it</li>
35
35
  </ol>
36
+ <p>Now you can use the project type <code>ServerlessProject</code> for your repo.</p>
37
+ <a id="md:adding-projen-constructs" class="tsd-anchor"></a><h3><a href="#md:adding-projen-constructs">Adding projen constructs</a></h3><p>First you need to add the desired construct to your projen configuration: (e.g. RestApi)</p>
38
+ <pre><code class="language-typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">RestApi</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;cdk-serverless/projen&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">RestApi</span><span class="hl-1">(</span><span class="hl-4">project</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-4">apiName:</span><span class="hl-1"> </span><span class="hl-2">&#39;TestApi&#39;</span><span class="hl-1">, </span><span class="hl-6">// logical name of your API</span><br/><span class="hl-1"> </span><span class="hl-4">definitionFile:</span><span class="hl-1"> </span><span class="hl-2">&#39;testapi.yaml&#39;</span><span class="hl-1">, </span><span class="hl-6">// path to your OpenAPI spec</span><br/><span class="hl-1">});</span>
39
+ </code><button>Copy</button></pre>
40
+ <p>Then run projen to generate construct files and models for the API.</p>
41
+ <a id="md:using-the-cdk-serverless-l3-constructs" class="tsd-anchor"></a><h3><a href="#md:using-the-cdk-serverless-l3-constructs">Using the CDK serverless L3 constructs</a></h3><p>In your stack you can then reference the generated L3s to create the API:</p>
42
+ <pre><code class="language-typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">TestApiRestApi</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;./generated/rest.testapi-api.generated&#39;</span><span class="hl-1">;</span><br/><br/><br/><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">api</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">TestApiRestApi</span><span class="hl-1">(</span><span class="hl-5">this</span><span class="hl-1">, </span><span class="hl-2">&#39;Api&#39;</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-4">stageName:</span><span class="hl-1"> </span><span class="hl-4">props</span><span class="hl-1">.</span><span class="hl-4">stageName</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">domainName:</span><span class="hl-1"> </span><span class="hl-4">props</span><span class="hl-1">.</span><span class="hl-4">domainName</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">apiHostname:</span><span class="hl-1"> </span><span class="hl-2">&#39;api&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">singleTableDatastore</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">cors:</span><span class="hl-1"> </span><span class="hl-5">true</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">additionalEnv:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">DOMAIN_NAME:</span><span class="hl-1"> </span><span class="hl-4">props</span><span class="hl-1">.</span><span class="hl-4">domainName</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
43
+ </code><button>Copy</button></pre>
44
+ <p>This will also create Lambda functions for all operations defined in your spec and wire them accordingly.</p>
36
45
  <a id="md:contribute" class="tsd-anchor"></a><h2><a href="#md:contribute">Contribute</a></h2><a id="md:how-to-contribute-to-cdk-serverless" class="tsd-anchor"></a><h3><a href="#md:how-to-contribute-to-cdk-serverless">How to contribute to CDK Serverless</a></h3><a id="md:did-you-find-a-bug" class="tsd-anchor"></a><h4><a href="#md:did-you-find-a-bug"><strong>Did you find a bug?</strong></a></h4><ul>
37
46
  <li><p><strong>Ensure the bug was not already reported</strong> by searching on GitHub under <a href="https://github.com/taimos/cdk-serverless/issues">Issues</a>.</p>
38
47
  </li>
@@ -83,6 +92,10 @@
83
92
  <ul>
84
93
  <li><a href="#md:features"><span>Features</span></a></li>
85
94
  <li><a href="#md:quick-start"><span>Quick <wbr/>Start</span></a></li>
95
+ <li>
96
+ <ul>
97
+ <li><a href="#md:adding-projen-constructs"><span>Adding projen constructs</span></a></li>
98
+ <li><a href="#md:using-the-cdk-serverless-l3-constructs"><span>Using the CDK serverless <wbr/>L3 constructs</span></a></li></ul></li>
86
99
  <li><a href="#md:contribute"><span>Contribute</span></a></li>
87
100
  <li>
88
101
  <ul>
@@ -5,20 +5,22 @@
5
5
  --dark-hl-1: #D4D4D4;
6
6
  --light-hl-2: #A31515;
7
7
  --dark-hl-2: #CE9178;
8
- --light-hl-3: #0000FF;
9
- --dark-hl-3: #569CD6;
8
+ --light-hl-3: #AF00DB;
9
+ --dark-hl-3: #C586C0;
10
10
  --light-hl-4: #001080;
11
11
  --dark-hl-4: #9CDCFE;
12
- --light-hl-5: #AF00DB;
13
- --dark-hl-5: #C586C0;
14
- --light-hl-6: #0070C1;
15
- --dark-hl-6: #4FC1FF;
16
- --light-hl-7: #098658;
17
- --dark-hl-7: #B5CEA8;
18
- --light-hl-8: #CD3131;
19
- --dark-hl-8: #F44747;
20
- --light-hl-9: #000000;
21
- --dark-hl-9: #C8C8C8;
12
+ --light-hl-5: #0000FF;
13
+ --dark-hl-5: #569CD6;
14
+ --light-hl-6: #008000;
15
+ --dark-hl-6: #6A9955;
16
+ --light-hl-7: #0070C1;
17
+ --dark-hl-7: #4FC1FF;
18
+ --light-hl-8: #098658;
19
+ --dark-hl-8: #B5CEA8;
20
+ --light-hl-9: #CD3131;
21
+ --dark-hl-9: #F44747;
22
+ --light-hl-10: #000000;
23
+ --dark-hl-10: #C8C8C8;
22
24
  --light-code-background: #FFFFFF;
23
25
  --dark-code-background: #1E1E1E;
24
26
  }
@@ -34,6 +36,7 @@
34
36
  --hl-7: var(--light-hl-7);
35
37
  --hl-8: var(--light-hl-8);
36
38
  --hl-9: var(--light-hl-9);
39
+ --hl-10: var(--light-hl-10);
37
40
  --code-background: var(--light-code-background);
38
41
  } }
39
42
 
@@ -48,6 +51,7 @@
48
51
  --hl-7: var(--dark-hl-7);
49
52
  --hl-8: var(--dark-hl-8);
50
53
  --hl-9: var(--dark-hl-9);
54
+ --hl-10: var(--dark-hl-10);
51
55
  --code-background: var(--dark-code-background);
52
56
  } }
53
57
 
@@ -62,6 +66,7 @@
62
66
  --hl-7: var(--light-hl-7);
63
67
  --hl-8: var(--light-hl-8);
64
68
  --hl-9: var(--light-hl-9);
69
+ --hl-10: var(--light-hl-10);
65
70
  --code-background: var(--light-code-background);
66
71
  }
67
72
 
@@ -76,6 +81,7 @@
76
81
  --hl-7: var(--dark-hl-7);
77
82
  --hl-8: var(--dark-hl-8);
78
83
  --hl-9: var(--dark-hl-9);
84
+ --hl-10: var(--dark-hl-10);
79
85
  --code-background: var(--dark-code-background);
80
86
  }
81
87
 
@@ -89,4 +95,5 @@
89
95
  .hl-7 { color: var(--hl-7); }
90
96
  .hl-8 { color: var(--hl-8); }
91
97
  .hl-9 { color: var(--hl-9); }
98
+ .hl-10 { color: var(--hl-10); }
92
99
  pre, code { background: var(--code-background); }
@@ -15,6 +15,15 @@
15
15
  <li><a href="../modules.html">cdk-serverless</a></li>
16
16
  <li><a href="Datastore.html">Datastore</a></li></ul>
17
17
  <h1>Class Datastore</h1></div>
18
+ <section class="tsd-panel tsd-comment">
19
+ <div class="tsd-comment tsd-typography"><p>The Datastore construct sets up a DynamoDB single-table design for a serverless project using projen.
20
+ This construct extends the projen Component to include dependencies and development dependencies required for DynamoDB and provides
21
+ methods to generate model and construct files based on a schema definition file.</p>
22
+ </div>
23
+ <div class="tsd-comment tsd-typography">
24
+ <h4>Example</h4><pre><code class="language-ts"><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">datastore</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">Datastore</span><span class="hl-1">(</span><span class="hl-4">app</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-4">modelName:</span><span class="hl-1"> </span><span class="hl-2">&#39;User&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">definitionFile:</span><span class="hl-1"> </span><span class="hl-2">&#39;src/models/user.schema.json&#39;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
25
+ </code><button>Copy</button></pre>
26
+ </div></section>
18
27
  <section class="tsd-panel tsd-hierarchy">
19
28
  <h4>Hierarchy</h4>
20
29
  <ul class="tsd-hierarchy">
@@ -15,6 +15,15 @@
15
15
  <li><a href="../modules.html">cdk-serverless</a></li>
16
16
  <li><a href="GraphQlApi.html">GraphQlApi</a></li></ul>
17
17
  <h1>Class GraphQlApi</h1></div>
18
+ <section class="tsd-panel tsd-comment">
19
+ <div class="tsd-comment tsd-typography"><p>The GraphQlApi construct sets up a GraphQL API for a serverless project using projen.
20
+ This construct extends the projen Component to include dependencies and development dependencies required for GraphQL
21
+ and provides methods to generate TypeScript types and resolvers from a GraphQL schema definition file.</p>
22
+ </div>
23
+ <div class="tsd-comment tsd-typography">
24
+ <h4>Example</h4><pre><code class="language-ts"><span class="hl-5">const</span><span class="hl-1"> </span><span class="hl-7">graphQlApi</span><span class="hl-1"> = </span><span class="hl-5">new</span><span class="hl-1"> </span><span class="hl-0">GraphQlApi</span><span class="hl-1">(</span><span class="hl-4">app</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-4">apiName:</span><span class="hl-1"> </span><span class="hl-2">&#39;MyGraphQlApi&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">definitionFile:</span><span class="hl-1"> </span><span class="hl-2">&#39;src/graphql/schema.graphql&#39;</span><span class="hl-1">,</span><br/><span class="hl-1">});</span>
25
+ </code><button>Copy</button></pre>
26
+ </div></section>
18
27
  <section class="tsd-panel tsd-hierarchy">
19
28
  <h4>Hierarchy</h4>
20
29
  <ul class="tsd-hierarchy">