How to use the ask-sdk-dynamodb-persistence-adapter.PartitionKeyGenerators.userId function in ask-sdk-dynamodb-persistence-adapter

To help you get started, we’ve selected a few ask-sdk-dynamodb-persistence-adapter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexa / alexa-skills-kit-sdk-for-nodejs / ask-sdk / tst / skill / factory / StandardSkillFactory.spec.ts View on Github external
it('should be able to add DynamoDbPersistenceAdapter with customization', () => {
        const skillConfig = StandardSkillFactory.init()
            .withTableName('testTable')
            .withAutoCreateTable(false)
            .withDynamoDbClient(new DynamoDB({apiVersion : 'latest'}))
            .withPartitionKeyGenerator(PartitionKeyGenerators.userId)
            .getSkillConfiguration();

        expect(skillConfig.persistenceAdapter).instanceOf(DynamoDbPersistenceAdapter);
    });
});

ask-sdk-dynamodb-persistence-adapter

DynamoDB based implementation package of PersistenceAdapter interface in ASK SDK v2 for Node.js

Apache-2.0
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis