Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions amplify/auth/resource.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { defineAuth, secret } from '@aws-amplify/backend';
import { customMessage } from './custom-message/resource';
import { webHookPlan } from '../functions/webHookPlan/resource';
import { postConfirmation } from './post-confirmation/resource';
import { planScheduler } from '../functions/planScheduler/resource';
import { validateStoreLimits } from '../functions/validateStoreLimits/resource';
// import { customMessage } from './custom-message/resource';
// import { webHookPlan } from '../functions/webHookPlan/resource';
// import { postConfirmation } from './post-confirmation/resource';
// import { planScheduler } from '../functions/planScheduler/resource';
// import { validateStoreLimits } from '../functions/validateStoreLimits/resource';

/**
* Define and configure your auth resource
* @see https://docs.amplify.aws/gen2/build-a-backend/auth
*/
export const auth = defineAuth({
triggers: {
customMessage,
postConfirmation,
},
name: 'auth-v1',
// triggers: {
// customMessage,
// postConfirmation,
// },

loginWith: {
email: true,
Expand Down Expand Up @@ -79,10 +80,10 @@ export const auth = defineAuth({
},
},

access: (allow) => [
allow.resource(webHookPlan).to(['updateUserAttributes', 'getUser']),
allow.resource(planScheduler).to(['updateUserAttributes', 'getUser']),
allow.resource(postConfirmation).to(['updateUserAttributes', 'getUser']),
allow.resource(validateStoreLimits).to(['updateUserAttributes', 'getUser']),
],
// access: (allow) => [
// allow.resource(webHookPlan).to(['updateUserAttributes', 'getUser']),
// allow.resource(planScheduler).to(['updateUserAttributes', 'getUser']),
// allow.resource(postConfirmation).to(['updateUserAttributes', 'getUser']),
// allow.resource(validateStoreLimits).to(['updateUserAttributes', 'getUser']),
// ],
});
8 changes: 4 additions & 4 deletions amplify/backend.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineBackend } from '@aws-amplify/backend';
import { postConfirmation } from './auth/post-confirmation/resource';
import { customMessage } from './auth/custom-message/resource';
// import { postConfirmation } from './auth/post-confirmation/resource';
// import { customMessage } from './auth/custom-message/resource';
import { auth } from './auth/resource';
import {
data,
Expand Down Expand Up @@ -44,8 +44,8 @@ const backend = defineBackend({
createSubscription,
webHookPlan,
planScheduler,
postConfirmation,
customMessage,
// postConfirmation,
// customMessage,
generateHaikuFunction,
checkStoreDomain,
generateProductDescriptionFunction,
Expand Down
4 changes: 2 additions & 2 deletions amplify/config/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export function applyBedrockPermissions(backend: any): void {
* Aplica permisos de SES para envío de emails
*/
export function applySesPermissions(backend: any): void {
backend.postConfirmation.resources.lambda.addToRolePolicy(sesPolicyStatement);
// backend.postConfirmation.resources.lambda.addToRolePolicy(sesPolicyStatement);
backend.bulkEmailAPI.resources.lambda.addToRolePolicy(sesPolicyStatement);
backend.bulkEmailProcessor.resources.lambda.addToRolePolicy(sesPolicyStatement);
backend.customMessage.resources.lambda.addToRolePolicy(sesPolicyStatement);
// backend.customMessage.resources.lambda.addToRolePolicy(sesPolicyStatement);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions amplify/data/resource.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type ClientSchema, a, defineData, defineFunction } from '@aws-amplify/backend';
import { postConfirmation } from '../auth/post-confirmation/resource';
// import { postConfirmation } from '../auth/post-confirmation/resource';
import { checkStoreDomain } from '../functions/checkStoreDomain/resource';
import { createStoreTemplate } from '../functions/createStoreTemplate/resource';
import { managePaymentKeys } from '../functions/managePaymentKeys/resource';
Expand Down Expand Up @@ -106,7 +106,7 @@ export const storeSchema = a
StoreAnalytics: storeAnalyticsModel,
})
.authorization((allow) => [
allow.resource(postConfirmation),
// allow.resource(postConfirmation),
allow.resource(webHookPlan),
allow.resource(planScheduler),
allow.resource(checkStoreDomain),
Expand Down Expand Up @@ -320,7 +320,7 @@ const fullSchema = a
StoreAnalytics: storeAnalyticsModel,
})
.authorization((allow) => [
allow.resource(postConfirmation),
// allow.resource(postConfirmation),
allow.resource(webHookPlan),
allow.resource(planScheduler),
allow.resource(checkStoreDomain),
Expand Down