Skip to content
Merged

Dev #39

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
**/node_modules/
/.pnp
.pnp.js
.yarn/install-state.gz
Expand Down Expand Up @@ -50,6 +50,7 @@ amplify/mock-api-resources
amplify/backend/amplify-meta.json
amplify/backend/.temp
amplify/node_modules/
amplify/functions/**/node_modules/
build/
dist/
aws-exports.js
Expand Down
44 changes: 0 additions & 44 deletions amplify/auth/post-authentication/handler.ts

This file was deleted.

7 changes: 0 additions & 7 deletions amplify/auth/post-authentication/resource.ts

This file was deleted.

8 changes: 6 additions & 2 deletions amplify/auth/post-confirmation/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export const handler: PostConfirmationTriggerHandler = async event => {
UserPoolId: event.userPoolId,
Username: event.userName,
UserAttributes: [
{
Name: 'email_verified',
Value: 'true',
},
{
Name: 'custom:plan',
Value: 'Royal',
Expand Down Expand Up @@ -66,10 +70,10 @@ export const handler: PostConfirmationTriggerHandler = async event => {
await sendWelcomeEmail(userEmail, trialEndDate)
}
} catch (dbError) {
console.error('Error creando registro de suscripción en DynamoDB:', dbError)
console.error('Error creating subscription record in DynamoDB:', dbError)
}
} catch (error) {
console.error('Error asignando prueba gratuita al usuario:', error)
console.error('Error assigning trial plan to user:', error)
}

return event
Expand Down
3 changes: 0 additions & 3 deletions amplify/auth/resource.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineAuth, secret } from '@aws-amplify/backend'
import { customMessage } from './custom-message/resource'
import { postAuthentication } from './post-authentication/resource'
import { webHookPlan } from '../functions/webHookPlan/resource'
import { postConfirmation } from './post-confirmation/resource'
import { planScheduler } from '../functions/planScheduler/resource'
Expand All @@ -13,7 +12,6 @@ export const auth = defineAuth({
triggers: {
customMessage,
postConfirmation,
preTokenGeneration: postAuthentication,
},

loginWith: {
Expand Down Expand Up @@ -89,7 +87,6 @@ export const auth = defineAuth({
},

access: allow => [
allow.resource(postAuthentication).to(['updateUserAttributes']),
allow.resource(webHookPlan).to(['updateUserAttributes', 'getUser']),
allow.resource(planScheduler).to(['updateUserAttributes', 'getUser']),
allow.resource(postConfirmation).to(['updateUserAttributes', 'getUser']),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Schema } from './resource'
import type { Schema } from '../resource'
import {
BedrockRuntimeClient,
InvokeModelCommand,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Schema } from './resource'
import type { Schema } from '../resource'
import {
BedrockRuntimeClient,
InvokeModelCommand,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Schema } from './resource'
import type { Schema } from '../resource'
import {
BedrockRuntimeClient,
InvokeModelCommand,
Expand Down
6 changes: 3 additions & 3 deletions amplify/data/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ import { getStoreCollections } from '../functions/getStoreCollections/resource'
export const MODEL_ID = 'us.anthropic.claude-3-haiku-20240307-v1:0'

export const generateHaikuFunction = defineFunction({
entry: './generateHaiku.ts',
entry: './chat-generate/generateHaiku.ts',
environment: {
MODEL_ID,
},
})

export const generateProductDescriptionFunction = defineFunction({
entry: './generateProductDescription.ts',
entry: './description-generate/generateProductDescription.ts',
environment: {
MODEL_ID,
},
})

export const generatePriceSuggestionFunction = defineFunction({
entry: './generatePriceSuggestion.ts',
entry: './price-suggestion/generatePriceSuggestion.ts',
environment: {
MODEL_ID,
},
Expand Down
107 changes: 0 additions & 107 deletions amplify/functions/cancelPlan/src/node_modules/.package-lock.json

This file was deleted.

21 changes: 0 additions & 21 deletions amplify/functions/cancelPlan/src/node_modules/asynckit/LICENSE

This file was deleted.

Loading
Loading