@xcelsior/support-api 0.1.6 → 0.1.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcelsior/support-api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"packages/**",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@xcelsior/lambda-http": "1.0.5",
|
|
29
29
|
"@xcelsior/email": "1.0.2",
|
|
30
30
|
"@xcelsior/aws": "1.0.4",
|
|
31
|
-
"@xcelsior/
|
|
32
|
-
"@xcelsior/
|
|
31
|
+
"@xcelsior/monitoring": "1.0.4",
|
|
32
|
+
"@xcelsior/support-client": "1.0.3"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"dev": "sst dev --stage dev --mode basic",
|
package/stacks/SupportStack.ts
CHANGED
|
@@ -17,9 +17,7 @@ export function SupportStack({ stack }: StackContext) {
|
|
|
17
17
|
// VPC Configuration - optional, lookup existing VPC by ID if provided
|
|
18
18
|
const vpcId = process.env.VPC_ID;
|
|
19
19
|
|
|
20
|
-
const vpc = vpcId
|
|
21
|
-
? ec2.Vpc.fromLookup(stack, 'support-vpc', { vpcId })
|
|
22
|
-
: undefined;
|
|
20
|
+
const vpc = vpcId ? ec2.Vpc.fromLookup(stack, 'support-vpc', { vpcId }) : undefined;
|
|
23
21
|
|
|
24
22
|
// Create security group for Lambda functions (only if VPC is configured)
|
|
25
23
|
const lambdaSecurityGroup = vpc
|
|
@@ -173,9 +171,20 @@ export function SupportStack({ stack }: StackContext) {
|
|
|
173
171
|
},
|
|
174
172
|
});
|
|
175
173
|
|
|
174
|
+
|
|
175
|
+
const binds = [
|
|
176
|
+
supportConfigTable,
|
|
177
|
+
categoriesTable,
|
|
178
|
+
teamsTable,
|
|
179
|
+
ticketsTable,
|
|
180
|
+
ticketEventsTable,
|
|
181
|
+
attachmentsBucket,
|
|
182
|
+
reminderQueue,
|
|
183
|
+
];
|
|
184
|
+
|
|
176
185
|
const notificationWorker = new Function(stack, 'support-notification-worker', {
|
|
177
186
|
handler: 'packages/functions/workers/notificationWorker.handler',
|
|
178
|
-
bind:
|
|
187
|
+
bind: binds,
|
|
179
188
|
functionName: `${stack.stage}-support-notification-worker`,
|
|
180
189
|
environment: {
|
|
181
190
|
...baseFunctionEnv,
|
|
@@ -204,7 +213,7 @@ export function SupportStack({ stack }: StackContext) {
|
|
|
204
213
|
job: {
|
|
205
214
|
function: {
|
|
206
215
|
handler: 'packages/functions/workers/reminderScanner.handler',
|
|
207
|
-
bind:
|
|
216
|
+
bind: binds,
|
|
208
217
|
functionName: `${stack.stage}-support-reminder-scanner`,
|
|
209
218
|
environment: baseFunctionEnv,
|
|
210
219
|
timeout: '5 minutes',
|
|
@@ -222,14 +231,7 @@ export function SupportStack({ stack }: StackContext) {
|
|
|
222
231
|
'ticket-search-sync': {
|
|
223
232
|
function: {
|
|
224
233
|
handler: 'packages/functions/tickets/searchSync.handler',
|
|
225
|
-
bind:
|
|
226
|
-
supportConfigTable,
|
|
227
|
-
categoriesTable,
|
|
228
|
-
teamsTable,
|
|
229
|
-
ticketsTable,
|
|
230
|
-
ticketEventsTable,
|
|
231
|
-
attachmentsBucket,
|
|
232
|
-
],
|
|
234
|
+
bind: binds,
|
|
233
235
|
functionName: `${stack.stage}-support-ticket-search-sync`,
|
|
234
236
|
environment: baseFunctionEnv,
|
|
235
237
|
nodejs: {
|
|
@@ -249,15 +251,7 @@ export function SupportStack({ stack }: StackContext) {
|
|
|
249
251
|
},
|
|
250
252
|
defaults: {
|
|
251
253
|
function: {
|
|
252
|
-
bind:
|
|
253
|
-
supportConfigTable,
|
|
254
|
-
categoriesTable,
|
|
255
|
-
teamsTable,
|
|
256
|
-
ticketsTable,
|
|
257
|
-
ticketEventsTable,
|
|
258
|
-
attachmentsBucket,
|
|
259
|
-
reminderQueue,
|
|
260
|
-
],
|
|
254
|
+
bind: binds,
|
|
261
255
|
environment: {
|
|
262
256
|
...baseFunctionEnv,
|
|
263
257
|
},
|
|
@@ -274,14 +268,14 @@ export function SupportStack({ stack }: StackContext) {
|
|
|
274
268
|
'GET /api/admin/config': {
|
|
275
269
|
function: {
|
|
276
270
|
handler: 'packages/functions/config/get.handler',
|
|
277
|
-
functionName: `${stack.stage}-support-get-
|
|
271
|
+
functionName: `${stack.stage}-support-get-configuration`,
|
|
278
272
|
},
|
|
279
273
|
cdk: { method: { apiKeyRequired: true } },
|
|
280
274
|
},
|
|
281
275
|
'PUT /api/admin/config': {
|
|
282
276
|
function: {
|
|
283
277
|
handler: 'packages/functions/config/update.handler',
|
|
284
|
-
functionName: `${stack.stage}-support-update-
|
|
278
|
+
functionName: `${stack.stage}-support-update-configuration`,
|
|
285
279
|
},
|
|
286
280
|
cdk: { method: { apiKeyRequired: true } },
|
|
287
281
|
},
|