cdk-amazon-connect-constructs 0.1.0-alpha.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Karth
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # cdk-amazon-connect-constructs
2
+
3
+ L2-style AWS CDK constructs for Amazon Connect.
4
+
5
+ The AWS CDK currently exposes Amazon Connect primarily through low-level
6
+ CloudFormation resources. This library wraps the foundational pieces with
7
+ validated, reusable constructs that are intended to publish through JSII for
8
+ TypeScript, Python, Java, and .NET.
9
+
10
+ ## Implemented constructs
11
+
12
+ - `ConnectInstance`
13
+ - `HoursOfOperation`
14
+ - `Queue`
15
+ - `RoutingProfile`
16
+ - `ContactFlow` with JSON import mode
17
+ - `LambdaIntegration`
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install cdk-amazon-connect-constructs aws-cdk-lib constructs
23
+ ```
24
+
25
+ ## Example
26
+
27
+ ```ts
28
+ import { Stack, aws_lambda as lambda } from 'aws-cdk-lib';
29
+ import {
30
+ ConnectInstance,
31
+ ContactFlow,
32
+ DayOfWeek,
33
+ HoursOfOperation,
34
+ LambdaIntegration,
35
+ Queue,
36
+ RoutingProfile,
37
+ } from 'cdk-amazon-connect-constructs';
38
+
39
+ const stack = new Stack();
40
+
41
+ const instance = new ConnectInstance(stack, 'Instance', {
42
+ instanceAlias: 'support',
43
+ attributes: {
44
+ contactflowLogs: true,
45
+ },
46
+ });
47
+
48
+ const hours = new HoursOfOperation(stack, 'Hours', {
49
+ instance,
50
+ name: 'Business hours',
51
+ timeZone: 'America/New_York',
52
+ config: [
53
+ {
54
+ day: DayOfWeek.MONDAY,
55
+ startTime: { hours: 9 },
56
+ endTime: { hours: 17 },
57
+ },
58
+ ],
59
+ });
60
+
61
+ const queue = new Queue(stack, 'Queue', {
62
+ instance,
63
+ hoursOfOperation: hours,
64
+ name: 'Support',
65
+ });
66
+
67
+ new RoutingProfile(stack, 'RoutingProfile', {
68
+ instance,
69
+ name: 'Tier 1',
70
+ description: 'Tier 1 support agents',
71
+ defaultOutboundQueue: queue,
72
+ });
73
+
74
+ const handler = new lambda.Function(stack, 'Handler', {
75
+ code: lambda.Code.fromInline('exports.handler = async () => ({ ok: true });'),
76
+ handler: 'index.handler',
77
+ runtime: lambda.Runtime.NODEJS_20_X,
78
+ });
79
+
80
+ new LambdaIntegration(stack, 'LambdaIntegration', {
81
+ instance,
82
+ function: handler,
83
+ });
84
+
85
+ new ContactFlow(stack, 'Flow', {
86
+ instance,
87
+ name: 'Inbound support',
88
+ content: ContactFlow.stringify({
89
+ Version: '2019-10-30',
90
+ StartAction: 'disconnect',
91
+ Actions: [
92
+ {
93
+ Identifier: 'disconnect',
94
+ Type: 'DisconnectParticipant',
95
+ Parameters: {},
96
+ Transitions: {},
97
+ },
98
+ ],
99
+ }),
100
+ });
101
+ ```
102
+
103
+ ## Roadmap
104
+
105
+ - Add typed builders for common Amazon Connect contact flow actions.
106
+ - Add Lex bot integration.
107
+ - Add phone number claim support.
108
+ - Add security profile, user, and quick connect constructs.
109
+
110
+ ## Development
111
+
112
+ ```bash
113
+ npm install
114
+ npm run build
115
+ npm test
116
+ npm run cdk:synth:example
117
+ ```
118
+
119
+ The project includes a `.projenrc.ts` configured for a JSII AWS CDK construct
120
+ library so generated project metadata can be maintained through projen.
121
+
122
+ ## Java publishing
123
+
124
+ Java artifacts are generated by JSII. Use the Java package helper to generate
125
+ `dist/java/pom.xml` and patch it for the current Sonatype Central Publisher
126
+ Portal flow:
127
+
128
+ ```bash
129
+ npm run package:java
130
+ ```
131
+
132
+ The generated POM is checked for legacy OSSRH/Nexus publishing settings and is
133
+ patched with `org.sonatype.central:central-publishing-maven-plugin`.