feat: initial commit for Alexa Malayalam Calendar skill
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import { handler } from '../src/index.mjs';
|
||||
|
||||
// Mock Alexa LaunchRequest Payload
|
||||
const mockAlexaLaunchRequest = {
|
||||
version: '1.0',
|
||||
session: {
|
||||
new: true,
|
||||
sessionId: 'amzn1.echo-sdk-s-session-mock-id',
|
||||
application: {
|
||||
applicationId: 'amzn1.ask.skill.53645cde-742f-499e-83d3-07ed537bce39'
|
||||
},
|
||||
user: {
|
||||
userId: 'amzn1.ask.account.mockUser'
|
||||
}
|
||||
},
|
||||
context: {
|
||||
System: {
|
||||
application: {
|
||||
applicationId: 'amzn1.ask.skill.53645cde-742f-499e-83d3-07ed537bce39'
|
||||
},
|
||||
user: {
|
||||
userId: 'amzn1.ask.account.mockUser'
|
||||
}
|
||||
}
|
||||
},
|
||||
request: {
|
||||
type: 'LaunchRequest',
|
||||
requestId: 'amzn1.echo-api.request.mockRequestId',
|
||||
timestamp: new Date().toISOString(),
|
||||
locale: 'en-US'
|
||||
}
|
||||
};
|
||||
|
||||
async function runLocalTest() {
|
||||
console.log('🚀 Running Alexa Handler Locally...\n');
|
||||
try {
|
||||
const response = await handler(mockAlexaLaunchRequest, {});
|
||||
console.log('✅ Response Received:\n');
|
||||
console.log(JSON.stringify(response, null, 2));
|
||||
} catch (error) {
|
||||
console.error('❌ Error executing handler locally:', error);
|
||||
}
|
||||
}
|
||||
|
||||
runLocalTest();
|
||||
Reference in New Issue
Block a user