diff --git a/.vscode/settings.json b/.vscode/settings.json index c12ae619e8a..ce53fbe91bc 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,5 +21,6 @@ }, "typescript.enablePromptUseWorkspaceTsdk": true, "prettier.prettierPath": "./node_modules/prettier", - "jest.jestCommandLine": "./node_modules/.bin/jest" + "jest.jestCommandLine": "./node_modules/.bin/jest", + "kiroAgent.configureMCP": "Disabled" } diff --git a/amplify-migration-apps/finance-tracker/.eslintignore b/amplify-migration-apps/finance-tracker/.eslintignore new file mode 100644 index 00000000000..ab2aba600ca --- /dev/null +++ b/amplify-migration-apps/finance-tracker/.eslintignore @@ -0,0 +1 @@ +amplify-codegen-temp/models/models \ No newline at end of file diff --git a/amplify-migration-apps/finance-tracker/.gitignore b/amplify-migration-apps/finance-tracker/.gitignore new file mode 100644 index 00000000000..883e79e8d14 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/.gitignore @@ -0,0 +1,46 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +#amplify-do-not-edit-begin +amplify/\#current-cloud-backend +amplify/.config/local-* +amplify/logs +amplify/mock-data +amplify/mock-api-resources +amplify/backend/amplify-meta.json +amplify/backend/.temp +build/ +dist/ +node_modules/ +aws-exports.js +awsconfiguration.json +amplifyconfiguration.json +amplifyconfiguration.dart +amplify-build-config.json +amplify-gradle-config.json +amplifytools.xcconfig +.secret-* +**.sample +#amplify-do-not-edit-end diff --git a/amplify-migration-apps/finance-tracker/.graphqlconfig.yml b/amplify-migration-apps/finance-tracker/.graphqlconfig.yml new file mode 100644 index 00000000000..008ea54e659 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/.graphqlconfig.yml @@ -0,0 +1,19 @@ +projects: + financetracker: + schemaPath: amplify/backend/api/financetracker/build/schema.graphql + includes: + - src/graphql/**/*.ts + excludes: + - ./amplify/** + - src/API.ts + extensions: + amplify: + codeGenTarget: typescript + generatedFileName: src/API.ts + docsFilePath: src/graphql + region: us-east-1 + apiId: null + maxDepth: 2 +extensions: + amplify: + version: 3 diff --git a/amplify-migration-apps/finance-tracker/README.md b/amplify-migration-apps/finance-tracker/README.md new file mode 100644 index 00000000000..5f0153c8453 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/README.md @@ -0,0 +1,519 @@ +# Finance Tracker (Amplify Gen1) + +![](./images/app.png) + +A personal finance tracking application built with Amplify Gen1, featuring authentication, +GraphQL API, Lambda functions, S3 storage, DynamoDB, and CDK custom resources. + +## Install Dependencies + +```console +npm install +``` + +## Initialize Environment + +```console +amplify init +``` + +```console +⚠️ For new projects, we recommend starting with AWS Amplify Gen 2, our new code-first developer experience. Get started at https://docs.amplify.aws/react/start/quickstart/ +✔ Do you want to continue with Amplify Gen 1? (y/N) · yes +✔ Why would you like to use Amplify Gen 1? · Prefer not to answer +Note: It is recommended to run this command from the root of your app directory +? Enter a name for the project financetracker +The following configuration will be applied: + +Project information +| Name: financetracker +| Environment: dev +| Default editor: Visual Studio Code +| App type: javascript +| Javascript framework: react +| Source Directory Path: src +| Distribution Directory Path: build +| Build Command: npm run-script build +| Start Command: npm run-script start + +? Initialize the project with the above configuration? No +? Enter a name for the environment main +? Choose your default editor: Visual Studio Code +✔ Choose the type of app that you're building · javascript +Please tell us about your project +? What javascript framework are you using react +? Source Directory Path: src +? Distribution Directory Path: dist +? Build Command: npm run-script build +? Start Command: npm run-script start +Using default provider awscloudformation +? Select the authentication method you want to use: AWS profile + +For more information on AWS Profiles, see: +https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html + +? Please choose the profile you want to use default +``` + +## Add Categories + +### Api + +GraphQL API with schema containing: + +- _Transaction_ model for tracking income and expenses with category, amount, date, and optional receipt URL. +- _Budget_ model for setting monthly spending limits per category. +- _FinancialSummary_ model for storing monthly income, expense, and balance totals. +- _calculateFinancialSummary_ query that computes financial metrics by invoking a Lambda function using the `@function` directive. +- _sendMonthlyReport_ and _sendBudgetAlert_ mutations that trigger notifications via a Lambda function using the `@function` directive. + +Uses Amazon Cognito User Pools for default authorization, with API key as an additional auth type. + +```console +amplify add api +``` + +```console +? Select from one of the below mentioned services: GraphQL +? Here is the GraphQL API that we will create. Select a setting to edit or continue Continue +? Choose a schema template: One-to-many relationship (e.g., "Blogs" with "Posts" and "Comments") +✔ Do you want to edit the schema now? (Y/n) · no +``` + +### Auth + +Cognito-based authentication using email with default configuration. + +```console +amplify add auth +``` + +```console +Using service: Cognito, provided by: awscloudformation + The current configured provider is Amazon Cognito. + Do you want to use the default authentication and security configuration? Default configuration + Warning: you will not be able to edit these selections. + How do you want users to be able to sign in? Email + Do you want to configure advanced settings? No, I am done. +``` + +### Storage + +S3 bucket for storing receipt images and financial documents. Authenticated users have full access; guest users have read-only access. + +```console +amplify add storage +``` + +```console +? Select from one of the below mentioned services: Content (Images, audio, video, etc.) +✔ Provide a friendly name for your resource that will be used to label this category in the project: · s3c787456e +✔ Provide bucket name: · financetracker1c469bed6bfe46528cbd48078b7b0c03 +✔ Who should have access: · Auth and guest users +✔ What kind of access do you want for Authenticated users? · create/update, read, delete +✔ What kind of access do you want for Guest users? · read +✔ Do you want to add a Lambda Trigger for your S3 Bucket? (y/N) · no +``` + +### Custom: SNS Topics (`customfinance`) + +CDK custom resource that creates two SNS topics for budget alerts and monthly reports, +with email subscriptions managed at the infrastructure level. + +```console +amplify add custom +``` + +```console +✔ How do you want to define this custom resource? · AWS CDK +✔ Provide a name for your custom resource · customfinance +✔ Do you want to edit the CDK stack now? (Y/n) · no +``` + +### Custom: VTL Resolver (`customresolver`) + +A second CDK custom resource that creates an AppSync VTL resolver for querying transactions +by category. This depends on the GraphQL API and tests the migration of custom resolvers +with API dependencies. + +```console +amplify add custom +``` + +```console +✔ How do you want to define this custom resource? · AWS CDK +✔ Provide a name for your custom resource · customresolver +✔ Do you want to edit the CDK stack now? (Y/n) · no +``` + +After creation, register the API dependency by editing `amplify/backend/backend-config.json` +to add `customresolver` with `dependsOn` on `api/financetracker`: + +```json +"customresolver": { + "dependsOn": [ + { + "attributes": ["GraphQLAPIIdOutput", "GraphQLAPIEndpointOutput", "GraphQLAPIKeyOutput"], + "category": "api", + "resourceName": "financetracker" + } + ], + "providerPlugin": "awscloudformation", + "service": "customCDK" +} +``` + +### Function + +Node.js Lambda function for computing financial summaries and sending budget notifications, with access to the CDK custom resource. + +```console +amplify add function +``` + +```console +? Select which capability you want to add: Lambda function (serverless function) +? Provide an AWS Lambda function name: financetracker +? Choose the runtime that you want to use: NodeJS +? Choose the function template that you want to use: Hello World + +✅ Available advanced settings: +- Resource access permissions +- Scheduled recurring invocation +- Lambda layers configuration +- Environment variables configuration +- Secret values configuration + +? Do you want to configure advanced settings? Yes +? Do you want to access other resources in this project from your Lambda function? Yes +? Select the categories you want this function to have access to. custom +? Custom has 2 resources in this project. Select the one you would like your Lambda to access customfinance +? Select the operations you want to permit on customfinance create, read, update, delete + +⚠️ custom category does not support resource policies yet. + +You can access the following resource attributes as environment variables from your Lambda function + ENV + REGION +? Do you want to invoke this function on a recurring schedule? No +? Do you want to enable Lambda layers for this function? No +? Do you want to configure environment variables for this function? No +? Do you want to configure secret values this function can access? No +✔ Choose the package manager that you want to use: · NPM +? Do you want to edit the local lambda function now? No +``` + +The CLI only handles basic resource access permissions. The custom IAM policies are already included in the repo and will be copied into the function directory by `npm run configure`. However, the dependency configuration and environment variables need to be added manually. + +**Edit `./amplify/backend/function//-cloudformation-template.json`:** + +Add the following to the `Parameters` section: + +```json +"customcustomfinanceBudgetAlertTopicArn": { + "Type": "String" +}, +"customcustomfinanceMonthlyReportTopicArn": { + "Type": "String" +}, +"dependsOn": { + "Type": "String", + "Default": "" +}, +"lambdaLayers": { + "Type": "String", + "Default": "" +} +``` + +Add the following to `Resources` → `LambdaFunction` → `Properties` → `Environment` → `Variables`: + +```json +"BUDGET_ALERT_TOPIC_ARN": { + "Ref": "customcustomfinanceBudgetAlertTopicArn" +}, +"MONTHLY_REPORT_TOPIC_ARN": { + "Ref": "customcustomfinanceMonthlyReportTopicArn" +} +``` + +**Edit `./amplify/backend/backend-config.json`:** + +Add the following to the function's `dependsOn` array: + +```json +{ + "category": "custom", + "resourceName": "customfinance", + "attributes": ["BudgetAlertTopicArn", "MonthlyReportTopicArn"] +} +``` + +## Configure + +```console +npm run configure +``` + +Next, update the function to grant it access to the DynamoDB Transaction table: + +```console +amplify update function +``` + +```console +? Select the Lambda function you want to update financetracker7f7c2ad7 +General information +- Name: financetracker7f7c2ad7 +- Runtime: nodejs + +Resource access permission +- Not configured + +Scheduled recurring invocation +- Not configured + +Lambda layers +- Not configured + +Environment variables: +- Not configured + +Secrets configuration +- Not configured + +? Which setting do you want to update? Resource access permissions +? Select the categories you want this function to have access to. storage +? Storage has 4 resources in this project. Select the one you would like your Lambda to access Transaction:@model(appsync) +? Select the operations you want to permit on Transaction:@model(appsync) create, read, update, delete + +You can access the following resource attributes as environment variables from your Lambda function + API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT + API_FINANCETRACKER_TRANSACTIONTABLE_ARN + API_FINANCETRACKER_TRANSACTIONTABLE_NAME +? Do you want to edit the local lambda function now? No +``` + +## Deploy Backend + +```console +amplify push +``` + +```console +┌──────────┬──────────────────────────┬───────────┬───────────────────┐ +│ Category │ Resource name │ Operation │ Provider plugin │ +├──────────┼──────────────────────────┼───────────┼───────────────────┤ +│ Auth │ financetracker96b98779 │ Create │ awscloudformation │ +├──────────┼──────────────────────────┼───────────┼───────────────────┤ +│ Api │ financetracker │ Create │ awscloudformation │ +├──────────┼──────────────────────────┼───────────┼───────────────────┤ +│ Storage │ s3c787456e │ Create │ awscloudformation │ +├──────────┼──────────────────────────┼───────────┼───────────────────┤ +│ Custom │ customfinance │ Create │ awscloudformation │ +├──────────┼──────────────────────────┼───────────┼───────────────────┤ +│ Custom │ customresolver │ Create │ awscloudformation │ +├──────────┼──────────────────────────┼───────────┼───────────────────┤ +│ Function │ financetracker7f7c2ad7 │ Create │ awscloudformation │ +└──────────┴──────────────────────────┴───────────┴───────────────────┘ + +✔ Are you sure you want to continue? (Y/n) · yes +``` + +## Publish Frontend + +To publish the frontend, we leverage the Amplify hosting console. First push everything to the `main` branch: + +```console +git add . +git commit -m "feat: gen1" +git push origin main +``` + +Next, accept all default values and follow the getting started wizard to connect your repo and branch. Wait for the deployment to finish successfully. + +![](./images/hosting-get-started.png) +![](./images/add-main-branch.png) +![](./images/deploying-main-branch.png) + +## Migrating to Gen2 + +> Based on https://github.com/aws-amplify/amplify-cli/blob/gen2-migration/GEN2_MIGRATION_GUIDE.md + +First install the experimental CLI package that provides the new commands: + +```console +npm install --no-save @aws-amplify/cli-internal-gen2-migration-experimental-alpha +``` + +Now run them: + +```console +npx amplify gen2-migration lock +``` + +```console +git checkout -b gen2-main +npx amplify gen2-migration generate +``` + +### Post-Generate Changes + +After running `gen2-migration generate`, the following manual changes are needed to get the Gen2 branch to deploy successfully. + +#### 1. Update Branch Name in Data Resource + +In `amplify/data/resource.ts`, update the `branchName` to match your Gen2 deployment branch. +The table mapping uses this branch name to resolve the correct Gen1 DynamoDB table names, +so it must match the branch you deploy to in order to reuse the existing Gen1 tables. + +```diff + export const data = defineData({ + migratedAmplifyGen1DynamoDbTableMappings: [{ +- branchName: 'main', ++ branchName: 'gen2-main', + modelNameToTableNameMapping: { + Transaction: 'Transaction-...-main', + Budget: 'Budget-...-main', + FinancialSummary: 'FinancialSummary-...-main', + }, + }], +``` + +#### 2. Lambda Handler: Convert to ESM + +In `amplify/function//index.js`, convert CommonJS to ESM syntax: + +- Change `require()` calls to `import` statements: + +```diff +-const { DynamoDBClient, ListTablesCommand } = require('@aws-sdk/client-dynamodb'); +-const { DynamoDBDocumentClient, ScanCommand } = require('@aws-sdk/lib-dynamodb'); +-const { SNSClient, PublishCommand } = require('@aws-sdk/client-sns'); ++import { DynamoDBClient, ListTablesCommand } from '@aws-sdk/client-dynamodb'; ++import { DynamoDBDocumentClient, ScanCommand } from '@aws-sdk/lib-dynamodb'; ++import { SNSClient, PublishCommand } from '@aws-sdk/client-sns'; +``` + +- Change `exports.handler` to `export const handler`: + +```diff +-exports.handler = async (event) => { ++export const handler = async (event) => { +``` + +#### 3. Update Frontend Config Import + +In `src/main.tsx`, update the Amplify config import to use the Gen2 outputs file: + +```diff +-import amplifyconfig from './amplifyconfiguration.json'; ++import amplifyconfig from '../amplify_outputs.json'; +``` + +#### 4. Root `package.json`: Install AWS SDK and Upgrade TypeScript + +Amplify Gen 2 uses esbuild to bundle Lambda functions. esbuild couldn't resolve +`@aws-sdk/client-dynamodb`, `@aws-sdk/lib-dynamodb`, and `@aws-sdk/client-sns` because +they weren't installed. + +Install the SDK packages as dependencies so esbuild can resolve and bundle them: + +```bash +npm install @aws-sdk/client-dynamodb @aws-sdk/lib-dynamodb @aws-sdk/client-sns +``` + + +Then run `npm install` to update `package-lock.json`. + +#### 5. Grant Lambda SNS Publish Permission + +In `amplify/backend.ts`, the Gen 2 Lambda doesn't have IAM permission to publish to SNS +topics. In Gen 1 this was handled by `custom-policies.json`, which doesn't apply in Gen 2. + +Add the SNS publish policy to the Lambda role: + +```ts +import { PolicyStatement } from 'aws-cdk-lib/aws-iam'; + +backend.financetracker30b1453.resources.lambda.addToRolePolicy( + new PolicyStatement({ + actions: ['sns:Publish'], + resources: ['*'], + }) +); +``` + +#### 6. Wire SNS Topic ARNs to Lambda Environment Variables + +In `amplify/backend.ts`, the custom resource instance needs to be captured so its topic +ARNs can be passed as environment variables to the Lambda function. In Gen 1 this was +handled by `function-parameters.json` and CloudFormation parameter resolution. + +```diff +-new financereport_cdkStack( ++const customfinance = new customfinance_cdkStack( + backend.createStack('customfinance'), + 'customfinance' + ); ++backend.financetracker30b1453.addEnvironment( ++ 'BUDGET_ALERT_TOPIC_ARN', ++ customfinance.budgetAlertTopic.topicArn ++); ++backend.financetracker30b1453.addEnvironment( ++ 'MONTHLY_REPORT_TOPIC_ARN', ++ customfinance.monthlyReportTopic.topicArn ++); +``` + + +#### 7. Fix Custom Resolver Table Name Reference + +In `amplify/custom/customresolver/resource.ts`, the generated code constructs the +DynamoDB table name using `Fn.sub` with the branch name, which resolves to the wrong +table name. Replace it with a direct reference to the Gen1 data resource table, which +resolves to the actual table name at deploy time. + +```diff + dynamoDbConfig: { +- tableName: cdk.Fn.sub('Transaction-${apiId}-${branchName}', { +- apiId: apiId, +- env: branchName, +- }), ++ tableName: backend.data.resources.tables['Transaction'].tableName, + }, +``` + +#### 8. Add API Key Auth to Custom VTL Resolver + +In `amplify/data/resource.ts`, the `getTransactionsByCategory` query field and +`TransactionConnection` type have no auth directive. In Gen1 the custom VTL resolver +bypassed schema-level auth, but Gen2 enforces it. Add `@aws_api_key` so API key +requests are authorized: + +```diff +- getTransactionsByCategory(category: String!, limit: Int): TransactionConnection ++ getTransactionsByCategory(category: String!, limit: Int): TransactionConnection @aws_api_key +``` + +```diff +-type TransactionConnection { ++type TransactionConnection @aws_api_key { +``` + +--- + +Commit and push the changes: + +```console +git add . +git commit -m "feat: migrate to gen2" +git push origin gen2-main +``` + +Now connect the `gen2-main` branch to the hosting service and wait for the deployment to finish successfully. + +![](./images/add-gen2-main-branch.png) +![](./images/deploying-gen2-main-branch.png) + +> **Note:** The `gen2-migration refactor` command is not currently supported for this app. diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/.gitignore b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/.gitignore new file mode 100644 index 00000000000..1badc50ff9c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/.gitignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* +node_modules +dist +dist-ssr +*.local +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +# amplify +.amplify +amplify_outputs* +amplifyconfiguration* +aws-exports* +build diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify.yml b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify.yml new file mode 100644 index 00000000000..19475262460 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify.yml @@ -0,0 +1,18 @@ +version: 1 +backend: + phases: + build: + commands: + - "# Execute Amplify CLI with the helper script" + - npm ci --cache .npm --prefer-offline + - npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID +frontend: + phases: + build: + commands: + - mkdir dist + - touch dist/index.html + artifacts: + baseDirectory: dist + files: + - "**/*" diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/auth/resource.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/auth/resource.ts new file mode 100644 index 00000000000..6649d5a124d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/auth/resource.ts @@ -0,0 +1,70 @@ +import { defineAuth } from '@aws-amplify/backend'; +import { CfnResource, Duration } from 'aws-cdk-lib'; +import type { Backend } from '../backend'; + +export const auth = defineAuth({ + loginWith: { + email: { + verificationEmailSubject: 'Your verification code', + verificationEmailBody: () => 'Your verification code is {####}', + }, + }, + userAttributes: { + email: { + required: true, + mutable: true, + }, + }, + multifactor: { + mode: 'OFF', + }, +}); + +export function applyEscapeHatches(backend: Backend) { + const cfnUserPool = backend.auth.resources.cfnResources.cfnUserPool; + cfnUserPool.usernameAttributes = ['email']; + cfnUserPool.policies = { + passwordPolicy: { + minimumLength: 8, + requireUppercase: false, + requireLowercase: false, + requireNumbers: false, + requireSymbols: false, + temporaryPasswordValidityDays: 7, + }, + }; + const userPool = backend.auth.resources.userPool; + const nativeUserPoolClient = userPool.addClient('NativeAppClient', { + refreshTokenValidity: Duration.days(30), + enableTokenRevocation: true, + enablePropagateAdditionalUserContextData: false, + authSessionValidity: Duration.minutes(3), + disableOAuth: true, + generateSecret: false, + }); + const cognitoProviders = + backend.auth.resources.cfnResources.cfnIdentityPool + .cognitoIdentityProviders; + if (cognitoProviders && Array.isArray(cognitoProviders)) { + cognitoProviders.push({ + clientId: nativeUserPoolClient.userPoolClientId, + providerName: `cognito-idp.${backend.auth.stack.region}.amazonaws.com/${userPool.userPoolId}`, + }); + } + for (const cfnResource of backend.auth.stack.node + .findAll() + .filter( + (c) => + CfnResource.isCfnResource(c) && + [ + 'AWS::Cognito::UserPool', + 'AWS::Cognito::IdentityPool', + 'AWS::Cognito::UserPoolClient', + 'AWS::Cognito::IdentityPoolRoleAttachment', + 'AWS::Cognito::UserPoolGroup', + ].includes(c.cfnResourceType) + )) { + (cfnResource as CfnResource).addOverride('UpdateReplacePolicy', 'Retain'); + (cfnResource as CfnResource).addOverride('DeletionPolicy', 'Retain'); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/backend.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/backend.ts new file mode 100644 index 00000000000..cbe36162108 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/backend.ts @@ -0,0 +1,33 @@ +import * as data from './data/resource'; +import * as auth from './auth/resource'; +import * as customfinance from './custom/customfinance/resource'; +import * as customresolver from './custom/customresolver/resource'; +import * as financetracker from './function/financetracker/resource'; +import * as storage from './storage/resource'; +import { defineBackend } from '@aws-amplify/backend'; +import { Tags } from 'aws-cdk-lib'; + +const backend = defineBackend({ + data: data.data, + auth: auth.auth, + financetracker: financetracker.financetracker, + storage: storage.storage, +}); + +export type Backend = typeof backend; + +customfinance.defineCustomfinance(backend); +customresolver.defineCustomresolver(backend); + +data.applyEscapeHatches(backend); +auth.applyEscapeHatches(backend); +financetracker.applyEscapeHatches(backend); +storage.applyEscapeHatches(backend); + +export function postRefactor() { + storage.postRefactor(backend); + Tags.of(backend.stack).add('gen2-migration/post-refactor', 'true'); +} + +// Uncomment after refactor +// postRefactor(); diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customfinance/construct.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customfinance/construct.ts new file mode 100644 index 00000000000..9dcb3b01ad0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customfinance/construct.ts @@ -0,0 +1,36 @@ +import * as cdk from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as subscriptions from 'aws-cdk-lib/aws-sns-subscriptions'; +const branchName = process.env.AWS_BRANCH ?? "sandbox"; +const projectName = "financetracker"; +export class Customfinance extends Construct { + public readonly budgetAlertTopic: sns.Topic; + public readonly monthlyReportTopic: sns.Topic; + constructor(scope: Construct, id: string) { + super(scope, id); + // 1. SNS Topic for Budget Alerts + this.budgetAlertTopic = new sns.Topic(this, 'BudgetAlertTopic', { + displayName: 'Fin Tracker Budget Alerts', + }); + this.budgetAlertTopic.addSubscription(new subscriptions.EmailSubscription('example@gmail.com')); + new cdk.CfnOutput(this, 'BudgetAlertTopicArn', { + value: this.budgetAlertTopic.topicArn, + description: 'SNS Topic ARN for budget alerts', + exportName: `${projectName}-BudgetAlertTopicArn-${branchName}`, + }); + // 2. SNS Topic for Monthly Reports + this.monthlyReportTopic = new sns.Topic(this, 'MonthlyReportTopic', { + displayName: 'Finance Tracker Monthly Reports', + }); + this.monthlyReportTopic.addSubscription(new subscriptions.EmailSubscription('example@gmail.com')); + new cdk.CfnOutput(this, 'MonthlyReportTopicArn', { + value: this.monthlyReportTopic.topicArn, + description: 'SNS Topic ARN for monthly reports', + exportName: `${projectName}-MonthlyReportTopicArn-${branchName}`, + }); + cdk.Tags.of(this).add('Project', 'FinanceTracker'); + cdk.Tags.of(this).add('Environment', branchName); + cdk.Tags.of(this).add('ManagedBy', 'Amplify'); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customfinance/resource.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customfinance/resource.ts new file mode 100644 index 00000000000..ad6f933f7c3 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customfinance/resource.ts @@ -0,0 +1,6 @@ +import type { Backend } from '../../backend'; +import { Customfinance } from './construct'; + +export function defineCustomfinance(backend: Backend) { + return new Customfinance(backend.createStack('customfinance'), 'customfinance'); +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customresolver/construct.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customresolver/construct.ts new file mode 100644 index 00000000000..f92b201d907 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customresolver/construct.ts @@ -0,0 +1,86 @@ +import * as cdk from 'aws-cdk-lib'; +import { Construct } from 'constructs'; +import * as iam from 'aws-cdk-lib/aws-iam'; +import type { Backend } from '../../backend'; +const branchName = process.env.AWS_BRANCH ?? "sandbox"; +const projectName = "financetracker"; +export class Customresolver extends Construct { + constructor(scope: Construct, id: string, backend: Backend) { + super(scope, id); + // Gen1 pattern: reference the GraphQL API ID using cdk.Fn.ref + // This is the exact pattern that breaks during Gen2 migration + const apiId = backend.data.resources.cfnResources.cfnGraphqlApi.attrApiId; + // Create IAM role for the DynamoDB data source + const dataSourceRole = new iam.Role(this, 'TransactionsByCategoryDSRole', { + assumedBy: new iam.ServicePrincipal('appsync.amazonaws.com'), + roleName: `TransByCatDSRole-${branchName}`, + }); + // Grant DynamoDB access to the role + dataSourceRole.addToPolicy(new iam.PolicyStatement({ + actions: [ + 'dynamodb:Query', + 'dynamodb:Scan', + 'dynamodb:GetItem', + ], + resources: [ + cdk.Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*'), + ], + })); + // Create a DynamoDB data source for the custom resolver + // Using Gen1 CfnDataSource pattern (low-level CloudFormation) + const dataSource = new cdk.aws_appsync.CfnDataSource(this, 'TransactionsByCategoryDS', { + apiId: apiId, + name: 'TransactionsByCategoryDataSource', + type: 'AMAZON_DYNAMODB', + dynamoDbConfig: { + tableName: cdk.Fn.sub('Transaction-${apiId}-${env}', { + apiId: apiId, + env: branchName, + }), + awsRegion: cdk.Fn.ref('AWS::Region'), + }, + serviceRoleArn: dataSourceRole.roleArn, + }); + // Request mapping template - VTL resolver for querying by category + const requestTemplate = ` +## Custom VTL resolver for getTransactionsByCategory +#set($limit = $util.defaultIfNull($ctx.args.limit, 20)) +{ + "version": "2018-05-29", + "operation": "Scan", + "filter": { + "expression": "category = :category", + "expressionValues": { + ":category": $util.dynamodb.toDynamoDBJson($ctx.args.category) + } + }, + "limit": $limit +}`; + // Response mapping template + const responseTemplate = ` +## Return the results as a TransactionConnection +{ + "items": $util.toJson($ctx.result.items), + "nextToken": $util.toJson($ctx.result.nextToken) +}`; + // Create the resolver using Gen1 CfnResolver pattern + const resolver = new cdk.aws_appsync.CfnResolver(this, 'GetTransactionsByCategoryResolver', { + apiId: apiId, + typeName: 'Query', + fieldName: 'getTransactionsByCategory', + dataSourceName: dataSource.attrName, + requestMappingTemplate: requestTemplate, + responseMappingTemplate: responseTemplate, + }); + resolver.addDependency(dataSource); + // Output the resolver info + new cdk.CfnOutput(this, 'ResolverArn', { + value: resolver.attrResolverArn, + description: 'ARN of the custom getTransactionsByCategory resolver', + }); + new cdk.CfnOutput(this, 'DataSourceName', { + value: dataSource.attrName, + description: 'Name of the custom DynamoDB data source', + }); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customresolver/resource.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customresolver/resource.ts new file mode 100644 index 00000000000..17c4d61cb1f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/custom/customresolver/resource.ts @@ -0,0 +1,6 @@ +import type { Backend } from '../../backend'; +import { Customresolver } from './construct'; + +export function defineCustomresolver(backend: Backend) { + return new Customresolver(backend.createStack('customresolver'), 'customresolver', backend); +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/data/resource.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/data/resource.ts new file mode 100644 index 00000000000..38760f25115 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/data/resource.ts @@ -0,0 +1,97 @@ +import { defineData } from '@aws-amplify/backend'; +import type { Backend } from '../backend'; + +const branchName = process.env.AWS_BRANCH ?? 'sandbox'; +const schema = `type Transaction @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String +} + +enum TransactionType { + INCOME + EXPENSE +} + +type Budget @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + category: String! + limit: Float! + month: String! + owner: String +} + +type FinancialSummary @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String +} + +type CalculatedSummary { + totalIncome: Float! @auth(rules: [{ allow: public }]) + totalExpenses: Float! @auth(rules: [{ allow: public }]) + balance: Float! @auth(rules: [{ allow: public }]) + savingsRate: Float! @auth(rules: [{ allow: public }]) +} + +type NotificationResult { + success: Boolean! @auth(rules: [{ allow: public }]) + message: String! @auth(rules: [{ allow: public }]) +} + + +type TransactionConnection { + items: [Transaction] + nextToken: String +} + +type Query { + calculateFinancialSummary: CalculatedSummary @function(name: "financetracker-${branchName}") @auth(rules: [{ allow: public }]) + getTransactionsByCategory(category: String!, limit: Int): TransactionConnection +} + +type Mutation { + sendMonthlyReport(email: String!): NotificationResult @function(name: "financetracker-${branchName}") @auth(rules: [{ allow: public }]) + sendBudgetAlert(email: String!, category: String!, exceeded: Float!): NotificationResult @function(name: "financetracker-${branchName}") @auth(rules: [{ allow: public }]) +} +`; + +export const data = defineData({ + migratedAmplifyGen1DynamoDbTableMappings: [ + { + //The "branchName" variable needs to be the same as your deployment branch if you want to reuse your Gen1 app tables + branchName: 'x', + modelNameToTableNameMapping: { + Transaction: 'Transaction-adetddan7nd55gwre37yyck3vu-x', + Budget: 'Budget-adetddan7nd55gwre37yyck3vu-x', + FinancialSummary: 'FinancialSummary-adetddan7nd55gwre37yyck3vu-x', + }, + }, + ], + authorizationModes: { + defaultAuthorizationMode: 'apiKey', + apiKeyAuthorizationMode: { expiresInDays: 7 }, + }, + schema, +}); + +export function applyEscapeHatches(backend: Backend) { + const cfnGraphqlApi = backend.data.resources.cfnResources.cfnGraphqlApi; + cfnGraphqlApi.additionalAuthenticationProviders = [ + { + authenticationType: 'AMAZON_COGNITO_USER_POOLS', + userPoolConfig: { + userPoolId: backend.auth.resources.userPool.userPoolId, + awsRegion: backend.auth.stack.region, + }, + }, + ]; +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/event.json b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/event.json new file mode 100644 index 00000000000..fd2722e8599 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/event.json @@ -0,0 +1,5 @@ +{ + "key1": "value1", + "key2": "value2", + "key3": "value3" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/index.js b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/index.js new file mode 100644 index 00000000000..519e5e91239 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/index.js @@ -0,0 +1,209 @@ +/* Amplify Params - DO NOT EDIT + API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT + API_FINANCETRACKER_TRANSACTIONTABLE_ARN + API_FINANCETRACKER_TRANSACTIONTABLE_NAME + BUDGET_ALERT_TOPIC_ARN + MONTHLY_REPORT_TOPIC_ARN + ENV + REGION +Amplify Params - DO NOT EDIT */ const { DynamoDBClient } = require('@aws-sdk/client-dynamodb'); +const { DynamoDBDocumentClient, ScanCommand } = require('@aws-sdk/lib-dynamodb'); +const { SNSClient, PublishCommand } = require('@aws-sdk/client-sns'); + +const dynamoClient = new DynamoDBClient({}); +const dynamodb = DynamoDBDocumentClient.from(dynamoClient); +const sns = new SNSClient({}); + +/** + * Calculates totals from an array of transactions. + * Returns { totalIncome, totalExpenses, balance, savingsRate }. + */ +function calculateTotals(transactions) { + const { totalIncome, totalExpenses } = transactions.reduce( + (acc, transaction) => { + if (transaction.type === 'INCOME') { + acc.totalIncome += transaction.amount; + } else if (transaction.type === 'EXPENSE') { + acc.totalExpenses += transaction.amount; + } + return acc; + }, + { totalIncome: 0, totalExpenses: 0 }, + ); + + const balance = totalIncome - totalExpenses; + const savingsRate = totalIncome > 0 ? parseFloat(((balance / totalIncome) * 100).toFixed(2)) : 0; + + return { totalIncome, totalExpenses, balance, savingsRate }; +} + +/** + * Returns the Transaction table name from the environment variable. + * Throws if not configured. + */ +function getTableName() { + const tableName = process.env.API_FINANCETRACKER_TRANSACTIONTABLE_NAME; + if (!tableName || tableName.includes('NONE')) { + throw new Error('Transaction table name is not configured. Check the API_FINANCETRACKER_TRANSACTIONTABLE_NAME environment variable.'); + } + return tableName; +} + +/** + * AppSync GraphQL resolver for calculating financial summary and sending notifications + * @type {import('@types/aws-lambda').AppSyncResolverHandler} + */ +exports.handler = async (event) => { + console.log(`EVENT: ${JSON.stringify(event, null, 2)}`); + + const fieldName = event.info?.fieldName || event.fieldName; + const args = event.arguments || event.args || {}; + + console.log('Field Name:', fieldName); + + try { + switch (fieldName) { + case 'calculateFinancialSummary': + return await calculateSummaryFromDB(); + + case 'sendMonthlyReport': + return await sendMonthlyReport(args); + + case 'sendBudgetAlert': + return await sendBudgetAlert(args); + + default: + throw new Error(`Unknown field: ${fieldName}`); + } + } catch (error) { + console.error('Handler Error:', error); + + // For calculateFinancialSummary, return zeros instead of null to avoid GraphQL errors + if (fieldName === 'calculateFinancialSummary') { + return { totalIncome: 0, totalExpenses: 0, balance: 0, savingsRate: 0 }; + } + + return { success: false, message: `Error: ${error.message}` }; + } +}; + +async function calculateSummaryFromDB() { + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + console.log('Found transactions:', transactions.length); + + const summary = calculateTotals(transactions); + console.log('Calculated summary:', summary); + return summary; +} + +async function sendMonthlyReport(args) { + const email = args.email; + if (!email) { + return { success: false, message: 'Email is required' }; + } + + try { + const topicArn = process.env.MONTHLY_REPORT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Monthly report topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + const summary = calculateTotals(transactions); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: '📊 Your Monthly Financial Report', + Message: `Hello, + +Here is your monthly financial report: + +💰 Total Income: ${summary.totalIncome.toFixed(2)} +💸 Total Expenses: ${summary.totalExpenses.toFixed(2)} +💵 Balance: ${summary.balance.toFixed(2)} +📈 Savings Rate: ${summary.savingsRate}% + +Total Transactions: ${transactions.length} + +This report was generated on ${new Date().toLocaleDateString()}. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + }, + }), + ); + + return { + success: true, + message: `Monthly report sent! Check ${email} for a confirmation email from AWS SNS, then click the button again.`, + }; + } catch (error) { + console.error('Error sending monthly report:', error); + return { success: false, message: `Failed to send report: ${error.message}` }; + } +} + +async function sendBudgetAlert(args) { + const { email, category, exceeded } = args; + + try { + const topicArn = process.env.BUDGET_ALERT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Budget alert topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send( + new ScanCommand({ + TableName: tableName, + FilterExpression: 'category = :category AND #type = :type', + ExpressionAttributeNames: { '#type': 'type' }, + ExpressionAttributeValues: { ':category': category, ':type': 'EXPENSE' }, + }), + ); + + const categoryTransactions = result.Items || []; + const totalSpent = categoryTransactions.reduce((sum, t) => sum + t.amount, 0); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: `⚠️ Budget Alert: ${category}`, + Message: `Hello, + +⚠️ BUDGET ALERT ⚠️ + +You have exceeded your budget for ${category} by ${exceeded.toFixed(2)}. + +Category: ${category} +Total Spent: ${totalSpent.toFixed(2)} +Number of Transactions: ${categoryTransactions.length} + +Consider reviewing your spending in this category. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + category: { DataType: 'String', StringValue: category }, + exceeded: { DataType: 'Number', StringValue: exceeded.toString() }, + }, + }), + ); + + return { success: true, message: 'Budget alert sent successfully!' }; + } catch (error) { + console.error('Error sending budget alert:', error); + return { success: false, message: `Failed to send alert: ${error.message}` }; + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/resource.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/resource.ts new file mode 100644 index 00000000000..60a43e3942f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/function/financetracker/resource.ts @@ -0,0 +1,55 @@ +import { defineFunction } from '@aws-amplify/backend'; +import type { Backend } from '../../backend'; + +const branchName = process.env.AWS_BRANCH ?? 'sandbox'; + +export const financetracker = defineFunction({ + entry: './index.js', + name: `financetracker-${branchName}`, + timeoutSeconds: 25, + memoryMB: 128, + environment: { + ENV: `${branchName}`, + REGION: 'us-east-1', + BUDGET_ALERT_TOPIC_ARN: + 'arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-BudgetAlertTopicF20DF526-R5tDxQli7ASH', + MONTHLY_REPORT_TOPIC_ARN: + 'arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-MonthlyReportTopic8D223100-riowtcOhtvf1', + }, + runtime: 22, +}); + +export function applyEscapeHatches(backend: Backend) { + backend.financetracker.resources.cfnResources.cfnFunction.functionName = `financetracker-${branchName}`; + backend.financetracker.addEnvironment( + 'API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT', + backend.data.apiId + ); + backend.financetracker.addEnvironment( + 'API_FINANCETRACKER_TRANSACTIONTABLE_ARN', + backend.data.resources.tables['Transaction'].tableArn + ); + backend.financetracker.addEnvironment( + 'API_FINANCETRACKER_TRANSACTIONTABLE_NAME', + backend.data.resources.tables['Transaction'].tableName + ); + backend.data.resources.tables['Transaction'].grant( + backend.financetracker.resources.lambda, + 'dynamodb:Put*', + 'dynamodb:Create*', + 'dynamodb:BatchWriteItem', + 'dynamodb:PartiQLInsert', + 'dynamodb:Get*', + 'dynamodb:BatchGetItem', + 'dynamodb:List*', + 'dynamodb:Describe*', + 'dynamodb:Scan', + 'dynamodb:Query', + 'dynamodb:PartiQLSelect', + 'dynamodb:Update*', + 'dynamodb:RestoreTable*', + 'dynamodb:PartiQLUpdate', + 'dynamodb:Delete*', + 'dynamodb:PartiQLDelete' + ); +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/package.json b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/package.json new file mode 100644 index 00000000000..3dbc1ca591c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/storage/resource.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/storage/resource.ts new file mode 100644 index 00000000000..5f8b89bb656 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/storage/resource.ts @@ -0,0 +1,52 @@ +import { defineStorage } from '@aws-amplify/backend'; +import { CfnResource } from 'aws-cdk-lib'; +import type { Backend } from '../backend'; + +const branchName = process.env.AWS_BRANCH ?? 'sandbox'; + +export const storage = defineStorage({ + name: `financetrackera14ace1bd4be4b579cb608d44266aea7x-${branchName}`, + access: (allow) => ({ + 'public/*': [ + allow.guest.to(['read']), + allow.authenticated.to(['write', 'read', 'delete']), + ], + 'protected/{entity_id}/*': [ + allow.authenticated.to(['write', 'read', 'delete']), + ], + 'private/{entity_id}/*': [ + allow.authenticated.to(['write', 'read', 'delete']), + ], + }), +}); + +export function postRefactor(backend: Backend) { + const s3Bucket = backend.storage.resources.cfnResources.cfnBucket; + s3Bucket.bucketName = 'financetrackera14ace1bd4be4b579cb608d44266aea7x-x'; +} + +export function applyEscapeHatches(backend: Backend) { + const s3Bucket = backend.storage.resources.cfnResources.cfnBucket; + s3Bucket.bucketEncryption = { + serverSideEncryptionConfiguration: [ + { + serverSideEncryptionByDefault: { + sseAlgorithm: 'AES256', + }, + bucketKeyEnabled: false, + }, + ], + }; + for (const cfnResource of backend.storage.stack.node + .findAll() + .filter( + (c) => + CfnResource.isCfnResource(c) && + ['AWS::S3::Bucket', 'Custom::S3AutoDeleteObjects'].includes( + c.cfnResourceType + ) + )) { + (cfnResource as CfnResource).addOverride('UpdateReplacePolicy', 'Retain'); + (cfnResource as CfnResource).addOverride('DeletionPolicy', 'Retain'); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/tsconfig.json b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/tsconfig.json new file mode 100644 index 00000000000..fb4251ddaae --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2022", + "module": "es2022", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "paths": { + "$amplify/*": ["../.amplify/generated/*"] + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/types/amplify-dependent-resources-ref.d.ts b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/types/amplify-dependent-resources-ref.d.ts new file mode 100644 index 00000000000..5c1c1d0b166 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/amplify/types/amplify-dependent-resources-ref.d.ts @@ -0,0 +1,45 @@ +export type AmplifyDependentResourcesAttributes = { + "api": { + "financetracker": { + "GraphQLAPIEndpointOutput": "string", + "GraphQLAPIIdOutput": "string", + "GraphQLAPIKeyOutput": "string" + } + }, + "auth": { + "financetracker331811e6": { + "AppClientID": "string", + "AppClientIDWeb": "string", + "IdentityPoolId": "string", + "IdentityPoolName": "string", + "UserPoolArn": "string", + "UserPoolId": "string", + "UserPoolName": "string" + } + }, + "custom": { + "customfinance": { + "BudgetAlertTopicArn": "string", + "MonthlyReportTopicArn": "string" + }, + "customresolver": { + "DataSourceName": "string", + "ResolverArn": "string" + } + }, + "function": { + "financetracker": { + "Arn": "string", + "LambdaExecutionRole": "string", + "LambdaExecutionRoleArn": "string", + "Name": "string", + "Region": "string" + } + }, + "storage": { + "s320279658": { + "BucketName": "string", + "Region": "string" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.post.generate/package.json b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/package.json new file mode 100644 index 00000000000..16b27282e8c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.post.generate/package.json @@ -0,0 +1,60 @@ +{ + "name": "@amplify-migration-apps/finance-tracker-snapshot", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview", + "configure": "./backend/configure.sh", + "sanitize": "tsx ../sanitize.ts", + "normalize": "tsx ../normalize.ts", + "typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit", + "pre-push": "npx tsx migration/pre-push.ts", + "post-generate": "npx tsx migration/post-generate.ts", + "post-refactor": "true", + "post-sandbox": "true", + "pre-sandbox": "true", + "post-push": "true", + "test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose", + "test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose", + "test:shared-data": "true", + "test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app finance-tracker --profile ${AWS_PROFILE:-default}", + "deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app finance-tracker --step deploy --profile ${AWS_PROFILE:-default}" + }, + "dependencies": { + "aws-amplify": "^6.0.0", + "react": "^19.2.0", + "react-dom": "^19.2.0" + }, + "devDependencies": { + "@aws-amplify/backend": "^1.18.0", + "@aws-amplify/backend-cli": "^1.8.0", + "@aws-amplify/backend-data": "^1.6.2", + "@aws-sdk/client-cognito-identity-provider": "^3.936.0", + "@eslint/js": "^9.39.1", + "@types/aws-lambda": "^8.10.92", + "@types/jest": "^29.5.14", + "@types/node": "*", + "@types/react": "^19.2.5", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.1.1", + "aws-cdk": "^2", + "aws-cdk-lib": "^2", + "ci-info": "^4.3.1", + "constructs": "^10.0.0", + "esbuild": "^0.27.0", + "eslint": "^9.39.1", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.5.0", + "jest": "^29.7.0", + "ts-jest": "^29.3.4", + "tsx": "^4.20.6", + "typescript": "~5.9.3", + "typescript-eslint": "^8.46.4", + "vite": "^7.2.4" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/.gitignore b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/.gitignore new file mode 100644 index 00000000000..8c9162f3547 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/.gitignore @@ -0,0 +1,45 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +#amplify-do-not-edit-begin +!amplify/\#current-cloud-backend +amplify/.config/local-* +!amplify/logs +!amplify/mock-data +!amplify/mock-api-resources +!amplify/backend/amplify-meta.json +!amplify/backend/.temp +!build/ +dist/ +node_modules/ +aws-exports.js +awsconfiguration.json +amplifyconfiguration.dart +amplify-build-config.json +amplify-gradle-config.json +amplifytools.xcconfig +.secret-* +**.sample +#amplify-do-not-edit-end diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/amplify-meta.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/amplify-meta.json new file mode 100644 index 00000000000..051e9aa47e4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/amplify-meta.json @@ -0,0 +1,203 @@ +{ + "providers": { + "awscloudformation": { + "AuthRoleName": "amplify-financetracker-x-x-authRole", + "UnauthRoleArn": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-unauthRole", + "AuthRoleArn": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-authRole", + "Region": "us-east-1", + "DeploymentBucketName": "amplify-financetracker-x-x-deployment", + "UnauthRoleName": "amplify-financetracker-x-x-unauthRole", + "StackName": "amplify-financetracker-x-x", + "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/amplify-financetracker-x-x/b5b77e20-3f49-11f1-aca5-1262955767e1", + "AmplifyAppId": "financetracker" + } + }, + "api": { + "financetracker": { + "dependsOn": [ + { + "attributes": [ + "UserPoolId" + ], + "category": "auth", + "resourceName": "financetracker331811e6" + } + ], + "output": { + "authConfig": { + "additionalAuthenticationProviders": [ + { + "authenticationType": "AMAZON_COGNITO_USER_POOLS", + "userPoolConfig": { + "userPoolId": "authfinancetracker331811e6" + } + } + ], + "defaultAuthentication": { + "apiKeyConfig": { + "apiKeyExpirationDays": 7 + }, + "authenticationType": "API_KEY" + } + }, + "GraphQLAPIIdOutput": "adetddan7nd55gwre37yyck3vu", + "GraphQLAPIEndpointOutput": "https://qcluzgdzhff3rdbn5r5dg2mnla.appsync-api.us-east-1.amazonaws.com/graphql", + "GraphQLAPIKeyOutput": "da2-fakeapikey00000000000000" + }, + "providerPlugin": "awscloudformation", + "service": "AppSync", + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/api/cloudformation-template.json", + "logicalId": "apifinancetracker" + }, + "lastPushDirHash": "P5h2DzOz2DkniNcIBgKBz9B+lF8=" + } + }, + "auth": { + "financetracker331811e6": { + "customAuth": false, + "dependsOn": [], + "frontendAuthConfig": { + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS" + ], + "passwordProtectionSettings": { + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": [] + }, + "signupAttributes": [ + "EMAIL" + ], + "socialProviders": [], + "usernameAttributes": [ + "EMAIL" + ], + "verificationMechanisms": [ + "EMAIL" + ] + }, + "providerPlugin": "awscloudformation", + "service": "Cognito", + "output": { + "UserPoolId": "us-east-1_LFxofbrDo", + "AppClientIDWeb": "pdn5tq3qc767u6n4gv9jnic6v", + "AppClientID": "1m28beghjka8l0hg8avja1ab2n", + "IdentityPoolId": "us-east-1:9c7ebdb2-57df-4b19-95ae-4f621dcfe3e4", + "UserPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_LFxofbrDo", + "IdentityPoolName": "financetracker331811e6_identitypool_331811e6__x", + "UserPoolName": "financetracker331811e6_userpool_331811e6" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/auth/financetracker331811e6-cloudformation-template.json", + "logicalId": "authfinancetracker331811e6" + }, + "lastPushDirHash": "TYdUKpnamNh8a7kbpjSS/0c3rp8=" + } + }, + "custom": { + "customfinance": { + "providerPlugin": "awscloudformation", + "service": "customCDK", + "output": { + "MonthlyReportTopicArn": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-MonthlyReportTopic8D223100-riowtcOhtvf1", + "BudgetAlertTopicArn": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-BudgetAlertTopicF20DF526-R5tDxQli7ASH" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customfinance-cloudformation-template.json", + "logicalId": "customcustomfinance" + }, + "lastPushDirHash": "EAlFTfG4+hgHLwheq/qriUrvAwM=" + }, + "customresolver": { + "dependsOn": [ + { + "category": "api", + "resourceName": "financetracker", + "attributes": [ + "GraphQLAPIKeyOutput", + "GraphQLAPIIdOutput", + "GraphQLAPIEndpointOutput" + ] + } + ], + "providerPlugin": "awscloudformation", + "service": "customCDK", + "output": { + "DataSourceName": "TransactionsByCategoryDataSource", + "ResolverArn": "arn:aws:appsync:us-east-1:123456789012:apis/adetddan7nd55gwre37yyck3vu/types/Query/resolvers/getTransactionsByCategory" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customresolver-cloudformation-template.json", + "logicalId": "customcustomresolver" + }, + "lastPushDirHash": "SgT20eFaRpzwe3wrwjlFOeYYy9Q=" + } + }, + "function": { + "financetracker": { + "build": true, + "dependsOn": [ + { + "attributes": [ + "GraphQLAPIIdOutput" + ], + "category": "api", + "resourceName": "financetracker" + }, + { + "attributes": [ + "BudgetAlertTopicArn", + "MonthlyReportTopicArn" + ], + "category": "custom", + "resourceName": "customfinance" + } + ], + "providerPlugin": "awscloudformation", + "service": "Lambda", + "output": { + "LambdaExecutionRoleArn": "arn:aws:iam::123456789012:role/financetrackerLambdaRole96a64165-x", + "Region": "us-east-1", + "Arn": "arn:aws:lambda:us-east-1:123456789012:function:financetracker-x", + "Name": "financetracker-x", + "LambdaExecutionRole": "financetrackerLambdaRole96a64165-x" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/function/financetracker-cloudformation-template.json", + "logicalId": "functionfinancetracker" + }, + "s3Bucket": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip" + }, + "lastBuildTimeStamp": "2026-04-23T19:23:16.888Z", + "lastBuildType": "PROD", + "lastPackageTimeStamp": "2026-04-23T19:23:16.905Z", + "distZipFilename": "financetracker-36344755354a3948535a-build.zip", + "lastPushDirHash": "kiL0nXnJyG035thUXEslXCwbF8s=" + } + }, + "storage": { + "s320279658": { + "dependsOn": [], + "providerPlugin": "awscloudformation", + "service": "S3", + "output": { + "BucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7x-x", + "Region": "us-east-1" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/storage/cloudformation-template.json", + "logicalId": "storages320279658" + }, + "lastPushDirHash": "Cx6dQZQ101wqgNP1eV8ptOLYgLk=" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/cloudformation-template.json new file mode 100644 index 00000000000..42f68b18272 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/cloudformation-template.json @@ -0,0 +1,1196 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Default": "NONE" + }, + "AppSyncApiName": { + "Type": "String", + "Default": "AppSyncSimpleTransform" + }, + "AuthCognitoUserPoolId": { + "Type": "String" + }, + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "An S3 Bucket name where assets are deployed" + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root of the deployment directory." + } + }, + "Resources": { + "GraphQLAPI": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AdditionalAuthenticationProviders": [ + { + "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", + "UserPoolConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "UserPoolId": { + "Ref": "AuthCognitoUserPoolId" + } + } + } + ], + "AuthenticationType": "API_KEY", + "Name": { + "Fn::Join": [ + "", + [ + { + "Ref": "AppSyncApiName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "GraphQLAPITransformerSchema3CB2AE18": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DefinitionS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/schema.graphql" + ] + ] + } + } + }, + "GraphQLAPIDefaultApiKey215A6DD7": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Expires": 1777576997 + } + }, + "GraphQLAPINONEDS95A13CF0": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Name": "NONE_DS", + "Type": "NONE" + } + }, + "Transaction": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Transaction.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "Budget": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Budget.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FinancialSummary": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FinancialSummary.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FunctionDirectiveStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FunctionDirectiveStack.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalIncomeDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalIncomeResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalIncome", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalIncome\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalExpensesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalExpensesResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalExpenses", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalExpenses\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryBalanceDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarybalanceResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "balance", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"balance\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummarySavingsRateDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarysavingsRateResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "savingsRate", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"savingsRate\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultSuccessDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultsuccessResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "success", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"success\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultMessageDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultmessageResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "message", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"message\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CustomResourcesjson": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "AppSyncApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "AppSyncApiName": { + "Ref": "AppSyncApiName" + }, + "env": { + "Ref": "env" + }, + "S3DeploymentBucket": { + "Ref": "S3DeploymentBucket" + }, + "S3DeploymentRootKey": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "/", + [ + "https://s3.amazonaws.com", + { + "Ref": "S3DeploymentBucket" + }, + { + "Ref": "S3DeploymentRootKey" + }, + "stacks", + "CustomResources.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPI", + "GraphQLAPITransformerSchema3CB2AE18", + "Transaction", + "Budget", + "FinancialSummary", + "FunctionDirectiveStack" + ] + } + }, + "Outputs": { + "GraphQLAPIKeyOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPIDefaultApiKey215A6DD7", + "ApiKey" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiKey" + ] + ] + } + } + }, + "GraphQLAPIIdOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiId" + ] + ] + } + } + }, + "GraphQLAPIEndpointOutput": { + "Description": "Your GraphQL API endpoint.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "GraphQLUrl" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiEndpoint" + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"api-AppSync\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/parameters.json new file mode 100644 index 00000000000..3a9e0bd846d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/parameters.json @@ -0,0 +1,13 @@ +{ + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + }, + "S3DeploymentBucket": "amplify-financetracker-x-x-deployment", + "S3DeploymentRootKey": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Budget.owner.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Budget.owner.req.vtl new file mode 100644 index 00000000000..a9c5efa2bb8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Budget.owner.req.vtl @@ -0,0 +1 @@ +$util.toJson({"version":"2018-05-29","payload":{}}) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Budget.owner.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Budget.owner.res.vtl new file mode 100644 index 00000000000..0552e7005c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Budget.owner.res.vtl @@ -0,0 +1,20 @@ +## [Start] Parse owner field auth for Get. ** +#if( $util.isList($ctx.source.owner) ) + #set( $ownerEntitiesList = [] ) + #set( $owner = $ctx.source.owner ) + #foreach( $entities in $owner ) + #set( $ownerEntities = $entities.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ownerEntitiesList.add($ownerEntitiesLast)) + #end + $util.qr($ctx.source.owner.put($ownerEntitiesList)) + $util.toJson($ownerEntitiesList) +#else + #set( $ownerEntities = $ctx.source.owner.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ctx.source.put("owner", $ownerEntitiesLast)) + $util.toJson($ctx.source.owner) +#end +## [End] Parse owner field auth for Get. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.balance.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.balance.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.balance.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.balance.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.balance.res.vtl new file mode 100644 index 00000000000..275cfc837de --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.balance.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["balance"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.res.vtl new file mode 100644 index 00000000000..5ed63df001b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["savingsRate"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.res.vtl new file mode 100644 index 00000000000..bcfbee6b50b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["totalExpenses"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.res.vtl new file mode 100644 index 00000000000..ba6d10769f8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["totalIncome"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/FinancialSummary.owner.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/FinancialSummary.owner.req.vtl new file mode 100644 index 00000000000..a9c5efa2bb8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/FinancialSummary.owner.req.vtl @@ -0,0 +1 @@ +$util.toJson({"version":"2018-05-29","payload":{}}) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/FinancialSummary.owner.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/FinancialSummary.owner.res.vtl new file mode 100644 index 00000000000..0552e7005c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/FinancialSummary.owner.res.vtl @@ -0,0 +1,20 @@ +## [Start] Parse owner field auth for Get. ** +#if( $util.isList($ctx.source.owner) ) + #set( $ownerEntitiesList = [] ) + #set( $owner = $ctx.source.owner ) + #foreach( $entities in $owner ) + #set( $ownerEntities = $entities.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ownerEntitiesList.add($ownerEntitiesLast)) + #end + $util.qr($ctx.source.owner.put($ownerEntitiesList)) + $util.toJson($ownerEntitiesList) +#else + #set( $ownerEntities = $ctx.source.owner.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ctx.source.put("owner", $ownerEntitiesLast)) + $util.toJson($ctx.source.owner) +#end +## [End] Parse owner field auth for Get. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl new file mode 100644 index 00000000000..3322375b85b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl @@ -0,0 +1,15 @@ +## [Start] Invoke AWS Lambda data source: FinancetrackerLambdaDataSource. ** +{ + "version": "2018-05-29", + "operation": "Invoke", + "payload": { + "typeName": $util.toJson($ctx.stash.get("typeName")), + "fieldName": $util.toJson($ctx.stash.get("fieldName")), + "arguments": $util.toJson($ctx.arguments), + "identity": $util.toJson($ctx.identity), + "source": $util.toJson($ctx.source), + "request": $util.toJson($ctx.request), + "prev": $util.toJson($ctx.prev) + } +} +## [End] Invoke AWS Lambda data source: FinancetrackerLambdaDataSource. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl new file mode 100644 index 00000000000..1316903313e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl @@ -0,0 +1,6 @@ +## [Start] Handle error or return result. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +$util.toJson($ctx.result) +## [End] Handle error or return result. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.auth.1.req.vtl new file mode 100644 index 00000000000..632e81cf389 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.auth.1.req.vtl @@ -0,0 +1,52 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.input.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( $isAuthorized && $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #end + #if( !$isAuthorized ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","category","limit","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerClaim0 == $ownerEntity0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #if( $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #set( $deniedFields = $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + #if( $deniedFields.size() > 0 ) + $util.error("Unauthorized on ${deniedFields}", "Unauthorized") + #end +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.init.1.req.vtl new file mode 100644 index 00000000000..407b5845fc2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.init.1.req.vtl @@ -0,0 +1,11 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +$util.qr($ctx.stash.defaultValues.put("id", $util.autoId())) +#set( $createdAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("createdAt", $createdAt)) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $createdAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.req.vtl new file mode 100644 index 00000000000..95d60a3ae11 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.req.vtl @@ -0,0 +1,66 @@ +## [Start] Create Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +$util.qr($mergedValues.put("__typename", "Budget")) +#set( $PutObject = { + "version": "2018-05-29", + "operation": "PutItem", + "attributeValues": $util.dynamodb.toMapValues($mergedValues), + "condition": $condition +} ) +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": false +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": false + } +})) +#end +## End - key condition ** +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($PutObject.put("condition", $Conditions)) +#end +#if( $ctx.stash.metadata.modelObjectKey ) + $util.qr($PutObject.put("key", $ctx.stash.metadata.modelObjectKey)) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($mergedValues.id) +} ) + $util.qr($PutObject.put("key", $Key)) +#end +$util.toJson($PutObject) +## [End] Create Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createBudget.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..34bae3ee43c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl @@ -0,0 +1,52 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.input.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( $isAuthorized && $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #end + #if( !$isAuthorized ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","totalIncome","totalExpenses","balance","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerClaim0 == $ownerEntity0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #if( $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #set( $deniedFields = $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + #if( $deniedFields.size() > 0 ) + $util.error("Unauthorized on ${deniedFields}", "Unauthorized") + #end +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.init.1.req.vtl new file mode 100644 index 00000000000..407b5845fc2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.init.1.req.vtl @@ -0,0 +1,11 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +$util.qr($ctx.stash.defaultValues.put("id", $util.autoId())) +#set( $createdAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("createdAt", $createdAt)) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $createdAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.req.vtl new file mode 100644 index 00000000000..f6571219681 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.req.vtl @@ -0,0 +1,66 @@ +## [Start] Create Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +$util.qr($mergedValues.put("__typename", "FinancialSummary")) +#set( $PutObject = { + "version": "2018-05-29", + "operation": "PutItem", + "attributeValues": $util.dynamodb.toMapValues($mergedValues), + "condition": $condition +} ) +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": false +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": false + } +})) +#end +## End - key condition ** +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($PutObject.put("condition", $Conditions)) +#end +#if( $ctx.stash.metadata.modelObjectKey ) + $util.qr($PutObject.put("key", $ctx.stash.metadata.modelObjectKey)) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($mergedValues.id) +} ) + $util.qr($PutObject.put("key", $Key)) +#end +$util.toJson($PutObject) +## [End] Create Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..1a20389d270 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.auth.1.req.vtl @@ -0,0 +1,52 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.input.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( $isAuthorized && $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #end + #if( !$isAuthorized ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","description","amount","type","category","date","receiptUrl","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerClaim0 == $ownerEntity0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #if( $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #set( $deniedFields = $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + #if( $deniedFields.size() > 0 ) + $util.error("Unauthorized on ${deniedFields}", "Unauthorized") + #end +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.init.1.req.vtl new file mode 100644 index 00000000000..407b5845fc2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.init.1.req.vtl @@ -0,0 +1,11 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +$util.qr($ctx.stash.defaultValues.put("id", $util.autoId())) +#set( $createdAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("createdAt", $createdAt)) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $createdAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.req.vtl new file mode 100644 index 00000000000..e550194e877 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.req.vtl @@ -0,0 +1,66 @@ +## [Start] Create Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +$util.qr($mergedValues.put("__typename", "Transaction")) +#set( $PutObject = { + "version": "2018-05-29", + "operation": "PutItem", + "attributeValues": $util.dynamodb.toMapValues($mergedValues), + "condition": $condition +} ) +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": false +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": false + } +})) +#end +## End - key condition ** +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($PutObject.put("condition", $Conditions)) +#end +#if( $ctx.stash.metadata.modelObjectKey ) + $util.qr($PutObject.put("key", $ctx.stash.metadata.modelObjectKey)) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($mergedValues.id) +} ) + $util.qr($PutObject.put("key", $Key)) +#end +$util.toJson($PutObject) +## [End] Create Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.createTransaction.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.res.vtl new file mode 100644 index 00000000000..a616f67a6c4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.res.vtl @@ -0,0 +1,27 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #end + #end + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.req.vtl new file mode 100644 index 00000000000..d2cb40cd15d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.req.vtl @@ -0,0 +1,58 @@ +## [Start] Delete Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $DeleteRequest = { + "version": "2018-05-29", + "operation": "DeleteItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +$util.qr($DeleteRequest.put("key", $Key)) +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($DeleteRequest.put("condition", $Conditions)) +#end +$util.toJson($DeleteRequest) +## [End] Delete Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteBudget.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl new file mode 100644 index 00000000000..a616f67a6c4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl @@ -0,0 +1,27 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #end + #end + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.req.vtl new file mode 100644 index 00000000000..d2cb40cd15d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.req.vtl @@ -0,0 +1,58 @@ +## [Start] Delete Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $DeleteRequest = { + "version": "2018-05-29", + "operation": "DeleteItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +$util.qr($DeleteRequest.put("key", $Key)) +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($DeleteRequest.put("condition", $Conditions)) +#end +$util.toJson($DeleteRequest) +## [End] Delete Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.res.vtl new file mode 100644 index 00000000000..a616f67a6c4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.res.vtl @@ -0,0 +1,27 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #end + #end + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.req.vtl new file mode 100644 index 00000000000..d2cb40cd15d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.req.vtl @@ -0,0 +1,58 @@ +## [Start] Delete Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $DeleteRequest = { + "version": "2018-05-29", + "operation": "DeleteItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +$util.qr($DeleteRequest.put("key", $Key)) +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($DeleteRequest.put("condition", $Conditions)) +#end +$util.toJson($DeleteRequest) +## [End] Delete Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.auth.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.auth.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.auth.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.res.vtl new file mode 100644 index 00000000000..c37b82e4a30 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.res.vtl @@ -0,0 +1 @@ +$util.toJson($ctx.prev.result) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.auth.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.auth.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.auth.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.res.vtl new file mode 100644 index 00000000000..c37b82e4a30 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.res.vtl @@ -0,0 +1 @@ +$util.toJson($ctx.prev.result) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.res.vtl new file mode 100644 index 00000000000..7e6e4c2607f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.res.vtl @@ -0,0 +1,55 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#set( $nullAllowedFields = [] ) +#set( $deniedFields = {} ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","category","limit","month","owner"] ) + #set( $ownerNullAllowedFields0 = ["id","category","limit","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + $util.qr($nullAllowedFields.addAll($ownerNullAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() && $nullAllowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #foreach( $entry in $util.map.copyAndRetainAllKeys($ctx.args.input, $inputFields).entrySet() ) + #if( $util.isNull($entry.value) && !$nullAllowedFields.contains($entry.key) ) + $util.qr($deniedFields.put($entry.key, "")) + #end + #end + #foreach( $deniedField in $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + $util.qr($deniedFields.put($deniedField, "")) + #end +#end +#if( $deniedFields.keySet().size() > 0 ) + $util.error("Unauthorized on ${deniedFields.keySet()}", "Unauthorized") +#end +$util.toJson({}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.init.1.req.vtl new file mode 100644 index 00000000000..dde2512aea8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.init.1.req.vtl @@ -0,0 +1,9 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +#set( $updatedAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $updatedAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.req.vtl new file mode 100644 index 00000000000..648b67d7c57 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.req.vtl @@ -0,0 +1,130 @@ +## [Start] Mutation Update resolver. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +## Initialize the vars for creating ddb expression ** +#set( $expNames = {} ) +#set( $expValues = {} ) +#set( $expSet = {} ) +#set( $expAdd = {} ) +#set( $expRemove = [] ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +## Model key ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyFields = [] ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyFields.add("$entry.key")) + #end +#else + #set( $keyFields = ["id"] ) +#end +#foreach( $entry in $util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet() ) + #if( !$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key") ) + #set( $entryKeyAttributeName = $ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key") ) + #else + #set( $entryKeyAttributeName = $entry.key ) + #end + #if( $util.isNull($entry.value) ) + #set( $discard = $expRemove.add("#$entryKeyAttributeName") ) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + #else + $util.qr($expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + $util.qr($expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))) + #end +#end +#set( $expression = "" ) +#if( !$expSet.isEmpty() ) + #set( $expression = "SET" ) + #foreach( $entry in $expSet.entrySet() ) + #set( $expression = "$expression $entry.key = $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expAdd.isEmpty() ) + #set( $expression = "$expression ADD" ) + #foreach( $entry in $expAdd.entrySet() ) + #set( $expression = "$expression $entry.key $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expRemove.isEmpty() ) + #set( $expression = "$expression REMOVE" ) + #foreach( $entry in $expRemove ) + #set( $expression = "$expression $entry" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#set( $update = {} ) +$util.qr($update.put("expression", "$expression")) +#if( !$expNames.isEmpty() ) + $util.qr($update.put("expressionNames", $expNames)) +#end +#if( !$expValues.isEmpty() ) + $util.qr($update.put("expressionValues", $expValues)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#set( $UpdateItem = { + "version": "2018-05-29", + "operation": "UpdateItem", + "key": $Key, + "update": $update +} ) +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($UpdateItem.put("condition", $Conditions)) +#end +$util.toJson($UpdateItem) +## [End] Mutation Update resolver. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateBudget.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl new file mode 100644 index 00000000000..65f81944e9b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl @@ -0,0 +1,55 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#set( $nullAllowedFields = [] ) +#set( $deniedFields = {} ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","totalIncome","totalExpenses","balance","month","owner"] ) + #set( $ownerNullAllowedFields0 = ["id","totalIncome","totalExpenses","balance","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + $util.qr($nullAllowedFields.addAll($ownerNullAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() && $nullAllowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #foreach( $entry in $util.map.copyAndRetainAllKeys($ctx.args.input, $inputFields).entrySet() ) + #if( $util.isNull($entry.value) && !$nullAllowedFields.contains($entry.key) ) + $util.qr($deniedFields.put($entry.key, "")) + #end + #end + #foreach( $deniedField in $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + $util.qr($deniedFields.put($deniedField, "")) + #end +#end +#if( $deniedFields.keySet().size() > 0 ) + $util.error("Unauthorized on ${deniedFields.keySet()}", "Unauthorized") +#end +$util.toJson({}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.init.1.req.vtl new file mode 100644 index 00000000000..dde2512aea8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.init.1.req.vtl @@ -0,0 +1,9 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +#set( $updatedAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $updatedAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.req.vtl new file mode 100644 index 00000000000..648b67d7c57 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.req.vtl @@ -0,0 +1,130 @@ +## [Start] Mutation Update resolver. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +## Initialize the vars for creating ddb expression ** +#set( $expNames = {} ) +#set( $expValues = {} ) +#set( $expSet = {} ) +#set( $expAdd = {} ) +#set( $expRemove = [] ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +## Model key ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyFields = [] ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyFields.add("$entry.key")) + #end +#else + #set( $keyFields = ["id"] ) +#end +#foreach( $entry in $util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet() ) + #if( !$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key") ) + #set( $entryKeyAttributeName = $ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key") ) + #else + #set( $entryKeyAttributeName = $entry.key ) + #end + #if( $util.isNull($entry.value) ) + #set( $discard = $expRemove.add("#$entryKeyAttributeName") ) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + #else + $util.qr($expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + $util.qr($expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))) + #end +#end +#set( $expression = "" ) +#if( !$expSet.isEmpty() ) + #set( $expression = "SET" ) + #foreach( $entry in $expSet.entrySet() ) + #set( $expression = "$expression $entry.key = $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expAdd.isEmpty() ) + #set( $expression = "$expression ADD" ) + #foreach( $entry in $expAdd.entrySet() ) + #set( $expression = "$expression $entry.key $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expRemove.isEmpty() ) + #set( $expression = "$expression REMOVE" ) + #foreach( $entry in $expRemove ) + #set( $expression = "$expression $entry" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#set( $update = {} ) +$util.qr($update.put("expression", "$expression")) +#if( !$expNames.isEmpty() ) + $util.qr($update.put("expressionNames", $expNames)) +#end +#if( !$expValues.isEmpty() ) + $util.qr($update.put("expressionValues", $expValues)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#set( $UpdateItem = { + "version": "2018-05-29", + "operation": "UpdateItem", + "key": $Key, + "update": $update +} ) +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($UpdateItem.put("condition", $Conditions)) +#end +$util.toJson($UpdateItem) +## [End] Mutation Update resolver. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.res.vtl new file mode 100644 index 00000000000..ccac8eca825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.res.vtl @@ -0,0 +1,55 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#set( $nullAllowedFields = [] ) +#set( $deniedFields = {} ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","description","amount","type","category","date","receiptUrl","owner"] ) + #set( $ownerNullAllowedFields0 = ["id","description","amount","type","category","date","receiptUrl","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + $util.qr($nullAllowedFields.addAll($ownerNullAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() && $nullAllowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #foreach( $entry in $util.map.copyAndRetainAllKeys($ctx.args.input, $inputFields).entrySet() ) + #if( $util.isNull($entry.value) && !$nullAllowedFields.contains($entry.key) ) + $util.qr($deniedFields.put($entry.key, "")) + #end + #end + #foreach( $deniedField in $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + $util.qr($deniedFields.put($deniedField, "")) + #end +#end +#if( $deniedFields.keySet().size() > 0 ) + $util.error("Unauthorized on ${deniedFields.keySet()}", "Unauthorized") +#end +$util.toJson({}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.init.1.req.vtl new file mode 100644 index 00000000000..dde2512aea8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.init.1.req.vtl @@ -0,0 +1,9 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +#set( $updatedAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $updatedAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.req.vtl new file mode 100644 index 00000000000..648b67d7c57 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.req.vtl @@ -0,0 +1,130 @@ +## [Start] Mutation Update resolver. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +## Initialize the vars for creating ddb expression ** +#set( $expNames = {} ) +#set( $expValues = {} ) +#set( $expSet = {} ) +#set( $expAdd = {} ) +#set( $expRemove = [] ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +## Model key ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyFields = [] ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyFields.add("$entry.key")) + #end +#else + #set( $keyFields = ["id"] ) +#end +#foreach( $entry in $util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet() ) + #if( !$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key") ) + #set( $entryKeyAttributeName = $ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key") ) + #else + #set( $entryKeyAttributeName = $entry.key ) + #end + #if( $util.isNull($entry.value) ) + #set( $discard = $expRemove.add("#$entryKeyAttributeName") ) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + #else + $util.qr($expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + $util.qr($expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))) + #end +#end +#set( $expression = "" ) +#if( !$expSet.isEmpty() ) + #set( $expression = "SET" ) + #foreach( $entry in $expSet.entrySet() ) + #set( $expression = "$expression $entry.key = $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expAdd.isEmpty() ) + #set( $expression = "$expression ADD" ) + #foreach( $entry in $expAdd.entrySet() ) + #set( $expression = "$expression $entry.key $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expRemove.isEmpty() ) + #set( $expression = "$expression REMOVE" ) + #foreach( $entry in $expRemove ) + #set( $expression = "$expression $entry" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#set( $update = {} ) +$util.qr($update.put("expression", "$expression")) +#if( !$expNames.isEmpty() ) + $util.qr($update.put("expressionNames", $expNames)) +#end +#if( !$expValues.isEmpty() ) + $util.qr($update.put("expressionValues", $expValues)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#set( $UpdateItem = { + "version": "2018-05-29", + "operation": "UpdateItem", + "key": $Key, + "update": $update +} ) +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($UpdateItem.put("condition", $Conditions)) +#end +$util.toJson($UpdateItem) +## [End] Mutation Update resolver. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Mutation.updateTransaction.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.message.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.message.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.message.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.message.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.message.res.vtl new file mode 100644 index 00000000000..7c27c12d67a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.message.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["message"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.success.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.success.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.success.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.success.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.success.res.vtl new file mode 100644 index 00000000000..9e3745df9e6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/NotificationResult.success.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["success"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.auth.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.auth.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.auth.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.res.vtl new file mode 100644 index 00000000000..c37b82e4a30 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.res.vtl @@ -0,0 +1 @@ +$util.toJson($ctx.prev.result) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.req.vtl new file mode 100644 index 00000000000..fd7fbfc8013 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.req.vtl @@ -0,0 +1,34 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "Query" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $expression = "" ) + #set( $expressionNames = {} ) + #set( $expressionValues = {} ) + #foreach( $item in $ctx.stash.metadata.modelObjectKey.entrySet() ) + #set( $expression = "$expression#keyCount$velocityCount = :valueCount$velocityCount AND " ) + $util.qr($expressionNames.put("#keyCount$velocityCount", $item.key)) + $util.qr($expressionValues.put(":valueCount$velocityCount", $item.value)) + #end + #set( $expression = $expression.replaceAll("AND $", "") ) + #set( $query = { + "expression": $expression, + "expressionNames": $expressionNames, + "expressionValues": $expressionValues +} ) +#else + #set( $query = { + "expression": "id = :id", + "expressionValues": { + ":id": $util.parseJson($util.dynamodb.toDynamoDBJson($ctx.args.id)) + } +} ) +#end +$util.qr($GetRequest.put("query", $query)) +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + $util.qr($GetRequest.put("filter", $util.parseJson($util.transform.toDynamoDBFilterExpression($ctx.stash.authFilter)))) +#end +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.res.vtl new file mode 100644 index 00000000000..92e05f99816 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getBudget.res.vtl @@ -0,0 +1,13 @@ +## [Start] Get Response template. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#if( !$ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) + $util.toJson($ctx.result.items[0]) +#else + #if( $ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) +$util.unauthorized() + #end + $util.toJson(null) +#end +## [End] Get Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.req.vtl new file mode 100644 index 00000000000..fd7fbfc8013 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.req.vtl @@ -0,0 +1,34 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "Query" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $expression = "" ) + #set( $expressionNames = {} ) + #set( $expressionValues = {} ) + #foreach( $item in $ctx.stash.metadata.modelObjectKey.entrySet() ) + #set( $expression = "$expression#keyCount$velocityCount = :valueCount$velocityCount AND " ) + $util.qr($expressionNames.put("#keyCount$velocityCount", $item.key)) + $util.qr($expressionValues.put(":valueCount$velocityCount", $item.value)) + #end + #set( $expression = $expression.replaceAll("AND $", "") ) + #set( $query = { + "expression": $expression, + "expressionNames": $expressionNames, + "expressionValues": $expressionValues +} ) +#else + #set( $query = { + "expression": "id = :id", + "expressionValues": { + ":id": $util.parseJson($util.dynamodb.toDynamoDBJson($ctx.args.id)) + } +} ) +#end +$util.qr($GetRequest.put("query", $query)) +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + $util.qr($GetRequest.put("filter", $util.parseJson($util.transform.toDynamoDBFilterExpression($ctx.stash.authFilter)))) +#end +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.res.vtl new file mode 100644 index 00000000000..92e05f99816 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getFinancialSummary.res.vtl @@ -0,0 +1,13 @@ +## [Start] Get Response template. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#if( !$ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) + $util.toJson($ctx.result.items[0]) +#else + #if( $ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) +$util.unauthorized() + #end + $util.toJson(null) +#end +## [End] Get Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.req.vtl new file mode 100644 index 00000000000..fd7fbfc8013 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.req.vtl @@ -0,0 +1,34 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "Query" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $expression = "" ) + #set( $expressionNames = {} ) + #set( $expressionValues = {} ) + #foreach( $item in $ctx.stash.metadata.modelObjectKey.entrySet() ) + #set( $expression = "$expression#keyCount$velocityCount = :valueCount$velocityCount AND " ) + $util.qr($expressionNames.put("#keyCount$velocityCount", $item.key)) + $util.qr($expressionValues.put(":valueCount$velocityCount", $item.value)) + #end + #set( $expression = $expression.replaceAll("AND $", "") ) + #set( $query = { + "expression": $expression, + "expressionNames": $expressionNames, + "expressionValues": $expressionValues +} ) +#else + #set( $query = { + "expression": "id = :id", + "expressionValues": { + ":id": $util.parseJson($util.dynamodb.toDynamoDBJson($ctx.args.id)) + } +} ) +#end +$util.qr($GetRequest.put("query", $query)) +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + $util.qr($GetRequest.put("filter", $util.parseJson($util.transform.toDynamoDBFilterExpression($ctx.stash.authFilter)))) +#end +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.res.vtl new file mode 100644 index 00000000000..92e05f99816 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.getTransaction.res.vtl @@ -0,0 +1,13 @@ +## [Start] Get Response template. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#if( !$ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) + $util.toJson($ctx.result.items[0]) +#else + #if( $ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) +$util.unauthorized() + #end + $util.toJson(null) +#end +## [End] Get Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.req.vtl new file mode 100644 index 00000000000..ef976126825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.req.vtl @@ -0,0 +1,50 @@ +## [Start] List Request. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $limit = $util.defaultIfNull($args.limit, 100) ) +#set( $ListRequest = { + "version": "2018-05-29", + "limit": $limit +} ) +#if( $args.nextToken ) + #set( $ListRequest.nextToken = $args.nextToken ) +#end +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + #set( $filter = $ctx.stash.authFilter ) + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = { + "and": [$filter, $args.filter] +} ) + #end +#else + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = $args.filter ) + #end +#end +#if( !$util.isNullOrEmpty($filter) ) + #set( $filterExpression = $util.parseJson($util.transform.toDynamoDBFilterExpression($filter)) ) + #if( $util.isNullOrEmpty($filterExpression) ) + $util.error("Unable to process the filter expression", "Unrecognized Filter") + #end + #if( !$util.isNullOrBlank($filterExpression.expression) ) + #if( $filterExpression.expressionValues.size() == 0 ) + $util.qr($filterExpression.remove("expressionValues")) + #end + #set( $ListRequest.filter = $filterExpression ) + #end +#end +#if( !$util.isNull($ctx.stash.modelQueryExpression) && !$util.isNullOrEmpty($ctx.stash.modelQueryExpression.expression) ) + $util.qr($ListRequest.put("operation", "Query")) + $util.qr($ListRequest.put("query", $ctx.stash.modelQueryExpression)) + #if( !$util.isNull($args.sortDirection) && $args.sortDirection == "DESC" ) + #set( $ListRequest.scanIndexForward = false ) + #else + #set( $ListRequest.scanIndexForward = true ) + #end +#else + $util.qr($ListRequest.put("operation", "Scan")) +#end +#if( !$util.isNull($ctx.stash.metadata.index) ) + #set( $ListRequest.IndexName = $ctx.stash.metadata.index ) +#end +$util.toJson($ListRequest) +## [End] List Request. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.res.vtl new file mode 100644 index 00000000000..aab9983954e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listBudgets.res.vtl @@ -0,0 +1,7 @@ +## [Start] ResponseTemplate. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.req.vtl new file mode 100644 index 00000000000..ef976126825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.req.vtl @@ -0,0 +1,50 @@ +## [Start] List Request. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $limit = $util.defaultIfNull($args.limit, 100) ) +#set( $ListRequest = { + "version": "2018-05-29", + "limit": $limit +} ) +#if( $args.nextToken ) + #set( $ListRequest.nextToken = $args.nextToken ) +#end +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + #set( $filter = $ctx.stash.authFilter ) + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = { + "and": [$filter, $args.filter] +} ) + #end +#else + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = $args.filter ) + #end +#end +#if( !$util.isNullOrEmpty($filter) ) + #set( $filterExpression = $util.parseJson($util.transform.toDynamoDBFilterExpression($filter)) ) + #if( $util.isNullOrEmpty($filterExpression) ) + $util.error("Unable to process the filter expression", "Unrecognized Filter") + #end + #if( !$util.isNullOrBlank($filterExpression.expression) ) + #if( $filterExpression.expressionValues.size() == 0 ) + $util.qr($filterExpression.remove("expressionValues")) + #end + #set( $ListRequest.filter = $filterExpression ) + #end +#end +#if( !$util.isNull($ctx.stash.modelQueryExpression) && !$util.isNullOrEmpty($ctx.stash.modelQueryExpression.expression) ) + $util.qr($ListRequest.put("operation", "Query")) + $util.qr($ListRequest.put("query", $ctx.stash.modelQueryExpression)) + #if( !$util.isNull($args.sortDirection) && $args.sortDirection == "DESC" ) + #set( $ListRequest.scanIndexForward = false ) + #else + #set( $ListRequest.scanIndexForward = true ) + #end +#else + $util.qr($ListRequest.put("operation", "Scan")) +#end +#if( !$util.isNull($ctx.stash.metadata.index) ) + #set( $ListRequest.IndexName = $ctx.stash.metadata.index ) +#end +$util.toJson($ListRequest) +## [End] List Request. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.res.vtl new file mode 100644 index 00000000000..aab9983954e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.res.vtl @@ -0,0 +1,7 @@ +## [Start] ResponseTemplate. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.req.vtl new file mode 100644 index 00000000000..ef976126825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.req.vtl @@ -0,0 +1,50 @@ +## [Start] List Request. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $limit = $util.defaultIfNull($args.limit, 100) ) +#set( $ListRequest = { + "version": "2018-05-29", + "limit": $limit +} ) +#if( $args.nextToken ) + #set( $ListRequest.nextToken = $args.nextToken ) +#end +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + #set( $filter = $ctx.stash.authFilter ) + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = { + "and": [$filter, $args.filter] +} ) + #end +#else + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = $args.filter ) + #end +#end +#if( !$util.isNullOrEmpty($filter) ) + #set( $filterExpression = $util.parseJson($util.transform.toDynamoDBFilterExpression($filter)) ) + #if( $util.isNullOrEmpty($filterExpression) ) + $util.error("Unable to process the filter expression", "Unrecognized Filter") + #end + #if( !$util.isNullOrBlank($filterExpression.expression) ) + #if( $filterExpression.expressionValues.size() == 0 ) + $util.qr($filterExpression.remove("expressionValues")) + #end + #set( $ListRequest.filter = $filterExpression ) + #end +#end +#if( !$util.isNull($ctx.stash.modelQueryExpression) && !$util.isNullOrEmpty($ctx.stash.modelQueryExpression.expression) ) + $util.qr($ListRequest.put("operation", "Query")) + $util.qr($ListRequest.put("query", $ctx.stash.modelQueryExpression)) + #if( !$util.isNull($args.sortDirection) && $args.sortDirection == "DESC" ) + #set( $ListRequest.scanIndexForward = false ) + #else + #set( $ListRequest.scanIndexForward = true ) + #end +#else + $util.qr($ListRequest.put("operation", "Scan")) +#end +#if( !$util.isNull($ctx.stash.metadata.index) ) + #set( $ListRequest.IndexName = $ctx.stash.metadata.index ) +#end +$util.toJson($ListRequest) +## [End] List Request. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.res.vtl new file mode 100644 index 00000000000..aab9983954e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Query.listTransactions.res.vtl @@ -0,0 +1,7 @@ +## [Start] ResponseTemplate. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Transaction.owner.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Transaction.owner.req.vtl new file mode 100644 index 00000000000..a9c5efa2bb8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Transaction.owner.req.vtl @@ -0,0 +1 @@ +$util.toJson({"version":"2018-05-29","payload":{}}) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Transaction.owner.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Transaction.owner.res.vtl new file mode 100644 index 00000000000..0552e7005c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/resolvers/Transaction.owner.res.vtl @@ -0,0 +1,20 @@ +## [Start] Parse owner field auth for Get. ** +#if( $util.isList($ctx.source.owner) ) + #set( $ownerEntitiesList = [] ) + #set( $owner = $ctx.source.owner ) + #foreach( $entities in $owner ) + #set( $ownerEntities = $entities.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ownerEntitiesList.add($ownerEntitiesLast)) + #end + $util.qr($ctx.source.owner.put($ownerEntitiesList)) + $util.toJson($ownerEntitiesList) +#else + #set( $ownerEntities = $ctx.source.owner.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ctx.source.put("owner", $ownerEntitiesLast)) + $util.toJson($ctx.source.owner) +#end +## [End] Parse owner field auth for Get. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/schema.graphql b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/schema.graphql new file mode 100644 index 00000000000..54fec7d3e40 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/schema.graphql @@ -0,0 +1,453 @@ +type Transaction @aws_cognito_user_pools @aws_api_key { + id: ID! + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +enum TransactionType { + INCOME + EXPENSE +} + +type Budget @aws_cognito_user_pools @aws_api_key { + id: ID! + category: String! + limit: Float! + month: String! + owner: String + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +type FinancialSummary @aws_cognito_user_pools @aws_api_key { + id: ID! + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +type CalculatedSummary { + totalIncome: Float! + totalExpenses: Float! + balance: Float! + savingsRate: Float! +} + +type NotificationResult { + success: Boolean! + message: String! +} + +type TransactionConnection { + items: [Transaction] + nextToken: String +} + +type Query { + calculateFinancialSummary: CalculatedSummary + getTransactionsByCategory(category: String!, limit: Int): TransactionConnection + getTransaction(id: ID!): Transaction @aws_api_key @aws_cognito_user_pools + listTransactions(filter: ModelTransactionFilterInput, limit: Int, nextToken: String): ModelTransactionConnection @aws_api_key @aws_cognito_user_pools + getBudget(id: ID!): Budget @aws_api_key @aws_cognito_user_pools + listBudgets(filter: ModelBudgetFilterInput, limit: Int, nextToken: String): ModelBudgetConnection @aws_api_key @aws_cognito_user_pools + getFinancialSummary(id: ID!): FinancialSummary @aws_api_key @aws_cognito_user_pools + listFinancialSummaries(filter: ModelFinancialSummaryFilterInput, limit: Int, nextToken: String): ModelFinancialSummaryConnection @aws_api_key @aws_cognito_user_pools +} + +type Mutation { + sendMonthlyReport(email: String!): NotificationResult + sendBudgetAlert(email: String!, category: String!, exceeded: Float!): NotificationResult + createTransaction(input: CreateTransactionInput!, condition: ModelTransactionConditionInput): Transaction @aws_cognito_user_pools + updateTransaction(input: UpdateTransactionInput!, condition: ModelTransactionConditionInput): Transaction @aws_cognito_user_pools + deleteTransaction(input: DeleteTransactionInput!, condition: ModelTransactionConditionInput): Transaction @aws_cognito_user_pools + createBudget(input: CreateBudgetInput!, condition: ModelBudgetConditionInput): Budget @aws_cognito_user_pools + updateBudget(input: UpdateBudgetInput!, condition: ModelBudgetConditionInput): Budget @aws_cognito_user_pools + deleteBudget(input: DeleteBudgetInput!, condition: ModelBudgetConditionInput): Budget @aws_cognito_user_pools + createFinancialSummary(input: CreateFinancialSummaryInput!, condition: ModelFinancialSummaryConditionInput): FinancialSummary @aws_cognito_user_pools + updateFinancialSummary(input: UpdateFinancialSummaryInput!, condition: ModelFinancialSummaryConditionInput): FinancialSummary @aws_cognito_user_pools + deleteFinancialSummary(input: DeleteFinancialSummaryInput!, condition: ModelFinancialSummaryConditionInput): FinancialSummary @aws_cognito_user_pools +} + +input ModelStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelBooleanInput { + ne: Boolean + eq: Boolean + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelSubscriptionStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + in: [String] + notIn: [String] +} + +input ModelSubscriptionIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + in: [Int] + notIn: [Int] +} + +input ModelSubscriptionFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + in: [Float] + notIn: [Float] +} + +input ModelSubscriptionBooleanInput { + ne: Boolean + eq: Boolean +} + +input ModelSubscriptionIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + in: [ID] + notIn: [ID] +} + +enum ModelAttributeTypes { + binary + binarySet + bool + list + map + number + numberSet + string + stringSet + _null +} + +input ModelSizeInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] +} + +enum ModelSortDirection { + ASC + DESC +} + +type ModelTransactionConnection @aws_api_key @aws_cognito_user_pools { + items: [Transaction]! + nextToken: String +} + +input ModelTransactionTypeInput { + eq: TransactionType + ne: TransactionType +} + +input ModelTransactionFilterInput { + id: ModelIDInput + description: ModelStringInput + amount: ModelFloatInput + type: ModelTransactionTypeInput + category: ModelStringInput + date: ModelStringInput + receiptUrl: ModelStringInput + owner: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelTransactionFilterInput] + or: [ModelTransactionFilterInput] + not: ModelTransactionFilterInput +} + +input ModelTransactionConditionInput { + description: ModelStringInput + amount: ModelFloatInput + type: ModelTransactionTypeInput + category: ModelStringInput + date: ModelStringInput + receiptUrl: ModelStringInput + owner: ModelStringInput + and: [ModelTransactionConditionInput] + or: [ModelTransactionConditionInput] + not: ModelTransactionConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateTransactionInput { + id: ID + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String +} + +input UpdateTransactionInput { + id: ID! + description: String + amount: Float + type: TransactionType + category: String + date: AWSDateTime + receiptUrl: String + owner: String +} + +input DeleteTransactionInput { + id: ID! +} + +input ModelSubscriptionTransactionFilterInput { + id: ModelSubscriptionIDInput + description: ModelSubscriptionStringInput + amount: ModelSubscriptionFloatInput + type: ModelSubscriptionStringInput + category: ModelSubscriptionStringInput + date: ModelSubscriptionStringInput + receiptUrl: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionTransactionFilterInput] + or: [ModelSubscriptionTransactionFilterInput] + owner: ModelStringInput +} + +type Subscription { + onCreateTransaction(filter: ModelSubscriptionTransactionFilterInput, owner: String): Transaction @aws_subscribe(mutations: ["createTransaction"]) @aws_api_key @aws_cognito_user_pools + onUpdateTransaction(filter: ModelSubscriptionTransactionFilterInput, owner: String): Transaction @aws_subscribe(mutations: ["updateTransaction"]) @aws_api_key @aws_cognito_user_pools + onDeleteTransaction(filter: ModelSubscriptionTransactionFilterInput, owner: String): Transaction @aws_subscribe(mutations: ["deleteTransaction"]) @aws_api_key @aws_cognito_user_pools + onCreateBudget(filter: ModelSubscriptionBudgetFilterInput, owner: String): Budget @aws_subscribe(mutations: ["createBudget"]) @aws_api_key @aws_cognito_user_pools + onUpdateBudget(filter: ModelSubscriptionBudgetFilterInput, owner: String): Budget @aws_subscribe(mutations: ["updateBudget"]) @aws_api_key @aws_cognito_user_pools + onDeleteBudget(filter: ModelSubscriptionBudgetFilterInput, owner: String): Budget @aws_subscribe(mutations: ["deleteBudget"]) @aws_api_key @aws_cognito_user_pools + onCreateFinancialSummary(filter: ModelSubscriptionFinancialSummaryFilterInput, owner: String): FinancialSummary @aws_subscribe(mutations: ["createFinancialSummary"]) @aws_api_key @aws_cognito_user_pools + onUpdateFinancialSummary(filter: ModelSubscriptionFinancialSummaryFilterInput, owner: String): FinancialSummary @aws_subscribe(mutations: ["updateFinancialSummary"]) @aws_api_key @aws_cognito_user_pools + onDeleteFinancialSummary(filter: ModelSubscriptionFinancialSummaryFilterInput, owner: String): FinancialSummary @aws_subscribe(mutations: ["deleteFinancialSummary"]) @aws_api_key @aws_cognito_user_pools +} + +type ModelBudgetConnection @aws_api_key @aws_cognito_user_pools { + items: [Budget]! + nextToken: String +} + +input ModelBudgetFilterInput { + id: ModelIDInput + category: ModelStringInput + limit: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelBudgetFilterInput] + or: [ModelBudgetFilterInput] + not: ModelBudgetFilterInput +} + +input ModelBudgetConditionInput { + category: ModelStringInput + limit: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + and: [ModelBudgetConditionInput] + or: [ModelBudgetConditionInput] + not: ModelBudgetConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateBudgetInput { + id: ID + category: String! + limit: Float! + month: String! + owner: String +} + +input UpdateBudgetInput { + id: ID! + category: String + limit: Float + month: String + owner: String +} + +input DeleteBudgetInput { + id: ID! +} + +input ModelSubscriptionBudgetFilterInput { + id: ModelSubscriptionIDInput + category: ModelSubscriptionStringInput + limit: ModelSubscriptionFloatInput + month: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionBudgetFilterInput] + or: [ModelSubscriptionBudgetFilterInput] + owner: ModelStringInput +} + +type ModelFinancialSummaryConnection @aws_api_key @aws_cognito_user_pools { + items: [FinancialSummary]! + nextToken: String +} + +input ModelFinancialSummaryFilterInput { + id: ModelIDInput + totalIncome: ModelFloatInput + totalExpenses: ModelFloatInput + balance: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelFinancialSummaryFilterInput] + or: [ModelFinancialSummaryFilterInput] + not: ModelFinancialSummaryFilterInput +} + +input ModelFinancialSummaryConditionInput { + totalIncome: ModelFloatInput + totalExpenses: ModelFloatInput + balance: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + and: [ModelFinancialSummaryConditionInput] + or: [ModelFinancialSummaryConditionInput] + not: ModelFinancialSummaryConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateFinancialSummaryInput { + id: ID + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String +} + +input UpdateFinancialSummaryInput { + id: ID! + totalIncome: Float + totalExpenses: Float + balance: Float + month: String + owner: String +} + +input DeleteFinancialSummaryInput { + id: ID! +} + +input ModelSubscriptionFinancialSummaryFilterInput { + id: ModelSubscriptionIDInput + totalIncome: ModelSubscriptionFloatInput + totalExpenses: ModelSubscriptionFloatInput + balance: ModelSubscriptionFloatInput + month: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionFinancialSummaryFilterInput] + or: [ModelSubscriptionFinancialSummaryFilterInput] + owner: ModelStringInput +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/Budget.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/Budget.json new file mode 100644 index 00000000000..534b11b1c35 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/Budget.json @@ -0,0 +1,1204 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "BudgetTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "BudgetIAMRole782EC899": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "BudgetIAMRole3af77f-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "BudgetIAMRoleDefaultPolicyAF75E5EB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "BudgetTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "BudgetIAMRoleDefaultPolicyAF75E5EB", + "Roles": [ + { + "Ref": "BudgetIAMRole782EC899" + } + ] + } + }, + "BudgetDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "BudgetTable" + } + }, + "Name": "BudgetTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "BudgetIAMRole782EC899", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "BudgetIAMRole782EC899" + ] + }, + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "GetBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListBudgetsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listBudgets.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listBudgets.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "ListBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listBudgets", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listBudgets\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "CreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "UpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "DeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "BudgetownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Budget\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Budget" + } + } + }, + "Outputs": { + "GetAttBudgetTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "BudgetTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetTable:StreamArn" + ] + ] + } + } + }, + "GetAttBudgetTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "BudgetTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetTable:Name" + ] + ] + } + } + }, + "GetAttBudgetDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetDataSource:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/CustomResources.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/CustomResources.json new file mode 100644 index 00000000000..5fe357d6096 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/CustomResources.json @@ -0,0 +1,61 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "An auto-generated nested stack.", + "Metadata": {}, + "Parameters": { + "AppSyncApiId": { + "Type": "String", + "Description": "The id of the AppSync API associated with this project." + }, + "AppSyncApiName": { + "Type": "String", + "Description": "The name of the AppSync API", + "Default": "AppSyncSimpleTransform" + }, + "env": { + "Type": "String", + "Description": "The environment name. e.g. Dev, Test, or Production", + "Default": "NONE" + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "The S3 bucket containing all deployment assets for the project." + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory." + } + }, + "Resources": { + "EmptyResource": { + "Type": "Custom::EmptyResource", + "Condition": "AlwaysFalse" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + ] + }, + "AlwaysFalse": { + "Fn::Equals": [ + "true", + "false" + ] + } + }, + "Outputs": { + "EmptyOutput": { + "Description": "An empty output. You may delete this if you have at least one resource above.", + "Value": "" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/FinancialSummary.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/FinancialSummary.json new file mode 100644 index 00000000000..367e33f8da6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/FinancialSummary.json @@ -0,0 +1,1204 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "FinancialSummaryTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "FinancialSummaryIAMRole994EE173": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "FinancialSummaryIAMRedd6e3-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "FinancialSummaryIAMRoleDefaultPolicyD577302F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FinancialSummaryIAMRoleDefaultPolicyD577302F", + "Roles": [ + { + "Ref": "FinancialSummaryIAMRole994EE173" + } + ] + } + }, + "FinancialSummaryDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "FinancialSummaryTable" + } + }, + "Name": "FinancialSummaryTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancialSummaryIAMRole994EE173", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "FinancialSummaryIAMRole994EE173" + ] + }, + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "GetFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListFinancialSummariesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listFinancialSummaries.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listFinancialSummaries.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "ListFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listFinancialSummaries", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listFinancialSummaries\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "CreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "UpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "DeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "FinancialSummaryownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"FinancialSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "FinancialSummary" + } + } + }, + "Outputs": { + "GetAttFinancialSummaryTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryTable:StreamArn" + ] + ] + } + } + }, + "GetAttFinancialSummaryTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "FinancialSummaryTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryTable:Name" + ] + ] + } + } + }, + "GetAttFinancialSummaryDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryDataSource:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/FunctionDirectiveStack.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/FunctionDirectiveStack.json new file mode 100644 index 00000000000..b363d73a0fd --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/FunctionDirectiveStack.json @@ -0,0 +1,369 @@ +{ + "Description": "An auto-generated nested stack for the @function directive.", + "AWSTemplateFormatVersion": "2010-09-09", + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + } + }, + "Resources": { + "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "FinancetrackerLambdaDataSourceServiceRoleDefaultPolicy28298548": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FinancetrackerLambdaDataSourceServiceRoleDefaultPolicy28298548", + "Roles": [ + { + "Ref": "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB" + } + ] + } + }, + "FinancetrackerLambdaDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "LambdaConfig": { + "LambdaFunctionArn": { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + } + }, + "Name": "FinancetrackerLambdaDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB", + "Arn" + ] + }, + "Type": "AWS_LAMBDA" + } + }, + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancetrackerLambdaDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "InvokeFinancetrackerLambdaDataSource", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancetrackerLambdaDataSource" + ] + }, + "QuerycalculateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "calculateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"calculateFinancialSummary\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.calculateFinancialSummary.res.vtl" + ] + ] + }, + "TypeName": "Query" + } + }, + "MutationsendMonthlyReportResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "sendMonthlyReport", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendMonthlyReport\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.sendMonthlyReport.res.vtl" + ] + ] + }, + "TypeName": "Mutation" + } + }, + "MutationsendBudgetAlertResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "sendBudgetAlert", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendBudgetAlert\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.sendBudgetAlert.res.vtl" + ] + ] + }, + "TypeName": "Mutation" + } + }, + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryCalculateFinancialSummaryAuthFN", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.calculateFinancialSummary.auth.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + } + }, + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/Transaction.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/Transaction.json new file mode 100644 index 00000000000..8a7e4a3ef69 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/build/stacks/Transaction.json @@ -0,0 +1,1536 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "TransactionTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "TransactionIAMRole04BA2E25": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "TransactionIAMRole373077-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "TransactionIAMRoleDefaultPolicy87E82DF4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "TransactionTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionIAMRoleDefaultPolicy87E82DF4", + "Roles": [ + { + "Ref": "TransactionIAMRole04BA2E25" + } + ] + } + }, + "TransactionDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "TransactionTable" + } + }, + "Name": "TransactionTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionIAMRole04BA2E25", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "TransactionIAMRole04BA2E25" + ] + }, + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.postAuth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "GetTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListTransactionsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listTransactions.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listTransactions.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "ListTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listTransactions", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTransactions\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.init.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "CreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.init.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "UpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "DeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.res.vtl" + ] + ] + } + } + }, + "SubscriptiononCreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "TransactionOwnerDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Transaction.owner.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Transaction.owner.res.vtl" + ] + ] + } + } + }, + "TransactionownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Transaction\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Transaction" + } + } + }, + "Outputs": { + "GetAttTransactionTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "TransactionTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionTable:StreamArn" + ] + ] + } + } + }, + "GetAttTransactionTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "TransactionTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionTable:Name" + ] + ] + } + } + }, + "GetAttTransactionDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionDataSource:Name" + ] + ] + } + } + }, + "transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Value": { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Value": { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Value": { + "Fn::GetAtt": [ + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Value": { + "Fn::GetAtt": [ + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Value": { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Value": { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Value": { + "Fn::GetAtt": [ + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E", + "FunctionId" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/cli-inputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/cli-inputs.json new file mode 100644 index 00000000000..6b36977ddd0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/cli-inputs.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "serviceConfiguration": { + "apiName": "financetracker", + "serviceName": "AppSync", + "defaultAuthType": { + "mode": "API_KEY", + "expirationTime": 7 + }, + "additionalAuthTypes": [ + { + "mode": "AMAZON_COGNITO_USER_POOLS", + "cognitoUserPoolId": "authfinancetracker331811e6" + } + ] + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/parameters.json new file mode 100644 index 00000000000..15962ecd241 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/parameters.json @@ -0,0 +1,11 @@ +{ + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/resolvers/README.md b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/resolvers/README.md new file mode 100644 index 00000000000..1634d295144 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/resolvers/README.md @@ -0,0 +1,2 @@ +Any resolvers that you add in this directory will override the ones automatically generated by Amplify CLI and will be directly copied to the cloud. +For more information, visit [https://docs.amplify.aws/cli/graphql-transformer/resolvers](https://docs.amplify.aws/cli/graphql-transformer/resolvers) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/schema.graphql b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/schema.graphql new file mode 100644 index 00000000000..6a1416cb020 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/schema.graphql @@ -0,0 +1,60 @@ +type Transaction @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String +} + +enum TransactionType { + INCOME + EXPENSE +} + +type Budget @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + category: String! + limit: Float! + month: String! + owner: String +} + +type FinancialSummary @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String +} + +type CalculatedSummary { + totalIncome: Float! @auth(rules: [{ allow: public }]) + totalExpenses: Float! @auth(rules: [{ allow: public }]) + balance: Float! @auth(rules: [{ allow: public }]) + savingsRate: Float! @auth(rules: [{ allow: public }]) +} + +type NotificationResult { + success: Boolean! @auth(rules: [{ allow: public }]) + message: String! @auth(rules: [{ allow: public }]) +} + + +type TransactionConnection { + items: [Transaction] + nextToken: String +} + +type Query { + calculateFinancialSummary: CalculatedSummary @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) + getTransactionsByCategory(category: String!, limit: Int): TransactionConnection +} + +type Mutation { + sendMonthlyReport(email: String!): NotificationResult @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) + sendBudgetAlert(email: String!, category: String!, exceeded: Float!): NotificationResult @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/stacks/CustomResources.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/stacks/CustomResources.json new file mode 100644 index 00000000000..f95feea378a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/stacks/CustomResources.json @@ -0,0 +1,58 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "An auto-generated nested stack.", + "Metadata": {}, + "Parameters": { + "AppSyncApiId": { + "Type": "String", + "Description": "The id of the AppSync API associated with this project." + }, + "AppSyncApiName": { + "Type": "String", + "Description": "The name of the AppSync API", + "Default": "AppSyncSimpleTransform" + }, + "env": { + "Type": "String", + "Description": "The environment name. e.g. Dev, Test, or Production", + "Default": "NONE" + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "The S3 bucket containing all deployment assets for the project." + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory." + } + }, + "Resources": { + "EmptyResource": { + "Type": "Custom::EmptyResource", + "Condition": "AlwaysFalse" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + ] + }, + "AlwaysFalse": { + "Fn::Equals": ["true", "false"] + } + }, + "Outputs": { + "EmptyOutput": { + "Description": "An empty output. You may delete this if you have at least one resource above.", + "Value": "" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/transform.conf.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/transform.conf.json new file mode 100644 index 00000000000..d0421b1df09 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/api/financetracker/transform.conf.json @@ -0,0 +1,4 @@ +{ + "Version": 5, + "ElasticsearchWarning": true +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json new file mode 100644 index 00000000000..5e89110762c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json @@ -0,0 +1,413 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"auth-Cognito\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "identityPoolName": { + "Type": "String" + }, + "allowUnauthenticatedIdentities": { + "Type": "String" + }, + "resourceNameTruncated": { + "Type": "String" + }, + "userPoolName": { + "Type": "String" + }, + "autoVerifiedAttributes": { + "Type": "CommaDelimitedList" + }, + "mfaConfiguration": { + "Type": "String" + }, + "mfaTypes": { + "Type": "CommaDelimitedList" + }, + "smsAuthenticationMessage": { + "Type": "String" + }, + "smsVerificationMessage": { + "Type": "String" + }, + "emailVerificationSubject": { + "Type": "String" + }, + "emailVerificationMessage": { + "Type": "String" + }, + "defaultPasswordPolicy": { + "Type": "String" + }, + "passwordPolicyMinLength": { + "Type": "String" + }, + "passwordPolicyCharacters": { + "Type": "CommaDelimitedList" + }, + "requiredAttributes": { + "Type": "CommaDelimitedList" + }, + "aliasAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientGenerateSecret": { + "Type": "String" + }, + "userpoolClientRefreshTokenValidity": { + "Type": "String" + }, + "userpoolClientWriteAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientReadAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientLambdaRole": { + "Type": "String" + }, + "userpoolClientSetAttributes": { + "Type": "String" + }, + "sharedId": { + "Type": "String" + }, + "resourceName": { + "Type": "String" + }, + "authSelections": { + "Type": "String" + }, + "useDefault": { + "Type": "String" + }, + "usernameAttributes": { + "Type": "CommaDelimitedList" + }, + "userPoolGroupList": { + "Type": "CommaDelimitedList" + }, + "serviceName": { + "Type": "String" + }, + "usernameCaseSensitive": { + "Type": "String" + }, + "useEnabledMfas": { + "Type": "String" + }, + "authRoleArn": { + "Type": "String" + }, + "unauthRoleArn": { + "Type": "String" + }, + "breakCircularDependency": { + "Type": "String" + }, + "dependsOn": { + "Type": "CommaDelimitedList" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "UserPool": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AutoVerifiedAttributes": [ + "email" + ], + "EmailVerificationMessage": { + "Ref": "emailVerificationMessage" + }, + "EmailVerificationSubject": { + "Ref": "emailVerificationSubject" + }, + "MfaConfiguration": { + "Ref": "mfaConfiguration" + }, + "Policies": { + "PasswordPolicy": { + "MinimumLength": { + "Ref": "passwordPolicyMinLength" + }, + "RequireLowercase": false, + "RequireNumbers": false, + "RequireSymbols": false, + "RequireUppercase": false + } + }, + "Schema": [ + { + "Mutable": true, + "Name": "email", + "Required": true + } + ], + "UserAttributeUpdateSettings": { + "AttributesRequireVerificationBeforeUpdate": [ + "email" + ] + }, + "UserPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userPoolName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "userPoolName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "UsernameAttributes": { + "Ref": "usernameAttributes" + }, + "UsernameConfiguration": { + "CaseSensitive": false + } + } + }, + "UserPoolClientWeb": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_clientWeb", + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClient": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_client", + "GenerateSecret": { + "Ref": "userpoolClientGenerateSecret" + }, + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClientRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + }, + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userpoolClientLambdaRole" + }, + { + "Fn::Join": [ + "", + [ + "upClientLambdaRole331811e6", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPool": { + "Type": "AWS::Cognito::IdentityPool", + "Properties": { + "AllowUnauthenticatedIdentities": { + "Ref": "allowUnauthenticatedIdentities" + }, + "CognitoIdentityProviders": [ + { + "ClientId": { + "Ref": "UserPoolClient" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + }, + { + "ClientId": { + "Ref": "UserPoolClientWeb" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + } + ], + "IdentityPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker331811e6_identitypool_331811e6", + { + "Fn::Join": [ + "", + [ + "financetracker331811e6_identitypool_331811e6__", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPoolRoleMap": { + "Type": "AWS::Cognito::IdentityPoolRoleAttachment", + "Properties": { + "IdentityPoolId": { + "Ref": "IdentityPool" + }, + "Roles": { + "unauthenticated": { + "Ref": "unauthRoleArn" + }, + "authenticated": { + "Ref": "authRoleArn" + } + } + }, + "DependsOn": [ + "IdentityPool" + ] + } + }, + "Outputs": { + "IdentityPoolId": { + "Description": "Id for the identity pool", + "Value": { + "Ref": "IdentityPool" + } + }, + "IdentityPoolName": { + "Value": { + "Fn::GetAtt": [ + "IdentityPool", + "Name" + ] + } + }, + "UserPoolId": { + "Description": "Id for the user pool", + "Value": { + "Ref": "UserPool" + } + }, + "UserPoolArn": { + "Description": "Arn for the user pool", + "Value": { + "Fn::GetAtt": [ + "UserPool", + "Arn" + ] + } + }, + "UserPoolName": { + "Value": { + "Ref": "userPoolName" + } + }, + "AppClientIDWeb": { + "Description": "The user pool app client id for web", + "Value": { + "Ref": "UserPoolClientWeb" + } + }, + "AppClientID": { + "Description": "The user pool app client id", + "Value": { + "Ref": "UserPoolClient" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/build/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/build/parameters.json new file mode 100644 index 00000000000..e003ff012bb --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/build/parameters.json @@ -0,0 +1,59 @@ +{ + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": [ + "email" + ], + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS Text Message" + ], + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": [], + "requiredAttributes": [ + "email" + ], + "aliasAttributes": [], + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": [ + "email" + ], + "userpoolClientReadAttributes": [ + "email" + ], + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": [ + "email" + ], + "userPoolGroupList": [], + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": [] +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/cli-inputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/cli-inputs.json new file mode 100644 index 00000000000..92b925d5aa2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/auth/financetracker331811e6/cli-inputs.json @@ -0,0 +1,62 @@ +{ + "version": "1", + "cognitoConfig": { + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": [ + "email" + ], + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS Text Message" + ], + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": [], + "requiredAttributes": [ + "email" + ], + "aliasAttributes": [], + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": [ + "email" + ], + "userpoolClientReadAttributes": [ + "email" + ], + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": [ + "email" + ], + "userPoolGroupList": [], + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": [] + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/api/financetracker/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/api/financetracker/build/cloudformation-template.json new file mode 100644 index 00000000000..42f68b18272 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/api/financetracker/build/cloudformation-template.json @@ -0,0 +1,1196 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Default": "NONE" + }, + "AppSyncApiName": { + "Type": "String", + "Default": "AppSyncSimpleTransform" + }, + "AuthCognitoUserPoolId": { + "Type": "String" + }, + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "An S3 Bucket name where assets are deployed" + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root of the deployment directory." + } + }, + "Resources": { + "GraphQLAPI": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AdditionalAuthenticationProviders": [ + { + "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", + "UserPoolConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "UserPoolId": { + "Ref": "AuthCognitoUserPoolId" + } + } + } + ], + "AuthenticationType": "API_KEY", + "Name": { + "Fn::Join": [ + "", + [ + { + "Ref": "AppSyncApiName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "GraphQLAPITransformerSchema3CB2AE18": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DefinitionS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/schema.graphql" + ] + ] + } + } + }, + "GraphQLAPIDefaultApiKey215A6DD7": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Expires": 1777576997 + } + }, + "GraphQLAPINONEDS95A13CF0": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Name": "NONE_DS", + "Type": "NONE" + } + }, + "Transaction": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Transaction.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "Budget": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Budget.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FinancialSummary": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FinancialSummary.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FunctionDirectiveStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FunctionDirectiveStack.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalIncomeDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalIncomeResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalIncome", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalIncome\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalExpensesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalExpensesResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalExpenses", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalExpenses\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryBalanceDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarybalanceResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "balance", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"balance\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummarySavingsRateDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarysavingsRateResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "savingsRate", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"savingsRate\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultSuccessDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultsuccessResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "success", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"success\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultMessageDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultmessageResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "message", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"message\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CustomResourcesjson": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "AppSyncApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "AppSyncApiName": { + "Ref": "AppSyncApiName" + }, + "env": { + "Ref": "env" + }, + "S3DeploymentBucket": { + "Ref": "S3DeploymentBucket" + }, + "S3DeploymentRootKey": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "/", + [ + "https://s3.amazonaws.com", + { + "Ref": "S3DeploymentBucket" + }, + { + "Ref": "S3DeploymentRootKey" + }, + "stacks", + "CustomResources.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPI", + "GraphQLAPITransformerSchema3CB2AE18", + "Transaction", + "Budget", + "FinancialSummary", + "FunctionDirectiveStack" + ] + } + }, + "Outputs": { + "GraphQLAPIKeyOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPIDefaultApiKey215A6DD7", + "ApiKey" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiKey" + ] + ] + } + } + }, + "GraphQLAPIIdOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiId" + ] + ] + } + } + }, + "GraphQLAPIEndpointOutput": { + "Description": "Your GraphQL API endpoint.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "GraphQLUrl" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiEndpoint" + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"api-AppSync\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json new file mode 100644 index 00000000000..5e89110762c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json @@ -0,0 +1,413 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"auth-Cognito\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "identityPoolName": { + "Type": "String" + }, + "allowUnauthenticatedIdentities": { + "Type": "String" + }, + "resourceNameTruncated": { + "Type": "String" + }, + "userPoolName": { + "Type": "String" + }, + "autoVerifiedAttributes": { + "Type": "CommaDelimitedList" + }, + "mfaConfiguration": { + "Type": "String" + }, + "mfaTypes": { + "Type": "CommaDelimitedList" + }, + "smsAuthenticationMessage": { + "Type": "String" + }, + "smsVerificationMessage": { + "Type": "String" + }, + "emailVerificationSubject": { + "Type": "String" + }, + "emailVerificationMessage": { + "Type": "String" + }, + "defaultPasswordPolicy": { + "Type": "String" + }, + "passwordPolicyMinLength": { + "Type": "String" + }, + "passwordPolicyCharacters": { + "Type": "CommaDelimitedList" + }, + "requiredAttributes": { + "Type": "CommaDelimitedList" + }, + "aliasAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientGenerateSecret": { + "Type": "String" + }, + "userpoolClientRefreshTokenValidity": { + "Type": "String" + }, + "userpoolClientWriteAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientReadAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientLambdaRole": { + "Type": "String" + }, + "userpoolClientSetAttributes": { + "Type": "String" + }, + "sharedId": { + "Type": "String" + }, + "resourceName": { + "Type": "String" + }, + "authSelections": { + "Type": "String" + }, + "useDefault": { + "Type": "String" + }, + "usernameAttributes": { + "Type": "CommaDelimitedList" + }, + "userPoolGroupList": { + "Type": "CommaDelimitedList" + }, + "serviceName": { + "Type": "String" + }, + "usernameCaseSensitive": { + "Type": "String" + }, + "useEnabledMfas": { + "Type": "String" + }, + "authRoleArn": { + "Type": "String" + }, + "unauthRoleArn": { + "Type": "String" + }, + "breakCircularDependency": { + "Type": "String" + }, + "dependsOn": { + "Type": "CommaDelimitedList" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "UserPool": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AutoVerifiedAttributes": [ + "email" + ], + "EmailVerificationMessage": { + "Ref": "emailVerificationMessage" + }, + "EmailVerificationSubject": { + "Ref": "emailVerificationSubject" + }, + "MfaConfiguration": { + "Ref": "mfaConfiguration" + }, + "Policies": { + "PasswordPolicy": { + "MinimumLength": { + "Ref": "passwordPolicyMinLength" + }, + "RequireLowercase": false, + "RequireNumbers": false, + "RequireSymbols": false, + "RequireUppercase": false + } + }, + "Schema": [ + { + "Mutable": true, + "Name": "email", + "Required": true + } + ], + "UserAttributeUpdateSettings": { + "AttributesRequireVerificationBeforeUpdate": [ + "email" + ] + }, + "UserPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userPoolName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "userPoolName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "UsernameAttributes": { + "Ref": "usernameAttributes" + }, + "UsernameConfiguration": { + "CaseSensitive": false + } + } + }, + "UserPoolClientWeb": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_clientWeb", + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClient": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_client", + "GenerateSecret": { + "Ref": "userpoolClientGenerateSecret" + }, + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClientRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + }, + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userpoolClientLambdaRole" + }, + { + "Fn::Join": [ + "", + [ + "upClientLambdaRole331811e6", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPool": { + "Type": "AWS::Cognito::IdentityPool", + "Properties": { + "AllowUnauthenticatedIdentities": { + "Ref": "allowUnauthenticatedIdentities" + }, + "CognitoIdentityProviders": [ + { + "ClientId": { + "Ref": "UserPoolClient" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + }, + { + "ClientId": { + "Ref": "UserPoolClientWeb" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + } + ], + "IdentityPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker331811e6_identitypool_331811e6", + { + "Fn::Join": [ + "", + [ + "financetracker331811e6_identitypool_331811e6__", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPoolRoleMap": { + "Type": "AWS::Cognito::IdentityPoolRoleAttachment", + "Properties": { + "IdentityPoolId": { + "Ref": "IdentityPool" + }, + "Roles": { + "unauthenticated": { + "Ref": "unauthRoleArn" + }, + "authenticated": { + "Ref": "authRoleArn" + } + } + }, + "DependsOn": [ + "IdentityPool" + ] + } + }, + "Outputs": { + "IdentityPoolId": { + "Description": "Id for the identity pool", + "Value": { + "Ref": "IdentityPool" + } + }, + "IdentityPoolName": { + "Value": { + "Fn::GetAtt": [ + "IdentityPool", + "Name" + ] + } + }, + "UserPoolId": { + "Description": "Id for the user pool", + "Value": { + "Ref": "UserPool" + } + }, + "UserPoolArn": { + "Description": "Arn for the user pool", + "Value": { + "Fn::GetAtt": [ + "UserPool", + "Arn" + ] + } + }, + "UserPoolName": { + "Value": { + "Ref": "userPoolName" + } + }, + "AppClientIDWeb": { + "Description": "The user pool app client id for web", + "Value": { + "Ref": "UserPoolClientWeb" + } + }, + "AppClientID": { + "Description": "The user pool app client id", + "Value": { + "Ref": "UserPoolClient" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/awscloudformation/build/root-cloudformation-stack.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/awscloudformation/build/root-cloudformation-stack.json new file mode 100644 index 00000000000..3f6b72c4bed --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/awscloudformation/build/root-cloudformation-stack.json @@ -0,0 +1,578 @@ +{ + "Description": "Root Stack for AWS Amplify CLI", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "DeploymentBucketName": { + "Type": "String", + "Default": "DeploymentBucket", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "AuthRoleName": { + "Type": "String", + "Default": "AuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "UnauthRoleName": { + "Type": "String", + "Default": "UnAuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + } + }, + "Outputs": { + "Region": { + "Description": "CloudFormation provider root stack Region", + "Value": { + "Ref": "AWS::Region" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-Region" + } + } + }, + "StackName": { + "Description": "CloudFormation provider root stack ID", + "Value": { + "Ref": "AWS::StackName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackName" + } + } + }, + "StackId": { + "Description": "CloudFormation provider root stack name", + "Value": { + "Ref": "AWS::StackId" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackId" + } + } + }, + "AuthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + "UnauthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + }, + "DeploymentBucketName": { + "Description": "CloudFormation provider root stack deployment bucket name", + "Value": { + "Ref": "DeploymentBucketName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-DeploymentBucketName" + } + } + }, + "AuthRoleName": { + "Value": { + "Ref": "AuthRole" + } + }, + "UnauthRoleName": { + "Value": { + "Ref": "UnauthRole" + } + } + }, + "Resources": { + "DeploymentBucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Ref": "DeploymentBucketName" + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DeploymentBucketBlockHTTP": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + } + ] + ] + } + ], + "Condition": { + "Bool": { + "aws:SecureTransport": false + } + } + } + ] + } + } + }, + "AuthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "AuthRoleName" + } + } + }, + "UnauthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "UnauthRoleName" + } + } + }, + "apifinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/api/cloudformation-template.json", + "Parameters": { + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + }, + "S3DeploymentBucket": "amplify-financetracker-x-x-deployment", + "S3DeploymentRootKey": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33", + "env": "x" + } + } + }, + "authfinancetracker331811e6": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/auth/financetracker331811e6-cloudformation-template.json", + "Parameters": { + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": "email", + "mfaConfiguration": "OFF", + "mfaTypes": "SMS Text Message", + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": "", + "requiredAttributes": "email", + "aliasAttributes": "", + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": "email", + "userpoolClientReadAttributes": "email", + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": "email", + "userPoolGroupList": "", + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": "", + "env": "x" + } + } + }, + "customcustomfinance": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customfinance-cloudformation-template.json", + "Parameters": { + "env": "x" + } + } + }, + "customcustomresolver": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customresolver-cloudformation-template.json", + "Parameters": { + "apifinancetrackerGraphQLAPIKeyOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIKeyOutput" + ] + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIEndpointOutput" + ] + }, + "env": "x" + } + } + }, + "functionfinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/function/financetracker-cloudformation-template.json", + "Parameters": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip", + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.BudgetAlertTopicArn" + ] + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.MonthlyReportTopicArn" + ] + }, + "env": "x" + } + } + }, + "storages320279658": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/storage/cloudformation-template.json", + "Parameters": { + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "selectedGuestPermissions": "s3:GetObject,s3:ListBucket", + "selectedAuthenticatedPermissions": "s3:PutObject,s3:GetObject,s3:ListBucket,s3:DeleteObject", + "unauthRoleName": { + "Ref": "UnauthRoleName" + }, + "authRoleName": { + "Ref": "AuthRoleName" + }, + "s3PrivatePolicy": "Private_policy_20279658", + "s3ProtectedPolicy": "Protected_policy_20279658", + "s3PublicPolicy": "Public_policy_20279658", + "s3ReadPolicy": "read_policy_20279658", + "s3UploadsPolicy": "Uploads_policy_20279658", + "authPolicyName": "s3_amplify_20279658", + "unauthPolicyName": "s3_amplify_20279658", + "AuthenticatedAllowList": "ALLOW", + "GuestAllowList": "ALLOW", + "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedUploads": "s3:PutObject", + "s3PermissionsGuestPublic": "s3:GetObject", + "s3PermissionsGuestUploads": "DISALLOW", + "env": "x" + } + } + }, + "UpdateRolesWithIDPFunction": { + "DependsOn": [ + "AuthRole", + "UnauthRole", + "authfinancetracker331811e6" + ], + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": { + "Fn::Join": [ + "\n", + [ + "const response = require('cfn-response');", + "const { IAMClient, GetRoleCommand, UpdateAssumeRolePolicyCommand } = require('@aws-sdk/client-iam');", + "exports.handler = function(event, context) {", + " // Don't return promise, response.send() marks context as done internally", + " const ignoredPromise = handleEvent(event, context)", + "};", + "async function handleEvent(event, context) {", + " try {", + " let authRoleName = event.ResourceProperties.authRoleName;", + " let unauthRoleName = event.ResourceProperties.unauthRoleName;", + " let idpId = event.ResourceProperties.idpId;", + " let authParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'authenticated'}", + " }", + " }]", + " };", + " let unauthParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'unauthenticated'}", + " }", + " }]", + " };", + " if (event.RequestType === 'Delete') {", + " try {", + " delete authParamsJson.Statement[0].Condition;", + " delete unauthParamsJson.Statement[0].Condition;", + " authParamsJson.Statement[0].Effect = 'Deny'", + " unauthParamsJson.Statement[0].Effect = 'Deny'", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let res = await Promise.all([", + " iam.send(new GetRoleCommand({RoleName: authParams.RoleName})),", + " iam.send(new GetRoleCommand({RoleName: unauthParams.RoleName}))", + " ]);", + " res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.SUCCESS, {Error: err});", + " }", + " } else if (event.RequestType === 'Update' || event.RequestType === 'Create') {", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " }", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.FAILED, {Error: err});", + " }", + "};" + ] + ] + } + }, + "Handler": "index.handler", + "Runtime": "nodejs22.x", + "Timeout": 300, + "Role": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunctionRole", + "Arn" + ] + } + } + }, + "UpdateRolesWithIDPFunctionOutputs": { + "Type": "Custom::LambdaCallout", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunction", + "Arn" + ] + }, + "region": { + "Ref": "AWS::Region" + }, + "idpId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.IdentityPoolId" + ] + }, + "authRoleName": { + "Ref": "AuthRole" + }, + "unauthRoleName": { + "Ref": "UnauthRole" + } + } + }, + "UpdateRolesWithIDPFunctionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::Join": [ + "", + [ + { + "Ref": "AuthRole" + }, + "-idp" + ] + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Policies": [ + { + "PolicyName": "UpdateRolesWithIDPFunctionPolicy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": "arn:aws:logs:*:*:*" + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + } + ] + } + } + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/custom/customfinance/build/customfinance-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/custom/customfinance/build/customfinance-cloudformation-template.json new file mode 100644 index 00000000000..b12c33f6841 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/custom/customfinance/build/customfinance-cloudformation-template.json @@ -0,0 +1,83 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + } + }, + "Resources": { + "BudgetAlertTopicF20DF526": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Fin Tracker Budget Alerts" + } + }, + "BudgetAlertTopicsanjanaravikumarazgmailcom9C5B945F": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "BudgetAlertTopicF20DF526" + } + } + }, + "MonthlyReportTopic8D223100": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Finance Tracker Monthly Reports" + } + }, + "MonthlyReportTopicsanjanaravikumarazgmailcomFBA75CE0": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "MonthlyReportTopic8D223100" + } + } + } + }, + "Outputs": { + "BudgetAlertTopicArn": { + "Description": "SNS Topic ARN for budget alerts", + "Value": { + "Ref": "BudgetAlertTopicF20DF526" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-BudgetAlertTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "MonthlyReportTopicArn": { + "Description": "SNS Topic ARN for monthly reports", + "Value": { + "Ref": "MonthlyReportTopic8D223100" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-MonthlyReportTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/custom/customresolver/build/customresolver-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/custom/customresolver/build/customresolver-cloudformation-template.json new file mode 100644 index 00000000000..4cdc5f8dba8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/custom/customresolver/build/customresolver-cloudformation-template.json @@ -0,0 +1,150 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + }, + "apifinancetrackerGraphQLAPIKeyOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Type": "String" + } + }, + "Resources": { + "TransactionsByCategoryDSRole265ACEB1": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": { + "Fn::Join": [ + "", + [ + "TransByCatDSRole-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:GetItem" + ], + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A", + "Roles": [ + { + "Ref": "TransactionsByCategoryDSRole265ACEB1" + } + ] + } + }, + "TransactionsByCategoryDS": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Sub": [ + "Transaction-${apiId}-${env}", + { + "apiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "env": { + "Ref": "env" + } + } + ] + } + }, + "Name": "TransactionsByCategoryDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionsByCategoryDSRole265ACEB1", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + } + }, + "GetTransactionsByCategoryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + }, + "FieldName": "getTransactionsByCategory", + "RequestMappingTemplate": "\n## Custom VTL resolver for getTransactionsByCategory\n#set($limit = $util.defaultIfNull($ctx.args.limit, 20))\n{\n \"version\": \"2018-05-29\",\n \"operation\": \"Scan\",\n \"filter\": {\n \"expression\": \"category = :category\",\n \"expressionValues\": {\n \":category\": $util.dynamodb.toDynamoDBJson($ctx.args.category)\n }\n },\n \"limit\": $limit\n}", + "ResponseMappingTemplate": "\n## Return the results as a TransactionConnection\n{\n \"items\": $util.toJson($ctx.result.items),\n \"nextToken\": $util.toJson($ctx.result.nextToken)\n}", + "TypeName": "Query" + }, + "DependsOn": [ + "TransactionsByCategoryDS" + ] + } + }, + "Outputs": { + "ResolverArn": { + "Description": "ARN of the custom getTransactionsByCategory resolver", + "Value": { + "Fn::GetAtt": [ + "GetTransactionsByCategoryResolver", + "ResolverArn" + ] + } + }, + "DataSourceName": { + "Description": "Name of the custom DynamoDB data source", + "Value": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/function/financetracker/financetracker-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/function/financetracker/financetracker-cloudformation-template.json new file mode 100644 index 00000000000..6dd8bac8d69 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/function/financetracker/financetracker-cloudformation-template.json @@ -0,0 +1,391 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"function-Lambda\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "Parameters": { + "CloudWatchRule": { + "Type": "String", + "Default": "NONE", + "Description": " Schedule Expression" + }, + "deploymentBucketName": { + "Type": "String" + }, + "env": { + "Type": "String" + }, + "s3Key": { + "Type": "String" + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Type": "String" + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Type": "String" + }, + "dependsOn": { + "Type": "String", + "Default": "" + }, + "lambdaLayers": { + "Type": "String", + "Default": "" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String", + "Default": "apifinancetrackerGraphQLAPIIdOutput" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "LambdaFunction": { + "Type": "AWS::Lambda::Function", + "Metadata": { + "aws:asset:path": "./src", + "aws:asset:property": "Code" + }, + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "deploymentBucketName" + }, + "S3Key": { + "Ref": "s3Key" + } + }, + "Handler": "index.handler", + "FunctionName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker2ceb6de29", + { + "Fn::Join": [ + "", + [ + "financetracker", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "Environment": { + "Variables": { + "ENV": { + "Ref": "env" + }, + "REGION": { + "Ref": "AWS::Region" + }, + "BUDGET_ALERT_TOPIC_ARN": { + "Ref": "customcustomfinanceBudgetAlertTopicArn" + }, + "MONTHLY_REPORT_TOPIC_ARN": { + "Ref": "customcustomfinanceMonthlyReportTopicArn" + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_NAME": { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_ARN": { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + "API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + } + } + }, + "Role": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Layers": [], + "Timeout": 25 + } + }, + "LambdaExecutionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetrackerLambdaRole96a64165", + { + "Fn::Join": [ + "", + [ + "financetrackerLambdaRole96a64165", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + } + } + }, + "lambdaexecutionpolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": { + "Fn::Sub": [ + "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", + { + "region": { + "Ref": "AWS::Region" + }, + "account": { + "Ref": "AWS::AccountId" + }, + "lambda": { + "Ref": "LambdaFunction" + } + } + ] + } + } + ] + } + } + }, + "AmplifyResourcesPolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "amplify-lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "dynamodb:Put*", + "dynamodb:Create*", + "dynamodb:BatchWriteItem", + "dynamodb:PartiQLInsert", + "dynamodb:Get*", + "dynamodb:BatchGetItem", + "dynamodb:List*", + "dynamodb:Describe*", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:PartiQLSelect", + "dynamodb:Update*", + "dynamodb:RestoreTable*", + "dynamodb:PartiQLUpdate", + "dynamodb:Delete*", + "dynamodb:PartiQLDelete" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "/index/*" + ] + ] + } + ] + } + ] + } + } + }, + "CustomLambdaExecutionPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "custom-lambda-execution-policy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "sns:Publish" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + }, + { + "Action": [ + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:GetItem" + ], + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", + {} + ] + } + ], + "Effect": "Allow" + }, + { + "Action": [ + "sts:GetCallerIdentity" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + } + ] + }, + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ] + }, + "DependsOn": "LambdaExecutionRole" + } + }, + "Outputs": { + "Name": { + "Value": { + "Ref": "LambdaFunction" + } + }, + "Arn": { + "Value": { + "Fn::GetAtt": [ + "LambdaFunction", + "Arn" + ] + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + }, + "LambdaExecutionRole": { + "Value": { + "Ref": "LambdaExecutionRole" + } + }, + "LambdaExecutionRoleArn": { + "Value": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/root-cloudformation-stack.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/root-cloudformation-stack.json new file mode 100644 index 00000000000..3f6b72c4bed --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/root-cloudformation-stack.json @@ -0,0 +1,578 @@ +{ + "Description": "Root Stack for AWS Amplify CLI", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "DeploymentBucketName": { + "Type": "String", + "Default": "DeploymentBucket", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "AuthRoleName": { + "Type": "String", + "Default": "AuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "UnauthRoleName": { + "Type": "String", + "Default": "UnAuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + } + }, + "Outputs": { + "Region": { + "Description": "CloudFormation provider root stack Region", + "Value": { + "Ref": "AWS::Region" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-Region" + } + } + }, + "StackName": { + "Description": "CloudFormation provider root stack ID", + "Value": { + "Ref": "AWS::StackName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackName" + } + } + }, + "StackId": { + "Description": "CloudFormation provider root stack name", + "Value": { + "Ref": "AWS::StackId" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackId" + } + } + }, + "AuthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + "UnauthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + }, + "DeploymentBucketName": { + "Description": "CloudFormation provider root stack deployment bucket name", + "Value": { + "Ref": "DeploymentBucketName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-DeploymentBucketName" + } + } + }, + "AuthRoleName": { + "Value": { + "Ref": "AuthRole" + } + }, + "UnauthRoleName": { + "Value": { + "Ref": "UnauthRole" + } + } + }, + "Resources": { + "DeploymentBucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Ref": "DeploymentBucketName" + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DeploymentBucketBlockHTTP": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + } + ] + ] + } + ], + "Condition": { + "Bool": { + "aws:SecureTransport": false + } + } + } + ] + } + } + }, + "AuthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "AuthRoleName" + } + } + }, + "UnauthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "UnauthRoleName" + } + } + }, + "apifinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/api/cloudformation-template.json", + "Parameters": { + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + }, + "S3DeploymentBucket": "amplify-financetracker-x-x-deployment", + "S3DeploymentRootKey": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33", + "env": "x" + } + } + }, + "authfinancetracker331811e6": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/auth/financetracker331811e6-cloudformation-template.json", + "Parameters": { + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": "email", + "mfaConfiguration": "OFF", + "mfaTypes": "SMS Text Message", + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": "", + "requiredAttributes": "email", + "aliasAttributes": "", + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": "email", + "userpoolClientReadAttributes": "email", + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": "email", + "userPoolGroupList": "", + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": "", + "env": "x" + } + } + }, + "customcustomfinance": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customfinance-cloudformation-template.json", + "Parameters": { + "env": "x" + } + } + }, + "customcustomresolver": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customresolver-cloudformation-template.json", + "Parameters": { + "apifinancetrackerGraphQLAPIKeyOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIKeyOutput" + ] + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIEndpointOutput" + ] + }, + "env": "x" + } + } + }, + "functionfinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/function/financetracker-cloudformation-template.json", + "Parameters": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip", + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.BudgetAlertTopicArn" + ] + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.MonthlyReportTopicArn" + ] + }, + "env": "x" + } + } + }, + "storages320279658": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/storage/cloudformation-template.json", + "Parameters": { + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "selectedGuestPermissions": "s3:GetObject,s3:ListBucket", + "selectedAuthenticatedPermissions": "s3:PutObject,s3:GetObject,s3:ListBucket,s3:DeleteObject", + "unauthRoleName": { + "Ref": "UnauthRoleName" + }, + "authRoleName": { + "Ref": "AuthRoleName" + }, + "s3PrivatePolicy": "Private_policy_20279658", + "s3ProtectedPolicy": "Protected_policy_20279658", + "s3PublicPolicy": "Public_policy_20279658", + "s3ReadPolicy": "read_policy_20279658", + "s3UploadsPolicy": "Uploads_policy_20279658", + "authPolicyName": "s3_amplify_20279658", + "unauthPolicyName": "s3_amplify_20279658", + "AuthenticatedAllowList": "ALLOW", + "GuestAllowList": "ALLOW", + "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedUploads": "s3:PutObject", + "s3PermissionsGuestPublic": "s3:GetObject", + "s3PermissionsGuestUploads": "DISALLOW", + "env": "x" + } + } + }, + "UpdateRolesWithIDPFunction": { + "DependsOn": [ + "AuthRole", + "UnauthRole", + "authfinancetracker331811e6" + ], + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": { + "Fn::Join": [ + "\n", + [ + "const response = require('cfn-response');", + "const { IAMClient, GetRoleCommand, UpdateAssumeRolePolicyCommand } = require('@aws-sdk/client-iam');", + "exports.handler = function(event, context) {", + " // Don't return promise, response.send() marks context as done internally", + " const ignoredPromise = handleEvent(event, context)", + "};", + "async function handleEvent(event, context) {", + " try {", + " let authRoleName = event.ResourceProperties.authRoleName;", + " let unauthRoleName = event.ResourceProperties.unauthRoleName;", + " let idpId = event.ResourceProperties.idpId;", + " let authParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'authenticated'}", + " }", + " }]", + " };", + " let unauthParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'unauthenticated'}", + " }", + " }]", + " };", + " if (event.RequestType === 'Delete') {", + " try {", + " delete authParamsJson.Statement[0].Condition;", + " delete unauthParamsJson.Statement[0].Condition;", + " authParamsJson.Statement[0].Effect = 'Deny'", + " unauthParamsJson.Statement[0].Effect = 'Deny'", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let res = await Promise.all([", + " iam.send(new GetRoleCommand({RoleName: authParams.RoleName})),", + " iam.send(new GetRoleCommand({RoleName: unauthParams.RoleName}))", + " ]);", + " res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.SUCCESS, {Error: err});", + " }", + " } else if (event.RequestType === 'Update' || event.RequestType === 'Create') {", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " }", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.FAILED, {Error: err});", + " }", + "};" + ] + ] + } + }, + "Handler": "index.handler", + "Runtime": "nodejs22.x", + "Timeout": 300, + "Role": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunctionRole", + "Arn" + ] + } + } + }, + "UpdateRolesWithIDPFunctionOutputs": { + "Type": "Custom::LambdaCallout", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunction", + "Arn" + ] + }, + "region": { + "Ref": "AWS::Region" + }, + "idpId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.IdentityPoolId" + ] + }, + "authRoleName": { + "Ref": "AuthRole" + }, + "unauthRoleName": { + "Ref": "UnauthRole" + } + } + }, + "UpdateRolesWithIDPFunctionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::Join": [ + "", + [ + { + "Ref": "AuthRole" + }, + "-idp" + ] + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Policies": [ + { + "PolicyName": "UpdateRolesWithIDPFunctionPolicy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": "arn:aws:logs:*:*:*" + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + } + ] + } + } + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/storage/s320279658/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/storage/s320279658/build/cloudformation-template.json new file mode 100644 index 00000000000..204a64677c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/awscloudformation/build/storage/s320279658/build/cloudformation-template.json @@ -0,0 +1,646 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"storage-S3\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "bucketName": { + "Type": "String" + }, + "authRoleName": { + "Type": "String" + }, + "unauthRoleName": { + "Type": "String" + }, + "authPolicyName": { + "Type": "String" + }, + "unauthPolicyName": { + "Type": "String" + }, + "s3PublicPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PrivatePolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ProtectedPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3UploadsPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ReadPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PermissionsAuthenticatedPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedProtected": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedPrivate": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "AuthenticatedAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "GuestAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "selectedGuestPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + }, + "selectedAuthenticatedPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + }, + "CreateAuthPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthProtected": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedProtected" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthPrivate": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPrivate" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedUploads" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestUploads" + }, + "DISALLOW" + ] + } + ] + }, + "AuthReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "AuthenticatedAllowList" + }, + "DISALLOW" + ] + } + ] + }, + "GuestReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "GuestAllowList" + }, + "DISALLOW" + ] + } + ] + } + }, + "Outputs": { + "BucketName": { + "Description": "Bucket name for the S3 bucket", + "Value": { + "Ref": "S3Bucket" + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + } + }, + "Resources": { + "S3Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "bucketName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "bucketName" + }, + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "GET", + "HEAD", + "PUT", + "POST", + "DELETE" + ], + "AllowedOrigins": [ + "*" + ], + "ExposedHeaders": [ + "x-amz-server-side-encryption", + "x-amz-request-id", + "x-amz-id-2", + "ETag" + ], + "Id": "S3CORSRuleId1", + "MaxAge": 3000 + } + ] + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "S3AuthPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPublic" + }, + "S3AuthProtectedPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedProtected" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3ProtectedPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthProtected" + }, + "S3AuthPrivatePolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPrivate" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/private/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PrivatePolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPrivate" + }, + "S3AuthUploadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedUploads" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/uploads/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3UploadsPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthUploads" + }, + "S3GuestPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsGuestPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateGuestPublic" + }, + "S3AuthReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*", + "private/${cognito-identity.amazonaws.com:sub}/", + "private/${cognito-identity.amazonaws.com:sub}/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "AuthReadAndList" + }, + "S3GuestReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "GuestReadAndList" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/backend-config.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/backend-config.json new file mode 100644 index 00000000000..fda2dcbc860 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/backend-config.json @@ -0,0 +1,133 @@ +{ + "api": { + "financetracker": { + "dependsOn": [ + { + "attributes": [ + "UserPoolId" + ], + "category": "auth", + "resourceName": "financetracker331811e6" + } + ], + "output": { + "authConfig": { + "additionalAuthenticationProviders": [ + { + "authenticationType": "AMAZON_COGNITO_USER_POOLS", + "userPoolConfig": { + "userPoolId": "authfinancetracker331811e6" + } + } + ], + "defaultAuthentication": { + "apiKeyConfig": { + "apiKeyExpirationDays": 7 + }, + "authenticationType": "API_KEY" + } + } + }, + "providerPlugin": "awscloudformation", + "service": "AppSync" + } + }, + "auth": { + "financetracker331811e6": { + "customAuth": false, + "dependsOn": [], + "frontendAuthConfig": { + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS" + ], + "passwordProtectionSettings": { + "passwordPolicyCharacters": [], + "passwordPolicyMinLength": 8 + }, + "signupAttributes": [ + "EMAIL" + ], + "socialProviders": [], + "usernameAttributes": [ + "EMAIL" + ], + "verificationMechanisms": [ + "EMAIL" + ] + }, + "providerPlugin": "awscloudformation", + "service": "Cognito" + } + }, + "custom": { + "customfinance": { + "providerPlugin": "awscloudformation", + "service": "customCDK" + }, + "customresolver": { + "dependsOn": [ + { + "attributes": [ + "GraphQLAPIKeyOutput", + "GraphQLAPIIdOutput", + "GraphQLAPIEndpointOutput" + ], + "category": "api", + "resourceName": "financetracker" + } + ], + "providerPlugin": "awscloudformation", + "service": "customCDK" + } + }, + "function": { + "financetracker": { + "build": true, + "dependsOn": [ + { + "attributes": [ + "GraphQLAPIIdOutput" + ], + "category": "api", + "resourceName": "financetracker" + }, + { + "attributes": [ + "BudgetAlertTopicArn", + "MonthlyReportTopicArn" + ], + "category": "custom", + "resourceName": "customfinance" + } + ], + "providerPlugin": "awscloudformation", + "service": "Lambda" + } + }, + "parameters": { + "AMPLIFY_function_financetracker_deploymentBucketName": { + "usedBy": [ + { + "category": "function", + "resourceName": "financetracker" + } + ] + }, + "AMPLIFY_function_financetracker_s3Key": { + "usedBy": [ + { + "category": "function", + "resourceName": "financetracker" + } + ] + } + }, + "storage": { + "s320279658": { + "dependsOn": [], + "providerPlugin": "awscloudformation", + "service": "S3" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/.npmrc b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/.npmrc new file mode 100644 index 00000000000..9b233e42bf4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/.npmrc @@ -0,0 +1 @@ +resolution-mode=highest diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/build/cdk-stack.js b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/build/cdk-stack.js new file mode 100644 index 00000000000..60bf8565f8d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/build/cdk-stack.js @@ -0,0 +1,64 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cdkStack = void 0; +const cdk = __importStar(require("aws-cdk-lib")); +const AmplifyHelpers = __importStar(require("@aws-amplify/cli-extensibility-helper")); +const sns = __importStar(require("aws-cdk-lib/aws-sns")); +const subscriptions = __importStar(require("aws-cdk-lib/aws-sns-subscriptions")); +class cdkStack extends cdk.Stack { + constructor(scope, id, props, amplifyResourceProps) { + super(scope, id, props); + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + const amplifyProjectInfo = AmplifyHelpers.getProjectInfo(); + // 1. SNS Topic for Budget Alerts + this.budgetAlertTopic = new sns.Topic(this, 'BudgetAlertTopic', { + displayName: 'Fin Tracker Budget Alerts', + }); + this.budgetAlertTopic.addSubscription(new subscriptions.EmailSubscription('example@gmail.com')); + new cdk.CfnOutput(this, 'BudgetAlertTopicArn', { + value: this.budgetAlertTopic.topicArn, + description: 'SNS Topic ARN for budget alerts', + exportName: `${amplifyProjectInfo.projectName}-BudgetAlertTopicArn-${cdk.Fn.ref('env')}`, + }); + // 2. SNS Topic for Monthly Reports + this.monthlyReportTopic = new sns.Topic(this, 'MonthlyReportTopic', { + displayName: 'Finance Tracker Monthly Reports', + }); + this.monthlyReportTopic.addSubscription(new subscriptions.EmailSubscription('example@gmail.com')); + new cdk.CfnOutput(this, 'MonthlyReportTopicArn', { + value: this.monthlyReportTopic.topicArn, + description: 'SNS Topic ARN for monthly reports', + exportName: `${amplifyProjectInfo.projectName}-MonthlyReportTopicArn-${cdk.Fn.ref('env')}`, + }); + cdk.Tags.of(this).add('Project', 'FinanceTracker'); + cdk.Tags.of(this).add('Environment', cdk.Fn.ref('env')); + cdk.Tags.of(this).add('ManagedBy', 'Amplify'); + } +} +exports.cdkStack = cdkStack; diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/build/customfinance-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/build/customfinance-cloudformation-template.json new file mode 100644 index 00000000000..b12c33f6841 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/build/customfinance-cloudformation-template.json @@ -0,0 +1,83 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + } + }, + "Resources": { + "BudgetAlertTopicF20DF526": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Fin Tracker Budget Alerts" + } + }, + "BudgetAlertTopicsanjanaravikumarazgmailcom9C5B945F": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "BudgetAlertTopicF20DF526" + } + } + }, + "MonthlyReportTopic8D223100": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Finance Tracker Monthly Reports" + } + }, + "MonthlyReportTopicsanjanaravikumarazgmailcomFBA75CE0": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "MonthlyReportTopic8D223100" + } + } + } + }, + "Outputs": { + "BudgetAlertTopicArn": { + "Description": "SNS Topic ARN for budget alerts", + "Value": { + "Ref": "BudgetAlertTopicF20DF526" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-BudgetAlertTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "MonthlyReportTopicArn": { + "Description": "SNS Topic ARN for monthly reports", + "Value": { + "Ref": "MonthlyReportTopic8D223100" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-MonthlyReportTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/cdk-stack.ts b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/cdk-stack.ts new file mode 100644 index 00000000000..4d048d1e7b2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/cdk-stack.ts @@ -0,0 +1,55 @@ +import * as cdk from 'aws-cdk-lib'; +import * as AmplifyHelpers from '@aws-amplify/cli-extensibility-helper'; +import { Construct } from 'constructs'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as subscriptions from 'aws-cdk-lib/aws-sns-subscriptions'; + +export class cdkStack extends cdk.Stack { + public readonly budgetAlertTopic: sns.Topic; + public readonly monthlyReportTopic: sns.Topic; + + constructor(scope: Construct, id: string, props?: cdk.StackProps, amplifyResourceProps?: AmplifyHelpers.AmplifyResourceProps) { + super(scope, id, props); + + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + + const amplifyProjectInfo = AmplifyHelpers.getProjectInfo(); + + // 1. SNS Topic for Budget Alerts + this.budgetAlertTopic = new sns.Topic(this, 'BudgetAlertTopic', { + displayName: 'Fin Tracker Budget Alerts', + }); + + this.budgetAlertTopic.addSubscription( + new subscriptions.EmailSubscription('example@gmail.com') + ); + + new cdk.CfnOutput(this, 'BudgetAlertTopicArn', { + value: this.budgetAlertTopic.topicArn, + description: 'SNS Topic ARN for budget alerts', + exportName: `${amplifyProjectInfo.projectName}-BudgetAlertTopicArn-${cdk.Fn.ref('env')}`, + }); + + // 2. SNS Topic for Monthly Reports + this.monthlyReportTopic = new sns.Topic(this, 'MonthlyReportTopic', { + displayName: 'Finance Tracker Monthly Reports', + }); + + this.monthlyReportTopic.addSubscription( + new subscriptions.EmailSubscription('example@gmail.com') + ); + + new cdk.CfnOutput(this, 'MonthlyReportTopicArn', { + value: this.monthlyReportTopic.topicArn, + description: 'SNS Topic ARN for monthly reports', + exportName: `${amplifyProjectInfo.projectName}-MonthlyReportTopicArn-${cdk.Fn.ref('env')}`, + }); + + cdk.Tags.of(this).add('Project', 'FinanceTracker'); + cdk.Tags.of(this).add('Environment', cdk.Fn.ref('env')); + cdk.Tags.of(this).add('ManagedBy', 'Amplify'); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/package.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/package.json new file mode 100644 index 00000000000..c56c1b1f48c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/package.json @@ -0,0 +1,18 @@ +{ + "name": "custom-resource", + "version": "1.0.0", + "description": "", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "@aws-amplify/cli-extensibility-helper": "^3.0.0", + "aws-cdk-lib": "~2.189.1", + "constructs": "^10.0.5" + }, + "devDependencies": { + "typescript": "^4.9.5" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/tsconfig.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/tsconfig.json new file mode 100644 index 00000000000..c6f1a33b4d9 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "outDir": "build" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/yarn.lock b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/yarn.lock new file mode 100644 index 00000000000..a4b07722088 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customfinance/yarn.lock @@ -0,0 +1,1816 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aws-amplify/amplify-category-custom@3.1.31": + version "3.1.31" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-category-custom/-/amplify-category-custom-3.1.31.tgz#795c6710cd4b8ab2f277a26128ff17332c57628e" + integrity sha512-w3j1M6S4Q7qdiRPUoxw/9YFaDp1hkdyTOl/Xn7QsTGeJxYe0U0KKDBzVY8lRs+l4AaIVgaxEkdJyo6wjyGYBaA== + dependencies: + "@aws-amplify/amplify-cli-core" "4.4.4" + "@aws-amplify/amplify-prompts" "2.8.7" + aws-cdk-lib "~2.189.1" + execa "^5.1.1" + fs-extra "^8.1.0" + glob "^11.0.1" + ora "^4.0.3" + uuid "^8.3.2" + +"@aws-amplify/amplify-cli-core@4.4.4": + version "4.4.4" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-core/-/amplify-cli-core-4.4.4.tgz#c075a3617a713219569743d06976de6b2f8c3b43" + integrity sha512-8YhyiEcfN9kbcoztTxF9s0DCaodRs5McV/saz41TK6Z8BjYi+LVvNGBkFDqdLRVZnUsY16eGvG78to+W6CFWQQ== + dependencies: + "@aws-amplify/amplify-cli-logger" "1.3.8" + "@aws-amplify/amplify-function-plugin-interface" "1.12.1" + "@aws-amplify/amplify-prompts" "2.8.7" + "@aws-amplify/graphql-transformer-interfaces" "^3.12.1" + "@aws-sdk/util-arn-parser" "^3.893.0" + "@yarnpkg/lockfile" "^1.1.0" + ajv "^6.12.6" + aws-cdk-lib "~2.189.1" + chalk "^4.1.1" + ci-info "^3.8.0" + cli-table3 "^0.6.0" + cloudform-types "^4.2.0" + colors "1.4.0" + dotenv "^8.2.0" + ejs "^3.1.7" + execa "^5.1.1" + fs-extra "^8.1.0" + globby "^11.0.3" + hjson "^3.2.1" + inquirer "^7.3.3" + js-yaml "^4.0.0" + lodash "^4.17.21" + node-fetch "^2.6.7" + open "^8.4.0" + ora "^4.0.3" + proxy-agent "^6.3.0" + semver "^7.5.4" + typescript-json-schema "~0.52.0" + which "^2.0.2" + yaml "^2.2.2" + yauzl "^3.1.3" + +"@aws-amplify/amplify-cli-logger@1.3.8": + version "1.3.8" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-logger/-/amplify-cli-logger-1.3.8.tgz#4ec9e51177d4ff0a852c9cdf177a2af38fe08b9d" + integrity sha512-ici3+D8cTrZeTtkKp42ibJmyuLdT7Pl7clY7K/wXAUzsKjljf+cuXr9jb4viwfwAGlQdmS7eqQv9aysz+sfELA== + dependencies: + winston "^3.3.3" + winston-daily-rotate-file "^4.5.0" + +"@aws-amplify/amplify-cli-shared-interfaces@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-shared-interfaces/-/amplify-cli-shared-interfaces-1.2.6.tgz#291533003e25a0417833f6ade9befc7969cbb517" + integrity sha512-On3ZSspb+9bwgLyYMjzTiSl2QICDEwDvp+ppmOPUPSBwuU2z8IpIKys8aP8hODbKEuziTyO31yHe4Ucc4xTljg== + +"@aws-amplify/amplify-function-plugin-interface@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-function-plugin-interface/-/amplify-function-plugin-interface-1.12.1.tgz#92703945ab8f4a5e084d7018e8f7e9f1c53ec136" + integrity sha512-il5Ctl0OfTmwkZ++rsY2/N0mwsdRjpkQStQsijHQt0kDz9F22TFVXaeYvmWM3yRRy7dIH5qyGnDZFkA00tJnZA== + +"@aws-amplify/amplify-prompts@2.8.7": + version "2.8.7" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-prompts/-/amplify-prompts-2.8.7.tgz#7080765f9e2d183868b6cb2febbca894a2c19854" + integrity sha512-bRkVaPgMlwXE2nN50WF5kOjej3e1LlQH4+pN13yoYOfFpsuHg3HD7Q7fUEMQG0yuu9e/i+GnKE6Pu8yR7dWNqA== + dependencies: + "@aws-amplify/amplify-cli-shared-interfaces" "1.2.6" + chalk "^4.1.1" + enquirer "^2.3.6" + +"@aws-amplify/cli-extensibility-helper@^3.0.0": + version "3.0.41" + resolved "https://registry.yarnpkg.com/@aws-amplify/cli-extensibility-helper/-/cli-extensibility-helper-3.0.41.tgz#145405c40084f2ebcb35253c41720a9fe9e53eb6" + integrity sha512-AxZeu6qpnRBvlDla/Z/hLGZGgy0+2sBx6JH7SkPaisT5uQJO9LCFYzpjyCYSvEKoQ1naWyH0HxhhpiG6pbb2zA== + dependencies: + "@aws-amplify/amplify-category-custom" "3.1.31" + "@aws-amplify/amplify-cli-core" "4.4.4" + aws-cdk-lib "~2.189.1" + +"@aws-amplify/graphql-transformer-interfaces@^3.12.1": + version "3.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/graphql-transformer-interfaces/-/graphql-transformer-interfaces-3.12.1.tgz#a105c30e8e05463471d916b94e8046ba1aa255a7" + integrity sha512-l+F2teZccD1cH1ksC6W/6+wK/KH8L1Vn6ahIl4R03JO+yr9M6R4ydLzHQ5JMU1qCl2mt6/5STlL6VZBXLrnP6Q== + dependencies: + graphql "^15.5.0" + +"@aws-cdk/asset-awscli-v1@^2.2.229": + version "2.2.276" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.276.tgz#b0600e95e2ae1366c24f32d36d196b0eb84c3bf1" + integrity sha512-ag+rGoWtjnhLHOVmSGOfocN8ay1rcC7tvhEJy5bzS4hPo3j+LMn0E4iBSlt5BB4aF81cpbC/7LnjhohWzoLMNA== + +"@aws-cdk/asset-node-proxy-agent-v6@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.1.tgz#184f980024d67ad60bdc52ab88c59c73fa070346" + integrity sha512-We4bmHaowOPHr+IQR4/FyTGjRfjgBj4ICMjtqmJeBDWad3Q/6St12NT07leNtyuukv2qMhtSZJQorD8KpKTwRA== + +"@aws-cdk/cloud-assembly-schema@^41.0.0": + version "41.2.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-41.2.0.tgz#c1ef513e1cc0528dbc05948ae39d5631306af423" + integrity sha512-JaulVS6z9y5+u4jNmoWbHZRs9uGOnmn/ktXygNWKNu1k6lF3ad4so3s18eRu15XCbUIomxN9WPYT6Ehh7hzONw== + dependencies: + jsonschema "~1.4.1" + semver "^7.7.1" + +"@aws-sdk/util-arn-parser@^3.893.0": + version "3.972.3" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-arn-parser/-/util-arn-parser-3.972.3.tgz#ed989862bbb172ce16d9e1cd5790e5fe367219c2" + integrity sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA== + dependencies: + tslib "^2.6.2" + +"@balena/dockerignore@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" + integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q== + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@colors/colors@1.6.0", "@colors/colors@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" + integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA== + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@dabh/diagnostics@^2.0.8": + version "2.0.8" + resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.8.tgz#ead97e72ca312cf0e6dd7af0d300b58993a31a5e" + integrity sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q== + dependencies: + "@so-ric/colorspace" "^1.1.6" + enabled "2.0.x" + kuler "^2.0.0" + +"@isaacs/cliui@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-9.0.0.tgz#4d0a3f127058043bf2e7ee169eaf30ed901302f3" + integrity sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg== + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@so-ric/colorspace@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@so-ric/colorspace/-/colorspace-1.1.6.tgz#62515d8b9f27746b76950a83bde1af812d91923b" + integrity sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw== + dependencies: + color "^5.0.2" + text-hex "1.0.x" + +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + +"@tsconfig/node10@^1.0.7": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@^16.9.2": + version "16.18.126" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.126.tgz#27875faa2926c0f475b39a8bb1e546c0176f8d4b" + integrity sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw== + +"@types/triple-beam@^1.3.2": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c" + integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw== + +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +acorn-walk@^8.1.1: + version "8.3.5" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" + integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.4.1: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== + +agent-base@^7.1.0, agent-base@^7.1.2: + version "7.1.4" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8" + integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ== + +ajv@^6.12.6: + version "6.14.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.14.0.tgz#fd067713e228210636ebb08c60bd3765d6dbe73a" + integrity sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" + integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async@^3.2.3, async@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + +aws-cdk-lib@~2.189.1: + version "2.189.1" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.189.1.tgz#57681865d0ff138a26299066695c06c46329bcb7" + integrity sha512-9JU0yUr2iRTJ1oCPrHyx7hOtBDWyUfyOcdb6arlumJnMcQr2cyAMASY8HuAXHc8Y10ipVp8dRTW+J4/132IIYA== + dependencies: + "@aws-cdk/asset-awscli-v1" "^2.2.229" + "@aws-cdk/asset-node-proxy-agent-v6" "^2.1.0" + "@aws-cdk/cloud-assembly-schema" "^41.0.0" + "@balena/dockerignore" "^1.0.2" + case "1.6.3" + fs-extra "^11.3.0" + ignore "^5.3.2" + jsonschema "^1.5.0" + mime-types "^2.1.35" + minimatch "^3.1.2" + punycode "^2.3.1" + semver "^7.7.1" + table "^6.9.0" + yaml "1.10.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +balanced-match@^4.0.2: + version "4.0.4" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a" + integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== + +basic-ftp@^5.0.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.3.0.tgz#88f057d1ba8442643c505c4c83bbaa4442b15cfd" + integrity sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w== + +brace-expansion@^1.1.7: + version "1.1.14" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.14.tgz#d9de602370d91347cd9ddad1224d4fd701eb348b" + integrity sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" + integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== + dependencies: + balanced-match "^1.0.0" + +brace-expansion@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.5.tgz#dcc3a37116b79f3e1b46db994ced5d570e930fdb" + integrity sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ== + dependencies: + balanced-match "^4.0.2" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +case@1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.0, chalk@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +ci-info@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.2.0: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + +cli-table3@^0.6.0: + version "0.6.5" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f" + integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + +cloudform-types@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/cloudform-types/-/cloudform-types-4.2.0.tgz#698c98a1468bd8fe9c1c275b2e65720f572ca401" + integrity sha512-i7fmpsOtrMzF4z3Ltpqn9Khi6pgSxNCMqqsXLXWbaZsczky7vA9mkq/Z2bdMUu5x4Eaj5wvvKc95ENZ0dtN/Uw== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-convert@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-3.1.3.tgz#db6627b97181cb8facdfce755ae26f97ab0711f1" + integrity sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg== + dependencies: + color-name "^2.0.0" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-2.1.0.tgz#0b677385c1c4b4edfdeaf77e38fa338e3a40b693" + integrity sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^2.1.3: + version "2.1.4" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-2.1.4.tgz#9dcf566ff976e23368c8bd673f5c35103ab41058" + integrity sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg== + dependencies: + color-name "^2.0.0" + +color@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/color/-/color-5.0.3.tgz#f79390b1b778e222ffbb54304d3dbeaef633f97f" + integrity sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA== + dependencies: + color-convert "^3.1.3" + color-string "^2.1.3" + +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +constructs@^10.0.5: + version "10.6.0" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-10.6.0.tgz#9ec889c48567182ed9e2a56d4335d582ba0bcb6b" + integrity sha512-TxHOnBO5zMo/G76ykzGF/wMpEHu257TbWiIxP9K0Yv/+t70UzgBQiTqjkAsWOPC6jW91DzJI0+ehQV6xDRNBuQ== + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^7.0.3, cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + +debug@4, debug@^4.3.4: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + +diff@^4.0.1: + version "4.0.4" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.4.tgz#7a6dbfda325f25f07517e9b518f897c08332e07d" + integrity sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dotenv@^8.2.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== + +ejs@^3.1.7: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enabled@2.0.x: + version "2.0.0" + resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" + integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== + +enquirer@^2.3.6: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-uri@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== + +fastq@^1.6.0: + version "1.20.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675" + integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw== + dependencies: + reusify "^1.0.4" + +fecha@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" + integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-stream-rotator@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz#007019e735b262bb6c6f0197e58e5c87cb96cec3" + integrity sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ== + dependencies: + moment "^2.29.1" + +filelist@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.6.tgz#1e8870942a7c636c862f7c49b9394937b6a995a3" + integrity sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA== + dependencies: + minimatch "^5.0.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +fn.name@1.x.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" + integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== + +foreground-child@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" + integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== + dependencies: + cross-spawn "^7.0.6" + signal-exit "^4.0.1" + +fs-extra@^11.3.0: + version "11.3.4" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.4.tgz#ab6934eca8bcf6f7f6b82742e33591f86301d6fc" + integrity sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-uri@^6.0.1: + version "6.0.5" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.5.tgz#714892aa4a871db671abc5395e5e9447bc306a16" + integrity sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^11.0.1: + version "11.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-11.1.0.tgz#4f826576e4eb99c7dad383793d2f9f08f67e50a6" + integrity sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw== + dependencies: + foreground-child "^3.3.1" + jackspeak "^4.1.1" + minimatch "^10.1.1" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + +glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphql@^15.5.0: + version "15.10.2" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.10.2.tgz#f57f8665cea9e77a80264d7eeb0d687079714e78" + integrity sha512-1PRqdDPAmViWr4h1GVBT8RoPZfWSGZa7kDzleTilOfVIslsgf+cia3Nl95v1KDmR4iERPaT7WzQ+tN4MJmbg3w== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +hjson@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/hjson/-/hjson-3.2.2.tgz#a5a81138f4c0bb427e4b2ac917fafd4b454436cf" + integrity sha512-MkUeB0cTIlppeSsndgESkfFD21T2nXPRaBStLtf3cAYA2bVEFdXlodZB0TukwZiobPD1Ksax5DK4RTZeaXCI3Q== + +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +https-proxy-agent@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" + integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== + dependencies: + agent-base "^7.1.2" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^5.2.0, ignore@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inquirer@^7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +ip-address@^10.0.1: + version "10.1.0" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.1.0.tgz#d8dcffb34d0e02eb241427444a6e23f5b0595aa4" + integrity sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q== + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +jackspeak@^4.1.1: + version "4.2.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.2.3.tgz#27ef80f33b93412037c3bea4f8eddf80e1931483" + integrity sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg== + dependencies: + "@isaacs/cliui" "^9.0.0" + +jake@^10.8.5: + version "10.9.4" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.4.tgz#d626da108c63d5cfb00ab5c25fadc7e0084af8e6" + integrity sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA== + dependencies: + async "^3.2.6" + filelist "^1.0.4" + picocolors "^1.1.1" + +js-yaml@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.2.1.tgz#b6e31717f22cc37330b081ce0051ed5de53af2f6" + integrity sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonschema@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.5.0.tgz#f6aceb1ab9123563dd901d05f81f9d4883d3b7d8" + integrity sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw== + +jsonschema@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== + +kuler@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" + integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.19, lodash@^4.17.21: + version "4.18.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.18.1.tgz#ff2b66c1f6326d59513de2407bf881439812771c" + integrity sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q== + +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +logform@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.7.0.tgz#cfca97528ef290f2e125a08396805002b2d060d1" + integrity sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ== + dependencies: + "@colors/colors" "1.6.0" + "@types/triple-beam" "^1.3.2" + fecha "^4.2.0" + ms "^2.1.1" + safe-stable-stringify "^2.3.1" + triple-beam "^1.3.0" + +lru-cache@^11.0.0: + version "11.3.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.3.5.tgz#29047d348c0b2793e3112a01c739bb7c6d855637" + integrity sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw== + +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.35: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^10.1.1: + version "10.2.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.5.tgz#bd48687a0be38ed2961399105600f832095861d1" + integrity sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== + dependencies: + brace-expansion "^5.0.5" + +minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" + integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.9" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.9.tgz#1293ef15db0098b394540e8f9f744f9fda8dee4b" + integrity sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw== + dependencies: + brace-expansion "^2.0.1" + +minipass@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.3.tgz#79389b4eb1bb2d003a9bba87d492f2bd37bdc65b" + integrity sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== + +moment@^2.29.1: + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== + +ms@^2.1.1, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +netmask@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.1.1.tgz#80043d265b53aa521b3bd01e8fcdf353f9e1e81e" + integrity sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA== + +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-hash@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" + integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +one-time@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45" + integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g== + dependencies: + fn.name "1.x.x" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +ora@^4.0.3: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.1.1.tgz#566cc0348a15c36f5f0e979612842e02ba9dddbc" + integrity sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +pac-proxy-agent@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz#9cfaf33ff25da36f6147a20844230ec92c06e5df" + integrity sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.1.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.6" + pac-resolver "^7.0.1" + socks-proxy-agent "^8.0.5" + +pac-resolver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-scurry@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.2.tgz#6be0d0ee02a10d9e0de7a98bae65e182c9061f85" + integrity sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601" + integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== + +proxy-agent@^6.3.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.5.0.tgz#9e49acba8e4ee234aacb539f89ed9c23d02f232d" + integrity sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.6" + lru-cache "^7.14.1" + pac-proxy-agent "^7.1.0" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.5" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +punycode@^2.1.0, punycode@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +readable-stream@^3.4.0, readable-stream@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +reusify@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rxjs@^6.6.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-stable-stringify@^2.2.0, safe-stable-stringify@^2.3.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^7.5.4, semver@^7.7.1: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.5: + version "8.0.5" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz#b9cdb4e7e998509d7659d689ce7697ac21645bee" + integrity sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.7" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.7.tgz#e2fb1d9a603add75050a2067db8c381a0b5669ea" + integrity sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A== + dependencies: + ip-address "^10.0.1" + smart-buffer "^4.2.0" + +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/table/-/table-6.9.0.tgz#50040afa6264141c7566b3b81d4d82c47a8668f5" + integrity sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +text-hex@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" + integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +triple-beam@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" + integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== + +ts-node@^10.2.1: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.1, tslib@^2.6.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript-json-schema@~0.52.0: + version "0.52.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.52.0.tgz#954560ec90e5486e8f7a5b7706ec59286a708e29" + integrity sha512-3ZdHzx116gZ+D9LmMl5/+d1G3Rpt8baWngKzepYWHnXbAa8Winv64CmFRqLlMKneE1c40yugYDFcWdyX1FjGzQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/node" "^16.9.2" + glob "^7.1.7" + safe-stable-stringify "^2.2.0" + ts-node "^10.2.1" + typescript "~4.4.4" + yargs "^17.1.1" + +typescript@^4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +typescript@~4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" + integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +winston-daily-rotate-file@^4.5.0: + version "4.7.1" + resolved "https://registry.yarnpkg.com/winston-daily-rotate-file/-/winston-daily-rotate-file-4.7.1.tgz#f60a643af87f8867f23170d8cd87dbe3603a625f" + integrity sha512-7LGPiYGBPNyGHLn9z33i96zx/bd71pjBn9tqQzO3I4Tayv94WPmBNwKC7CO1wPHdP9uvu+Md/1nr6VSH9h0iaA== + dependencies: + file-stream-rotator "^0.6.1" + object-hash "^2.0.1" + triple-beam "^1.3.0" + winston-transport "^4.4.0" + +winston-transport@^4.4.0, winston-transport@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.9.0.tgz#3bba345de10297654ea6f33519424560003b3bf9" + integrity sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A== + dependencies: + logform "^2.7.0" + readable-stream "^3.6.2" + triple-beam "^1.3.0" + +winston@^3.3.3: + version "3.19.0" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.19.0.tgz#cc1d1262f5f45946904085cfffe73efb4b7a581d" + integrity sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA== + dependencies: + "@colors/colors" "^1.6.0" + "@dabh/diagnostics" "^2.0.8" + async "^3.2.3" + is-stream "^2.0.0" + logform "^2.7.0" + one-time "^1.0.0" + readable-stream "^3.4.0" + safe-stable-stringify "^2.3.1" + stack-trace "0.0.x" + triple-beam "^1.3.0" + winston-transport "^4.9.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaml@1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yaml@^2.2.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.3.tgz#a0d6bd2efb3dd03c59370223701834e60409bd7d" + integrity sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.1.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yauzl@^3.1.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.3.0.tgz#5be5e287b9a8112941c177734a34bf61a3e11bb4" + integrity sha512-PtGEvEP30p7sbIBJKUBjUnqgTVOyMURc4dLo9iNyAJnNIEz9pm88cCXF21w94Kg3k6RXkeZh5DHOGS0qEONvNQ== + dependencies: + buffer-crc32 "~0.2.3" + pend "~1.2.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/.npmrc b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/.npmrc new file mode 100644 index 00000000000..9b233e42bf4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/.npmrc @@ -0,0 +1 @@ +resolution-mode=highest diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/build/cdk-stack.js b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/build/cdk-stack.js new file mode 100644 index 00000000000..a3be92062ea --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/build/cdk-stack.js @@ -0,0 +1,119 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cdkStack = void 0; +const cdk = __importStar(require("aws-cdk-lib")); +const AmplifyHelpers = __importStar(require("@aws-amplify/cli-extensibility-helper")); +const iam = __importStar(require("aws-cdk-lib/aws-iam")); +class cdkStack extends cdk.Stack { + constructor(scope, id, props, amplifyResourceProps) { + super(scope, id, props); + /* Do not remove - Amplify CLI automatically injects the current deployment environment in this input parameter */ + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + // Access Amplify-generated resources using Gen1 pattern + const retVal = AmplifyHelpers.addResourceDependency(this, amplifyResourceProps.category, amplifyResourceProps.resourceName, [ + { category: 'api', resourceName: 'financetracker' }, + ]); + // Gen1 pattern: reference the GraphQL API ID using cdk.Fn.ref + // This is the exact pattern that breaks during Gen2 migration + const apiId = cdk.Fn.ref(retVal.api.financetracker.GraphQLAPIIdOutput); + // Create IAM role for the DynamoDB data source + const dataSourceRole = new iam.Role(this, 'TransactionsByCategoryDSRole', { + assumedBy: new iam.ServicePrincipal('appsync.amazonaws.com'), + roleName: `TransByCatDSRole-${cdk.Fn.ref('env')}`, + }); + // Grant DynamoDB access to the role + dataSourceRole.addToPolicy(new iam.PolicyStatement({ + actions: [ + 'dynamodb:Query', + 'dynamodb:Scan', + 'dynamodb:GetItem', + ], + resources: [ + cdk.Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*'), + ], + })); + // Create a DynamoDB data source for the custom resolver + // Using Gen1 CfnDataSource pattern (low-level CloudFormation) + const dataSource = new cdk.aws_appsync.CfnDataSource(this, 'TransactionsByCategoryDS', { + apiId: apiId, + name: 'TransactionsByCategoryDataSource', + type: 'AMAZON_DYNAMODB', + dynamoDbConfig: { + tableName: cdk.Fn.sub('Transaction-${apiId}-${env}', { + apiId: apiId, + env: cdk.Fn.ref('env'), + }), + awsRegion: cdk.Fn.ref('AWS::Region'), + }, + serviceRoleArn: dataSourceRole.roleArn, + }); + // Request mapping template - VTL resolver for querying by category + const requestTemplate = ` +## Custom VTL resolver for getTransactionsByCategory +#set($limit = $util.defaultIfNull($ctx.args.limit, 20)) +{ + "version": "2018-05-29", + "operation": "Scan", + "filter": { + "expression": "category = :category", + "expressionValues": { + ":category": $util.dynamodb.toDynamoDBJson($ctx.args.category) + } + }, + "limit": $limit +}`; + // Response mapping template + const responseTemplate = ` +## Return the results as a TransactionConnection +{ + "items": $util.toJson($ctx.result.items), + "nextToken": $util.toJson($ctx.result.nextToken) +}`; + // Create the resolver using Gen1 CfnResolver pattern + const resolver = new cdk.aws_appsync.CfnResolver(this, 'GetTransactionsByCategoryResolver', { + apiId: apiId, + typeName: 'Query', + fieldName: 'getTransactionsByCategory', + dataSourceName: dataSource.attrName, + requestMappingTemplate: requestTemplate, + responseMappingTemplate: responseTemplate, + }); + resolver.addDependency(dataSource); + // Output the resolver info + new cdk.CfnOutput(this, 'ResolverArn', { + value: resolver.attrResolverArn, + description: 'ARN of the custom getTransactionsByCategory resolver', + }); + new cdk.CfnOutput(this, 'DataSourceName', { + value: dataSource.attrName, + description: 'Name of the custom DynamoDB data source', + }); + } +} +exports.cdkStack = cdkStack; diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/build/customresolver-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/build/customresolver-cloudformation-template.json new file mode 100644 index 00000000000..4cdc5f8dba8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/build/customresolver-cloudformation-template.json @@ -0,0 +1,150 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + }, + "apifinancetrackerGraphQLAPIKeyOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Type": "String" + } + }, + "Resources": { + "TransactionsByCategoryDSRole265ACEB1": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": { + "Fn::Join": [ + "", + [ + "TransByCatDSRole-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:GetItem" + ], + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A", + "Roles": [ + { + "Ref": "TransactionsByCategoryDSRole265ACEB1" + } + ] + } + }, + "TransactionsByCategoryDS": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Sub": [ + "Transaction-${apiId}-${env}", + { + "apiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "env": { + "Ref": "env" + } + } + ] + } + }, + "Name": "TransactionsByCategoryDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionsByCategoryDSRole265ACEB1", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + } + }, + "GetTransactionsByCategoryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + }, + "FieldName": "getTransactionsByCategory", + "RequestMappingTemplate": "\n## Custom VTL resolver for getTransactionsByCategory\n#set($limit = $util.defaultIfNull($ctx.args.limit, 20))\n{\n \"version\": \"2018-05-29\",\n \"operation\": \"Scan\",\n \"filter\": {\n \"expression\": \"category = :category\",\n \"expressionValues\": {\n \":category\": $util.dynamodb.toDynamoDBJson($ctx.args.category)\n }\n },\n \"limit\": $limit\n}", + "ResponseMappingTemplate": "\n## Return the results as a TransactionConnection\n{\n \"items\": $util.toJson($ctx.result.items),\n \"nextToken\": $util.toJson($ctx.result.nextToken)\n}", + "TypeName": "Query" + }, + "DependsOn": [ + "TransactionsByCategoryDS" + ] + } + }, + "Outputs": { + "ResolverArn": { + "Description": "ARN of the custom getTransactionsByCategory resolver", + "Value": { + "Fn::GetAtt": [ + "GetTransactionsByCategoryResolver", + "ResolverArn" + ] + } + }, + "DataSourceName": { + "Description": "Name of the custom DynamoDB data source", + "Value": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/cdk-stack.ts b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/cdk-stack.ts new file mode 100644 index 00000000000..64d547c8a95 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/cdk-stack.ts @@ -0,0 +1,111 @@ +import * as cdk from 'aws-cdk-lib'; +import * as AmplifyHelpers from '@aws-amplify/cli-extensibility-helper'; +import { AmplifyDependentResourcesAttributes } from '../../types/amplify-dependent-resources-ref'; +import { Construct } from 'constructs'; +import * as iam from 'aws-cdk-lib/aws-iam'; + +export class cdkStack extends cdk.Stack { + constructor(scope: Construct, id: string, props?: cdk.StackProps, amplifyResourceProps?: AmplifyHelpers.AmplifyResourceProps) { + super(scope, id, props); + + /* Do not remove - Amplify CLI automatically injects the current deployment environment in this input parameter */ + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + + // Access Amplify-generated resources using Gen1 pattern + const retVal: AmplifyDependentResourcesAttributes = AmplifyHelpers.addResourceDependency(this, + amplifyResourceProps!.category, + amplifyResourceProps!.resourceName, + [ + { category: 'api', resourceName: 'financetracker' }, + ] + ); + + // Gen1 pattern: reference the GraphQL API ID using cdk.Fn.ref + // This is the exact pattern that breaks during Gen2 migration + const apiId = cdk.Fn.ref(retVal.api.financetracker.GraphQLAPIIdOutput); + + // Create IAM role for the DynamoDB data source + const dataSourceRole = new iam.Role(this, 'TransactionsByCategoryDSRole', { + assumedBy: new iam.ServicePrincipal('appsync.amazonaws.com'), + roleName: `TransByCatDSRole-${cdk.Fn.ref('env')}`, + }); + + // Grant DynamoDB access to the role + dataSourceRole.addToPolicy(new iam.PolicyStatement({ + actions: [ + 'dynamodb:Query', + 'dynamodb:Scan', + 'dynamodb:GetItem', + ], + resources: [ + cdk.Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*'), + ], + })); + + // Create a DynamoDB data source for the custom resolver + // Using Gen1 CfnDataSource pattern (low-level CloudFormation) + const dataSource = new cdk.aws_appsync.CfnDataSource(this, 'TransactionsByCategoryDS', { + apiId: apiId, + name: 'TransactionsByCategoryDataSource', + type: 'AMAZON_DYNAMODB', + dynamoDbConfig: { + tableName: cdk.Fn.sub('Transaction-${apiId}-${env}', { + apiId: apiId, + env: cdk.Fn.ref('env'), + }), + awsRegion: cdk.Fn.ref('AWS::Region'), + }, + serviceRoleArn: dataSourceRole.roleArn, + }); + + // Request mapping template - VTL resolver for querying by category + const requestTemplate = ` +## Custom VTL resolver for getTransactionsByCategory +#set($limit = $util.defaultIfNull($ctx.args.limit, 20)) +{ + "version": "2018-05-29", + "operation": "Scan", + "filter": { + "expression": "category = :category", + "expressionValues": { + ":category": $util.dynamodb.toDynamoDBJson($ctx.args.category) + } + }, + "limit": $limit +}`; + + // Response mapping template + const responseTemplate = ` +## Return the results as a TransactionConnection +{ + "items": $util.toJson($ctx.result.items), + "nextToken": $util.toJson($ctx.result.nextToken) +}`; + + // Create the resolver using Gen1 CfnResolver pattern + const resolver = new cdk.aws_appsync.CfnResolver(this, 'GetTransactionsByCategoryResolver', { + apiId: apiId, + typeName: 'Query', + fieldName: 'getTransactionsByCategory', + dataSourceName: dataSource.attrName, + requestMappingTemplate: requestTemplate, + responseMappingTemplate: responseTemplate, + }); + + resolver.addDependency(dataSource); + + // Output the resolver info + new cdk.CfnOutput(this, 'ResolverArn', { + value: resolver.attrResolverArn, + description: 'ARN of the custom getTransactionsByCategory resolver', + }); + + new cdk.CfnOutput(this, 'DataSourceName', { + value: dataSource.attrName, + description: 'Name of the custom DynamoDB data source', + }); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/package.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/package.json new file mode 100644 index 00000000000..c56c1b1f48c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/package.json @@ -0,0 +1,18 @@ +{ + "name": "custom-resource", + "version": "1.0.0", + "description": "", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "@aws-amplify/cli-extensibility-helper": "^3.0.0", + "aws-cdk-lib": "~2.189.1", + "constructs": "^10.0.5" + }, + "devDependencies": { + "typescript": "^4.9.5" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/tsconfig.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/tsconfig.json new file mode 100644 index 00000000000..c6f1a33b4d9 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "outDir": "build" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/yarn.lock b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/yarn.lock new file mode 100644 index 00000000000..a4b07722088 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/custom/customresolver/yarn.lock @@ -0,0 +1,1816 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aws-amplify/amplify-category-custom@3.1.31": + version "3.1.31" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-category-custom/-/amplify-category-custom-3.1.31.tgz#795c6710cd4b8ab2f277a26128ff17332c57628e" + integrity sha512-w3j1M6S4Q7qdiRPUoxw/9YFaDp1hkdyTOl/Xn7QsTGeJxYe0U0KKDBzVY8lRs+l4AaIVgaxEkdJyo6wjyGYBaA== + dependencies: + "@aws-amplify/amplify-cli-core" "4.4.4" + "@aws-amplify/amplify-prompts" "2.8.7" + aws-cdk-lib "~2.189.1" + execa "^5.1.1" + fs-extra "^8.1.0" + glob "^11.0.1" + ora "^4.0.3" + uuid "^8.3.2" + +"@aws-amplify/amplify-cli-core@4.4.4": + version "4.4.4" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-core/-/amplify-cli-core-4.4.4.tgz#c075a3617a713219569743d06976de6b2f8c3b43" + integrity sha512-8YhyiEcfN9kbcoztTxF9s0DCaodRs5McV/saz41TK6Z8BjYi+LVvNGBkFDqdLRVZnUsY16eGvG78to+W6CFWQQ== + dependencies: + "@aws-amplify/amplify-cli-logger" "1.3.8" + "@aws-amplify/amplify-function-plugin-interface" "1.12.1" + "@aws-amplify/amplify-prompts" "2.8.7" + "@aws-amplify/graphql-transformer-interfaces" "^3.12.1" + "@aws-sdk/util-arn-parser" "^3.893.0" + "@yarnpkg/lockfile" "^1.1.0" + ajv "^6.12.6" + aws-cdk-lib "~2.189.1" + chalk "^4.1.1" + ci-info "^3.8.0" + cli-table3 "^0.6.0" + cloudform-types "^4.2.0" + colors "1.4.0" + dotenv "^8.2.0" + ejs "^3.1.7" + execa "^5.1.1" + fs-extra "^8.1.0" + globby "^11.0.3" + hjson "^3.2.1" + inquirer "^7.3.3" + js-yaml "^4.0.0" + lodash "^4.17.21" + node-fetch "^2.6.7" + open "^8.4.0" + ora "^4.0.3" + proxy-agent "^6.3.0" + semver "^7.5.4" + typescript-json-schema "~0.52.0" + which "^2.0.2" + yaml "^2.2.2" + yauzl "^3.1.3" + +"@aws-amplify/amplify-cli-logger@1.3.8": + version "1.3.8" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-logger/-/amplify-cli-logger-1.3.8.tgz#4ec9e51177d4ff0a852c9cdf177a2af38fe08b9d" + integrity sha512-ici3+D8cTrZeTtkKp42ibJmyuLdT7Pl7clY7K/wXAUzsKjljf+cuXr9jb4viwfwAGlQdmS7eqQv9aysz+sfELA== + dependencies: + winston "^3.3.3" + winston-daily-rotate-file "^4.5.0" + +"@aws-amplify/amplify-cli-shared-interfaces@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-shared-interfaces/-/amplify-cli-shared-interfaces-1.2.6.tgz#291533003e25a0417833f6ade9befc7969cbb517" + integrity sha512-On3ZSspb+9bwgLyYMjzTiSl2QICDEwDvp+ppmOPUPSBwuU2z8IpIKys8aP8hODbKEuziTyO31yHe4Ucc4xTljg== + +"@aws-amplify/amplify-function-plugin-interface@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-function-plugin-interface/-/amplify-function-plugin-interface-1.12.1.tgz#92703945ab8f4a5e084d7018e8f7e9f1c53ec136" + integrity sha512-il5Ctl0OfTmwkZ++rsY2/N0mwsdRjpkQStQsijHQt0kDz9F22TFVXaeYvmWM3yRRy7dIH5qyGnDZFkA00tJnZA== + +"@aws-amplify/amplify-prompts@2.8.7": + version "2.8.7" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-prompts/-/amplify-prompts-2.8.7.tgz#7080765f9e2d183868b6cb2febbca894a2c19854" + integrity sha512-bRkVaPgMlwXE2nN50WF5kOjej3e1LlQH4+pN13yoYOfFpsuHg3HD7Q7fUEMQG0yuu9e/i+GnKE6Pu8yR7dWNqA== + dependencies: + "@aws-amplify/amplify-cli-shared-interfaces" "1.2.6" + chalk "^4.1.1" + enquirer "^2.3.6" + +"@aws-amplify/cli-extensibility-helper@^3.0.0": + version "3.0.41" + resolved "https://registry.yarnpkg.com/@aws-amplify/cli-extensibility-helper/-/cli-extensibility-helper-3.0.41.tgz#145405c40084f2ebcb35253c41720a9fe9e53eb6" + integrity sha512-AxZeu6qpnRBvlDla/Z/hLGZGgy0+2sBx6JH7SkPaisT5uQJO9LCFYzpjyCYSvEKoQ1naWyH0HxhhpiG6pbb2zA== + dependencies: + "@aws-amplify/amplify-category-custom" "3.1.31" + "@aws-amplify/amplify-cli-core" "4.4.4" + aws-cdk-lib "~2.189.1" + +"@aws-amplify/graphql-transformer-interfaces@^3.12.1": + version "3.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/graphql-transformer-interfaces/-/graphql-transformer-interfaces-3.12.1.tgz#a105c30e8e05463471d916b94e8046ba1aa255a7" + integrity sha512-l+F2teZccD1cH1ksC6W/6+wK/KH8L1Vn6ahIl4R03JO+yr9M6R4ydLzHQ5JMU1qCl2mt6/5STlL6VZBXLrnP6Q== + dependencies: + graphql "^15.5.0" + +"@aws-cdk/asset-awscli-v1@^2.2.229": + version "2.2.276" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.276.tgz#b0600e95e2ae1366c24f32d36d196b0eb84c3bf1" + integrity sha512-ag+rGoWtjnhLHOVmSGOfocN8ay1rcC7tvhEJy5bzS4hPo3j+LMn0E4iBSlt5BB4aF81cpbC/7LnjhohWzoLMNA== + +"@aws-cdk/asset-node-proxy-agent-v6@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.1.tgz#184f980024d67ad60bdc52ab88c59c73fa070346" + integrity sha512-We4bmHaowOPHr+IQR4/FyTGjRfjgBj4ICMjtqmJeBDWad3Q/6St12NT07leNtyuukv2qMhtSZJQorD8KpKTwRA== + +"@aws-cdk/cloud-assembly-schema@^41.0.0": + version "41.2.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-41.2.0.tgz#c1ef513e1cc0528dbc05948ae39d5631306af423" + integrity sha512-JaulVS6z9y5+u4jNmoWbHZRs9uGOnmn/ktXygNWKNu1k6lF3ad4so3s18eRu15XCbUIomxN9WPYT6Ehh7hzONw== + dependencies: + jsonschema "~1.4.1" + semver "^7.7.1" + +"@aws-sdk/util-arn-parser@^3.893.0": + version "3.972.3" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-arn-parser/-/util-arn-parser-3.972.3.tgz#ed989862bbb172ce16d9e1cd5790e5fe367219c2" + integrity sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA== + dependencies: + tslib "^2.6.2" + +"@balena/dockerignore@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" + integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q== + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@colors/colors@1.6.0", "@colors/colors@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" + integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA== + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@dabh/diagnostics@^2.0.8": + version "2.0.8" + resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.8.tgz#ead97e72ca312cf0e6dd7af0d300b58993a31a5e" + integrity sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q== + dependencies: + "@so-ric/colorspace" "^1.1.6" + enabled "2.0.x" + kuler "^2.0.0" + +"@isaacs/cliui@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-9.0.0.tgz#4d0a3f127058043bf2e7ee169eaf30ed901302f3" + integrity sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg== + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@so-ric/colorspace@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@so-ric/colorspace/-/colorspace-1.1.6.tgz#62515d8b9f27746b76950a83bde1af812d91923b" + integrity sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw== + dependencies: + color "^5.0.2" + text-hex "1.0.x" + +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + +"@tsconfig/node10@^1.0.7": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@^16.9.2": + version "16.18.126" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.126.tgz#27875faa2926c0f475b39a8bb1e546c0176f8d4b" + integrity sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw== + +"@types/triple-beam@^1.3.2": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c" + integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw== + +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +acorn-walk@^8.1.1: + version "8.3.5" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" + integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.4.1: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== + +agent-base@^7.1.0, agent-base@^7.1.2: + version "7.1.4" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8" + integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ== + +ajv@^6.12.6: + version "6.14.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.14.0.tgz#fd067713e228210636ebb08c60bd3765d6dbe73a" + integrity sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" + integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async@^3.2.3, async@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + +aws-cdk-lib@~2.189.1: + version "2.189.1" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.189.1.tgz#57681865d0ff138a26299066695c06c46329bcb7" + integrity sha512-9JU0yUr2iRTJ1oCPrHyx7hOtBDWyUfyOcdb6arlumJnMcQr2cyAMASY8HuAXHc8Y10ipVp8dRTW+J4/132IIYA== + dependencies: + "@aws-cdk/asset-awscli-v1" "^2.2.229" + "@aws-cdk/asset-node-proxy-agent-v6" "^2.1.0" + "@aws-cdk/cloud-assembly-schema" "^41.0.0" + "@balena/dockerignore" "^1.0.2" + case "1.6.3" + fs-extra "^11.3.0" + ignore "^5.3.2" + jsonschema "^1.5.0" + mime-types "^2.1.35" + minimatch "^3.1.2" + punycode "^2.3.1" + semver "^7.7.1" + table "^6.9.0" + yaml "1.10.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +balanced-match@^4.0.2: + version "4.0.4" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a" + integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== + +basic-ftp@^5.0.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.3.0.tgz#88f057d1ba8442643c505c4c83bbaa4442b15cfd" + integrity sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w== + +brace-expansion@^1.1.7: + version "1.1.14" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.14.tgz#d9de602370d91347cd9ddad1224d4fd701eb348b" + integrity sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" + integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== + dependencies: + balanced-match "^1.0.0" + +brace-expansion@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.5.tgz#dcc3a37116b79f3e1b46db994ced5d570e930fdb" + integrity sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ== + dependencies: + balanced-match "^4.0.2" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +case@1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.0, chalk@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +ci-info@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.2.0: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + +cli-table3@^0.6.0: + version "0.6.5" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f" + integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + +cloudform-types@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/cloudform-types/-/cloudform-types-4.2.0.tgz#698c98a1468bd8fe9c1c275b2e65720f572ca401" + integrity sha512-i7fmpsOtrMzF4z3Ltpqn9Khi6pgSxNCMqqsXLXWbaZsczky7vA9mkq/Z2bdMUu5x4Eaj5wvvKc95ENZ0dtN/Uw== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-convert@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-3.1.3.tgz#db6627b97181cb8facdfce755ae26f97ab0711f1" + integrity sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg== + dependencies: + color-name "^2.0.0" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-2.1.0.tgz#0b677385c1c4b4edfdeaf77e38fa338e3a40b693" + integrity sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^2.1.3: + version "2.1.4" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-2.1.4.tgz#9dcf566ff976e23368c8bd673f5c35103ab41058" + integrity sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg== + dependencies: + color-name "^2.0.0" + +color@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/color/-/color-5.0.3.tgz#f79390b1b778e222ffbb54304d3dbeaef633f97f" + integrity sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA== + dependencies: + color-convert "^3.1.3" + color-string "^2.1.3" + +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +constructs@^10.0.5: + version "10.6.0" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-10.6.0.tgz#9ec889c48567182ed9e2a56d4335d582ba0bcb6b" + integrity sha512-TxHOnBO5zMo/G76ykzGF/wMpEHu257TbWiIxP9K0Yv/+t70UzgBQiTqjkAsWOPC6jW91DzJI0+ehQV6xDRNBuQ== + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^7.0.3, cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + +debug@4, debug@^4.3.4: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + +diff@^4.0.1: + version "4.0.4" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.4.tgz#7a6dbfda325f25f07517e9b518f897c08332e07d" + integrity sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dotenv@^8.2.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== + +ejs@^3.1.7: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enabled@2.0.x: + version "2.0.0" + resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" + integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== + +enquirer@^2.3.6: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-uri@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== + +fastq@^1.6.0: + version "1.20.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675" + integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw== + dependencies: + reusify "^1.0.4" + +fecha@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" + integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-stream-rotator@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz#007019e735b262bb6c6f0197e58e5c87cb96cec3" + integrity sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ== + dependencies: + moment "^2.29.1" + +filelist@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.6.tgz#1e8870942a7c636c862f7c49b9394937b6a995a3" + integrity sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA== + dependencies: + minimatch "^5.0.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +fn.name@1.x.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" + integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== + +foreground-child@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" + integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== + dependencies: + cross-spawn "^7.0.6" + signal-exit "^4.0.1" + +fs-extra@^11.3.0: + version "11.3.4" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.4.tgz#ab6934eca8bcf6f7f6b82742e33591f86301d6fc" + integrity sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-uri@^6.0.1: + version "6.0.5" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.5.tgz#714892aa4a871db671abc5395e5e9447bc306a16" + integrity sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^11.0.1: + version "11.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-11.1.0.tgz#4f826576e4eb99c7dad383793d2f9f08f67e50a6" + integrity sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw== + dependencies: + foreground-child "^3.3.1" + jackspeak "^4.1.1" + minimatch "^10.1.1" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + +glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphql@^15.5.0: + version "15.10.2" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.10.2.tgz#f57f8665cea9e77a80264d7eeb0d687079714e78" + integrity sha512-1PRqdDPAmViWr4h1GVBT8RoPZfWSGZa7kDzleTilOfVIslsgf+cia3Nl95v1KDmR4iERPaT7WzQ+tN4MJmbg3w== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +hjson@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/hjson/-/hjson-3.2.2.tgz#a5a81138f4c0bb427e4b2ac917fafd4b454436cf" + integrity sha512-MkUeB0cTIlppeSsndgESkfFD21T2nXPRaBStLtf3cAYA2bVEFdXlodZB0TukwZiobPD1Ksax5DK4RTZeaXCI3Q== + +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +https-proxy-agent@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" + integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== + dependencies: + agent-base "^7.1.2" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^5.2.0, ignore@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inquirer@^7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +ip-address@^10.0.1: + version "10.1.0" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.1.0.tgz#d8dcffb34d0e02eb241427444a6e23f5b0595aa4" + integrity sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q== + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +jackspeak@^4.1.1: + version "4.2.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.2.3.tgz#27ef80f33b93412037c3bea4f8eddf80e1931483" + integrity sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg== + dependencies: + "@isaacs/cliui" "^9.0.0" + +jake@^10.8.5: + version "10.9.4" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.4.tgz#d626da108c63d5cfb00ab5c25fadc7e0084af8e6" + integrity sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA== + dependencies: + async "^3.2.6" + filelist "^1.0.4" + picocolors "^1.1.1" + +js-yaml@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.2.1.tgz#b6e31717f22cc37330b081ce0051ed5de53af2f6" + integrity sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonschema@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.5.0.tgz#f6aceb1ab9123563dd901d05f81f9d4883d3b7d8" + integrity sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw== + +jsonschema@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== + +kuler@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" + integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.19, lodash@^4.17.21: + version "4.18.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.18.1.tgz#ff2b66c1f6326d59513de2407bf881439812771c" + integrity sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q== + +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +logform@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.7.0.tgz#cfca97528ef290f2e125a08396805002b2d060d1" + integrity sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ== + dependencies: + "@colors/colors" "1.6.0" + "@types/triple-beam" "^1.3.2" + fecha "^4.2.0" + ms "^2.1.1" + safe-stable-stringify "^2.3.1" + triple-beam "^1.3.0" + +lru-cache@^11.0.0: + version "11.3.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.3.5.tgz#29047d348c0b2793e3112a01c739bb7c6d855637" + integrity sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw== + +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.35: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^10.1.1: + version "10.2.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.5.tgz#bd48687a0be38ed2961399105600f832095861d1" + integrity sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== + dependencies: + brace-expansion "^5.0.5" + +minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" + integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.9" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.9.tgz#1293ef15db0098b394540e8f9f744f9fda8dee4b" + integrity sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw== + dependencies: + brace-expansion "^2.0.1" + +minipass@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.3.tgz#79389b4eb1bb2d003a9bba87d492f2bd37bdc65b" + integrity sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== + +moment@^2.29.1: + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== + +ms@^2.1.1, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +netmask@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.1.1.tgz#80043d265b53aa521b3bd01e8fcdf353f9e1e81e" + integrity sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA== + +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-hash@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" + integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +one-time@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45" + integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g== + dependencies: + fn.name "1.x.x" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +ora@^4.0.3: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.1.1.tgz#566cc0348a15c36f5f0e979612842e02ba9dddbc" + integrity sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +pac-proxy-agent@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz#9cfaf33ff25da36f6147a20844230ec92c06e5df" + integrity sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.1.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.6" + pac-resolver "^7.0.1" + socks-proxy-agent "^8.0.5" + +pac-resolver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-scurry@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.2.tgz#6be0d0ee02a10d9e0de7a98bae65e182c9061f85" + integrity sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601" + integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== + +proxy-agent@^6.3.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.5.0.tgz#9e49acba8e4ee234aacb539f89ed9c23d02f232d" + integrity sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.6" + lru-cache "^7.14.1" + pac-proxy-agent "^7.1.0" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.5" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +punycode@^2.1.0, punycode@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +readable-stream@^3.4.0, readable-stream@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +reusify@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rxjs@^6.6.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-stable-stringify@^2.2.0, safe-stable-stringify@^2.3.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^7.5.4, semver@^7.7.1: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.5: + version "8.0.5" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz#b9cdb4e7e998509d7659d689ce7697ac21645bee" + integrity sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.7" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.7.tgz#e2fb1d9a603add75050a2067db8c381a0b5669ea" + integrity sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A== + dependencies: + ip-address "^10.0.1" + smart-buffer "^4.2.0" + +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/table/-/table-6.9.0.tgz#50040afa6264141c7566b3b81d4d82c47a8668f5" + integrity sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +text-hex@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" + integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +triple-beam@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" + integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== + +ts-node@^10.2.1: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.1, tslib@^2.6.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript-json-schema@~0.52.0: + version "0.52.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.52.0.tgz#954560ec90e5486e8f7a5b7706ec59286a708e29" + integrity sha512-3ZdHzx116gZ+D9LmMl5/+d1G3Rpt8baWngKzepYWHnXbAa8Winv64CmFRqLlMKneE1c40yugYDFcWdyX1FjGzQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/node" "^16.9.2" + glob "^7.1.7" + safe-stable-stringify "^2.2.0" + ts-node "^10.2.1" + typescript "~4.4.4" + yargs "^17.1.1" + +typescript@^4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +typescript@~4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" + integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +winston-daily-rotate-file@^4.5.0: + version "4.7.1" + resolved "https://registry.yarnpkg.com/winston-daily-rotate-file/-/winston-daily-rotate-file-4.7.1.tgz#f60a643af87f8867f23170d8cd87dbe3603a625f" + integrity sha512-7LGPiYGBPNyGHLn9z33i96zx/bd71pjBn9tqQzO3I4Tayv94WPmBNwKC7CO1wPHdP9uvu+Md/1nr6VSH9h0iaA== + dependencies: + file-stream-rotator "^0.6.1" + object-hash "^2.0.1" + triple-beam "^1.3.0" + winston-transport "^4.4.0" + +winston-transport@^4.4.0, winston-transport@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.9.0.tgz#3bba345de10297654ea6f33519424560003b3bf9" + integrity sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A== + dependencies: + logform "^2.7.0" + readable-stream "^3.6.2" + triple-beam "^1.3.0" + +winston@^3.3.3: + version "3.19.0" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.19.0.tgz#cc1d1262f5f45946904085cfffe73efb4b7a581d" + integrity sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA== + dependencies: + "@colors/colors" "^1.6.0" + "@dabh/diagnostics" "^2.0.8" + async "^3.2.3" + is-stream "^2.0.0" + logform "^2.7.0" + one-time "^1.0.0" + readable-stream "^3.4.0" + safe-stable-stringify "^2.3.1" + stack-trace "0.0.x" + triple-beam "^1.3.0" + winston-transport "^4.9.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaml@1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yaml@^2.2.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.3.tgz#a0d6bd2efb3dd03c59370223701834e60409bd7d" + integrity sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.1.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yauzl@^3.1.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.3.0.tgz#5be5e287b9a8112941c177734a34bf61a3e11bb4" + integrity sha512-PtGEvEP30p7sbIBJKUBjUnqgTVOyMURc4dLo9iNyAJnNIEz9pm88cCXF21w94Kg3k6RXkeZh5DHOGS0qEONvNQ== + dependencies: + buffer-crc32 "~0.2.3" + pend "~1.2.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/amplify.state b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/amplify.state new file mode 100644 index 00000000000..f4f664b5257 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/amplify.state @@ -0,0 +1,9 @@ +{ + "pluginId": "amplify-nodejs-function-runtime-provider", + "functionRuntime": "nodejs", + "useLegacyBuild": true, + "defaultEditorFile": "src/index.js", + "scripts": { + "build": "npm install --no-bin-links --production" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/custom-policies.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/custom-policies.json new file mode 100644 index 00000000000..22b177335f0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/custom-policies.json @@ -0,0 +1,18 @@ +[ + { + "Action": ["sns:Publish"], + "Resource": ["*"] + }, + { + "Action": ["dynamodb:Scan", "dynamodb:Query", "dynamodb:GetItem"], + "Resource": [ + { + "Fn::Sub": ["arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", {}] + } + ] + }, + { + "Action": ["sts:GetCallerIdentity"], + "Resource": ["*"] + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/financetracker-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/financetracker-cloudformation-template.json new file mode 100644 index 00000000000..6dd8bac8d69 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/financetracker-cloudformation-template.json @@ -0,0 +1,391 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"function-Lambda\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "Parameters": { + "CloudWatchRule": { + "Type": "String", + "Default": "NONE", + "Description": " Schedule Expression" + }, + "deploymentBucketName": { + "Type": "String" + }, + "env": { + "Type": "String" + }, + "s3Key": { + "Type": "String" + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Type": "String" + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Type": "String" + }, + "dependsOn": { + "Type": "String", + "Default": "" + }, + "lambdaLayers": { + "Type": "String", + "Default": "" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String", + "Default": "apifinancetrackerGraphQLAPIIdOutput" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "LambdaFunction": { + "Type": "AWS::Lambda::Function", + "Metadata": { + "aws:asset:path": "./src", + "aws:asset:property": "Code" + }, + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "deploymentBucketName" + }, + "S3Key": { + "Ref": "s3Key" + } + }, + "Handler": "index.handler", + "FunctionName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker2ceb6de29", + { + "Fn::Join": [ + "", + [ + "financetracker", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "Environment": { + "Variables": { + "ENV": { + "Ref": "env" + }, + "REGION": { + "Ref": "AWS::Region" + }, + "BUDGET_ALERT_TOPIC_ARN": { + "Ref": "customcustomfinanceBudgetAlertTopicArn" + }, + "MONTHLY_REPORT_TOPIC_ARN": { + "Ref": "customcustomfinanceMonthlyReportTopicArn" + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_NAME": { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_ARN": { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + "API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + } + } + }, + "Role": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Layers": [], + "Timeout": 25 + } + }, + "LambdaExecutionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetrackerLambdaRole96a64165", + { + "Fn::Join": [ + "", + [ + "financetrackerLambdaRole96a64165", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + } + } + }, + "lambdaexecutionpolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": { + "Fn::Sub": [ + "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", + { + "region": { + "Ref": "AWS::Region" + }, + "account": { + "Ref": "AWS::AccountId" + }, + "lambda": { + "Ref": "LambdaFunction" + } + } + ] + } + } + ] + } + } + }, + "AmplifyResourcesPolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "amplify-lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "dynamodb:Put*", + "dynamodb:Create*", + "dynamodb:BatchWriteItem", + "dynamodb:PartiQLInsert", + "dynamodb:Get*", + "dynamodb:BatchGetItem", + "dynamodb:List*", + "dynamodb:Describe*", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:PartiQLSelect", + "dynamodb:Update*", + "dynamodb:RestoreTable*", + "dynamodb:PartiQLUpdate", + "dynamodb:Delete*", + "dynamodb:PartiQLDelete" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "/index/*" + ] + ] + } + ] + } + ] + } + } + }, + "CustomLambdaExecutionPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "custom-lambda-execution-policy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "sns:Publish" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + }, + { + "Action": [ + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:GetItem" + ], + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", + {} + ] + } + ], + "Effect": "Allow" + }, + { + "Action": [ + "sts:GetCallerIdentity" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + } + ] + }, + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ] + }, + "DependsOn": "LambdaExecutionRole" + } + }, + "Outputs": { + "Name": { + "Value": { + "Ref": "LambdaFunction" + } + }, + "Arn": { + "Value": { + "Fn::GetAtt": [ + "LambdaFunction", + "Arn" + ] + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + }, + "LambdaExecutionRole": { + "Value": { + "Ref": "LambdaExecutionRole" + } + }, + "LambdaExecutionRoleArn": { + "Value": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/function-parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/function-parameters.json new file mode 100644 index 00000000000..f6d67716a92 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/function-parameters.json @@ -0,0 +1,23 @@ +{ + "permissions": { + "storage": { + "Transaction:@model(appsync)": [ + "create", + "read", + "update", + "delete" + ] + } + }, + "lambdaLayers": [], + "dependsOn": [ + { + "category": "custom", + "resourceName": "customfinance", + "attributes": [ + "BudgetAlertTopicArn", + "MonthlyReportTopicArn" + ] + } + ] +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/parameters.json new file mode 100644 index 00000000000..0967ef424bc --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/parameters.json @@ -0,0 +1 @@ +{} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/event.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/event.json new file mode 100644 index 00000000000..fd2722e8599 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/event.json @@ -0,0 +1,5 @@ +{ + "key1": "value1", + "key2": "value2", + "key3": "value3" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/index.js b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/index.js new file mode 100644 index 00000000000..519e5e91239 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/index.js @@ -0,0 +1,209 @@ +/* Amplify Params - DO NOT EDIT + API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT + API_FINANCETRACKER_TRANSACTIONTABLE_ARN + API_FINANCETRACKER_TRANSACTIONTABLE_NAME + BUDGET_ALERT_TOPIC_ARN + MONTHLY_REPORT_TOPIC_ARN + ENV + REGION +Amplify Params - DO NOT EDIT */ const { DynamoDBClient } = require('@aws-sdk/client-dynamodb'); +const { DynamoDBDocumentClient, ScanCommand } = require('@aws-sdk/lib-dynamodb'); +const { SNSClient, PublishCommand } = require('@aws-sdk/client-sns'); + +const dynamoClient = new DynamoDBClient({}); +const dynamodb = DynamoDBDocumentClient.from(dynamoClient); +const sns = new SNSClient({}); + +/** + * Calculates totals from an array of transactions. + * Returns { totalIncome, totalExpenses, balance, savingsRate }. + */ +function calculateTotals(transactions) { + const { totalIncome, totalExpenses } = transactions.reduce( + (acc, transaction) => { + if (transaction.type === 'INCOME') { + acc.totalIncome += transaction.amount; + } else if (transaction.type === 'EXPENSE') { + acc.totalExpenses += transaction.amount; + } + return acc; + }, + { totalIncome: 0, totalExpenses: 0 }, + ); + + const balance = totalIncome - totalExpenses; + const savingsRate = totalIncome > 0 ? parseFloat(((balance / totalIncome) * 100).toFixed(2)) : 0; + + return { totalIncome, totalExpenses, balance, savingsRate }; +} + +/** + * Returns the Transaction table name from the environment variable. + * Throws if not configured. + */ +function getTableName() { + const tableName = process.env.API_FINANCETRACKER_TRANSACTIONTABLE_NAME; + if (!tableName || tableName.includes('NONE')) { + throw new Error('Transaction table name is not configured. Check the API_FINANCETRACKER_TRANSACTIONTABLE_NAME environment variable.'); + } + return tableName; +} + +/** + * AppSync GraphQL resolver for calculating financial summary and sending notifications + * @type {import('@types/aws-lambda').AppSyncResolverHandler} + */ +exports.handler = async (event) => { + console.log(`EVENT: ${JSON.stringify(event, null, 2)}`); + + const fieldName = event.info?.fieldName || event.fieldName; + const args = event.arguments || event.args || {}; + + console.log('Field Name:', fieldName); + + try { + switch (fieldName) { + case 'calculateFinancialSummary': + return await calculateSummaryFromDB(); + + case 'sendMonthlyReport': + return await sendMonthlyReport(args); + + case 'sendBudgetAlert': + return await sendBudgetAlert(args); + + default: + throw new Error(`Unknown field: ${fieldName}`); + } + } catch (error) { + console.error('Handler Error:', error); + + // For calculateFinancialSummary, return zeros instead of null to avoid GraphQL errors + if (fieldName === 'calculateFinancialSummary') { + return { totalIncome: 0, totalExpenses: 0, balance: 0, savingsRate: 0 }; + } + + return { success: false, message: `Error: ${error.message}` }; + } +}; + +async function calculateSummaryFromDB() { + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + console.log('Found transactions:', transactions.length); + + const summary = calculateTotals(transactions); + console.log('Calculated summary:', summary); + return summary; +} + +async function sendMonthlyReport(args) { + const email = args.email; + if (!email) { + return { success: false, message: 'Email is required' }; + } + + try { + const topicArn = process.env.MONTHLY_REPORT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Monthly report topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + const summary = calculateTotals(transactions); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: '📊 Your Monthly Financial Report', + Message: `Hello, + +Here is your monthly financial report: + +💰 Total Income: ${summary.totalIncome.toFixed(2)} +💸 Total Expenses: ${summary.totalExpenses.toFixed(2)} +💵 Balance: ${summary.balance.toFixed(2)} +📈 Savings Rate: ${summary.savingsRate}% + +Total Transactions: ${transactions.length} + +This report was generated on ${new Date().toLocaleDateString()}. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + }, + }), + ); + + return { + success: true, + message: `Monthly report sent! Check ${email} for a confirmation email from AWS SNS, then click the button again.`, + }; + } catch (error) { + console.error('Error sending monthly report:', error); + return { success: false, message: `Failed to send report: ${error.message}` }; + } +} + +async function sendBudgetAlert(args) { + const { email, category, exceeded } = args; + + try { + const topicArn = process.env.BUDGET_ALERT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Budget alert topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send( + new ScanCommand({ + TableName: tableName, + FilterExpression: 'category = :category AND #type = :type', + ExpressionAttributeNames: { '#type': 'type' }, + ExpressionAttributeValues: { ':category': category, ':type': 'EXPENSE' }, + }), + ); + + const categoryTransactions = result.Items || []; + const totalSpent = categoryTransactions.reduce((sum, t) => sum + t.amount, 0); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: `⚠️ Budget Alert: ${category}`, + Message: `Hello, + +⚠️ BUDGET ALERT ⚠️ + +You have exceeded your budget for ${category} by ${exceeded.toFixed(2)}. + +Category: ${category} +Total Spent: ${totalSpent.toFixed(2)} +Number of Transactions: ${categoryTransactions.length} + +Consider reviewing your spending in this category. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + category: { DataType: 'String', StringValue: category }, + exceeded: { DataType: 'Number', StringValue: exceeded.toString() }, + }, + }), + ); + + return { success: true, message: 'Budget alert sent successfully!' }; + } catch (error) { + console.error('Error sending budget alert:', error); + return { success: false, message: `Failed to send alert: ${error.message}` }; + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/package.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/package.json new file mode 100644 index 00000000000..41f603c8d52 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/function/financetracker/src/package.json @@ -0,0 +1,10 @@ +{ + "name": "financetracker", + "version": "2.0.0", + "description": "Lambda function generated by Amplify", + "main": "index.js", + "license": "Apache-2.0", + "devDependencies": { + "@types/aws-lambda": "^8.10.92" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/build/cloudformation-template.json new file mode 100644 index 00000000000..d9b5969f570 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/build/cloudformation-template.json @@ -0,0 +1,637 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"storage-S3\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "bucketName": { + "Type": "String" + }, + "authRoleName": { + "Type": "String" + }, + "unauthRoleName": { + "Type": "String" + }, + "authPolicyName": { + "Type": "String" + }, + "unauthPolicyName": { + "Type": "String" + }, + "s3PublicPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PrivatePolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ProtectedPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3UploadsPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ReadPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PermissionsAuthenticatedPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedProtected": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedPrivate": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "AuthenticatedAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "GuestAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "selectedGuestPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + }, + "selectedAuthenticatedPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + }, + "CreateAuthPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthProtected": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedProtected" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthPrivate": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPrivate" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedUploads" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestUploads" + }, + "DISALLOW" + ] + } + ] + }, + "AuthReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "AuthenticatedAllowList" + }, + "DISALLOW" + ] + } + ] + }, + "GuestReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "GuestAllowList" + }, + "DISALLOW" + ] + } + ] + } + }, + "Outputs": { + "BucketName": { + "Description": "Bucket name for the S3 bucket", + "Value": { + "Ref": "S3Bucket" + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + } + }, + "Resources": { + "S3Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "bucketName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "bucketName" + }, + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "GET", + "HEAD", + "PUT", + "POST", + "DELETE" + ], + "AllowedOrigins": [ + "*" + ], + "ExposedHeaders": [ + "x-amz-server-side-encryption", + "x-amz-request-id", + "x-amz-id-2", + "ETag" + ], + "Id": "S3CORSRuleId1", + "MaxAge": 3000 + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "S3AuthPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPublic" + }, + "S3AuthProtectedPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedProtected" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3ProtectedPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthProtected" + }, + "S3AuthPrivatePolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPrivate" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/private/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PrivatePolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPrivate" + }, + "S3AuthUploadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedUploads" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/uploads/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3UploadsPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthUploads" + }, + "S3GuestPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsGuestPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateGuestPublic" + }, + "S3AuthReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*", + "private/${cognito-identity.amazonaws.com:sub}/", + "private/${cognito-identity.amazonaws.com:sub}/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "AuthReadAndList" + }, + "S3GuestReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "GuestReadAndList" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/build/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/build/parameters.json new file mode 100644 index 00000000000..cf45d8d48ff --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/build/parameters.json @@ -0,0 +1,34 @@ +{ + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "selectedGuestPermissions": [ + "s3:GetObject", + "s3:ListBucket" + ], + "selectedAuthenticatedPermissions": [ + "s3:PutObject", + "s3:GetObject", + "s3:ListBucket", + "s3:DeleteObject" + ], + "unauthRoleName": { + "Ref": "UnauthRoleName" + }, + "authRoleName": { + "Ref": "AuthRoleName" + }, + "s3PrivatePolicy": "Private_policy_20279658", + "s3ProtectedPolicy": "Protected_policy_20279658", + "s3PublicPolicy": "Public_policy_20279658", + "s3ReadPolicy": "read_policy_20279658", + "s3UploadsPolicy": "Uploads_policy_20279658", + "authPolicyName": "s3_amplify_20279658", + "unauthPolicyName": "s3_amplify_20279658", + "AuthenticatedAllowList": "ALLOW", + "GuestAllowList": "ALLOW", + "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedUploads": "s3:PutObject", + "s3PermissionsGuestPublic": "s3:GetObject", + "s3PermissionsGuestUploads": "DISALLOW" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/cli-inputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/cli-inputs.json new file mode 100644 index 00000000000..ceeb0108d90 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/storage/s320279658/cli-inputs.json @@ -0,0 +1,16 @@ +{ + "resourceName": "s320279658", + "policyUUID": "20279658", + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "storageAccess": "authAndGuest", + "guestAccess": [ + "READ" + ], + "authAccess": [ + "CREATE_AND_UPDATE", + "READ", + "DELETE" + ], + "triggerFunction": "NONE", + "groupAccess": {} +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/tags.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/tags.json new file mode 100644 index 00000000000..71f6abe11a6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/#current-cloud-backend/tags.json @@ -0,0 +1,10 @@ +[ + { + "Key": "user:Stack", + "Value": "{project-env}" + }, + { + "Key": "user:Application", + "Value": "{project-name}" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/.config/project-config.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/.config/project-config.json new file mode 100644 index 00000000000..5b38fc9158f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/.config/project-config.json @@ -0,0 +1,18 @@ +{ + "whyContinueWithGen1": "Prefer not to answer", + "projectName": "financetracker", + "version": "3.1", + "frontend": "javascript", + "javascript": { + "framework": "react", + "config": { + "SourceDir": "src", + "DistributionDir": "dist", + "BuildCommand": "npm run build", + "StartCommand": "npm run-script start" + } + }, + "providers": [ + "awscloudformation" + ] +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/README.md b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/README.md new file mode 100644 index 00000000000..46165a9c8c6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/README.md @@ -0,0 +1,8 @@ +# Getting Started with Amplify CLI +This directory was generated by [Amplify CLI](https://docs.amplify.aws/cli). + +Helpful resources: +- Amplify documentation: https://docs.amplify.aws. +- Amplify CLI documentation: https://docs.amplify.aws/cli. +- More details on this folder & generated files: https://docs.amplify.aws/cli/reference/files. +- Join Amplify's community: https://amplify.aws/community/. diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/amplify-meta.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/amplify-meta.json new file mode 100644 index 00000000000..051e9aa47e4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/amplify-meta.json @@ -0,0 +1,203 @@ +{ + "providers": { + "awscloudformation": { + "AuthRoleName": "amplify-financetracker-x-x-authRole", + "UnauthRoleArn": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-unauthRole", + "AuthRoleArn": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-authRole", + "Region": "us-east-1", + "DeploymentBucketName": "amplify-financetracker-x-x-deployment", + "UnauthRoleName": "amplify-financetracker-x-x-unauthRole", + "StackName": "amplify-financetracker-x-x", + "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/amplify-financetracker-x-x/b5b77e20-3f49-11f1-aca5-1262955767e1", + "AmplifyAppId": "financetracker" + } + }, + "api": { + "financetracker": { + "dependsOn": [ + { + "attributes": [ + "UserPoolId" + ], + "category": "auth", + "resourceName": "financetracker331811e6" + } + ], + "output": { + "authConfig": { + "additionalAuthenticationProviders": [ + { + "authenticationType": "AMAZON_COGNITO_USER_POOLS", + "userPoolConfig": { + "userPoolId": "authfinancetracker331811e6" + } + } + ], + "defaultAuthentication": { + "apiKeyConfig": { + "apiKeyExpirationDays": 7 + }, + "authenticationType": "API_KEY" + } + }, + "GraphQLAPIIdOutput": "adetddan7nd55gwre37yyck3vu", + "GraphQLAPIEndpointOutput": "https://qcluzgdzhff3rdbn5r5dg2mnla.appsync-api.us-east-1.amazonaws.com/graphql", + "GraphQLAPIKeyOutput": "da2-fakeapikey00000000000000" + }, + "providerPlugin": "awscloudformation", + "service": "AppSync", + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/api/cloudformation-template.json", + "logicalId": "apifinancetracker" + }, + "lastPushDirHash": "P5h2DzOz2DkniNcIBgKBz9B+lF8=" + } + }, + "auth": { + "financetracker331811e6": { + "customAuth": false, + "dependsOn": [], + "frontendAuthConfig": { + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS" + ], + "passwordProtectionSettings": { + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": [] + }, + "signupAttributes": [ + "EMAIL" + ], + "socialProviders": [], + "usernameAttributes": [ + "EMAIL" + ], + "verificationMechanisms": [ + "EMAIL" + ] + }, + "providerPlugin": "awscloudformation", + "service": "Cognito", + "output": { + "UserPoolId": "us-east-1_LFxofbrDo", + "AppClientIDWeb": "pdn5tq3qc767u6n4gv9jnic6v", + "AppClientID": "1m28beghjka8l0hg8avja1ab2n", + "IdentityPoolId": "us-east-1:9c7ebdb2-57df-4b19-95ae-4f621dcfe3e4", + "UserPoolArn": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_LFxofbrDo", + "IdentityPoolName": "financetracker331811e6_identitypool_331811e6__x", + "UserPoolName": "financetracker331811e6_userpool_331811e6" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/auth/financetracker331811e6-cloudformation-template.json", + "logicalId": "authfinancetracker331811e6" + }, + "lastPushDirHash": "TYdUKpnamNh8a7kbpjSS/0c3rp8=" + } + }, + "custom": { + "customfinance": { + "providerPlugin": "awscloudformation", + "service": "customCDK", + "output": { + "MonthlyReportTopicArn": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-MonthlyReportTopic8D223100-riowtcOhtvf1", + "BudgetAlertTopicArn": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-BudgetAlertTopicF20DF526-R5tDxQli7ASH" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customfinance-cloudformation-template.json", + "logicalId": "customcustomfinance" + }, + "lastPushDirHash": "EAlFTfG4+hgHLwheq/qriUrvAwM=" + }, + "customresolver": { + "dependsOn": [ + { + "category": "api", + "resourceName": "financetracker", + "attributes": [ + "GraphQLAPIKeyOutput", + "GraphQLAPIIdOutput", + "GraphQLAPIEndpointOutput" + ] + } + ], + "providerPlugin": "awscloudformation", + "service": "customCDK", + "output": { + "DataSourceName": "TransactionsByCategoryDataSource", + "ResolverArn": "arn:aws:appsync:us-east-1:123456789012:apis/adetddan7nd55gwre37yyck3vu/types/Query/resolvers/getTransactionsByCategory" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customresolver-cloudformation-template.json", + "logicalId": "customcustomresolver" + }, + "lastPushDirHash": "SgT20eFaRpzwe3wrwjlFOeYYy9Q=" + } + }, + "function": { + "financetracker": { + "build": true, + "dependsOn": [ + { + "attributes": [ + "GraphQLAPIIdOutput" + ], + "category": "api", + "resourceName": "financetracker" + }, + { + "attributes": [ + "BudgetAlertTopicArn", + "MonthlyReportTopicArn" + ], + "category": "custom", + "resourceName": "customfinance" + } + ], + "providerPlugin": "awscloudformation", + "service": "Lambda", + "output": { + "LambdaExecutionRoleArn": "arn:aws:iam::123456789012:role/financetrackerLambdaRole96a64165-x", + "Region": "us-east-1", + "Arn": "arn:aws:lambda:us-east-1:123456789012:function:financetracker-x", + "Name": "financetracker-x", + "LambdaExecutionRole": "financetrackerLambdaRole96a64165-x" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/function/financetracker-cloudformation-template.json", + "logicalId": "functionfinancetracker" + }, + "s3Bucket": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip" + }, + "lastBuildTimeStamp": "2026-04-23T19:23:16.888Z", + "lastBuildType": "PROD", + "lastPackageTimeStamp": "2026-04-23T19:23:16.905Z", + "distZipFilename": "financetracker-36344755354a3948535a-build.zip", + "lastPushDirHash": "kiL0nXnJyG035thUXEslXCwbF8s=" + } + }, + "storage": { + "s320279658": { + "dependsOn": [], + "providerPlugin": "awscloudformation", + "service": "S3", + "output": { + "BucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7x-x", + "Region": "us-east-1" + }, + "lastPushTimeStamp": "2026-04-23T19:28:01.721Z", + "providerMetadata": { + "s3TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/storage/cloudformation-template.json", + "logicalId": "storages320279658" + }, + "lastPushDirHash": "Cx6dQZQ101wqgNP1eV8ptOLYgLk=" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/cloudformation-template.json new file mode 100644 index 00000000000..42f68b18272 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/cloudformation-template.json @@ -0,0 +1,1196 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Default": "NONE" + }, + "AppSyncApiName": { + "Type": "String", + "Default": "AppSyncSimpleTransform" + }, + "AuthCognitoUserPoolId": { + "Type": "String" + }, + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "An S3 Bucket name where assets are deployed" + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root of the deployment directory." + } + }, + "Resources": { + "GraphQLAPI": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AdditionalAuthenticationProviders": [ + { + "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", + "UserPoolConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "UserPoolId": { + "Ref": "AuthCognitoUserPoolId" + } + } + } + ], + "AuthenticationType": "API_KEY", + "Name": { + "Fn::Join": [ + "", + [ + { + "Ref": "AppSyncApiName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "GraphQLAPITransformerSchema3CB2AE18": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DefinitionS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/schema.graphql" + ] + ] + } + } + }, + "GraphQLAPIDefaultApiKey215A6DD7": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Expires": 1777576997 + } + }, + "GraphQLAPINONEDS95A13CF0": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Name": "NONE_DS", + "Type": "NONE" + } + }, + "Transaction": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Transaction.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "Budget": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Budget.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FinancialSummary": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FinancialSummary.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FunctionDirectiveStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FunctionDirectiveStack.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalIncomeDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalIncomeResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalIncome", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalIncome\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalExpensesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalExpensesResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalExpenses", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalExpenses\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryBalanceDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarybalanceResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "balance", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"balance\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummarySavingsRateDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarysavingsRateResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "savingsRate", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"savingsRate\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultSuccessDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultsuccessResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "success", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"success\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultMessageDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultmessageResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "message", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"message\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CustomResourcesjson": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "AppSyncApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "AppSyncApiName": { + "Ref": "AppSyncApiName" + }, + "env": { + "Ref": "env" + }, + "S3DeploymentBucket": { + "Ref": "S3DeploymentBucket" + }, + "S3DeploymentRootKey": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "/", + [ + "https://s3.amazonaws.com", + { + "Ref": "S3DeploymentBucket" + }, + { + "Ref": "S3DeploymentRootKey" + }, + "stacks", + "CustomResources.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPI", + "GraphQLAPITransformerSchema3CB2AE18", + "Transaction", + "Budget", + "FinancialSummary", + "FunctionDirectiveStack" + ] + } + }, + "Outputs": { + "GraphQLAPIKeyOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPIDefaultApiKey215A6DD7", + "ApiKey" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiKey" + ] + ] + } + } + }, + "GraphQLAPIIdOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiId" + ] + ] + } + } + }, + "GraphQLAPIEndpointOutput": { + "Description": "Your GraphQL API endpoint.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "GraphQLUrl" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiEndpoint" + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"api-AppSync\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/parameters.json new file mode 100644 index 00000000000..3a9e0bd846d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/parameters.json @@ -0,0 +1,13 @@ +{ + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + }, + "S3DeploymentBucket": "amplify-financetracker-x-x-deployment", + "S3DeploymentRootKey": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Budget.owner.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Budget.owner.req.vtl new file mode 100644 index 00000000000..a9c5efa2bb8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Budget.owner.req.vtl @@ -0,0 +1 @@ +$util.toJson({"version":"2018-05-29","payload":{}}) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Budget.owner.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Budget.owner.res.vtl new file mode 100644 index 00000000000..0552e7005c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Budget.owner.res.vtl @@ -0,0 +1,20 @@ +## [Start] Parse owner field auth for Get. ** +#if( $util.isList($ctx.source.owner) ) + #set( $ownerEntitiesList = [] ) + #set( $owner = $ctx.source.owner ) + #foreach( $entities in $owner ) + #set( $ownerEntities = $entities.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ownerEntitiesList.add($ownerEntitiesLast)) + #end + $util.qr($ctx.source.owner.put($ownerEntitiesList)) + $util.toJson($ownerEntitiesList) +#else + #set( $ownerEntities = $ctx.source.owner.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ctx.source.put("owner", $ownerEntitiesLast)) + $util.toJson($ctx.source.owner) +#end +## [End] Parse owner field auth for Get. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.balance.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.balance.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.balance.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.balance.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.balance.res.vtl new file mode 100644 index 00000000000..275cfc837de --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.balance.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["balance"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.res.vtl new file mode 100644 index 00000000000..5ed63df001b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.savingsRate.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["savingsRate"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.res.vtl new file mode 100644 index 00000000000..bcfbee6b50b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalExpenses.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["totalExpenses"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.res.vtl new file mode 100644 index 00000000000..ba6d10769f8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/CalculatedSummary.totalIncome.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["totalIncome"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/FinancialSummary.owner.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/FinancialSummary.owner.req.vtl new file mode 100644 index 00000000000..a9c5efa2bb8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/FinancialSummary.owner.req.vtl @@ -0,0 +1 @@ +$util.toJson({"version":"2018-05-29","payload":{}}) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/FinancialSummary.owner.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/FinancialSummary.owner.res.vtl new file mode 100644 index 00000000000..0552e7005c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/FinancialSummary.owner.res.vtl @@ -0,0 +1,20 @@ +## [Start] Parse owner field auth for Get. ** +#if( $util.isList($ctx.source.owner) ) + #set( $ownerEntitiesList = [] ) + #set( $owner = $ctx.source.owner ) + #foreach( $entities in $owner ) + #set( $ownerEntities = $entities.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ownerEntitiesList.add($ownerEntitiesLast)) + #end + $util.qr($ctx.source.owner.put($ownerEntitiesList)) + $util.toJson($ownerEntitiesList) +#else + #set( $ownerEntities = $ctx.source.owner.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ctx.source.put("owner", $ownerEntitiesLast)) + $util.toJson($ctx.source.owner) +#end +## [End] Parse owner field auth for Get. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl new file mode 100644 index 00000000000..3322375b85b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl @@ -0,0 +1,15 @@ +## [Start] Invoke AWS Lambda data source: FinancetrackerLambdaDataSource. ** +{ + "version": "2018-05-29", + "operation": "Invoke", + "payload": { + "typeName": $util.toJson($ctx.stash.get("typeName")), + "fieldName": $util.toJson($ctx.stash.get("fieldName")), + "arguments": $util.toJson($ctx.arguments), + "identity": $util.toJson($ctx.identity), + "source": $util.toJson($ctx.source), + "request": $util.toJson($ctx.request), + "prev": $util.toJson($ctx.prev) + } +} +## [End] Invoke AWS Lambda data source: FinancetrackerLambdaDataSource. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl new file mode 100644 index 00000000000..1316903313e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl @@ -0,0 +1,6 @@ +## [Start] Handle error or return result. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +$util.toJson($ctx.result) +## [End] Handle error or return result. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.auth.1.req.vtl new file mode 100644 index 00000000000..632e81cf389 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.auth.1.req.vtl @@ -0,0 +1,52 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.input.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( $isAuthorized && $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #end + #if( !$isAuthorized ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","category","limit","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerClaim0 == $ownerEntity0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #if( $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #set( $deniedFields = $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + #if( $deniedFields.size() > 0 ) + $util.error("Unauthorized on ${deniedFields}", "Unauthorized") + #end +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.init.1.req.vtl new file mode 100644 index 00000000000..407b5845fc2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.init.1.req.vtl @@ -0,0 +1,11 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +$util.qr($ctx.stash.defaultValues.put("id", $util.autoId())) +#set( $createdAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("createdAt", $createdAt)) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $createdAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.req.vtl new file mode 100644 index 00000000000..95d60a3ae11 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.req.vtl @@ -0,0 +1,66 @@ +## [Start] Create Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +$util.qr($mergedValues.put("__typename", "Budget")) +#set( $PutObject = { + "version": "2018-05-29", + "operation": "PutItem", + "attributeValues": $util.dynamodb.toMapValues($mergedValues), + "condition": $condition +} ) +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": false +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": false + } +})) +#end +## End - key condition ** +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($PutObject.put("condition", $Conditions)) +#end +#if( $ctx.stash.metadata.modelObjectKey ) + $util.qr($PutObject.put("key", $ctx.stash.metadata.modelObjectKey)) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($mergedValues.id) +} ) + $util.qr($PutObject.put("key", $Key)) +#end +$util.toJson($PutObject) +## [End] Create Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createBudget.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..34bae3ee43c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl @@ -0,0 +1,52 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.input.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( $isAuthorized && $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #end + #if( !$isAuthorized ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","totalIncome","totalExpenses","balance","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerClaim0 == $ownerEntity0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #if( $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #set( $deniedFields = $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + #if( $deniedFields.size() > 0 ) + $util.error("Unauthorized on ${deniedFields}", "Unauthorized") + #end +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.init.1.req.vtl new file mode 100644 index 00000000000..407b5845fc2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.init.1.req.vtl @@ -0,0 +1,11 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +$util.qr($ctx.stash.defaultValues.put("id", $util.autoId())) +#set( $createdAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("createdAt", $createdAt)) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $createdAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.req.vtl new file mode 100644 index 00000000000..f6571219681 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.req.vtl @@ -0,0 +1,66 @@ +## [Start] Create Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +$util.qr($mergedValues.put("__typename", "FinancialSummary")) +#set( $PutObject = { + "version": "2018-05-29", + "operation": "PutItem", + "attributeValues": $util.dynamodb.toMapValues($mergedValues), + "condition": $condition +} ) +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": false +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": false + } +})) +#end +## End - key condition ** +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($PutObject.put("condition", $Conditions)) +#end +#if( $ctx.stash.metadata.modelObjectKey ) + $util.qr($PutObject.put("key", $ctx.stash.metadata.modelObjectKey)) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($mergedValues.id) +} ) + $util.qr($PutObject.put("key", $Key)) +#end +$util.toJson($PutObject) +## [End] Create Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createFinancialSummary.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..1a20389d270 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.auth.1.req.vtl @@ -0,0 +1,52 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.input.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( $isAuthorized && $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #end + #if( !$isAuthorized ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","description","amount","type","category","date","receiptUrl","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerClaim0 == $ownerEntity0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #if( $util.isNull($ownerEntity0) && !$ctx.args.input.containsKey("owner") ) + $util.qr($ctx.args.input.put("owner", $ownerClaim0)) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #set( $deniedFields = $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + #if( $deniedFields.size() > 0 ) + $util.error("Unauthorized on ${deniedFields}", "Unauthorized") + #end +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.init.1.req.vtl new file mode 100644 index 00000000000..407b5845fc2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.init.1.req.vtl @@ -0,0 +1,11 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +$util.qr($ctx.stash.defaultValues.put("id", $util.autoId())) +#set( $createdAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("createdAt", $createdAt)) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $createdAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.req.vtl new file mode 100644 index 00000000000..e550194e877 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.req.vtl @@ -0,0 +1,66 @@ +## [Start] Create Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +$util.qr($mergedValues.put("__typename", "Transaction")) +#set( $PutObject = { + "version": "2018-05-29", + "operation": "PutItem", + "attributeValues": $util.dynamodb.toMapValues($mergedValues), + "condition": $condition +} ) +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": false +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": false + } +})) +#end +## End - key condition ** +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($PutObject.put("condition", $Conditions)) +#end +#if( $ctx.stash.metadata.modelObjectKey ) + $util.qr($PutObject.put("key", $ctx.stash.metadata.modelObjectKey)) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($mergedValues.id) +} ) + $util.qr($PutObject.put("key", $Key)) +#end +$util.toJson($PutObject) +## [End] Create Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.createTransaction.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.res.vtl new file mode 100644 index 00000000000..a616f67a6c4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.auth.1.res.vtl @@ -0,0 +1,27 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #end + #end + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.req.vtl new file mode 100644 index 00000000000..d2cb40cd15d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.req.vtl @@ -0,0 +1,58 @@ +## [Start] Delete Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $DeleteRequest = { + "version": "2018-05-29", + "operation": "DeleteItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +$util.qr($DeleteRequest.put("key", $Key)) +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($DeleteRequest.put("condition", $Conditions)) +#end +$util.toJson($DeleteRequest) +## [End] Delete Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteBudget.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl new file mode 100644 index 00000000000..a616f67a6c4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl @@ -0,0 +1,27 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #end + #end + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.req.vtl new file mode 100644 index 00000000000..d2cb40cd15d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.req.vtl @@ -0,0 +1,58 @@ +## [Start] Delete Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $DeleteRequest = { + "version": "2018-05-29", + "operation": "DeleteItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +$util.qr($DeleteRequest.put("key", $Key)) +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($DeleteRequest.put("condition", $Conditions)) +#end +$util.toJson($DeleteRequest) +## [End] Delete Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteFinancialSummary.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.res.vtl new file mode 100644 index 00000000000..a616f67a6c4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.auth.1.res.vtl @@ -0,0 +1,27 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #end + #end + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.req.vtl new file mode 100644 index 00000000000..d2cb40cd15d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.req.vtl @@ -0,0 +1,58 @@ +## [Start] Delete Request template. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $DeleteRequest = { + "version": "2018-05-29", + "operation": "DeleteItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +$util.qr($DeleteRequest.put("key", $Key)) +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($DeleteRequest.put("condition", $Conditions)) +#end +$util.toJson($DeleteRequest) +## [End] Delete Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.deleteTransaction.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.auth.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.auth.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.auth.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.res.vtl new file mode 100644 index 00000000000..c37b82e4a30 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendBudgetAlert.res.vtl @@ -0,0 +1 @@ +$util.toJson($ctx.prev.result) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.auth.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.auth.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.auth.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.res.vtl new file mode 100644 index 00000000000..c37b82e4a30 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.sendMonthlyReport.res.vtl @@ -0,0 +1 @@ +$util.toJson($ctx.prev.result) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.res.vtl new file mode 100644 index 00000000000..7e6e4c2607f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.auth.1.res.vtl @@ -0,0 +1,55 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#set( $nullAllowedFields = [] ) +#set( $deniedFields = {} ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","category","limit","month","owner"] ) + #set( $ownerNullAllowedFields0 = ["id","category","limit","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + $util.qr($nullAllowedFields.addAll($ownerNullAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() && $nullAllowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #foreach( $entry in $util.map.copyAndRetainAllKeys($ctx.args.input, $inputFields).entrySet() ) + #if( $util.isNull($entry.value) && !$nullAllowedFields.contains($entry.key) ) + $util.qr($deniedFields.put($entry.key, "")) + #end + #end + #foreach( $deniedField in $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + $util.qr($deniedFields.put($deniedField, "")) + #end +#end +#if( $deniedFields.keySet().size() > 0 ) + $util.error("Unauthorized on ${deniedFields.keySet()}", "Unauthorized") +#end +$util.toJson({}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.init.1.req.vtl new file mode 100644 index 00000000000..dde2512aea8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.init.1.req.vtl @@ -0,0 +1,9 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +#set( $updatedAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $updatedAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.req.vtl new file mode 100644 index 00000000000..648b67d7c57 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.req.vtl @@ -0,0 +1,130 @@ +## [Start] Mutation Update resolver. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +## Initialize the vars for creating ddb expression ** +#set( $expNames = {} ) +#set( $expValues = {} ) +#set( $expSet = {} ) +#set( $expAdd = {} ) +#set( $expRemove = [] ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +## Model key ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyFields = [] ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyFields.add("$entry.key")) + #end +#else + #set( $keyFields = ["id"] ) +#end +#foreach( $entry in $util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet() ) + #if( !$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key") ) + #set( $entryKeyAttributeName = $ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key") ) + #else + #set( $entryKeyAttributeName = $entry.key ) + #end + #if( $util.isNull($entry.value) ) + #set( $discard = $expRemove.add("#$entryKeyAttributeName") ) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + #else + $util.qr($expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + $util.qr($expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))) + #end +#end +#set( $expression = "" ) +#if( !$expSet.isEmpty() ) + #set( $expression = "SET" ) + #foreach( $entry in $expSet.entrySet() ) + #set( $expression = "$expression $entry.key = $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expAdd.isEmpty() ) + #set( $expression = "$expression ADD" ) + #foreach( $entry in $expAdd.entrySet() ) + #set( $expression = "$expression $entry.key $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expRemove.isEmpty() ) + #set( $expression = "$expression REMOVE" ) + #foreach( $entry in $expRemove ) + #set( $expression = "$expression $entry" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#set( $update = {} ) +$util.qr($update.put("expression", "$expression")) +#if( !$expNames.isEmpty() ) + $util.qr($update.put("expressionNames", $expNames)) +#end +#if( !$expValues.isEmpty() ) + $util.qr($update.put("expressionValues", $expValues)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#set( $UpdateItem = { + "version": "2018-05-29", + "operation": "UpdateItem", + "key": $Key, + "update": $update +} ) +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($UpdateItem.put("condition", $Conditions)) +#end +$util.toJson($UpdateItem) +## [End] Mutation Update resolver. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateBudget.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl new file mode 100644 index 00000000000..65f81944e9b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl @@ -0,0 +1,55 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#set( $nullAllowedFields = [] ) +#set( $deniedFields = {} ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","totalIncome","totalExpenses","balance","month","owner"] ) + #set( $ownerNullAllowedFields0 = ["id","totalIncome","totalExpenses","balance","month","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + $util.qr($nullAllowedFields.addAll($ownerNullAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() && $nullAllowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #foreach( $entry in $util.map.copyAndRetainAllKeys($ctx.args.input, $inputFields).entrySet() ) + #if( $util.isNull($entry.value) && !$nullAllowedFields.contains($entry.key) ) + $util.qr($deniedFields.put($entry.key, "")) + #end + #end + #foreach( $deniedField in $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + $util.qr($deniedFields.put($deniedField, "")) + #end +#end +#if( $deniedFields.keySet().size() > 0 ) + $util.error("Unauthorized on ${deniedFields.keySet()}", "Unauthorized") +#end +$util.toJson({}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.init.1.req.vtl new file mode 100644 index 00000000000..dde2512aea8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.init.1.req.vtl @@ -0,0 +1,9 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +#set( $updatedAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $updatedAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.req.vtl new file mode 100644 index 00000000000..648b67d7c57 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.req.vtl @@ -0,0 +1,130 @@ +## [Start] Mutation Update resolver. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +## Initialize the vars for creating ddb expression ** +#set( $expNames = {} ) +#set( $expValues = {} ) +#set( $expSet = {} ) +#set( $expAdd = {} ) +#set( $expRemove = [] ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +## Model key ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyFields = [] ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyFields.add("$entry.key")) + #end +#else + #set( $keyFields = ["id"] ) +#end +#foreach( $entry in $util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet() ) + #if( !$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key") ) + #set( $entryKeyAttributeName = $ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key") ) + #else + #set( $entryKeyAttributeName = $entry.key ) + #end + #if( $util.isNull($entry.value) ) + #set( $discard = $expRemove.add("#$entryKeyAttributeName") ) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + #else + $util.qr($expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + $util.qr($expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))) + #end +#end +#set( $expression = "" ) +#if( !$expSet.isEmpty() ) + #set( $expression = "SET" ) + #foreach( $entry in $expSet.entrySet() ) + #set( $expression = "$expression $entry.key = $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expAdd.isEmpty() ) + #set( $expression = "$expression ADD" ) + #foreach( $entry in $expAdd.entrySet() ) + #set( $expression = "$expression $entry.key $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expRemove.isEmpty() ) + #set( $expression = "$expression REMOVE" ) + #foreach( $entry in $expRemove ) + #set( $expression = "$expression $entry" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#set( $update = {} ) +$util.qr($update.put("expression", "$expression")) +#if( !$expNames.isEmpty() ) + $util.qr($update.put("expressionNames", $expNames)) +#end +#if( !$expValues.isEmpty() ) + $util.qr($update.put("expressionValues", $expValues)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#set( $UpdateItem = { + "version": "2018-05-29", + "operation": "UpdateItem", + "key": $Key, + "update": $update +} ) +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($UpdateItem.put("condition", $Conditions)) +#end +$util.toJson($UpdateItem) +## [End] Mutation Update resolver. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateFinancialSummary.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..d05ac25ddc0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.req.vtl @@ -0,0 +1,15 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "GetItem" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $key = { + "id": $util.dynamodb.toDynamoDB($ctx.args.input.id) +} ) +#end +$util.qr($GetRequest.put("key", $key)) +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.res.vtl new file mode 100644 index 00000000000..ccac8eca825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.auth.1.res.vtl @@ -0,0 +1,55 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#set( $inputFields = $util.parseJson($util.toJson($ctx.args.input.keySet())) ) +#set( $isAuthorized = false ) +#set( $allowedFields = [] ) +#set( $nullAllowedFields = [] ) +#set( $deniedFields = {} ) +#if( $util.authType() == "API Key Authorization" ) +$util.unauthorized() +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.result.owner, null) ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + #set( $ownerAllowedFields0 = ["id","description","amount","type","category","date","receiptUrl","owner"] ) + #set( $ownerNullAllowedFields0 = ["id","description","amount","type","category","date","receiptUrl","owner"] ) + #set( $isAuthorizedOnAllFields0 = true ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #if( $isAuthorizedOnAllFields0 ) + #set( $isAuthorized = true ) + #else + $util.qr($allowedFields.addAll($ownerAllowedFields0)) + $util.qr($nullAllowedFields.addAll($ownerNullAllowedFields0)) + #end + #end + #end + #end +#end +#if( !$isAuthorized && $allowedFields.isEmpty() && $nullAllowedFields.isEmpty() ) +$util.unauthorized() +#end +#if( !$isAuthorized ) + #foreach( $entry in $util.map.copyAndRetainAllKeys($ctx.args.input, $inputFields).entrySet() ) + #if( $util.isNull($entry.value) && !$nullAllowedFields.contains($entry.key) ) + $util.qr($deniedFields.put($entry.key, "")) + #end + #end + #foreach( $deniedField in $util.list.copyAndRemoveAll($inputFields, $allowedFields) ) + $util.qr($deniedFields.put($deniedField, "")) + #end +#end +#if( $deniedFields.keySet().size() > 0 ) + $util.error("Unauthorized on ${deniedFields.keySet()}", "Unauthorized") +#end +$util.toJson({}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.init.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.init.1.req.vtl new file mode 100644 index 00000000000..dde2512aea8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.init.1.req.vtl @@ -0,0 +1,9 @@ +## [Start] Initialization default values. ** +$util.qr($ctx.stash.put("defaultValues", $util.defaultIfNull($ctx.stash.defaultValues, {}))) +#set( $updatedAt = $util.time.nowISO8601() ) +$util.qr($ctx.stash.defaultValues.put("updatedAt", $updatedAt)) +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Initialization default values. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.req.vtl new file mode 100644 index 00000000000..648b67d7c57 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.req.vtl @@ -0,0 +1,130 @@ +## [Start] Mutation Update resolver. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +## Set the default values to put request ** +#set( $mergedValues = $util.defaultIfNull($ctx.stash.defaultValues, {}) ) +## copy the values from input ** +$util.qr($mergedValues.putAll($util.defaultIfNull($args.input, {}))) +## set the typename ** +## Initialize the vars for creating ddb expression ** +#set( $expNames = {} ) +#set( $expValues = {} ) +#set( $expSet = {} ) +#set( $expAdd = {} ) +#set( $expRemove = [] ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $Key = $ctx.stash.metadata.modelObjectKey ) +#else + #set( $Key = { + "id": $util.dynamodb.toDynamoDB($args.input.id) +} ) +#end +## Model key ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyFields = [] ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyFields.add("$entry.key")) + #end +#else + #set( $keyFields = ["id"] ) +#end +#foreach( $entry in $util.map.copyAndRemoveAllKeys($mergedValues, $keyFields).entrySet() ) + #if( !$util.isNull($ctx.stash.metadata.dynamodbNameOverrideMap) && $ctx.stash.metadata.dynamodbNameOverrideMap.containsKey("$entry.key") ) + #set( $entryKeyAttributeName = $ctx.stash.metadata.dynamodbNameOverrideMap.get("$entry.key") ) + #else + #set( $entryKeyAttributeName = $entry.key ) + #end + #if( $util.isNull($entry.value) ) + #set( $discard = $expRemove.add("#$entryKeyAttributeName") ) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + #else + $util.qr($expSet.put("#$entryKeyAttributeName", ":$entryKeyAttributeName")) + $util.qr($expNames.put("#$entryKeyAttributeName", "$entry.key")) + $util.qr($expValues.put(":$entryKeyAttributeName", $util.dynamodb.toDynamoDB($entry.value))) + #end +#end +#set( $expression = "" ) +#if( !$expSet.isEmpty() ) + #set( $expression = "SET" ) + #foreach( $entry in $expSet.entrySet() ) + #set( $expression = "$expression $entry.key = $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expAdd.isEmpty() ) + #set( $expression = "$expression ADD" ) + #foreach( $entry in $expAdd.entrySet() ) + #set( $expression = "$expression $entry.key $entry.value" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#if( !$expRemove.isEmpty() ) + #set( $expression = "$expression REMOVE" ) + #foreach( $entry in $expRemove ) + #set( $expression = "$expression $entry" ) + #if( $foreach.hasNext() ) + #set( $expression = "$expression," ) + #end + #end +#end +#set( $update = {} ) +$util.qr($update.put("expression", "$expression")) +#if( !$expNames.isEmpty() ) + $util.qr($update.put("expressionNames", $expNames)) +#end +#if( !$expValues.isEmpty() ) + $util.qr($update.put("expressionValues", $expValues)) +#end +## Begin - key condition ** +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $keyConditionExpr = {} ) + #set( $keyConditionExprNames = {} ) + #foreach( $entry in $ctx.stash.metadata.modelObjectKey.entrySet() ) + $util.qr($keyConditionExpr.put("keyCondition$velocityCount", { + "attributeExists": true +})) + $util.qr($keyConditionExprNames.put("#keyCondition$velocityCount", "$entry.key")) + #end + $util.qr($ctx.stash.conditions.add($keyConditionExpr)) +#else + $util.qr($ctx.stash.conditions.add({ + "id": { + "attributeExists": true + } +})) +#end +## End - key condition ** +#if( $args.condition ) + $util.qr($ctx.stash.conditions.add($args.condition)) +#end +## Start condition block ** +#if( $ctx.stash.conditions && $ctx.stash.conditions.size() != 0 ) + #set( $mergedConditions = { + "and": $ctx.stash.conditions +} ) + #set( $Conditions = $util.parseJson($util.transform.toDynamoDBConditionExpression($mergedConditions)) ) + #if( $Conditions.expressionValues && $Conditions.expressionValues.size() == 0 ) + #set( $Conditions = { + "expression": $Conditions.expression, + "expressionNames": $Conditions.expressionNames +} ) + #end + ## End condition block ** +#end +#set( $UpdateItem = { + "version": "2018-05-29", + "operation": "UpdateItem", + "key": $Key, + "update": $update +} ) +#if( $Conditions ) + #if( $keyConditionExprNames ) + $util.qr($Conditions.expressionNames.putAll($keyConditionExprNames)) + #end + $util.qr($UpdateItem.put("condition", $Conditions)) +#end +$util.toJson($UpdateItem) +## [End] Mutation Update resolver. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.res.vtl new file mode 100644 index 00000000000..f8056d27f3f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Mutation.updateTransaction.res.vtl @@ -0,0 +1,8 @@ +## [Start] ResponseTemplate. ** +$util.qr($ctx.result.put("__operation", "Mutation")) +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.message.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.message.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.message.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.message.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.message.res.vtl new file mode 100644 index 00000000000..7c27c12d67a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.message.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["message"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.success.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.success.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.success.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.success.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.success.res.vtl new file mode 100644 index 00000000000..9e3745df9e6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/NotificationResult.success.res.vtl @@ -0,0 +1,3 @@ +## [Start] Return Source Field. ** +$util.toJson($context.source["success"]) +## [End] Return Source Field. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.auth.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.auth.req.vtl new file mode 100644 index 00000000000..87b04ad4019 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.auth.req.vtl @@ -0,0 +1,13 @@ +## [Start] Field Authorization Steps. ** +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Field Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.res.vtl new file mode 100644 index 00000000000..c37b82e4a30 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.calculateFinancialSummary.res.vtl @@ -0,0 +1 @@ +$util.toJson($ctx.prev.result) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.req.vtl new file mode 100644 index 00000000000..fd7fbfc8013 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.req.vtl @@ -0,0 +1,34 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "Query" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $expression = "" ) + #set( $expressionNames = {} ) + #set( $expressionValues = {} ) + #foreach( $item in $ctx.stash.metadata.modelObjectKey.entrySet() ) + #set( $expression = "$expression#keyCount$velocityCount = :valueCount$velocityCount AND " ) + $util.qr($expressionNames.put("#keyCount$velocityCount", $item.key)) + $util.qr($expressionValues.put(":valueCount$velocityCount", $item.value)) + #end + #set( $expression = $expression.replaceAll("AND $", "") ) + #set( $query = { + "expression": $expression, + "expressionNames": $expressionNames, + "expressionValues": $expressionValues +} ) +#else + #set( $query = { + "expression": "id = :id", + "expressionValues": { + ":id": $util.parseJson($util.dynamodb.toDynamoDBJson($ctx.args.id)) + } +} ) +#end +$util.qr($GetRequest.put("query", $query)) +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + $util.qr($GetRequest.put("filter", $util.parseJson($util.transform.toDynamoDBFilterExpression($ctx.stash.authFilter)))) +#end +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.res.vtl new file mode 100644 index 00000000000..92e05f99816 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getBudget.res.vtl @@ -0,0 +1,13 @@ +## [Start] Get Response template. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#if( !$ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) + $util.toJson($ctx.result.items[0]) +#else + #if( $ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) +$util.unauthorized() + #end + $util.toJson(null) +#end +## [End] Get Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.req.vtl new file mode 100644 index 00000000000..fd7fbfc8013 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.req.vtl @@ -0,0 +1,34 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "Query" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $expression = "" ) + #set( $expressionNames = {} ) + #set( $expressionValues = {} ) + #foreach( $item in $ctx.stash.metadata.modelObjectKey.entrySet() ) + #set( $expression = "$expression#keyCount$velocityCount = :valueCount$velocityCount AND " ) + $util.qr($expressionNames.put("#keyCount$velocityCount", $item.key)) + $util.qr($expressionValues.put(":valueCount$velocityCount", $item.value)) + #end + #set( $expression = $expression.replaceAll("AND $", "") ) + #set( $query = { + "expression": $expression, + "expressionNames": $expressionNames, + "expressionValues": $expressionValues +} ) +#else + #set( $query = { + "expression": "id = :id", + "expressionValues": { + ":id": $util.parseJson($util.dynamodb.toDynamoDBJson($ctx.args.id)) + } +} ) +#end +$util.qr($GetRequest.put("query", $query)) +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + $util.qr($GetRequest.put("filter", $util.parseJson($util.transform.toDynamoDBFilterExpression($ctx.stash.authFilter)))) +#end +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.res.vtl new file mode 100644 index 00000000000..92e05f99816 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getFinancialSummary.res.vtl @@ -0,0 +1,13 @@ +## [Start] Get Response template. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#if( !$ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) + $util.toJson($ctx.result.items[0]) +#else + #if( $ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) +$util.unauthorized() + #end + $util.toJson(null) +#end +## [End] Get Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.req.vtl new file mode 100644 index 00000000000..fd7fbfc8013 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.req.vtl @@ -0,0 +1,34 @@ +## [Start] Get Request template. ** +#set( $GetRequest = { + "version": "2018-05-29", + "operation": "Query" +} ) +#if( $ctx.stash.metadata.modelObjectKey ) + #set( $expression = "" ) + #set( $expressionNames = {} ) + #set( $expressionValues = {} ) + #foreach( $item in $ctx.stash.metadata.modelObjectKey.entrySet() ) + #set( $expression = "$expression#keyCount$velocityCount = :valueCount$velocityCount AND " ) + $util.qr($expressionNames.put("#keyCount$velocityCount", $item.key)) + $util.qr($expressionValues.put(":valueCount$velocityCount", $item.value)) + #end + #set( $expression = $expression.replaceAll("AND $", "") ) + #set( $query = { + "expression": $expression, + "expressionNames": $expressionNames, + "expressionValues": $expressionValues +} ) +#else + #set( $query = { + "expression": "id = :id", + "expressionValues": { + ":id": $util.parseJson($util.dynamodb.toDynamoDBJson($ctx.args.id)) + } +} ) +#end +$util.qr($GetRequest.put("query", $query)) +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + $util.qr($GetRequest.put("filter", $util.parseJson($util.transform.toDynamoDBFilterExpression($ctx.stash.authFilter)))) +#end +$util.toJson($GetRequest) +## [End] Get Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.res.vtl new file mode 100644 index 00000000000..92e05f99816 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.getTransaction.res.vtl @@ -0,0 +1,13 @@ +## [Start] Get Response template. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#end +#if( !$ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) + $util.toJson($ctx.result.items[0]) +#else + #if( $ctx.result.items.isEmpty() && $ctx.result.scannedCount == 1 ) +$util.unauthorized() + #end + $util.toJson(null) +#end +## [End] Get Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.req.vtl new file mode 100644 index 00000000000..ef976126825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.req.vtl @@ -0,0 +1,50 @@ +## [Start] List Request. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $limit = $util.defaultIfNull($args.limit, 100) ) +#set( $ListRequest = { + "version": "2018-05-29", + "limit": $limit +} ) +#if( $args.nextToken ) + #set( $ListRequest.nextToken = $args.nextToken ) +#end +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + #set( $filter = $ctx.stash.authFilter ) + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = { + "and": [$filter, $args.filter] +} ) + #end +#else + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = $args.filter ) + #end +#end +#if( !$util.isNullOrEmpty($filter) ) + #set( $filterExpression = $util.parseJson($util.transform.toDynamoDBFilterExpression($filter)) ) + #if( $util.isNullOrEmpty($filterExpression) ) + $util.error("Unable to process the filter expression", "Unrecognized Filter") + #end + #if( !$util.isNullOrBlank($filterExpression.expression) ) + #if( $filterExpression.expressionValues.size() == 0 ) + $util.qr($filterExpression.remove("expressionValues")) + #end + #set( $ListRequest.filter = $filterExpression ) + #end +#end +#if( !$util.isNull($ctx.stash.modelQueryExpression) && !$util.isNullOrEmpty($ctx.stash.modelQueryExpression.expression) ) + $util.qr($ListRequest.put("operation", "Query")) + $util.qr($ListRequest.put("query", $ctx.stash.modelQueryExpression)) + #if( !$util.isNull($args.sortDirection) && $args.sortDirection == "DESC" ) + #set( $ListRequest.scanIndexForward = false ) + #else + #set( $ListRequest.scanIndexForward = true ) + #end +#else + $util.qr($ListRequest.put("operation", "Scan")) +#end +#if( !$util.isNull($ctx.stash.metadata.index) ) + #set( $ListRequest.IndexName = $ctx.stash.metadata.index ) +#end +$util.toJson($ListRequest) +## [End] List Request. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.res.vtl new file mode 100644 index 00000000000..aab9983954e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listBudgets.res.vtl @@ -0,0 +1,7 @@ +## [Start] ResponseTemplate. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.req.vtl new file mode 100644 index 00000000000..ef976126825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.req.vtl @@ -0,0 +1,50 @@ +## [Start] List Request. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $limit = $util.defaultIfNull($args.limit, 100) ) +#set( $ListRequest = { + "version": "2018-05-29", + "limit": $limit +} ) +#if( $args.nextToken ) + #set( $ListRequest.nextToken = $args.nextToken ) +#end +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + #set( $filter = $ctx.stash.authFilter ) + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = { + "and": [$filter, $args.filter] +} ) + #end +#else + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = $args.filter ) + #end +#end +#if( !$util.isNullOrEmpty($filter) ) + #set( $filterExpression = $util.parseJson($util.transform.toDynamoDBFilterExpression($filter)) ) + #if( $util.isNullOrEmpty($filterExpression) ) + $util.error("Unable to process the filter expression", "Unrecognized Filter") + #end + #if( !$util.isNullOrBlank($filterExpression.expression) ) + #if( $filterExpression.expressionValues.size() == 0 ) + $util.qr($filterExpression.remove("expressionValues")) + #end + #set( $ListRequest.filter = $filterExpression ) + #end +#end +#if( !$util.isNull($ctx.stash.modelQueryExpression) && !$util.isNullOrEmpty($ctx.stash.modelQueryExpression.expression) ) + $util.qr($ListRequest.put("operation", "Query")) + $util.qr($ListRequest.put("query", $ctx.stash.modelQueryExpression)) + #if( !$util.isNull($args.sortDirection) && $args.sortDirection == "DESC" ) + #set( $ListRequest.scanIndexForward = false ) + #else + #set( $ListRequest.scanIndexForward = true ) + #end +#else + $util.qr($ListRequest.put("operation", "Scan")) +#end +#if( !$util.isNull($ctx.stash.metadata.index) ) + #set( $ListRequest.IndexName = $ctx.stash.metadata.index ) +#end +$util.toJson($ListRequest) +## [End] List Request. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.res.vtl new file mode 100644 index 00000000000..aab9983954e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listFinancialSummaries.res.vtl @@ -0,0 +1,7 @@ +## [Start] ResponseTemplate. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.auth.1.req.vtl new file mode 100644 index 00000000000..da78f5423e7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.auth.1.req.vtl @@ -0,0 +1,36 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#set( $primaryFieldMap = {} ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #if( !$isAuthorized ) + #set( $authFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #if( !$util.isNull($ownerClaim0) ) + $util.qr($authFilter.add({"owner": { "eq": $ownerClaim0 }})) + #end + #end + #set( $role0_0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #if( !$util.isNull($role0_0) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_0 }})) + #end + #set( $role0_1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($role0_1) ) + $util.qr($authFilter.add({"owner": { "eq": $role0_1 }})) + #end + #if( !$authFilter.isEmpty() ) + $util.qr($ctx.stash.put("authFilter", { "or": $authFilter })) + #end + #end +#end +#if( !$isAuthorized && $util.isNull($ctx.stash.authFilter) ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.req.vtl new file mode 100644 index 00000000000..ef976126825 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.req.vtl @@ -0,0 +1,50 @@ +## [Start] List Request. ** +#set( $args = $util.defaultIfNull($ctx.stash.transformedArgs, $ctx.args) ) +#set( $limit = $util.defaultIfNull($args.limit, 100) ) +#set( $ListRequest = { + "version": "2018-05-29", + "limit": $limit +} ) +#if( $args.nextToken ) + #set( $ListRequest.nextToken = $args.nextToken ) +#end +#if( !$util.isNullOrEmpty($ctx.stash.authFilter) ) + #set( $filter = $ctx.stash.authFilter ) + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = { + "and": [$filter, $args.filter] +} ) + #end +#else + #if( !$util.isNullOrEmpty($args.filter) ) + #set( $filter = $args.filter ) + #end +#end +#if( !$util.isNullOrEmpty($filter) ) + #set( $filterExpression = $util.parseJson($util.transform.toDynamoDBFilterExpression($filter)) ) + #if( $util.isNullOrEmpty($filterExpression) ) + $util.error("Unable to process the filter expression", "Unrecognized Filter") + #end + #if( !$util.isNullOrBlank($filterExpression.expression) ) + #if( $filterExpression.expressionValues.size() == 0 ) + $util.qr($filterExpression.remove("expressionValues")) + #end + #set( $ListRequest.filter = $filterExpression ) + #end +#end +#if( !$util.isNull($ctx.stash.modelQueryExpression) && !$util.isNullOrEmpty($ctx.stash.modelQueryExpression.expression) ) + $util.qr($ListRequest.put("operation", "Query")) + $util.qr($ListRequest.put("query", $ctx.stash.modelQueryExpression)) + #if( !$util.isNull($args.sortDirection) && $args.sortDirection == "DESC" ) + #set( $ListRequest.scanIndexForward = false ) + #else + #set( $ListRequest.scanIndexForward = true ) + #end +#else + $util.qr($ListRequest.put("operation", "Scan")) +#end +#if( !$util.isNull($ctx.stash.metadata.index) ) + #set( $ListRequest.IndexName = $ctx.stash.metadata.index ) +#end +$util.toJson($ListRequest) +## [End] List Request. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.res.vtl new file mode 100644 index 00000000000..aab9983954e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Query.listTransactions.res.vtl @@ -0,0 +1,7 @@ +## [Start] ResponseTemplate. ** +#if( $ctx.error ) + $util.error($ctx.error.message, $ctx.error.type) +#else + $util.toJson($ctx.result) +#end +## [End] ResponseTemplate. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateBudget.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateFinancialSummary.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onCreateTransaction.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteBudget.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteFinancialSummary.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onDeleteTransaction.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateBudget.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateFinancialSummary.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.auth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.auth.1.req.vtl new file mode 100644 index 00000000000..0d61efbb69c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.auth.1.req.vtl @@ -0,0 +1,56 @@ +## [Start] Authorization Steps. ** +$util.qr($ctx.stash.put("hasAuth", true)) +#set( $isAuthorized = false ) +#if( $util.authType() == "API Key Authorization" ) + #set( $isAuthorized = true ) +#end +#if( $util.authType() == "User Pool Authorization" ) + #set( $hasValidOwnerArgument = false ) + #set( $authRuntimeFilter = [] ) + #set( $authOwnerRuntimeFilter = [] ) + #set( $authGroupRuntimeFilter = [] ) + #set( $ownerClaim0 = $util.defaultIfNull($ctx.identity.claims.get("sub"), null) ) + #set( $currentClaim1 = $util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)) ) + #if( !$util.isNull($ownerClaim0) && !$util.isNull($currentClaim1) ) + #set( $ownerClaim0 = "$ownerClaim0::$currentClaim1" ) + #set( $ownerClaimsList0 = [] ) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("sub"), null))) + $util.qr($ownerClaimsList0.add($util.defaultIfNull($ctx.identity.claims.get("username"), $util.defaultIfNull($ctx.identity.claims.get("cognito:username"), null)))) + $util.qr($authOwnerRuntimeFilter.add({ "owner": { "eq": $currentClaim1 } })) + #set( $ownerEntity0 = $util.defaultIfNull($ctx.args.owner, null) ) + #if( !$isAuthorized && !$util.isNullOrEmpty($ownerEntity0) ) + #if( $ownerEntity0 == $ownerClaim0 || $ownerClaimsList0.contains($ownerEntity0) ) + #set( $isAuthorized = true ) + #set( $hasValidOwnerArgument = true ) + #else + $util.unauthorized() + #end + #end + #end + ## Apply dynamic roles auth if not previously authorized by static groups and owner argument ** + #if( $authOwnerRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authOwnerRuntimeFilter)) + #end + #if( $authGroupRuntimeFilter.size() > 0 ) + $util.qr($authRuntimeFilter.addAll($authGroupRuntimeFilter)) + #end + #set( $filterArgsSize = 0 ) + #if( !$util.isNullOrEmpty($ctx.args.filter) ) + #set( $filterArgsSize = $ctx.args.filter.size() ) + #end + #set( $isOwnerAuthAuthorizedAndNoOtherFilters = $hasValidOwnerArgument && $authRuntimeFilter.size() == 1 && $filterArgsSize == 0 ) + #set( $isOwnerOrDynamicAuthAuthorizedWithFilters = (!$isAuthorized || $hasValidOwnerArgument) && $authRuntimeFilter.size() > 0 ) + #if( !$isOwnerAuthAuthorizedAndNoOtherFilters && $isOwnerOrDynamicAuthAuthorizedWithFilters ) + #if( $util.isNullOrEmpty($ctx.args.filter) ) + #set( $ctx.args.filter = { "or": $authRuntimeFilter } ) + #else + #set( $ctx.args.filter = { "and": [ { "or": $authRuntimeFilter }, $ctx.args.filter ]} ) + #end + #set( $isAuthorized = true ) + #end +#end +#if( !$isAuthorized ) +$util.unauthorized() +#end +$util.toJson({"version":"2018-05-29","payload":{}}) +## [End] Authorization Steps. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.postAuth.1.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.postAuth.1.req.vtl new file mode 100644 index 00000000000..6271df2ee62 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.postAuth.1.req.vtl @@ -0,0 +1,6 @@ +## [Start] Sandbox Mode Disabled, IAM Access Disabled. ** +#if( !$ctx.stash.get("hasAuth") ) + $util.unauthorized() +#end +$util.toJson({}) +## [End] Sandbox Mode Disabled, IAM Access Disabled. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.req.vtl new file mode 100644 index 00000000000..dc06ee8467b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.req.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Request template. ** +$util.toJson({ + "version": "2018-05-29", + "payload": {} +}) +## [End] Subscription Request template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.res.vtl new file mode 100644 index 00000000000..25076fe5fa1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Subscription.onUpdateTransaction.res.vtl @@ -0,0 +1,6 @@ +## [Start] Subscription Response template. ** +#if( !$util.isNullOrEmpty($ctx.args.filter) ) +$extensions.setSubscriptionFilter($util.transform.toSubscriptionFilter($ctx.args.filter)) +#end +$util.toJson(null) +## [End] Subscription Response template. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Transaction.owner.req.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Transaction.owner.req.vtl new file mode 100644 index 00000000000..a9c5efa2bb8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Transaction.owner.req.vtl @@ -0,0 +1 @@ +$util.toJson({"version":"2018-05-29","payload":{}}) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Transaction.owner.res.vtl b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Transaction.owner.res.vtl new file mode 100644 index 00000000000..0552e7005c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/resolvers/Transaction.owner.res.vtl @@ -0,0 +1,20 @@ +## [Start] Parse owner field auth for Get. ** +#if( $util.isList($ctx.source.owner) ) + #set( $ownerEntitiesList = [] ) + #set( $owner = $ctx.source.owner ) + #foreach( $entities in $owner ) + #set( $ownerEntities = $entities.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ownerEntitiesList.add($ownerEntitiesLast)) + #end + $util.qr($ctx.source.owner.put($ownerEntitiesList)) + $util.toJson($ownerEntitiesList) +#else + #set( $ownerEntities = $ctx.source.owner.split("::") ) + #set( $ownerEntitiesLastIdx = $ownerEntities.size() - 1 ) + #set( $ownerEntitiesLast = $ownerEntities[$ownerEntitiesLastIdx] ) + $util.qr($ctx.source.put("owner", $ownerEntitiesLast)) + $util.toJson($ctx.source.owner) +#end +## [End] Parse owner field auth for Get. ** diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/schema.graphql b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/schema.graphql new file mode 100644 index 00000000000..54fec7d3e40 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/schema.graphql @@ -0,0 +1,453 @@ +type Transaction @aws_cognito_user_pools @aws_api_key { + id: ID! + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +enum TransactionType { + INCOME + EXPENSE +} + +type Budget @aws_cognito_user_pools @aws_api_key { + id: ID! + category: String! + limit: Float! + month: String! + owner: String + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +type FinancialSummary @aws_cognito_user_pools @aws_api_key { + id: ID! + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String + createdAt: AWSDateTime! + updatedAt: AWSDateTime! +} + +type CalculatedSummary { + totalIncome: Float! + totalExpenses: Float! + balance: Float! + savingsRate: Float! +} + +type NotificationResult { + success: Boolean! + message: String! +} + +type TransactionConnection { + items: [Transaction] + nextToken: String +} + +type Query { + calculateFinancialSummary: CalculatedSummary + getTransactionsByCategory(category: String!, limit: Int): TransactionConnection + getTransaction(id: ID!): Transaction @aws_api_key @aws_cognito_user_pools + listTransactions(filter: ModelTransactionFilterInput, limit: Int, nextToken: String): ModelTransactionConnection @aws_api_key @aws_cognito_user_pools + getBudget(id: ID!): Budget @aws_api_key @aws_cognito_user_pools + listBudgets(filter: ModelBudgetFilterInput, limit: Int, nextToken: String): ModelBudgetConnection @aws_api_key @aws_cognito_user_pools + getFinancialSummary(id: ID!): FinancialSummary @aws_api_key @aws_cognito_user_pools + listFinancialSummaries(filter: ModelFinancialSummaryFilterInput, limit: Int, nextToken: String): ModelFinancialSummaryConnection @aws_api_key @aws_cognito_user_pools +} + +type Mutation { + sendMonthlyReport(email: String!): NotificationResult + sendBudgetAlert(email: String!, category: String!, exceeded: Float!): NotificationResult + createTransaction(input: CreateTransactionInput!, condition: ModelTransactionConditionInput): Transaction @aws_cognito_user_pools + updateTransaction(input: UpdateTransactionInput!, condition: ModelTransactionConditionInput): Transaction @aws_cognito_user_pools + deleteTransaction(input: DeleteTransactionInput!, condition: ModelTransactionConditionInput): Transaction @aws_cognito_user_pools + createBudget(input: CreateBudgetInput!, condition: ModelBudgetConditionInput): Budget @aws_cognito_user_pools + updateBudget(input: UpdateBudgetInput!, condition: ModelBudgetConditionInput): Budget @aws_cognito_user_pools + deleteBudget(input: DeleteBudgetInput!, condition: ModelBudgetConditionInput): Budget @aws_cognito_user_pools + createFinancialSummary(input: CreateFinancialSummaryInput!, condition: ModelFinancialSummaryConditionInput): FinancialSummary @aws_cognito_user_pools + updateFinancialSummary(input: UpdateFinancialSummaryInput!, condition: ModelFinancialSummaryConditionInput): FinancialSummary @aws_cognito_user_pools + deleteFinancialSummary(input: DeleteFinancialSummaryInput!, condition: ModelFinancialSummaryConditionInput): FinancialSummary @aws_cognito_user_pools +} + +input ModelStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelBooleanInput { + ne: Boolean + eq: Boolean + attributeExists: Boolean + attributeType: ModelAttributeTypes +} + +input ModelIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + attributeExists: Boolean + attributeType: ModelAttributeTypes + size: ModelSizeInput +} + +input ModelSubscriptionStringInput { + ne: String + eq: String + le: String + lt: String + ge: String + gt: String + contains: String + notContains: String + between: [String] + beginsWith: String + in: [String] + notIn: [String] +} + +input ModelSubscriptionIntInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] + in: [Int] + notIn: [Int] +} + +input ModelSubscriptionFloatInput { + ne: Float + eq: Float + le: Float + lt: Float + ge: Float + gt: Float + between: [Float] + in: [Float] + notIn: [Float] +} + +input ModelSubscriptionBooleanInput { + ne: Boolean + eq: Boolean +} + +input ModelSubscriptionIDInput { + ne: ID + eq: ID + le: ID + lt: ID + ge: ID + gt: ID + contains: ID + notContains: ID + between: [ID] + beginsWith: ID + in: [ID] + notIn: [ID] +} + +enum ModelAttributeTypes { + binary + binarySet + bool + list + map + number + numberSet + string + stringSet + _null +} + +input ModelSizeInput { + ne: Int + eq: Int + le: Int + lt: Int + ge: Int + gt: Int + between: [Int] +} + +enum ModelSortDirection { + ASC + DESC +} + +type ModelTransactionConnection @aws_api_key @aws_cognito_user_pools { + items: [Transaction]! + nextToken: String +} + +input ModelTransactionTypeInput { + eq: TransactionType + ne: TransactionType +} + +input ModelTransactionFilterInput { + id: ModelIDInput + description: ModelStringInput + amount: ModelFloatInput + type: ModelTransactionTypeInput + category: ModelStringInput + date: ModelStringInput + receiptUrl: ModelStringInput + owner: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelTransactionFilterInput] + or: [ModelTransactionFilterInput] + not: ModelTransactionFilterInput +} + +input ModelTransactionConditionInput { + description: ModelStringInput + amount: ModelFloatInput + type: ModelTransactionTypeInput + category: ModelStringInput + date: ModelStringInput + receiptUrl: ModelStringInput + owner: ModelStringInput + and: [ModelTransactionConditionInput] + or: [ModelTransactionConditionInput] + not: ModelTransactionConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateTransactionInput { + id: ID + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String +} + +input UpdateTransactionInput { + id: ID! + description: String + amount: Float + type: TransactionType + category: String + date: AWSDateTime + receiptUrl: String + owner: String +} + +input DeleteTransactionInput { + id: ID! +} + +input ModelSubscriptionTransactionFilterInput { + id: ModelSubscriptionIDInput + description: ModelSubscriptionStringInput + amount: ModelSubscriptionFloatInput + type: ModelSubscriptionStringInput + category: ModelSubscriptionStringInput + date: ModelSubscriptionStringInput + receiptUrl: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionTransactionFilterInput] + or: [ModelSubscriptionTransactionFilterInput] + owner: ModelStringInput +} + +type Subscription { + onCreateTransaction(filter: ModelSubscriptionTransactionFilterInput, owner: String): Transaction @aws_subscribe(mutations: ["createTransaction"]) @aws_api_key @aws_cognito_user_pools + onUpdateTransaction(filter: ModelSubscriptionTransactionFilterInput, owner: String): Transaction @aws_subscribe(mutations: ["updateTransaction"]) @aws_api_key @aws_cognito_user_pools + onDeleteTransaction(filter: ModelSubscriptionTransactionFilterInput, owner: String): Transaction @aws_subscribe(mutations: ["deleteTransaction"]) @aws_api_key @aws_cognito_user_pools + onCreateBudget(filter: ModelSubscriptionBudgetFilterInput, owner: String): Budget @aws_subscribe(mutations: ["createBudget"]) @aws_api_key @aws_cognito_user_pools + onUpdateBudget(filter: ModelSubscriptionBudgetFilterInput, owner: String): Budget @aws_subscribe(mutations: ["updateBudget"]) @aws_api_key @aws_cognito_user_pools + onDeleteBudget(filter: ModelSubscriptionBudgetFilterInput, owner: String): Budget @aws_subscribe(mutations: ["deleteBudget"]) @aws_api_key @aws_cognito_user_pools + onCreateFinancialSummary(filter: ModelSubscriptionFinancialSummaryFilterInput, owner: String): FinancialSummary @aws_subscribe(mutations: ["createFinancialSummary"]) @aws_api_key @aws_cognito_user_pools + onUpdateFinancialSummary(filter: ModelSubscriptionFinancialSummaryFilterInput, owner: String): FinancialSummary @aws_subscribe(mutations: ["updateFinancialSummary"]) @aws_api_key @aws_cognito_user_pools + onDeleteFinancialSummary(filter: ModelSubscriptionFinancialSummaryFilterInput, owner: String): FinancialSummary @aws_subscribe(mutations: ["deleteFinancialSummary"]) @aws_api_key @aws_cognito_user_pools +} + +type ModelBudgetConnection @aws_api_key @aws_cognito_user_pools { + items: [Budget]! + nextToken: String +} + +input ModelBudgetFilterInput { + id: ModelIDInput + category: ModelStringInput + limit: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelBudgetFilterInput] + or: [ModelBudgetFilterInput] + not: ModelBudgetFilterInput +} + +input ModelBudgetConditionInput { + category: ModelStringInput + limit: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + and: [ModelBudgetConditionInput] + or: [ModelBudgetConditionInput] + not: ModelBudgetConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateBudgetInput { + id: ID + category: String! + limit: Float! + month: String! + owner: String +} + +input UpdateBudgetInput { + id: ID! + category: String + limit: Float + month: String + owner: String +} + +input DeleteBudgetInput { + id: ID! +} + +input ModelSubscriptionBudgetFilterInput { + id: ModelSubscriptionIDInput + category: ModelSubscriptionStringInput + limit: ModelSubscriptionFloatInput + month: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionBudgetFilterInput] + or: [ModelSubscriptionBudgetFilterInput] + owner: ModelStringInput +} + +type ModelFinancialSummaryConnection @aws_api_key @aws_cognito_user_pools { + items: [FinancialSummary]! + nextToken: String +} + +input ModelFinancialSummaryFilterInput { + id: ModelIDInput + totalIncome: ModelFloatInput + totalExpenses: ModelFloatInput + balance: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + createdAt: ModelStringInput + updatedAt: ModelStringInput + and: [ModelFinancialSummaryFilterInput] + or: [ModelFinancialSummaryFilterInput] + not: ModelFinancialSummaryFilterInput +} + +input ModelFinancialSummaryConditionInput { + totalIncome: ModelFloatInput + totalExpenses: ModelFloatInput + balance: ModelFloatInput + month: ModelStringInput + owner: ModelStringInput + and: [ModelFinancialSummaryConditionInput] + or: [ModelFinancialSummaryConditionInput] + not: ModelFinancialSummaryConditionInput + createdAt: ModelStringInput + updatedAt: ModelStringInput +} + +input CreateFinancialSummaryInput { + id: ID + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String +} + +input UpdateFinancialSummaryInput { + id: ID! + totalIncome: Float + totalExpenses: Float + balance: Float + month: String + owner: String +} + +input DeleteFinancialSummaryInput { + id: ID! +} + +input ModelSubscriptionFinancialSummaryFilterInput { + id: ModelSubscriptionIDInput + totalIncome: ModelSubscriptionFloatInput + totalExpenses: ModelSubscriptionFloatInput + balance: ModelSubscriptionFloatInput + month: ModelSubscriptionStringInput + createdAt: ModelSubscriptionStringInput + updatedAt: ModelSubscriptionStringInput + and: [ModelSubscriptionFinancialSummaryFilterInput] + or: [ModelSubscriptionFinancialSummaryFilterInput] + owner: ModelStringInput +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/Budget.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/Budget.json new file mode 100644 index 00000000000..534b11b1c35 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/Budget.json @@ -0,0 +1,1204 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "BudgetTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "BudgetIAMRole782EC899": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "BudgetIAMRole3af77f-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "BudgetIAMRoleDefaultPolicyAF75E5EB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "BudgetTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "BudgetIAMRoleDefaultPolicyAF75E5EB", + "Roles": [ + { + "Ref": "BudgetIAMRole782EC899" + } + ] + } + }, + "BudgetDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "BudgetTable" + } + }, + "Name": "BudgetTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "BudgetIAMRole782EC899", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "BudgetIAMRole782EC899" + ] + }, + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "GetBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListBudgetsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listBudgets.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listBudgets.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "ListBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listBudgets", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listBudgets\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "CreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "UpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "DeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "BudgetownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Budget\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Budget" + } + } + }, + "Outputs": { + "GetAttBudgetTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "BudgetTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetTable:StreamArn" + ] + ] + } + } + }, + "GetAttBudgetTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "BudgetTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetTable:Name" + ] + ] + } + } + }, + "GetAttBudgetDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetDataSource:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/CustomResources.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/CustomResources.json new file mode 100644 index 00000000000..5fe357d6096 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/CustomResources.json @@ -0,0 +1,61 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "An auto-generated nested stack.", + "Metadata": {}, + "Parameters": { + "AppSyncApiId": { + "Type": "String", + "Description": "The id of the AppSync API associated with this project." + }, + "AppSyncApiName": { + "Type": "String", + "Description": "The name of the AppSync API", + "Default": "AppSyncSimpleTransform" + }, + "env": { + "Type": "String", + "Description": "The environment name. e.g. Dev, Test, or Production", + "Default": "NONE" + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "The S3 bucket containing all deployment assets for the project." + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory." + } + }, + "Resources": { + "EmptyResource": { + "Type": "Custom::EmptyResource", + "Condition": "AlwaysFalse" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + ] + }, + "AlwaysFalse": { + "Fn::Equals": [ + "true", + "false" + ] + } + }, + "Outputs": { + "EmptyOutput": { + "Description": "An empty output. You may delete this if you have at least one resource above.", + "Value": "" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/FinancialSummary.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/FinancialSummary.json new file mode 100644 index 00000000000..367e33f8da6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/FinancialSummary.json @@ -0,0 +1,1204 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "FinancialSummaryTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "FinancialSummaryIAMRole994EE173": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "FinancialSummaryIAMRedd6e3-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "FinancialSummaryIAMRoleDefaultPolicyD577302F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FinancialSummaryIAMRoleDefaultPolicyD577302F", + "Roles": [ + { + "Ref": "FinancialSummaryIAMRole994EE173" + } + ] + } + }, + "FinancialSummaryDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "FinancialSummaryTable" + } + }, + "Name": "FinancialSummaryTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancialSummaryIAMRole994EE173", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "FinancialSummaryIAMRole994EE173" + ] + }, + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "GetFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListFinancialSummariesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listFinancialSummaries.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listFinancialSummaries.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "ListFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listFinancialSummaries", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listFinancialSummaries\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "CreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "UpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "DeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "FinancialSummaryownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"FinancialSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "FinancialSummary" + } + } + }, + "Outputs": { + "GetAttFinancialSummaryTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryTable:StreamArn" + ] + ] + } + } + }, + "GetAttFinancialSummaryTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "FinancialSummaryTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryTable:Name" + ] + ] + } + } + }, + "GetAttFinancialSummaryDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryDataSource:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/FunctionDirectiveStack.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/FunctionDirectiveStack.json new file mode 100644 index 00000000000..b363d73a0fd --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/FunctionDirectiveStack.json @@ -0,0 +1,369 @@ +{ + "Description": "An auto-generated nested stack for the @function directive.", + "AWSTemplateFormatVersion": "2010-09-09", + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + } + }, + "Resources": { + "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "FinancetrackerLambdaDataSourceServiceRoleDefaultPolicy28298548": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FinancetrackerLambdaDataSourceServiceRoleDefaultPolicy28298548", + "Roles": [ + { + "Ref": "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB" + } + ] + } + }, + "FinancetrackerLambdaDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "LambdaConfig": { + "LambdaFunctionArn": { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + } + }, + "Name": "FinancetrackerLambdaDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB", + "Arn" + ] + }, + "Type": "AWS_LAMBDA" + } + }, + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancetrackerLambdaDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "InvokeFinancetrackerLambdaDataSource", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancetrackerLambdaDataSource" + ] + }, + "QuerycalculateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "calculateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"calculateFinancialSummary\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.calculateFinancialSummary.res.vtl" + ] + ] + }, + "TypeName": "Query" + } + }, + "MutationsendMonthlyReportResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "sendMonthlyReport", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendMonthlyReport\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.sendMonthlyReport.res.vtl" + ] + ] + }, + "TypeName": "Mutation" + } + }, + "MutationsendBudgetAlertResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "sendBudgetAlert", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendBudgetAlert\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.sendBudgetAlert.res.vtl" + ] + ] + }, + "TypeName": "Mutation" + } + }, + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryCalculateFinancialSummaryAuthFN", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.calculateFinancialSummary.auth.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + } + }, + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/Transaction.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/Transaction.json new file mode 100644 index 00000000000..8a7e4a3ef69 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/build/stacks/Transaction.json @@ -0,0 +1,1536 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "TransactionTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "TransactionIAMRole04BA2E25": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "TransactionIAMRole373077-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "TransactionIAMRoleDefaultPolicy87E82DF4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "TransactionTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionIAMRoleDefaultPolicy87E82DF4", + "Roles": [ + { + "Ref": "TransactionIAMRole04BA2E25" + } + ] + } + }, + "TransactionDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "TransactionTable" + } + }, + "Name": "TransactionTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionIAMRole04BA2E25", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "TransactionIAMRole04BA2E25" + ] + }, + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.postAuth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "GetTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListTransactionsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listTransactions.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listTransactions.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "ListTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listTransactions", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTransactions\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.init.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "CreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.init.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "UpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "DeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.res.vtl" + ] + ] + } + } + }, + "SubscriptiononCreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "TransactionOwnerDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Transaction.owner.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Transaction.owner.res.vtl" + ] + ] + } + } + }, + "TransactionownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Transaction\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Transaction" + } + } + }, + "Outputs": { + "GetAttTransactionTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "TransactionTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionTable:StreamArn" + ] + ] + } + } + }, + "GetAttTransactionTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "TransactionTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionTable:Name" + ] + ] + } + } + }, + "GetAttTransactionDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionDataSource:Name" + ] + ] + } + } + }, + "transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Value": { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Value": { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Value": { + "Fn::GetAtt": [ + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Value": { + "Fn::GetAtt": [ + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Value": { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Value": { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Value": { + "Fn::GetAtt": [ + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E", + "FunctionId" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/cli-inputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/cli-inputs.json new file mode 100644 index 00000000000..6b36977ddd0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/cli-inputs.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "serviceConfiguration": { + "apiName": "financetracker", + "serviceName": "AppSync", + "defaultAuthType": { + "mode": "API_KEY", + "expirationTime": 7 + }, + "additionalAuthTypes": [ + { + "mode": "AMAZON_COGNITO_USER_POOLS", + "cognitoUserPoolId": "authfinancetracker331811e6" + } + ] + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/parameters.json new file mode 100644 index 00000000000..15962ecd241 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/parameters.json @@ -0,0 +1,11 @@ +{ + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/resolvers/README.md b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/resolvers/README.md new file mode 100644 index 00000000000..1634d295144 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/resolvers/README.md @@ -0,0 +1,2 @@ +Any resolvers that you add in this directory will override the ones automatically generated by Amplify CLI and will be directly copied to the cloud. +For more information, visit [https://docs.amplify.aws/cli/graphql-transformer/resolvers](https://docs.amplify.aws/cli/graphql-transformer/resolvers) diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/schema.graphql b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/schema.graphql new file mode 100644 index 00000000000..6a1416cb020 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/schema.graphql @@ -0,0 +1,60 @@ +type Transaction @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String +} + +enum TransactionType { + INCOME + EXPENSE +} + +type Budget @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + category: String! + limit: Float! + month: String! + owner: String +} + +type FinancialSummary @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String +} + +type CalculatedSummary { + totalIncome: Float! @auth(rules: [{ allow: public }]) + totalExpenses: Float! @auth(rules: [{ allow: public }]) + balance: Float! @auth(rules: [{ allow: public }]) + savingsRate: Float! @auth(rules: [{ allow: public }]) +} + +type NotificationResult { + success: Boolean! @auth(rules: [{ allow: public }]) + message: String! @auth(rules: [{ allow: public }]) +} + + +type TransactionConnection { + items: [Transaction] + nextToken: String +} + +type Query { + calculateFinancialSummary: CalculatedSummary @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) + getTransactionsByCategory(category: String!, limit: Int): TransactionConnection +} + +type Mutation { + sendMonthlyReport(email: String!): NotificationResult @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) + sendBudgetAlert(email: String!, category: String!, exceeded: Float!): NotificationResult @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/stacks/CustomResources.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/stacks/CustomResources.json new file mode 100644 index 00000000000..f95feea378a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/stacks/CustomResources.json @@ -0,0 +1,58 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "An auto-generated nested stack.", + "Metadata": {}, + "Parameters": { + "AppSyncApiId": { + "Type": "String", + "Description": "The id of the AppSync API associated with this project." + }, + "AppSyncApiName": { + "Type": "String", + "Description": "The name of the AppSync API", + "Default": "AppSyncSimpleTransform" + }, + "env": { + "Type": "String", + "Description": "The environment name. e.g. Dev, Test, or Production", + "Default": "NONE" + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "The S3 bucket containing all deployment assets for the project." + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory." + } + }, + "Resources": { + "EmptyResource": { + "Type": "Custom::EmptyResource", + "Condition": "AlwaysFalse" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + ] + }, + "AlwaysFalse": { + "Fn::Equals": ["true", "false"] + } + }, + "Outputs": { + "EmptyOutput": { + "Description": "An empty output. You may delete this if you have at least one resource above.", + "Value": "" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/transform.conf.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/transform.conf.json new file mode 100644 index 00000000000..d0421b1df09 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/api/financetracker/transform.conf.json @@ -0,0 +1,4 @@ +{ + "Version": 5, + "ElasticsearchWarning": true +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json new file mode 100644 index 00000000000..5e89110762c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json @@ -0,0 +1,413 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"auth-Cognito\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "identityPoolName": { + "Type": "String" + }, + "allowUnauthenticatedIdentities": { + "Type": "String" + }, + "resourceNameTruncated": { + "Type": "String" + }, + "userPoolName": { + "Type": "String" + }, + "autoVerifiedAttributes": { + "Type": "CommaDelimitedList" + }, + "mfaConfiguration": { + "Type": "String" + }, + "mfaTypes": { + "Type": "CommaDelimitedList" + }, + "smsAuthenticationMessage": { + "Type": "String" + }, + "smsVerificationMessage": { + "Type": "String" + }, + "emailVerificationSubject": { + "Type": "String" + }, + "emailVerificationMessage": { + "Type": "String" + }, + "defaultPasswordPolicy": { + "Type": "String" + }, + "passwordPolicyMinLength": { + "Type": "String" + }, + "passwordPolicyCharacters": { + "Type": "CommaDelimitedList" + }, + "requiredAttributes": { + "Type": "CommaDelimitedList" + }, + "aliasAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientGenerateSecret": { + "Type": "String" + }, + "userpoolClientRefreshTokenValidity": { + "Type": "String" + }, + "userpoolClientWriteAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientReadAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientLambdaRole": { + "Type": "String" + }, + "userpoolClientSetAttributes": { + "Type": "String" + }, + "sharedId": { + "Type": "String" + }, + "resourceName": { + "Type": "String" + }, + "authSelections": { + "Type": "String" + }, + "useDefault": { + "Type": "String" + }, + "usernameAttributes": { + "Type": "CommaDelimitedList" + }, + "userPoolGroupList": { + "Type": "CommaDelimitedList" + }, + "serviceName": { + "Type": "String" + }, + "usernameCaseSensitive": { + "Type": "String" + }, + "useEnabledMfas": { + "Type": "String" + }, + "authRoleArn": { + "Type": "String" + }, + "unauthRoleArn": { + "Type": "String" + }, + "breakCircularDependency": { + "Type": "String" + }, + "dependsOn": { + "Type": "CommaDelimitedList" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "UserPool": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AutoVerifiedAttributes": [ + "email" + ], + "EmailVerificationMessage": { + "Ref": "emailVerificationMessage" + }, + "EmailVerificationSubject": { + "Ref": "emailVerificationSubject" + }, + "MfaConfiguration": { + "Ref": "mfaConfiguration" + }, + "Policies": { + "PasswordPolicy": { + "MinimumLength": { + "Ref": "passwordPolicyMinLength" + }, + "RequireLowercase": false, + "RequireNumbers": false, + "RequireSymbols": false, + "RequireUppercase": false + } + }, + "Schema": [ + { + "Mutable": true, + "Name": "email", + "Required": true + } + ], + "UserAttributeUpdateSettings": { + "AttributesRequireVerificationBeforeUpdate": [ + "email" + ] + }, + "UserPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userPoolName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "userPoolName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "UsernameAttributes": { + "Ref": "usernameAttributes" + }, + "UsernameConfiguration": { + "CaseSensitive": false + } + } + }, + "UserPoolClientWeb": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_clientWeb", + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClient": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_client", + "GenerateSecret": { + "Ref": "userpoolClientGenerateSecret" + }, + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClientRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + }, + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userpoolClientLambdaRole" + }, + { + "Fn::Join": [ + "", + [ + "upClientLambdaRole331811e6", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPool": { + "Type": "AWS::Cognito::IdentityPool", + "Properties": { + "AllowUnauthenticatedIdentities": { + "Ref": "allowUnauthenticatedIdentities" + }, + "CognitoIdentityProviders": [ + { + "ClientId": { + "Ref": "UserPoolClient" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + }, + { + "ClientId": { + "Ref": "UserPoolClientWeb" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + } + ], + "IdentityPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker331811e6_identitypool_331811e6", + { + "Fn::Join": [ + "", + [ + "financetracker331811e6_identitypool_331811e6__", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPoolRoleMap": { + "Type": "AWS::Cognito::IdentityPoolRoleAttachment", + "Properties": { + "IdentityPoolId": { + "Ref": "IdentityPool" + }, + "Roles": { + "unauthenticated": { + "Ref": "unauthRoleArn" + }, + "authenticated": { + "Ref": "authRoleArn" + } + } + }, + "DependsOn": [ + "IdentityPool" + ] + } + }, + "Outputs": { + "IdentityPoolId": { + "Description": "Id for the identity pool", + "Value": { + "Ref": "IdentityPool" + } + }, + "IdentityPoolName": { + "Value": { + "Fn::GetAtt": [ + "IdentityPool", + "Name" + ] + } + }, + "UserPoolId": { + "Description": "Id for the user pool", + "Value": { + "Ref": "UserPool" + } + }, + "UserPoolArn": { + "Description": "Arn for the user pool", + "Value": { + "Fn::GetAtt": [ + "UserPool", + "Arn" + ] + } + }, + "UserPoolName": { + "Value": { + "Ref": "userPoolName" + } + }, + "AppClientIDWeb": { + "Description": "The user pool app client id for web", + "Value": { + "Ref": "UserPoolClientWeb" + } + }, + "AppClientID": { + "Description": "The user pool app client id", + "Value": { + "Ref": "UserPoolClient" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/build/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/build/parameters.json new file mode 100644 index 00000000000..e003ff012bb --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/build/parameters.json @@ -0,0 +1,59 @@ +{ + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": [ + "email" + ], + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS Text Message" + ], + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": [], + "requiredAttributes": [ + "email" + ], + "aliasAttributes": [], + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": [ + "email" + ], + "userpoolClientReadAttributes": [ + "email" + ], + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": [ + "email" + ], + "userPoolGroupList": [], + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": [] +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/cli-inputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/cli-inputs.json new file mode 100644 index 00000000000..92b925d5aa2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/auth/financetracker331811e6/cli-inputs.json @@ -0,0 +1,62 @@ +{ + "version": "1", + "cognitoConfig": { + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": [ + "email" + ], + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS Text Message" + ], + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": [], + "requiredAttributes": [ + "email" + ], + "aliasAttributes": [], + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": [ + "email" + ], + "userpoolClientReadAttributes": [ + "email" + ], + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": [ + "email" + ], + "userPoolGroupList": [], + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": [] + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/api/financetracker/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/api/financetracker/build/cloudformation-template.json new file mode 100644 index 00000000000..42f68b18272 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/api/financetracker/build/cloudformation-template.json @@ -0,0 +1,1196 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Default": "NONE" + }, + "AppSyncApiName": { + "Type": "String", + "Default": "AppSyncSimpleTransform" + }, + "AuthCognitoUserPoolId": { + "Type": "String" + }, + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "An S3 Bucket name where assets are deployed" + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root of the deployment directory." + } + }, + "Resources": { + "GraphQLAPI": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AdditionalAuthenticationProviders": [ + { + "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", + "UserPoolConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "UserPoolId": { + "Ref": "AuthCognitoUserPoolId" + } + } + } + ], + "AuthenticationType": "API_KEY", + "Name": { + "Fn::Join": [ + "", + [ + { + "Ref": "AppSyncApiName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "GraphQLAPITransformerSchema3CB2AE18": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DefinitionS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/schema.graphql" + ] + ] + } + } + }, + "GraphQLAPIDefaultApiKey215A6DD7": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Expires": 1777576997 + } + }, + "GraphQLAPINONEDS95A13CF0": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Name": "NONE_DS", + "Type": "NONE" + } + }, + "Transaction": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Transaction.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "Budget": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Budget.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FinancialSummary": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FinancialSummary.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FunctionDirectiveStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FunctionDirectiveStack.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalIncomeDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalIncomeResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalIncome", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalIncome\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalExpensesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalExpensesResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalExpenses", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalExpenses\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryBalanceDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarybalanceResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "balance", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"balance\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummarySavingsRateDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarysavingsRateResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "savingsRate", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"savingsRate\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultSuccessDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultsuccessResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "success", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"success\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultMessageDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultmessageResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "message", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"message\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CustomResourcesjson": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "AppSyncApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "AppSyncApiName": { + "Ref": "AppSyncApiName" + }, + "env": { + "Ref": "env" + }, + "S3DeploymentBucket": { + "Ref": "S3DeploymentBucket" + }, + "S3DeploymentRootKey": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "/", + [ + "https://s3.amazonaws.com", + { + "Ref": "S3DeploymentBucket" + }, + { + "Ref": "S3DeploymentRootKey" + }, + "stacks", + "CustomResources.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPI", + "GraphQLAPITransformerSchema3CB2AE18", + "Transaction", + "Budget", + "FinancialSummary", + "FunctionDirectiveStack" + ] + } + }, + "Outputs": { + "GraphQLAPIKeyOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPIDefaultApiKey215A6DD7", + "ApiKey" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiKey" + ] + ] + } + } + }, + "GraphQLAPIIdOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiId" + ] + ] + } + } + }, + "GraphQLAPIEndpointOutput": { + "Description": "Your GraphQL API endpoint.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "GraphQLUrl" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiEndpoint" + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"api-AppSync\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json new file mode 100644 index 00000000000..5e89110762c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/auth/financetracker331811e6/build/financetracker331811e6-cloudformation-template.json @@ -0,0 +1,413 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"auth-Cognito\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "identityPoolName": { + "Type": "String" + }, + "allowUnauthenticatedIdentities": { + "Type": "String" + }, + "resourceNameTruncated": { + "Type": "String" + }, + "userPoolName": { + "Type": "String" + }, + "autoVerifiedAttributes": { + "Type": "CommaDelimitedList" + }, + "mfaConfiguration": { + "Type": "String" + }, + "mfaTypes": { + "Type": "CommaDelimitedList" + }, + "smsAuthenticationMessage": { + "Type": "String" + }, + "smsVerificationMessage": { + "Type": "String" + }, + "emailVerificationSubject": { + "Type": "String" + }, + "emailVerificationMessage": { + "Type": "String" + }, + "defaultPasswordPolicy": { + "Type": "String" + }, + "passwordPolicyMinLength": { + "Type": "String" + }, + "passwordPolicyCharacters": { + "Type": "CommaDelimitedList" + }, + "requiredAttributes": { + "Type": "CommaDelimitedList" + }, + "aliasAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientGenerateSecret": { + "Type": "String" + }, + "userpoolClientRefreshTokenValidity": { + "Type": "String" + }, + "userpoolClientWriteAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientReadAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientLambdaRole": { + "Type": "String" + }, + "userpoolClientSetAttributes": { + "Type": "String" + }, + "sharedId": { + "Type": "String" + }, + "resourceName": { + "Type": "String" + }, + "authSelections": { + "Type": "String" + }, + "useDefault": { + "Type": "String" + }, + "usernameAttributes": { + "Type": "CommaDelimitedList" + }, + "userPoolGroupList": { + "Type": "CommaDelimitedList" + }, + "serviceName": { + "Type": "String" + }, + "usernameCaseSensitive": { + "Type": "String" + }, + "useEnabledMfas": { + "Type": "String" + }, + "authRoleArn": { + "Type": "String" + }, + "unauthRoleArn": { + "Type": "String" + }, + "breakCircularDependency": { + "Type": "String" + }, + "dependsOn": { + "Type": "CommaDelimitedList" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "UserPool": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AutoVerifiedAttributes": [ + "email" + ], + "EmailVerificationMessage": { + "Ref": "emailVerificationMessage" + }, + "EmailVerificationSubject": { + "Ref": "emailVerificationSubject" + }, + "MfaConfiguration": { + "Ref": "mfaConfiguration" + }, + "Policies": { + "PasswordPolicy": { + "MinimumLength": { + "Ref": "passwordPolicyMinLength" + }, + "RequireLowercase": false, + "RequireNumbers": false, + "RequireSymbols": false, + "RequireUppercase": false + } + }, + "Schema": [ + { + "Mutable": true, + "Name": "email", + "Required": true + } + ], + "UserAttributeUpdateSettings": { + "AttributesRequireVerificationBeforeUpdate": [ + "email" + ] + }, + "UserPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userPoolName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "userPoolName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "UsernameAttributes": { + "Ref": "usernameAttributes" + }, + "UsernameConfiguration": { + "CaseSensitive": false + } + } + }, + "UserPoolClientWeb": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_clientWeb", + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClient": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_client", + "GenerateSecret": { + "Ref": "userpoolClientGenerateSecret" + }, + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClientRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + }, + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userpoolClientLambdaRole" + }, + { + "Fn::Join": [ + "", + [ + "upClientLambdaRole331811e6", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPool": { + "Type": "AWS::Cognito::IdentityPool", + "Properties": { + "AllowUnauthenticatedIdentities": { + "Ref": "allowUnauthenticatedIdentities" + }, + "CognitoIdentityProviders": [ + { + "ClientId": { + "Ref": "UserPoolClient" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + }, + { + "ClientId": { + "Ref": "UserPoolClientWeb" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + } + ], + "IdentityPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker331811e6_identitypool_331811e6", + { + "Fn::Join": [ + "", + [ + "financetracker331811e6_identitypool_331811e6__", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPoolRoleMap": { + "Type": "AWS::Cognito::IdentityPoolRoleAttachment", + "Properties": { + "IdentityPoolId": { + "Ref": "IdentityPool" + }, + "Roles": { + "unauthenticated": { + "Ref": "unauthRoleArn" + }, + "authenticated": { + "Ref": "authRoleArn" + } + } + }, + "DependsOn": [ + "IdentityPool" + ] + } + }, + "Outputs": { + "IdentityPoolId": { + "Description": "Id for the identity pool", + "Value": { + "Ref": "IdentityPool" + } + }, + "IdentityPoolName": { + "Value": { + "Fn::GetAtt": [ + "IdentityPool", + "Name" + ] + } + }, + "UserPoolId": { + "Description": "Id for the user pool", + "Value": { + "Ref": "UserPool" + } + }, + "UserPoolArn": { + "Description": "Arn for the user pool", + "Value": { + "Fn::GetAtt": [ + "UserPool", + "Arn" + ] + } + }, + "UserPoolName": { + "Value": { + "Ref": "userPoolName" + } + }, + "AppClientIDWeb": { + "Description": "The user pool app client id for web", + "Value": { + "Ref": "UserPoolClientWeb" + } + }, + "AppClientID": { + "Description": "The user pool app client id", + "Value": { + "Ref": "UserPoolClient" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/awscloudformation/build/root-cloudformation-stack.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/awscloudformation/build/root-cloudformation-stack.json new file mode 100644 index 00000000000..3f6b72c4bed --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/awscloudformation/build/root-cloudformation-stack.json @@ -0,0 +1,578 @@ +{ + "Description": "Root Stack for AWS Amplify CLI", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "DeploymentBucketName": { + "Type": "String", + "Default": "DeploymentBucket", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "AuthRoleName": { + "Type": "String", + "Default": "AuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "UnauthRoleName": { + "Type": "String", + "Default": "UnAuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + } + }, + "Outputs": { + "Region": { + "Description": "CloudFormation provider root stack Region", + "Value": { + "Ref": "AWS::Region" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-Region" + } + } + }, + "StackName": { + "Description": "CloudFormation provider root stack ID", + "Value": { + "Ref": "AWS::StackName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackName" + } + } + }, + "StackId": { + "Description": "CloudFormation provider root stack name", + "Value": { + "Ref": "AWS::StackId" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackId" + } + } + }, + "AuthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + "UnauthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + }, + "DeploymentBucketName": { + "Description": "CloudFormation provider root stack deployment bucket name", + "Value": { + "Ref": "DeploymentBucketName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-DeploymentBucketName" + } + } + }, + "AuthRoleName": { + "Value": { + "Ref": "AuthRole" + } + }, + "UnauthRoleName": { + "Value": { + "Ref": "UnauthRole" + } + } + }, + "Resources": { + "DeploymentBucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Ref": "DeploymentBucketName" + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DeploymentBucketBlockHTTP": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + } + ] + ] + } + ], + "Condition": { + "Bool": { + "aws:SecureTransport": false + } + } + } + ] + } + } + }, + "AuthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "AuthRoleName" + } + } + }, + "UnauthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "UnauthRoleName" + } + } + }, + "apifinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/api/cloudformation-template.json", + "Parameters": { + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + }, + "S3DeploymentBucket": "amplify-financetracker-x-x-deployment", + "S3DeploymentRootKey": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33", + "env": "x" + } + } + }, + "authfinancetracker331811e6": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/auth/financetracker331811e6-cloudformation-template.json", + "Parameters": { + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": "email", + "mfaConfiguration": "OFF", + "mfaTypes": "SMS Text Message", + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": "", + "requiredAttributes": "email", + "aliasAttributes": "", + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": "email", + "userpoolClientReadAttributes": "email", + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": "email", + "userPoolGroupList": "", + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": "", + "env": "x" + } + } + }, + "customcustomfinance": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customfinance-cloudformation-template.json", + "Parameters": { + "env": "x" + } + } + }, + "customcustomresolver": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customresolver-cloudformation-template.json", + "Parameters": { + "apifinancetrackerGraphQLAPIKeyOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIKeyOutput" + ] + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIEndpointOutput" + ] + }, + "env": "x" + } + } + }, + "functionfinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/function/financetracker-cloudformation-template.json", + "Parameters": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip", + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.BudgetAlertTopicArn" + ] + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.MonthlyReportTopicArn" + ] + }, + "env": "x" + } + } + }, + "storages320279658": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/storage/cloudformation-template.json", + "Parameters": { + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "selectedGuestPermissions": "s3:GetObject,s3:ListBucket", + "selectedAuthenticatedPermissions": "s3:PutObject,s3:GetObject,s3:ListBucket,s3:DeleteObject", + "unauthRoleName": { + "Ref": "UnauthRoleName" + }, + "authRoleName": { + "Ref": "AuthRoleName" + }, + "s3PrivatePolicy": "Private_policy_20279658", + "s3ProtectedPolicy": "Protected_policy_20279658", + "s3PublicPolicy": "Public_policy_20279658", + "s3ReadPolicy": "read_policy_20279658", + "s3UploadsPolicy": "Uploads_policy_20279658", + "authPolicyName": "s3_amplify_20279658", + "unauthPolicyName": "s3_amplify_20279658", + "AuthenticatedAllowList": "ALLOW", + "GuestAllowList": "ALLOW", + "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedUploads": "s3:PutObject", + "s3PermissionsGuestPublic": "s3:GetObject", + "s3PermissionsGuestUploads": "DISALLOW", + "env": "x" + } + } + }, + "UpdateRolesWithIDPFunction": { + "DependsOn": [ + "AuthRole", + "UnauthRole", + "authfinancetracker331811e6" + ], + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": { + "Fn::Join": [ + "\n", + [ + "const response = require('cfn-response');", + "const { IAMClient, GetRoleCommand, UpdateAssumeRolePolicyCommand } = require('@aws-sdk/client-iam');", + "exports.handler = function(event, context) {", + " // Don't return promise, response.send() marks context as done internally", + " const ignoredPromise = handleEvent(event, context)", + "};", + "async function handleEvent(event, context) {", + " try {", + " let authRoleName = event.ResourceProperties.authRoleName;", + " let unauthRoleName = event.ResourceProperties.unauthRoleName;", + " let idpId = event.ResourceProperties.idpId;", + " let authParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'authenticated'}", + " }", + " }]", + " };", + " let unauthParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'unauthenticated'}", + " }", + " }]", + " };", + " if (event.RequestType === 'Delete') {", + " try {", + " delete authParamsJson.Statement[0].Condition;", + " delete unauthParamsJson.Statement[0].Condition;", + " authParamsJson.Statement[0].Effect = 'Deny'", + " unauthParamsJson.Statement[0].Effect = 'Deny'", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let res = await Promise.all([", + " iam.send(new GetRoleCommand({RoleName: authParams.RoleName})),", + " iam.send(new GetRoleCommand({RoleName: unauthParams.RoleName}))", + " ]);", + " res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.SUCCESS, {Error: err});", + " }", + " } else if (event.RequestType === 'Update' || event.RequestType === 'Create') {", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " }", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.FAILED, {Error: err});", + " }", + "};" + ] + ] + } + }, + "Handler": "index.handler", + "Runtime": "nodejs22.x", + "Timeout": 300, + "Role": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunctionRole", + "Arn" + ] + } + } + }, + "UpdateRolesWithIDPFunctionOutputs": { + "Type": "Custom::LambdaCallout", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunction", + "Arn" + ] + }, + "region": { + "Ref": "AWS::Region" + }, + "idpId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.IdentityPoolId" + ] + }, + "authRoleName": { + "Ref": "AuthRole" + }, + "unauthRoleName": { + "Ref": "UnauthRole" + } + } + }, + "UpdateRolesWithIDPFunctionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::Join": [ + "", + [ + { + "Ref": "AuthRole" + }, + "-idp" + ] + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Policies": [ + { + "PolicyName": "UpdateRolesWithIDPFunctionPolicy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": "arn:aws:logs:*:*:*" + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + } + ] + } + } + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/custom/customfinance/build/customfinance-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/custom/customfinance/build/customfinance-cloudformation-template.json new file mode 100644 index 00000000000..b12c33f6841 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/custom/customfinance/build/customfinance-cloudformation-template.json @@ -0,0 +1,83 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + } + }, + "Resources": { + "BudgetAlertTopicF20DF526": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Fin Tracker Budget Alerts" + } + }, + "BudgetAlertTopicsanjanaravikumarazgmailcom9C5B945F": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "BudgetAlertTopicF20DF526" + } + } + }, + "MonthlyReportTopic8D223100": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Finance Tracker Monthly Reports" + } + }, + "MonthlyReportTopicsanjanaravikumarazgmailcomFBA75CE0": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "MonthlyReportTopic8D223100" + } + } + } + }, + "Outputs": { + "BudgetAlertTopicArn": { + "Description": "SNS Topic ARN for budget alerts", + "Value": { + "Ref": "BudgetAlertTopicF20DF526" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-BudgetAlertTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "MonthlyReportTopicArn": { + "Description": "SNS Topic ARN for monthly reports", + "Value": { + "Ref": "MonthlyReportTopic8D223100" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-MonthlyReportTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/custom/customresolver/build/customresolver-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/custom/customresolver/build/customresolver-cloudformation-template.json new file mode 100644 index 00000000000..4cdc5f8dba8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/custom/customresolver/build/customresolver-cloudformation-template.json @@ -0,0 +1,150 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + }, + "apifinancetrackerGraphQLAPIKeyOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Type": "String" + } + }, + "Resources": { + "TransactionsByCategoryDSRole265ACEB1": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": { + "Fn::Join": [ + "", + [ + "TransByCatDSRole-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:GetItem" + ], + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A", + "Roles": [ + { + "Ref": "TransactionsByCategoryDSRole265ACEB1" + } + ] + } + }, + "TransactionsByCategoryDS": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Sub": [ + "Transaction-${apiId}-${env}", + { + "apiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "env": { + "Ref": "env" + } + } + ] + } + }, + "Name": "TransactionsByCategoryDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionsByCategoryDSRole265ACEB1", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + } + }, + "GetTransactionsByCategoryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + }, + "FieldName": "getTransactionsByCategory", + "RequestMappingTemplate": "\n## Custom VTL resolver for getTransactionsByCategory\n#set($limit = $util.defaultIfNull($ctx.args.limit, 20))\n{\n \"version\": \"2018-05-29\",\n \"operation\": \"Scan\",\n \"filter\": {\n \"expression\": \"category = :category\",\n \"expressionValues\": {\n \":category\": $util.dynamodb.toDynamoDBJson($ctx.args.category)\n }\n },\n \"limit\": $limit\n}", + "ResponseMappingTemplate": "\n## Return the results as a TransactionConnection\n{\n \"items\": $util.toJson($ctx.result.items),\n \"nextToken\": $util.toJson($ctx.result.nextToken)\n}", + "TypeName": "Query" + }, + "DependsOn": [ + "TransactionsByCategoryDS" + ] + } + }, + "Outputs": { + "ResolverArn": { + "Description": "ARN of the custom getTransactionsByCategory resolver", + "Value": { + "Fn::GetAtt": [ + "GetTransactionsByCategoryResolver", + "ResolverArn" + ] + } + }, + "DataSourceName": { + "Description": "Name of the custom DynamoDB data source", + "Value": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/function/financetracker/financetracker-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/function/financetracker/financetracker-cloudformation-template.json new file mode 100644 index 00000000000..6dd8bac8d69 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/function/financetracker/financetracker-cloudformation-template.json @@ -0,0 +1,391 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"function-Lambda\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "Parameters": { + "CloudWatchRule": { + "Type": "String", + "Default": "NONE", + "Description": " Schedule Expression" + }, + "deploymentBucketName": { + "Type": "String" + }, + "env": { + "Type": "String" + }, + "s3Key": { + "Type": "String" + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Type": "String" + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Type": "String" + }, + "dependsOn": { + "Type": "String", + "Default": "" + }, + "lambdaLayers": { + "Type": "String", + "Default": "" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String", + "Default": "apifinancetrackerGraphQLAPIIdOutput" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "LambdaFunction": { + "Type": "AWS::Lambda::Function", + "Metadata": { + "aws:asset:path": "./src", + "aws:asset:property": "Code" + }, + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "deploymentBucketName" + }, + "S3Key": { + "Ref": "s3Key" + } + }, + "Handler": "index.handler", + "FunctionName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker2ceb6de29", + { + "Fn::Join": [ + "", + [ + "financetracker", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "Environment": { + "Variables": { + "ENV": { + "Ref": "env" + }, + "REGION": { + "Ref": "AWS::Region" + }, + "BUDGET_ALERT_TOPIC_ARN": { + "Ref": "customcustomfinanceBudgetAlertTopicArn" + }, + "MONTHLY_REPORT_TOPIC_ARN": { + "Ref": "customcustomfinanceMonthlyReportTopicArn" + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_NAME": { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_ARN": { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + "API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + } + } + }, + "Role": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Layers": [], + "Timeout": 25 + } + }, + "LambdaExecutionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetrackerLambdaRole96a64165", + { + "Fn::Join": [ + "", + [ + "financetrackerLambdaRole96a64165", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + } + } + }, + "lambdaexecutionpolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": { + "Fn::Sub": [ + "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", + { + "region": { + "Ref": "AWS::Region" + }, + "account": { + "Ref": "AWS::AccountId" + }, + "lambda": { + "Ref": "LambdaFunction" + } + } + ] + } + } + ] + } + } + }, + "AmplifyResourcesPolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "amplify-lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "dynamodb:Put*", + "dynamodb:Create*", + "dynamodb:BatchWriteItem", + "dynamodb:PartiQLInsert", + "dynamodb:Get*", + "dynamodb:BatchGetItem", + "dynamodb:List*", + "dynamodb:Describe*", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:PartiQLSelect", + "dynamodb:Update*", + "dynamodb:RestoreTable*", + "dynamodb:PartiQLUpdate", + "dynamodb:Delete*", + "dynamodb:PartiQLDelete" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "/index/*" + ] + ] + } + ] + } + ] + } + } + }, + "CustomLambdaExecutionPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "custom-lambda-execution-policy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "sns:Publish" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + }, + { + "Action": [ + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:GetItem" + ], + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", + {} + ] + } + ], + "Effect": "Allow" + }, + { + "Action": [ + "sts:GetCallerIdentity" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + } + ] + }, + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ] + }, + "DependsOn": "LambdaExecutionRole" + } + }, + "Outputs": { + "Name": { + "Value": { + "Ref": "LambdaFunction" + } + }, + "Arn": { + "Value": { + "Fn::GetAtt": [ + "LambdaFunction", + "Arn" + ] + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + }, + "LambdaExecutionRole": { + "Value": { + "Ref": "LambdaExecutionRole" + } + }, + "LambdaExecutionRoleArn": { + "Value": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/root-cloudformation-stack.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/root-cloudformation-stack.json new file mode 100644 index 00000000000..3f6b72c4bed --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/root-cloudformation-stack.json @@ -0,0 +1,578 @@ +{ + "Description": "Root Stack for AWS Amplify CLI", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "DeploymentBucketName": { + "Type": "String", + "Default": "DeploymentBucket", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "AuthRoleName": { + "Type": "String", + "Default": "AuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "UnauthRoleName": { + "Type": "String", + "Default": "UnAuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + } + }, + "Outputs": { + "Region": { + "Description": "CloudFormation provider root stack Region", + "Value": { + "Ref": "AWS::Region" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-Region" + } + } + }, + "StackName": { + "Description": "CloudFormation provider root stack ID", + "Value": { + "Ref": "AWS::StackName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackName" + } + } + }, + "StackId": { + "Description": "CloudFormation provider root stack name", + "Value": { + "Ref": "AWS::StackId" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackId" + } + } + }, + "AuthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + "UnauthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + }, + "DeploymentBucketName": { + "Description": "CloudFormation provider root stack deployment bucket name", + "Value": { + "Ref": "DeploymentBucketName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-DeploymentBucketName" + } + } + }, + "AuthRoleName": { + "Value": { + "Ref": "AuthRole" + } + }, + "UnauthRoleName": { + "Value": { + "Ref": "UnauthRole" + } + } + }, + "Resources": { + "DeploymentBucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Ref": "DeploymentBucketName" + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DeploymentBucketBlockHTTP": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + } + ] + ] + } + ], + "Condition": { + "Bool": { + "aws:SecureTransport": false + } + } + } + ] + } + } + }, + "AuthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "AuthRoleName" + } + } + }, + "UnauthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "UnauthRoleName" + } + } + }, + "apifinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/api/cloudformation-template.json", + "Parameters": { + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + }, + "S3DeploymentBucket": "amplify-financetracker-x-x-deployment", + "S3DeploymentRootKey": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33", + "env": "x" + } + } + }, + "authfinancetracker331811e6": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/auth/financetracker331811e6-cloudformation-template.json", + "Parameters": { + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": "email", + "mfaConfiguration": "OFF", + "mfaTypes": "SMS Text Message", + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": "", + "requiredAttributes": "email", + "aliasAttributes": "", + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": "email", + "userpoolClientReadAttributes": "email", + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": "email", + "userPoolGroupList": "", + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": "", + "env": "x" + } + } + }, + "customcustomfinance": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customfinance-cloudformation-template.json", + "Parameters": { + "env": "x" + } + } + }, + "customcustomresolver": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customresolver-cloudformation-template.json", + "Parameters": { + "apifinancetrackerGraphQLAPIKeyOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIKeyOutput" + ] + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIEndpointOutput" + ] + }, + "env": "x" + } + } + }, + "functionfinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/function/financetracker-cloudformation-template.json", + "Parameters": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip", + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.BudgetAlertTopicArn" + ] + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.MonthlyReportTopicArn" + ] + }, + "env": "x" + } + } + }, + "storages320279658": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/storage/cloudformation-template.json", + "Parameters": { + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "selectedGuestPermissions": "s3:GetObject,s3:ListBucket", + "selectedAuthenticatedPermissions": "s3:PutObject,s3:GetObject,s3:ListBucket,s3:DeleteObject", + "unauthRoleName": { + "Ref": "UnauthRoleName" + }, + "authRoleName": { + "Ref": "AuthRoleName" + }, + "s3PrivatePolicy": "Private_policy_20279658", + "s3ProtectedPolicy": "Protected_policy_20279658", + "s3PublicPolicy": "Public_policy_20279658", + "s3ReadPolicy": "read_policy_20279658", + "s3UploadsPolicy": "Uploads_policy_20279658", + "authPolicyName": "s3_amplify_20279658", + "unauthPolicyName": "s3_amplify_20279658", + "AuthenticatedAllowList": "ALLOW", + "GuestAllowList": "ALLOW", + "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedUploads": "s3:PutObject", + "s3PermissionsGuestPublic": "s3:GetObject", + "s3PermissionsGuestUploads": "DISALLOW", + "env": "x" + } + } + }, + "UpdateRolesWithIDPFunction": { + "DependsOn": [ + "AuthRole", + "UnauthRole", + "authfinancetracker331811e6" + ], + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": { + "Fn::Join": [ + "\n", + [ + "const response = require('cfn-response');", + "const { IAMClient, GetRoleCommand, UpdateAssumeRolePolicyCommand } = require('@aws-sdk/client-iam');", + "exports.handler = function(event, context) {", + " // Don't return promise, response.send() marks context as done internally", + " const ignoredPromise = handleEvent(event, context)", + "};", + "async function handleEvent(event, context) {", + " try {", + " let authRoleName = event.ResourceProperties.authRoleName;", + " let unauthRoleName = event.ResourceProperties.unauthRoleName;", + " let idpId = event.ResourceProperties.idpId;", + " let authParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'authenticated'}", + " }", + " }]", + " };", + " let unauthParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'unauthenticated'}", + " }", + " }]", + " };", + " if (event.RequestType === 'Delete') {", + " try {", + " delete authParamsJson.Statement[0].Condition;", + " delete unauthParamsJson.Statement[0].Condition;", + " authParamsJson.Statement[0].Effect = 'Deny'", + " unauthParamsJson.Statement[0].Effect = 'Deny'", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let res = await Promise.all([", + " iam.send(new GetRoleCommand({RoleName: authParams.RoleName})),", + " iam.send(new GetRoleCommand({RoleName: unauthParams.RoleName}))", + " ]);", + " res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.SUCCESS, {Error: err});", + " }", + " } else if (event.RequestType === 'Update' || event.RequestType === 'Create') {", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " }", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.FAILED, {Error: err});", + " }", + "};" + ] + ] + } + }, + "Handler": "index.handler", + "Runtime": "nodejs22.x", + "Timeout": 300, + "Role": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunctionRole", + "Arn" + ] + } + } + }, + "UpdateRolesWithIDPFunctionOutputs": { + "Type": "Custom::LambdaCallout", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunction", + "Arn" + ] + }, + "region": { + "Ref": "AWS::Region" + }, + "idpId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.IdentityPoolId" + ] + }, + "authRoleName": { + "Ref": "AuthRole" + }, + "unauthRoleName": { + "Ref": "UnauthRole" + } + } + }, + "UpdateRolesWithIDPFunctionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::Join": [ + "", + [ + { + "Ref": "AuthRole" + }, + "-idp" + ] + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Policies": [ + { + "PolicyName": "UpdateRolesWithIDPFunctionPolicy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": "arn:aws:logs:*:*:*" + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + } + ] + } + } + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/storage/s320279658/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/storage/s320279658/build/cloudformation-template.json new file mode 100644 index 00000000000..204a64677c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/awscloudformation/build/storage/s320279658/build/cloudformation-template.json @@ -0,0 +1,646 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"storage-S3\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "bucketName": { + "Type": "String" + }, + "authRoleName": { + "Type": "String" + }, + "unauthRoleName": { + "Type": "String" + }, + "authPolicyName": { + "Type": "String" + }, + "unauthPolicyName": { + "Type": "String" + }, + "s3PublicPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PrivatePolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ProtectedPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3UploadsPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ReadPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PermissionsAuthenticatedPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedProtected": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedPrivate": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "AuthenticatedAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "GuestAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "selectedGuestPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + }, + "selectedAuthenticatedPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + }, + "CreateAuthPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthProtected": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedProtected" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthPrivate": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPrivate" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedUploads" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestUploads" + }, + "DISALLOW" + ] + } + ] + }, + "AuthReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "AuthenticatedAllowList" + }, + "DISALLOW" + ] + } + ] + }, + "GuestReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "GuestAllowList" + }, + "DISALLOW" + ] + } + ] + } + }, + "Outputs": { + "BucketName": { + "Description": "Bucket name for the S3 bucket", + "Value": { + "Ref": "S3Bucket" + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + } + }, + "Resources": { + "S3Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "bucketName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "bucketName" + }, + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "GET", + "HEAD", + "PUT", + "POST", + "DELETE" + ], + "AllowedOrigins": [ + "*" + ], + "ExposedHeaders": [ + "x-amz-server-side-encryption", + "x-amz-request-id", + "x-amz-id-2", + "ETag" + ], + "Id": "S3CORSRuleId1", + "MaxAge": 3000 + } + ] + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "S3AuthPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPublic" + }, + "S3AuthProtectedPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedProtected" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3ProtectedPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthProtected" + }, + "S3AuthPrivatePolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPrivate" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/private/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PrivatePolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPrivate" + }, + "S3AuthUploadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedUploads" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/uploads/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3UploadsPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthUploads" + }, + "S3GuestPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsGuestPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateGuestPublic" + }, + "S3AuthReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*", + "private/${cognito-identity.amazonaws.com:sub}/", + "private/${cognito-identity.amazonaws.com:sub}/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "AuthReadAndList" + }, + "S3GuestReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "GuestReadAndList" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/backend-config.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/backend-config.json new file mode 100644 index 00000000000..fda2dcbc860 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/backend-config.json @@ -0,0 +1,133 @@ +{ + "api": { + "financetracker": { + "dependsOn": [ + { + "attributes": [ + "UserPoolId" + ], + "category": "auth", + "resourceName": "financetracker331811e6" + } + ], + "output": { + "authConfig": { + "additionalAuthenticationProviders": [ + { + "authenticationType": "AMAZON_COGNITO_USER_POOLS", + "userPoolConfig": { + "userPoolId": "authfinancetracker331811e6" + } + } + ], + "defaultAuthentication": { + "apiKeyConfig": { + "apiKeyExpirationDays": 7 + }, + "authenticationType": "API_KEY" + } + } + }, + "providerPlugin": "awscloudformation", + "service": "AppSync" + } + }, + "auth": { + "financetracker331811e6": { + "customAuth": false, + "dependsOn": [], + "frontendAuthConfig": { + "mfaConfiguration": "OFF", + "mfaTypes": [ + "SMS" + ], + "passwordProtectionSettings": { + "passwordPolicyCharacters": [], + "passwordPolicyMinLength": 8 + }, + "signupAttributes": [ + "EMAIL" + ], + "socialProviders": [], + "usernameAttributes": [ + "EMAIL" + ], + "verificationMechanisms": [ + "EMAIL" + ] + }, + "providerPlugin": "awscloudformation", + "service": "Cognito" + } + }, + "custom": { + "customfinance": { + "providerPlugin": "awscloudformation", + "service": "customCDK" + }, + "customresolver": { + "dependsOn": [ + { + "attributes": [ + "GraphQLAPIKeyOutput", + "GraphQLAPIIdOutput", + "GraphQLAPIEndpointOutput" + ], + "category": "api", + "resourceName": "financetracker" + } + ], + "providerPlugin": "awscloudformation", + "service": "customCDK" + } + }, + "function": { + "financetracker": { + "build": true, + "dependsOn": [ + { + "attributes": [ + "GraphQLAPIIdOutput" + ], + "category": "api", + "resourceName": "financetracker" + }, + { + "attributes": [ + "BudgetAlertTopicArn", + "MonthlyReportTopicArn" + ], + "category": "custom", + "resourceName": "customfinance" + } + ], + "providerPlugin": "awscloudformation", + "service": "Lambda" + } + }, + "parameters": { + "AMPLIFY_function_financetracker_deploymentBucketName": { + "usedBy": [ + { + "category": "function", + "resourceName": "financetracker" + } + ] + }, + "AMPLIFY_function_financetracker_s3Key": { + "usedBy": [ + { + "category": "function", + "resourceName": "financetracker" + } + ] + } + }, + "storage": { + "s320279658": { + "dependsOn": [], + "providerPlugin": "awscloudformation", + "service": "S3" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/.npmrc b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/.npmrc new file mode 100644 index 00000000000..9b233e42bf4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/.npmrc @@ -0,0 +1 @@ +resolution-mode=highest diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/build/cdk-stack.js b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/build/cdk-stack.js new file mode 100644 index 00000000000..60bf8565f8d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/build/cdk-stack.js @@ -0,0 +1,64 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cdkStack = void 0; +const cdk = __importStar(require("aws-cdk-lib")); +const AmplifyHelpers = __importStar(require("@aws-amplify/cli-extensibility-helper")); +const sns = __importStar(require("aws-cdk-lib/aws-sns")); +const subscriptions = __importStar(require("aws-cdk-lib/aws-sns-subscriptions")); +class cdkStack extends cdk.Stack { + constructor(scope, id, props, amplifyResourceProps) { + super(scope, id, props); + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + const amplifyProjectInfo = AmplifyHelpers.getProjectInfo(); + // 1. SNS Topic for Budget Alerts + this.budgetAlertTopic = new sns.Topic(this, 'BudgetAlertTopic', { + displayName: 'Fin Tracker Budget Alerts', + }); + this.budgetAlertTopic.addSubscription(new subscriptions.EmailSubscription('example@gmail.com')); + new cdk.CfnOutput(this, 'BudgetAlertTopicArn', { + value: this.budgetAlertTopic.topicArn, + description: 'SNS Topic ARN for budget alerts', + exportName: `${amplifyProjectInfo.projectName}-BudgetAlertTopicArn-${cdk.Fn.ref('env')}`, + }); + // 2. SNS Topic for Monthly Reports + this.monthlyReportTopic = new sns.Topic(this, 'MonthlyReportTopic', { + displayName: 'Finance Tracker Monthly Reports', + }); + this.monthlyReportTopic.addSubscription(new subscriptions.EmailSubscription('example@gmail.com')); + new cdk.CfnOutput(this, 'MonthlyReportTopicArn', { + value: this.monthlyReportTopic.topicArn, + description: 'SNS Topic ARN for monthly reports', + exportName: `${amplifyProjectInfo.projectName}-MonthlyReportTopicArn-${cdk.Fn.ref('env')}`, + }); + cdk.Tags.of(this).add('Project', 'FinanceTracker'); + cdk.Tags.of(this).add('Environment', cdk.Fn.ref('env')); + cdk.Tags.of(this).add('ManagedBy', 'Amplify'); + } +} +exports.cdkStack = cdkStack; diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/build/customfinance-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/build/customfinance-cloudformation-template.json new file mode 100644 index 00000000000..b12c33f6841 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/build/customfinance-cloudformation-template.json @@ -0,0 +1,83 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + } + }, + "Resources": { + "BudgetAlertTopicF20DF526": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Fin Tracker Budget Alerts" + } + }, + "BudgetAlertTopicsanjanaravikumarazgmailcom9C5B945F": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "BudgetAlertTopicF20DF526" + } + } + }, + "MonthlyReportTopic8D223100": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Finance Tracker Monthly Reports" + } + }, + "MonthlyReportTopicsanjanaravikumarazgmailcomFBA75CE0": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "MonthlyReportTopic8D223100" + } + } + } + }, + "Outputs": { + "BudgetAlertTopicArn": { + "Description": "SNS Topic ARN for budget alerts", + "Value": { + "Ref": "BudgetAlertTopicF20DF526" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-BudgetAlertTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "MonthlyReportTopicArn": { + "Description": "SNS Topic ARN for monthly reports", + "Value": { + "Ref": "MonthlyReportTopic8D223100" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-MonthlyReportTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/cdk-stack.ts b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/cdk-stack.ts new file mode 100644 index 00000000000..4d048d1e7b2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/cdk-stack.ts @@ -0,0 +1,55 @@ +import * as cdk from 'aws-cdk-lib'; +import * as AmplifyHelpers from '@aws-amplify/cli-extensibility-helper'; +import { Construct } from 'constructs'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as subscriptions from 'aws-cdk-lib/aws-sns-subscriptions'; + +export class cdkStack extends cdk.Stack { + public readonly budgetAlertTopic: sns.Topic; + public readonly monthlyReportTopic: sns.Topic; + + constructor(scope: Construct, id: string, props?: cdk.StackProps, amplifyResourceProps?: AmplifyHelpers.AmplifyResourceProps) { + super(scope, id, props); + + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + + const amplifyProjectInfo = AmplifyHelpers.getProjectInfo(); + + // 1. SNS Topic for Budget Alerts + this.budgetAlertTopic = new sns.Topic(this, 'BudgetAlertTopic', { + displayName: 'Fin Tracker Budget Alerts', + }); + + this.budgetAlertTopic.addSubscription( + new subscriptions.EmailSubscription('example@gmail.com') + ); + + new cdk.CfnOutput(this, 'BudgetAlertTopicArn', { + value: this.budgetAlertTopic.topicArn, + description: 'SNS Topic ARN for budget alerts', + exportName: `${amplifyProjectInfo.projectName}-BudgetAlertTopicArn-${cdk.Fn.ref('env')}`, + }); + + // 2. SNS Topic for Monthly Reports + this.monthlyReportTopic = new sns.Topic(this, 'MonthlyReportTopic', { + displayName: 'Finance Tracker Monthly Reports', + }); + + this.monthlyReportTopic.addSubscription( + new subscriptions.EmailSubscription('example@gmail.com') + ); + + new cdk.CfnOutput(this, 'MonthlyReportTopicArn', { + value: this.monthlyReportTopic.topicArn, + description: 'SNS Topic ARN for monthly reports', + exportName: `${amplifyProjectInfo.projectName}-MonthlyReportTopicArn-${cdk.Fn.ref('env')}`, + }); + + cdk.Tags.of(this).add('Project', 'FinanceTracker'); + cdk.Tags.of(this).add('Environment', cdk.Fn.ref('env')); + cdk.Tags.of(this).add('ManagedBy', 'Amplify'); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/package.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/package.json new file mode 100644 index 00000000000..c56c1b1f48c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/package.json @@ -0,0 +1,18 @@ +{ + "name": "custom-resource", + "version": "1.0.0", + "description": "", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "@aws-amplify/cli-extensibility-helper": "^3.0.0", + "aws-cdk-lib": "~2.189.1", + "constructs": "^10.0.5" + }, + "devDependencies": { + "typescript": "^4.9.5" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/tsconfig.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/tsconfig.json new file mode 100644 index 00000000000..c6f1a33b4d9 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "outDir": "build" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/yarn.lock b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/yarn.lock new file mode 100644 index 00000000000..a4b07722088 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customfinance/yarn.lock @@ -0,0 +1,1816 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aws-amplify/amplify-category-custom@3.1.31": + version "3.1.31" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-category-custom/-/amplify-category-custom-3.1.31.tgz#795c6710cd4b8ab2f277a26128ff17332c57628e" + integrity sha512-w3j1M6S4Q7qdiRPUoxw/9YFaDp1hkdyTOl/Xn7QsTGeJxYe0U0KKDBzVY8lRs+l4AaIVgaxEkdJyo6wjyGYBaA== + dependencies: + "@aws-amplify/amplify-cli-core" "4.4.4" + "@aws-amplify/amplify-prompts" "2.8.7" + aws-cdk-lib "~2.189.1" + execa "^5.1.1" + fs-extra "^8.1.0" + glob "^11.0.1" + ora "^4.0.3" + uuid "^8.3.2" + +"@aws-amplify/amplify-cli-core@4.4.4": + version "4.4.4" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-core/-/amplify-cli-core-4.4.4.tgz#c075a3617a713219569743d06976de6b2f8c3b43" + integrity sha512-8YhyiEcfN9kbcoztTxF9s0DCaodRs5McV/saz41TK6Z8BjYi+LVvNGBkFDqdLRVZnUsY16eGvG78to+W6CFWQQ== + dependencies: + "@aws-amplify/amplify-cli-logger" "1.3.8" + "@aws-amplify/amplify-function-plugin-interface" "1.12.1" + "@aws-amplify/amplify-prompts" "2.8.7" + "@aws-amplify/graphql-transformer-interfaces" "^3.12.1" + "@aws-sdk/util-arn-parser" "^3.893.0" + "@yarnpkg/lockfile" "^1.1.0" + ajv "^6.12.6" + aws-cdk-lib "~2.189.1" + chalk "^4.1.1" + ci-info "^3.8.0" + cli-table3 "^0.6.0" + cloudform-types "^4.2.0" + colors "1.4.0" + dotenv "^8.2.0" + ejs "^3.1.7" + execa "^5.1.1" + fs-extra "^8.1.0" + globby "^11.0.3" + hjson "^3.2.1" + inquirer "^7.3.3" + js-yaml "^4.0.0" + lodash "^4.17.21" + node-fetch "^2.6.7" + open "^8.4.0" + ora "^4.0.3" + proxy-agent "^6.3.0" + semver "^7.5.4" + typescript-json-schema "~0.52.0" + which "^2.0.2" + yaml "^2.2.2" + yauzl "^3.1.3" + +"@aws-amplify/amplify-cli-logger@1.3.8": + version "1.3.8" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-logger/-/amplify-cli-logger-1.3.8.tgz#4ec9e51177d4ff0a852c9cdf177a2af38fe08b9d" + integrity sha512-ici3+D8cTrZeTtkKp42ibJmyuLdT7Pl7clY7K/wXAUzsKjljf+cuXr9jb4viwfwAGlQdmS7eqQv9aysz+sfELA== + dependencies: + winston "^3.3.3" + winston-daily-rotate-file "^4.5.0" + +"@aws-amplify/amplify-cli-shared-interfaces@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-shared-interfaces/-/amplify-cli-shared-interfaces-1.2.6.tgz#291533003e25a0417833f6ade9befc7969cbb517" + integrity sha512-On3ZSspb+9bwgLyYMjzTiSl2QICDEwDvp+ppmOPUPSBwuU2z8IpIKys8aP8hODbKEuziTyO31yHe4Ucc4xTljg== + +"@aws-amplify/amplify-function-plugin-interface@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-function-plugin-interface/-/amplify-function-plugin-interface-1.12.1.tgz#92703945ab8f4a5e084d7018e8f7e9f1c53ec136" + integrity sha512-il5Ctl0OfTmwkZ++rsY2/N0mwsdRjpkQStQsijHQt0kDz9F22TFVXaeYvmWM3yRRy7dIH5qyGnDZFkA00tJnZA== + +"@aws-amplify/amplify-prompts@2.8.7": + version "2.8.7" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-prompts/-/amplify-prompts-2.8.7.tgz#7080765f9e2d183868b6cb2febbca894a2c19854" + integrity sha512-bRkVaPgMlwXE2nN50WF5kOjej3e1LlQH4+pN13yoYOfFpsuHg3HD7Q7fUEMQG0yuu9e/i+GnKE6Pu8yR7dWNqA== + dependencies: + "@aws-amplify/amplify-cli-shared-interfaces" "1.2.6" + chalk "^4.1.1" + enquirer "^2.3.6" + +"@aws-amplify/cli-extensibility-helper@^3.0.0": + version "3.0.41" + resolved "https://registry.yarnpkg.com/@aws-amplify/cli-extensibility-helper/-/cli-extensibility-helper-3.0.41.tgz#145405c40084f2ebcb35253c41720a9fe9e53eb6" + integrity sha512-AxZeu6qpnRBvlDla/Z/hLGZGgy0+2sBx6JH7SkPaisT5uQJO9LCFYzpjyCYSvEKoQ1naWyH0HxhhpiG6pbb2zA== + dependencies: + "@aws-amplify/amplify-category-custom" "3.1.31" + "@aws-amplify/amplify-cli-core" "4.4.4" + aws-cdk-lib "~2.189.1" + +"@aws-amplify/graphql-transformer-interfaces@^3.12.1": + version "3.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/graphql-transformer-interfaces/-/graphql-transformer-interfaces-3.12.1.tgz#a105c30e8e05463471d916b94e8046ba1aa255a7" + integrity sha512-l+F2teZccD1cH1ksC6W/6+wK/KH8L1Vn6ahIl4R03JO+yr9M6R4ydLzHQ5JMU1qCl2mt6/5STlL6VZBXLrnP6Q== + dependencies: + graphql "^15.5.0" + +"@aws-cdk/asset-awscli-v1@^2.2.229": + version "2.2.276" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.276.tgz#b0600e95e2ae1366c24f32d36d196b0eb84c3bf1" + integrity sha512-ag+rGoWtjnhLHOVmSGOfocN8ay1rcC7tvhEJy5bzS4hPo3j+LMn0E4iBSlt5BB4aF81cpbC/7LnjhohWzoLMNA== + +"@aws-cdk/asset-node-proxy-agent-v6@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.1.tgz#184f980024d67ad60bdc52ab88c59c73fa070346" + integrity sha512-We4bmHaowOPHr+IQR4/FyTGjRfjgBj4ICMjtqmJeBDWad3Q/6St12NT07leNtyuukv2qMhtSZJQorD8KpKTwRA== + +"@aws-cdk/cloud-assembly-schema@^41.0.0": + version "41.2.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-41.2.0.tgz#c1ef513e1cc0528dbc05948ae39d5631306af423" + integrity sha512-JaulVS6z9y5+u4jNmoWbHZRs9uGOnmn/ktXygNWKNu1k6lF3ad4so3s18eRu15XCbUIomxN9WPYT6Ehh7hzONw== + dependencies: + jsonschema "~1.4.1" + semver "^7.7.1" + +"@aws-sdk/util-arn-parser@^3.893.0": + version "3.972.3" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-arn-parser/-/util-arn-parser-3.972.3.tgz#ed989862bbb172ce16d9e1cd5790e5fe367219c2" + integrity sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA== + dependencies: + tslib "^2.6.2" + +"@balena/dockerignore@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" + integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q== + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@colors/colors@1.6.0", "@colors/colors@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" + integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA== + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@dabh/diagnostics@^2.0.8": + version "2.0.8" + resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.8.tgz#ead97e72ca312cf0e6dd7af0d300b58993a31a5e" + integrity sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q== + dependencies: + "@so-ric/colorspace" "^1.1.6" + enabled "2.0.x" + kuler "^2.0.0" + +"@isaacs/cliui@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-9.0.0.tgz#4d0a3f127058043bf2e7ee169eaf30ed901302f3" + integrity sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg== + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@so-ric/colorspace@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@so-ric/colorspace/-/colorspace-1.1.6.tgz#62515d8b9f27746b76950a83bde1af812d91923b" + integrity sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw== + dependencies: + color "^5.0.2" + text-hex "1.0.x" + +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + +"@tsconfig/node10@^1.0.7": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@^16.9.2": + version "16.18.126" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.126.tgz#27875faa2926c0f475b39a8bb1e546c0176f8d4b" + integrity sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw== + +"@types/triple-beam@^1.3.2": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c" + integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw== + +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +acorn-walk@^8.1.1: + version "8.3.5" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" + integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.4.1: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== + +agent-base@^7.1.0, agent-base@^7.1.2: + version "7.1.4" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8" + integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ== + +ajv@^6.12.6: + version "6.14.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.14.0.tgz#fd067713e228210636ebb08c60bd3765d6dbe73a" + integrity sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" + integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async@^3.2.3, async@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + +aws-cdk-lib@~2.189.1: + version "2.189.1" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.189.1.tgz#57681865d0ff138a26299066695c06c46329bcb7" + integrity sha512-9JU0yUr2iRTJ1oCPrHyx7hOtBDWyUfyOcdb6arlumJnMcQr2cyAMASY8HuAXHc8Y10ipVp8dRTW+J4/132IIYA== + dependencies: + "@aws-cdk/asset-awscli-v1" "^2.2.229" + "@aws-cdk/asset-node-proxy-agent-v6" "^2.1.0" + "@aws-cdk/cloud-assembly-schema" "^41.0.0" + "@balena/dockerignore" "^1.0.2" + case "1.6.3" + fs-extra "^11.3.0" + ignore "^5.3.2" + jsonschema "^1.5.0" + mime-types "^2.1.35" + minimatch "^3.1.2" + punycode "^2.3.1" + semver "^7.7.1" + table "^6.9.0" + yaml "1.10.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +balanced-match@^4.0.2: + version "4.0.4" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a" + integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== + +basic-ftp@^5.0.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.3.0.tgz#88f057d1ba8442643c505c4c83bbaa4442b15cfd" + integrity sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w== + +brace-expansion@^1.1.7: + version "1.1.14" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.14.tgz#d9de602370d91347cd9ddad1224d4fd701eb348b" + integrity sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" + integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== + dependencies: + balanced-match "^1.0.0" + +brace-expansion@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.5.tgz#dcc3a37116b79f3e1b46db994ced5d570e930fdb" + integrity sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ== + dependencies: + balanced-match "^4.0.2" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +case@1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.0, chalk@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +ci-info@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.2.0: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + +cli-table3@^0.6.0: + version "0.6.5" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f" + integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + +cloudform-types@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/cloudform-types/-/cloudform-types-4.2.0.tgz#698c98a1468bd8fe9c1c275b2e65720f572ca401" + integrity sha512-i7fmpsOtrMzF4z3Ltpqn9Khi6pgSxNCMqqsXLXWbaZsczky7vA9mkq/Z2bdMUu5x4Eaj5wvvKc95ENZ0dtN/Uw== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-convert@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-3.1.3.tgz#db6627b97181cb8facdfce755ae26f97ab0711f1" + integrity sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg== + dependencies: + color-name "^2.0.0" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-2.1.0.tgz#0b677385c1c4b4edfdeaf77e38fa338e3a40b693" + integrity sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^2.1.3: + version "2.1.4" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-2.1.4.tgz#9dcf566ff976e23368c8bd673f5c35103ab41058" + integrity sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg== + dependencies: + color-name "^2.0.0" + +color@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/color/-/color-5.0.3.tgz#f79390b1b778e222ffbb54304d3dbeaef633f97f" + integrity sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA== + dependencies: + color-convert "^3.1.3" + color-string "^2.1.3" + +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +constructs@^10.0.5: + version "10.6.0" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-10.6.0.tgz#9ec889c48567182ed9e2a56d4335d582ba0bcb6b" + integrity sha512-TxHOnBO5zMo/G76ykzGF/wMpEHu257TbWiIxP9K0Yv/+t70UzgBQiTqjkAsWOPC6jW91DzJI0+ehQV6xDRNBuQ== + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^7.0.3, cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + +debug@4, debug@^4.3.4: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + +diff@^4.0.1: + version "4.0.4" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.4.tgz#7a6dbfda325f25f07517e9b518f897c08332e07d" + integrity sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dotenv@^8.2.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== + +ejs@^3.1.7: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enabled@2.0.x: + version "2.0.0" + resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" + integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== + +enquirer@^2.3.6: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-uri@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== + +fastq@^1.6.0: + version "1.20.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675" + integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw== + dependencies: + reusify "^1.0.4" + +fecha@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" + integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-stream-rotator@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz#007019e735b262bb6c6f0197e58e5c87cb96cec3" + integrity sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ== + dependencies: + moment "^2.29.1" + +filelist@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.6.tgz#1e8870942a7c636c862f7c49b9394937b6a995a3" + integrity sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA== + dependencies: + minimatch "^5.0.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +fn.name@1.x.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" + integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== + +foreground-child@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" + integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== + dependencies: + cross-spawn "^7.0.6" + signal-exit "^4.0.1" + +fs-extra@^11.3.0: + version "11.3.4" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.4.tgz#ab6934eca8bcf6f7f6b82742e33591f86301d6fc" + integrity sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-uri@^6.0.1: + version "6.0.5" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.5.tgz#714892aa4a871db671abc5395e5e9447bc306a16" + integrity sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^11.0.1: + version "11.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-11.1.0.tgz#4f826576e4eb99c7dad383793d2f9f08f67e50a6" + integrity sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw== + dependencies: + foreground-child "^3.3.1" + jackspeak "^4.1.1" + minimatch "^10.1.1" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + +glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphql@^15.5.0: + version "15.10.2" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.10.2.tgz#f57f8665cea9e77a80264d7eeb0d687079714e78" + integrity sha512-1PRqdDPAmViWr4h1GVBT8RoPZfWSGZa7kDzleTilOfVIslsgf+cia3Nl95v1KDmR4iERPaT7WzQ+tN4MJmbg3w== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +hjson@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/hjson/-/hjson-3.2.2.tgz#a5a81138f4c0bb427e4b2ac917fafd4b454436cf" + integrity sha512-MkUeB0cTIlppeSsndgESkfFD21T2nXPRaBStLtf3cAYA2bVEFdXlodZB0TukwZiobPD1Ksax5DK4RTZeaXCI3Q== + +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +https-proxy-agent@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" + integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== + dependencies: + agent-base "^7.1.2" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^5.2.0, ignore@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inquirer@^7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +ip-address@^10.0.1: + version "10.1.0" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.1.0.tgz#d8dcffb34d0e02eb241427444a6e23f5b0595aa4" + integrity sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q== + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +jackspeak@^4.1.1: + version "4.2.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.2.3.tgz#27ef80f33b93412037c3bea4f8eddf80e1931483" + integrity sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg== + dependencies: + "@isaacs/cliui" "^9.0.0" + +jake@^10.8.5: + version "10.9.4" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.4.tgz#d626da108c63d5cfb00ab5c25fadc7e0084af8e6" + integrity sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA== + dependencies: + async "^3.2.6" + filelist "^1.0.4" + picocolors "^1.1.1" + +js-yaml@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.2.1.tgz#b6e31717f22cc37330b081ce0051ed5de53af2f6" + integrity sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonschema@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.5.0.tgz#f6aceb1ab9123563dd901d05f81f9d4883d3b7d8" + integrity sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw== + +jsonschema@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== + +kuler@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" + integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.19, lodash@^4.17.21: + version "4.18.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.18.1.tgz#ff2b66c1f6326d59513de2407bf881439812771c" + integrity sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q== + +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +logform@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.7.0.tgz#cfca97528ef290f2e125a08396805002b2d060d1" + integrity sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ== + dependencies: + "@colors/colors" "1.6.0" + "@types/triple-beam" "^1.3.2" + fecha "^4.2.0" + ms "^2.1.1" + safe-stable-stringify "^2.3.1" + triple-beam "^1.3.0" + +lru-cache@^11.0.0: + version "11.3.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.3.5.tgz#29047d348c0b2793e3112a01c739bb7c6d855637" + integrity sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw== + +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.35: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^10.1.1: + version "10.2.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.5.tgz#bd48687a0be38ed2961399105600f832095861d1" + integrity sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== + dependencies: + brace-expansion "^5.0.5" + +minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" + integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.9" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.9.tgz#1293ef15db0098b394540e8f9f744f9fda8dee4b" + integrity sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw== + dependencies: + brace-expansion "^2.0.1" + +minipass@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.3.tgz#79389b4eb1bb2d003a9bba87d492f2bd37bdc65b" + integrity sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== + +moment@^2.29.1: + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== + +ms@^2.1.1, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +netmask@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.1.1.tgz#80043d265b53aa521b3bd01e8fcdf353f9e1e81e" + integrity sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA== + +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-hash@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" + integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +one-time@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45" + integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g== + dependencies: + fn.name "1.x.x" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +ora@^4.0.3: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.1.1.tgz#566cc0348a15c36f5f0e979612842e02ba9dddbc" + integrity sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +pac-proxy-agent@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz#9cfaf33ff25da36f6147a20844230ec92c06e5df" + integrity sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.1.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.6" + pac-resolver "^7.0.1" + socks-proxy-agent "^8.0.5" + +pac-resolver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-scurry@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.2.tgz#6be0d0ee02a10d9e0de7a98bae65e182c9061f85" + integrity sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601" + integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== + +proxy-agent@^6.3.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.5.0.tgz#9e49acba8e4ee234aacb539f89ed9c23d02f232d" + integrity sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.6" + lru-cache "^7.14.1" + pac-proxy-agent "^7.1.0" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.5" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +punycode@^2.1.0, punycode@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +readable-stream@^3.4.0, readable-stream@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +reusify@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rxjs@^6.6.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-stable-stringify@^2.2.0, safe-stable-stringify@^2.3.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^7.5.4, semver@^7.7.1: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.5: + version "8.0.5" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz#b9cdb4e7e998509d7659d689ce7697ac21645bee" + integrity sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.7" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.7.tgz#e2fb1d9a603add75050a2067db8c381a0b5669ea" + integrity sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A== + dependencies: + ip-address "^10.0.1" + smart-buffer "^4.2.0" + +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/table/-/table-6.9.0.tgz#50040afa6264141c7566b3b81d4d82c47a8668f5" + integrity sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +text-hex@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" + integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +triple-beam@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" + integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== + +ts-node@^10.2.1: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.1, tslib@^2.6.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript-json-schema@~0.52.0: + version "0.52.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.52.0.tgz#954560ec90e5486e8f7a5b7706ec59286a708e29" + integrity sha512-3ZdHzx116gZ+D9LmMl5/+d1G3Rpt8baWngKzepYWHnXbAa8Winv64CmFRqLlMKneE1c40yugYDFcWdyX1FjGzQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/node" "^16.9.2" + glob "^7.1.7" + safe-stable-stringify "^2.2.0" + ts-node "^10.2.1" + typescript "~4.4.4" + yargs "^17.1.1" + +typescript@^4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +typescript@~4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" + integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +winston-daily-rotate-file@^4.5.0: + version "4.7.1" + resolved "https://registry.yarnpkg.com/winston-daily-rotate-file/-/winston-daily-rotate-file-4.7.1.tgz#f60a643af87f8867f23170d8cd87dbe3603a625f" + integrity sha512-7LGPiYGBPNyGHLn9z33i96zx/bd71pjBn9tqQzO3I4Tayv94WPmBNwKC7CO1wPHdP9uvu+Md/1nr6VSH9h0iaA== + dependencies: + file-stream-rotator "^0.6.1" + object-hash "^2.0.1" + triple-beam "^1.3.0" + winston-transport "^4.4.0" + +winston-transport@^4.4.0, winston-transport@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.9.0.tgz#3bba345de10297654ea6f33519424560003b3bf9" + integrity sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A== + dependencies: + logform "^2.7.0" + readable-stream "^3.6.2" + triple-beam "^1.3.0" + +winston@^3.3.3: + version "3.19.0" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.19.0.tgz#cc1d1262f5f45946904085cfffe73efb4b7a581d" + integrity sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA== + dependencies: + "@colors/colors" "^1.6.0" + "@dabh/diagnostics" "^2.0.8" + async "^3.2.3" + is-stream "^2.0.0" + logform "^2.7.0" + one-time "^1.0.0" + readable-stream "^3.4.0" + safe-stable-stringify "^2.3.1" + stack-trace "0.0.x" + triple-beam "^1.3.0" + winston-transport "^4.9.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaml@1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yaml@^2.2.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.3.tgz#a0d6bd2efb3dd03c59370223701834e60409bd7d" + integrity sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.1.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yauzl@^3.1.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.3.0.tgz#5be5e287b9a8112941c177734a34bf61a3e11bb4" + integrity sha512-PtGEvEP30p7sbIBJKUBjUnqgTVOyMURc4dLo9iNyAJnNIEz9pm88cCXF21w94Kg3k6RXkeZh5DHOGS0qEONvNQ== + dependencies: + buffer-crc32 "~0.2.3" + pend "~1.2.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/.npmrc b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/.npmrc new file mode 100644 index 00000000000..9b233e42bf4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/.npmrc @@ -0,0 +1 @@ +resolution-mode=highest diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/build/cdk-stack.js b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/build/cdk-stack.js new file mode 100644 index 00000000000..a3be92062ea --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/build/cdk-stack.js @@ -0,0 +1,119 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cdkStack = void 0; +const cdk = __importStar(require("aws-cdk-lib")); +const AmplifyHelpers = __importStar(require("@aws-amplify/cli-extensibility-helper")); +const iam = __importStar(require("aws-cdk-lib/aws-iam")); +class cdkStack extends cdk.Stack { + constructor(scope, id, props, amplifyResourceProps) { + super(scope, id, props); + /* Do not remove - Amplify CLI automatically injects the current deployment environment in this input parameter */ + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + // Access Amplify-generated resources using Gen1 pattern + const retVal = AmplifyHelpers.addResourceDependency(this, amplifyResourceProps.category, amplifyResourceProps.resourceName, [ + { category: 'api', resourceName: 'financetracker' }, + ]); + // Gen1 pattern: reference the GraphQL API ID using cdk.Fn.ref + // This is the exact pattern that breaks during Gen2 migration + const apiId = cdk.Fn.ref(retVal.api.financetracker.GraphQLAPIIdOutput); + // Create IAM role for the DynamoDB data source + const dataSourceRole = new iam.Role(this, 'TransactionsByCategoryDSRole', { + assumedBy: new iam.ServicePrincipal('appsync.amazonaws.com'), + roleName: `TransByCatDSRole-${cdk.Fn.ref('env')}`, + }); + // Grant DynamoDB access to the role + dataSourceRole.addToPolicy(new iam.PolicyStatement({ + actions: [ + 'dynamodb:Query', + 'dynamodb:Scan', + 'dynamodb:GetItem', + ], + resources: [ + cdk.Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*'), + ], + })); + // Create a DynamoDB data source for the custom resolver + // Using Gen1 CfnDataSource pattern (low-level CloudFormation) + const dataSource = new cdk.aws_appsync.CfnDataSource(this, 'TransactionsByCategoryDS', { + apiId: apiId, + name: 'TransactionsByCategoryDataSource', + type: 'AMAZON_DYNAMODB', + dynamoDbConfig: { + tableName: cdk.Fn.sub('Transaction-${apiId}-${env}', { + apiId: apiId, + env: cdk.Fn.ref('env'), + }), + awsRegion: cdk.Fn.ref('AWS::Region'), + }, + serviceRoleArn: dataSourceRole.roleArn, + }); + // Request mapping template - VTL resolver for querying by category + const requestTemplate = ` +## Custom VTL resolver for getTransactionsByCategory +#set($limit = $util.defaultIfNull($ctx.args.limit, 20)) +{ + "version": "2018-05-29", + "operation": "Scan", + "filter": { + "expression": "category = :category", + "expressionValues": { + ":category": $util.dynamodb.toDynamoDBJson($ctx.args.category) + } + }, + "limit": $limit +}`; + // Response mapping template + const responseTemplate = ` +## Return the results as a TransactionConnection +{ + "items": $util.toJson($ctx.result.items), + "nextToken": $util.toJson($ctx.result.nextToken) +}`; + // Create the resolver using Gen1 CfnResolver pattern + const resolver = new cdk.aws_appsync.CfnResolver(this, 'GetTransactionsByCategoryResolver', { + apiId: apiId, + typeName: 'Query', + fieldName: 'getTransactionsByCategory', + dataSourceName: dataSource.attrName, + requestMappingTemplate: requestTemplate, + responseMappingTemplate: responseTemplate, + }); + resolver.addDependency(dataSource); + // Output the resolver info + new cdk.CfnOutput(this, 'ResolverArn', { + value: resolver.attrResolverArn, + description: 'ARN of the custom getTransactionsByCategory resolver', + }); + new cdk.CfnOutput(this, 'DataSourceName', { + value: dataSource.attrName, + description: 'Name of the custom DynamoDB data source', + }); + } +} +exports.cdkStack = cdkStack; diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/build/customresolver-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/build/customresolver-cloudformation-template.json new file mode 100644 index 00000000000..4cdc5f8dba8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/build/customresolver-cloudformation-template.json @@ -0,0 +1,150 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + }, + "apifinancetrackerGraphQLAPIKeyOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Type": "String" + } + }, + "Resources": { + "TransactionsByCategoryDSRole265ACEB1": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": { + "Fn::Join": [ + "", + [ + "TransByCatDSRole-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:GetItem" + ], + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A", + "Roles": [ + { + "Ref": "TransactionsByCategoryDSRole265ACEB1" + } + ] + } + }, + "TransactionsByCategoryDS": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Sub": [ + "Transaction-${apiId}-${env}", + { + "apiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "env": { + "Ref": "env" + } + } + ] + } + }, + "Name": "TransactionsByCategoryDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionsByCategoryDSRole265ACEB1", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + } + }, + "GetTransactionsByCategoryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + }, + "FieldName": "getTransactionsByCategory", + "RequestMappingTemplate": "\n## Custom VTL resolver for getTransactionsByCategory\n#set($limit = $util.defaultIfNull($ctx.args.limit, 20))\n{\n \"version\": \"2018-05-29\",\n \"operation\": \"Scan\",\n \"filter\": {\n \"expression\": \"category = :category\",\n \"expressionValues\": {\n \":category\": $util.dynamodb.toDynamoDBJson($ctx.args.category)\n }\n },\n \"limit\": $limit\n}", + "ResponseMappingTemplate": "\n## Return the results as a TransactionConnection\n{\n \"items\": $util.toJson($ctx.result.items),\n \"nextToken\": $util.toJson($ctx.result.nextToken)\n}", + "TypeName": "Query" + }, + "DependsOn": [ + "TransactionsByCategoryDS" + ] + } + }, + "Outputs": { + "ResolverArn": { + "Description": "ARN of the custom getTransactionsByCategory resolver", + "Value": { + "Fn::GetAtt": [ + "GetTransactionsByCategoryResolver", + "ResolverArn" + ] + } + }, + "DataSourceName": { + "Description": "Name of the custom DynamoDB data source", + "Value": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/cdk-stack.ts b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/cdk-stack.ts new file mode 100644 index 00000000000..64d547c8a95 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/cdk-stack.ts @@ -0,0 +1,111 @@ +import * as cdk from 'aws-cdk-lib'; +import * as AmplifyHelpers from '@aws-amplify/cli-extensibility-helper'; +import { AmplifyDependentResourcesAttributes } from '../../types/amplify-dependent-resources-ref'; +import { Construct } from 'constructs'; +import * as iam from 'aws-cdk-lib/aws-iam'; + +export class cdkStack extends cdk.Stack { + constructor(scope: Construct, id: string, props?: cdk.StackProps, amplifyResourceProps?: AmplifyHelpers.AmplifyResourceProps) { + super(scope, id, props); + + /* Do not remove - Amplify CLI automatically injects the current deployment environment in this input parameter */ + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + + // Access Amplify-generated resources using Gen1 pattern + const retVal: AmplifyDependentResourcesAttributes = AmplifyHelpers.addResourceDependency(this, + amplifyResourceProps!.category, + amplifyResourceProps!.resourceName, + [ + { category: 'api', resourceName: 'financetracker' }, + ] + ); + + // Gen1 pattern: reference the GraphQL API ID using cdk.Fn.ref + // This is the exact pattern that breaks during Gen2 migration + const apiId = cdk.Fn.ref(retVal.api.financetracker.GraphQLAPIIdOutput); + + // Create IAM role for the DynamoDB data source + const dataSourceRole = new iam.Role(this, 'TransactionsByCategoryDSRole', { + assumedBy: new iam.ServicePrincipal('appsync.amazonaws.com'), + roleName: `TransByCatDSRole-${cdk.Fn.ref('env')}`, + }); + + // Grant DynamoDB access to the role + dataSourceRole.addToPolicy(new iam.PolicyStatement({ + actions: [ + 'dynamodb:Query', + 'dynamodb:Scan', + 'dynamodb:GetItem', + ], + resources: [ + cdk.Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*'), + ], + })); + + // Create a DynamoDB data source for the custom resolver + // Using Gen1 CfnDataSource pattern (low-level CloudFormation) + const dataSource = new cdk.aws_appsync.CfnDataSource(this, 'TransactionsByCategoryDS', { + apiId: apiId, + name: 'TransactionsByCategoryDataSource', + type: 'AMAZON_DYNAMODB', + dynamoDbConfig: { + tableName: cdk.Fn.sub('Transaction-${apiId}-${env}', { + apiId: apiId, + env: cdk.Fn.ref('env'), + }), + awsRegion: cdk.Fn.ref('AWS::Region'), + }, + serviceRoleArn: dataSourceRole.roleArn, + }); + + // Request mapping template - VTL resolver for querying by category + const requestTemplate = ` +## Custom VTL resolver for getTransactionsByCategory +#set($limit = $util.defaultIfNull($ctx.args.limit, 20)) +{ + "version": "2018-05-29", + "operation": "Scan", + "filter": { + "expression": "category = :category", + "expressionValues": { + ":category": $util.dynamodb.toDynamoDBJson($ctx.args.category) + } + }, + "limit": $limit +}`; + + // Response mapping template + const responseTemplate = ` +## Return the results as a TransactionConnection +{ + "items": $util.toJson($ctx.result.items), + "nextToken": $util.toJson($ctx.result.nextToken) +}`; + + // Create the resolver using Gen1 CfnResolver pattern + const resolver = new cdk.aws_appsync.CfnResolver(this, 'GetTransactionsByCategoryResolver', { + apiId: apiId, + typeName: 'Query', + fieldName: 'getTransactionsByCategory', + dataSourceName: dataSource.attrName, + requestMappingTemplate: requestTemplate, + responseMappingTemplate: responseTemplate, + }); + + resolver.addDependency(dataSource); + + // Output the resolver info + new cdk.CfnOutput(this, 'ResolverArn', { + value: resolver.attrResolverArn, + description: 'ARN of the custom getTransactionsByCategory resolver', + }); + + new cdk.CfnOutput(this, 'DataSourceName', { + value: dataSource.attrName, + description: 'Name of the custom DynamoDB data source', + }); + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/package.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/package.json new file mode 100644 index 00000000000..c56c1b1f48c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/package.json @@ -0,0 +1,18 @@ +{ + "name": "custom-resource", + "version": "1.0.0", + "description": "", + "scripts": { + "build": "tsc", + "watch": "tsc -w", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "dependencies": { + "@aws-amplify/cli-extensibility-helper": "^3.0.0", + "aws-cdk-lib": "~2.189.1", + "constructs": "^10.0.5" + }, + "devDependencies": { + "typescript": "^4.9.5" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/tsconfig.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/tsconfig.json new file mode 100644 index 00000000000..c6f1a33b4d9 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "outDir": "build" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/yarn.lock b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/yarn.lock new file mode 100644 index 00000000000..a4b07722088 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/custom/customresolver/yarn.lock @@ -0,0 +1,1816 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aws-amplify/amplify-category-custom@3.1.31": + version "3.1.31" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-category-custom/-/amplify-category-custom-3.1.31.tgz#795c6710cd4b8ab2f277a26128ff17332c57628e" + integrity sha512-w3j1M6S4Q7qdiRPUoxw/9YFaDp1hkdyTOl/Xn7QsTGeJxYe0U0KKDBzVY8lRs+l4AaIVgaxEkdJyo6wjyGYBaA== + dependencies: + "@aws-amplify/amplify-cli-core" "4.4.4" + "@aws-amplify/amplify-prompts" "2.8.7" + aws-cdk-lib "~2.189.1" + execa "^5.1.1" + fs-extra "^8.1.0" + glob "^11.0.1" + ora "^4.0.3" + uuid "^8.3.2" + +"@aws-amplify/amplify-cli-core@4.4.4": + version "4.4.4" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-core/-/amplify-cli-core-4.4.4.tgz#c075a3617a713219569743d06976de6b2f8c3b43" + integrity sha512-8YhyiEcfN9kbcoztTxF9s0DCaodRs5McV/saz41TK6Z8BjYi+LVvNGBkFDqdLRVZnUsY16eGvG78to+W6CFWQQ== + dependencies: + "@aws-amplify/amplify-cli-logger" "1.3.8" + "@aws-amplify/amplify-function-plugin-interface" "1.12.1" + "@aws-amplify/amplify-prompts" "2.8.7" + "@aws-amplify/graphql-transformer-interfaces" "^3.12.1" + "@aws-sdk/util-arn-parser" "^3.893.0" + "@yarnpkg/lockfile" "^1.1.0" + ajv "^6.12.6" + aws-cdk-lib "~2.189.1" + chalk "^4.1.1" + ci-info "^3.8.0" + cli-table3 "^0.6.0" + cloudform-types "^4.2.0" + colors "1.4.0" + dotenv "^8.2.0" + ejs "^3.1.7" + execa "^5.1.1" + fs-extra "^8.1.0" + globby "^11.0.3" + hjson "^3.2.1" + inquirer "^7.3.3" + js-yaml "^4.0.0" + lodash "^4.17.21" + node-fetch "^2.6.7" + open "^8.4.0" + ora "^4.0.3" + proxy-agent "^6.3.0" + semver "^7.5.4" + typescript-json-schema "~0.52.0" + which "^2.0.2" + yaml "^2.2.2" + yauzl "^3.1.3" + +"@aws-amplify/amplify-cli-logger@1.3.8": + version "1.3.8" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-logger/-/amplify-cli-logger-1.3.8.tgz#4ec9e51177d4ff0a852c9cdf177a2af38fe08b9d" + integrity sha512-ici3+D8cTrZeTtkKp42ibJmyuLdT7Pl7clY7K/wXAUzsKjljf+cuXr9jb4viwfwAGlQdmS7eqQv9aysz+sfELA== + dependencies: + winston "^3.3.3" + winston-daily-rotate-file "^4.5.0" + +"@aws-amplify/amplify-cli-shared-interfaces@1.2.6": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-cli-shared-interfaces/-/amplify-cli-shared-interfaces-1.2.6.tgz#291533003e25a0417833f6ade9befc7969cbb517" + integrity sha512-On3ZSspb+9bwgLyYMjzTiSl2QICDEwDvp+ppmOPUPSBwuU2z8IpIKys8aP8hODbKEuziTyO31yHe4Ucc4xTljg== + +"@aws-amplify/amplify-function-plugin-interface@1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-function-plugin-interface/-/amplify-function-plugin-interface-1.12.1.tgz#92703945ab8f4a5e084d7018e8f7e9f1c53ec136" + integrity sha512-il5Ctl0OfTmwkZ++rsY2/N0mwsdRjpkQStQsijHQt0kDz9F22TFVXaeYvmWM3yRRy7dIH5qyGnDZFkA00tJnZA== + +"@aws-amplify/amplify-prompts@2.8.7": + version "2.8.7" + resolved "https://registry.yarnpkg.com/@aws-amplify/amplify-prompts/-/amplify-prompts-2.8.7.tgz#7080765f9e2d183868b6cb2febbca894a2c19854" + integrity sha512-bRkVaPgMlwXE2nN50WF5kOjej3e1LlQH4+pN13yoYOfFpsuHg3HD7Q7fUEMQG0yuu9e/i+GnKE6Pu8yR7dWNqA== + dependencies: + "@aws-amplify/amplify-cli-shared-interfaces" "1.2.6" + chalk "^4.1.1" + enquirer "^2.3.6" + +"@aws-amplify/cli-extensibility-helper@^3.0.0": + version "3.0.41" + resolved "https://registry.yarnpkg.com/@aws-amplify/cli-extensibility-helper/-/cli-extensibility-helper-3.0.41.tgz#145405c40084f2ebcb35253c41720a9fe9e53eb6" + integrity sha512-AxZeu6qpnRBvlDla/Z/hLGZGgy0+2sBx6JH7SkPaisT5uQJO9LCFYzpjyCYSvEKoQ1naWyH0HxhhpiG6pbb2zA== + dependencies: + "@aws-amplify/amplify-category-custom" "3.1.31" + "@aws-amplify/amplify-cli-core" "4.4.4" + aws-cdk-lib "~2.189.1" + +"@aws-amplify/graphql-transformer-interfaces@^3.12.1": + version "3.12.1" + resolved "https://registry.yarnpkg.com/@aws-amplify/graphql-transformer-interfaces/-/graphql-transformer-interfaces-3.12.1.tgz#a105c30e8e05463471d916b94e8046ba1aa255a7" + integrity sha512-l+F2teZccD1cH1ksC6W/6+wK/KH8L1Vn6ahIl4R03JO+yr9M6R4ydLzHQ5JMU1qCl2mt6/5STlL6VZBXLrnP6Q== + dependencies: + graphql "^15.5.0" + +"@aws-cdk/asset-awscli-v1@^2.2.229": + version "2.2.276" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-awscli-v1/-/asset-awscli-v1-2.2.276.tgz#b0600e95e2ae1366c24f32d36d196b0eb84c3bf1" + integrity sha512-ag+rGoWtjnhLHOVmSGOfocN8ay1rcC7tvhEJy5bzS4hPo3j+LMn0E4iBSlt5BB4aF81cpbC/7LnjhohWzoLMNA== + +"@aws-cdk/asset-node-proxy-agent-v6@^2.1.0": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@aws-cdk/asset-node-proxy-agent-v6/-/asset-node-proxy-agent-v6-2.1.1.tgz#184f980024d67ad60bdc52ab88c59c73fa070346" + integrity sha512-We4bmHaowOPHr+IQR4/FyTGjRfjgBj4ICMjtqmJeBDWad3Q/6St12NT07leNtyuukv2qMhtSZJQorD8KpKTwRA== + +"@aws-cdk/cloud-assembly-schema@^41.0.0": + version "41.2.0" + resolved "https://registry.yarnpkg.com/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-41.2.0.tgz#c1ef513e1cc0528dbc05948ae39d5631306af423" + integrity sha512-JaulVS6z9y5+u4jNmoWbHZRs9uGOnmn/ktXygNWKNu1k6lF3ad4so3s18eRu15XCbUIomxN9WPYT6Ehh7hzONw== + dependencies: + jsonschema "~1.4.1" + semver "^7.7.1" + +"@aws-sdk/util-arn-parser@^3.893.0": + version "3.972.3" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-arn-parser/-/util-arn-parser-3.972.3.tgz#ed989862bbb172ce16d9e1cd5790e5fe367219c2" + integrity sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA== + dependencies: + tslib "^2.6.2" + +"@balena/dockerignore@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" + integrity sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q== + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@colors/colors@1.6.0", "@colors/colors@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.6.0.tgz#ec6cd237440700bc23ca23087f513c75508958b0" + integrity sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA== + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@dabh/diagnostics@^2.0.8": + version "2.0.8" + resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.8.tgz#ead97e72ca312cf0e6dd7af0d300b58993a31a5e" + integrity sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q== + dependencies: + "@so-ric/colorspace" "^1.1.6" + enabled "2.0.x" + kuler "^2.0.0" + +"@isaacs/cliui@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-9.0.0.tgz#4d0a3f127058043bf2e7ee169eaf30ed901302f3" + integrity sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg== + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.5.5" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@so-ric/colorspace@^1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@so-ric/colorspace/-/colorspace-1.1.6.tgz#62515d8b9f27746b76950a83bde1af812d91923b" + integrity sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw== + dependencies: + color "^5.0.2" + text-hex "1.0.x" + +"@tootallnate/quickjs-emscripten@^0.23.0": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c" + integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== + +"@tsconfig/node10@^1.0.7": + version "1.0.12" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.12.tgz#be57ceac1e4692b41be9de6be8c32a106636dba4" + integrity sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/node@^16.9.2": + version "16.18.126" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.126.tgz#27875faa2926c0f475b39a8bb1e546c0176f8d4b" + integrity sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw== + +"@types/triple-beam@^1.3.2": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c" + integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw== + +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +acorn-walk@^8.1.1: + version "8.3.5" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" + integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.4.1: + version "8.16.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" + integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== + +agent-base@^7.1.0, agent-base@^7.1.2: + version "7.1.4" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8" + integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ== + +ajv@^6.12.6: + version "6.14.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.14.0.tgz#fd067713e228210636ebb08c60bd3765d6dbe73a" + integrity sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" + integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^4.2.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +ast-types@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" + integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== + dependencies: + tslib "^2.0.1" + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async@^3.2.3, async@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce" + integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA== + +aws-cdk-lib@~2.189.1: + version "2.189.1" + resolved "https://registry.yarnpkg.com/aws-cdk-lib/-/aws-cdk-lib-2.189.1.tgz#57681865d0ff138a26299066695c06c46329bcb7" + integrity sha512-9JU0yUr2iRTJ1oCPrHyx7hOtBDWyUfyOcdb6arlumJnMcQr2cyAMASY8HuAXHc8Y10ipVp8dRTW+J4/132IIYA== + dependencies: + "@aws-cdk/asset-awscli-v1" "^2.2.229" + "@aws-cdk/asset-node-proxy-agent-v6" "^2.1.0" + "@aws-cdk/cloud-assembly-schema" "^41.0.0" + "@balena/dockerignore" "^1.0.2" + case "1.6.3" + fs-extra "^11.3.0" + ignore "^5.3.2" + jsonschema "^1.5.0" + mime-types "^2.1.35" + minimatch "^3.1.2" + punycode "^2.3.1" + semver "^7.7.1" + table "^6.9.0" + yaml "1.10.2" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +balanced-match@^4.0.2: + version "4.0.4" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a" + integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA== + +basic-ftp@^5.0.2: + version "5.3.0" + resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.3.0.tgz#88f057d1ba8442643c505c4c83bbaa4442b15cfd" + integrity sha512-5K9eNNn7ywHPsYnFwjKgYH8Hf8B5emh7JKcPaVjjrMJFQQwGpwowEnZNEtHs7DfR7hCZsmaK3VA4HUK0YarT+w== + +brace-expansion@^1.1.7: + version "1.1.14" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.14.tgz#d9de602370d91347cd9ddad1224d4fd701eb348b" + integrity sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.0.tgz#4f41a41190216ee36067ec381526fe9539c4f0ae" + integrity sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w== + dependencies: + balanced-match "^1.0.0" + +brace-expansion@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.5.tgz#dcc3a37116b79f3e1b46db994ced5d570e930fdb" + integrity sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ== + dependencies: + balanced-match "^4.0.2" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +case@1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.0, chalk@^4.1.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +ci-info@^3.8.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.2.0: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + +cli-table3@^0.6.0: + version "0.6.5" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.5.tgz#013b91351762739c16a9567c21a04632e449bf2f" + integrity sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + +cloudform-types@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/cloudform-types/-/cloudform-types-4.2.0.tgz#698c98a1468bd8fe9c1c275b2e65720f572ca401" + integrity sha512-i7fmpsOtrMzF4z3Ltpqn9Khi6pgSxNCMqqsXLXWbaZsczky7vA9mkq/Z2bdMUu5x4Eaj5wvvKc95ENZ0dtN/Uw== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-convert@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-3.1.3.tgz#db6627b97181cb8facdfce755ae26f97ab0711f1" + integrity sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg== + dependencies: + color-name "^2.0.0" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-2.1.0.tgz#0b677385c1c4b4edfdeaf77e38fa338e3a40b693" + integrity sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^2.1.3: + version "2.1.4" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-2.1.4.tgz#9dcf566ff976e23368c8bd673f5c35103ab41058" + integrity sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg== + dependencies: + color-name "^2.0.0" + +color@^5.0.2: + version "5.0.3" + resolved "https://registry.yarnpkg.com/color/-/color-5.0.3.tgz#f79390b1b778e222ffbb54304d3dbeaef633f97f" + integrity sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA== + dependencies: + color-convert "^3.1.3" + color-string "^2.1.3" + +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +constructs@^10.0.5: + version "10.6.0" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-10.6.0.tgz#9ec889c48567182ed9e2a56d4335d582ba0bcb6b" + integrity sha512-TxHOnBO5zMo/G76ykzGF/wMpEHu257TbWiIxP9K0Yv/+t70UzgBQiTqjkAsWOPC6jW91DzJI0+ehQV6xDRNBuQ== + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^7.0.3, cross-spawn@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +data-uri-to-buffer@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz#8a58bb67384b261a38ef18bea1810cb01badd28b" + integrity sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== + +debug@4, debug@^4.3.4: + version "4.4.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +degenerator@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-5.0.1.tgz#9403bf297c6dad9a1ece409b37db27954f91f2f5" + integrity sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== + dependencies: + ast-types "^0.13.4" + escodegen "^2.1.0" + esprima "^4.0.1" + +diff@^4.0.1: + version "4.0.4" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.4.tgz#7a6dbfda325f25f07517e9b518f897c08332e07d" + integrity sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dotenv@^8.2.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" + integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== + +ejs@^3.1.7: + version "3.1.10" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.10.tgz#69ab8358b14e896f80cc39e62087b88500c3ac3b" + integrity sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA== + dependencies: + jake "^10.8.5" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enabled@2.0.x: + version "2.0.0" + resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" + integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== + +enquirer@^2.3.6: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + +escalade@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escodegen@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.1.0.tgz#ba93bbb7a43986d29d6041f99f5262da773e2e17" + integrity sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionalDependencies: + source-map "~0.6.1" + +esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.3.3" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-uri@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.1.0.tgz#66eecff6c764c0df9b762e62ca7edcfb53b4edfa" + integrity sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA== + +fastq@^1.6.0: + version "1.20.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.1.tgz#ca750a10dc925bc8b18839fd203e3ef4b3ced675" + integrity sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw== + dependencies: + reusify "^1.0.4" + +fecha@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.3.tgz#4d9ccdbc61e8629b259fdca67e65891448d569fd" + integrity sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw== + +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-stream-rotator@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/file-stream-rotator/-/file-stream-rotator-0.6.1.tgz#007019e735b262bb6c6f0197e58e5c87cb96cec3" + integrity sha512-u+dBid4PvZw17PmDeRcNOtCP9CCK/9lRN2w+r1xIS7yOL9JFrIBKTvrYsxT4P0pGtThYTn++QS5ChHaUov3+zQ== + dependencies: + moment "^2.29.1" + +filelist@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.6.tgz#1e8870942a7c636c862f7c49b9394937b6a995a3" + integrity sha512-5giy2PkLYY1cP39p17Ech+2xlpTRL9HLspOfEgm0L6CwBXBTgsK5ou0JtzYuepxkaQ/tvhCFIJ5uXo0OrM2DxA== + dependencies: + minimatch "^5.0.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +fn.name@1.x.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" + integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== + +foreground-child@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f" + integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw== + dependencies: + cross-spawn "^7.0.6" + signal-exit "^4.0.1" + +fs-extra@^11.3.0: + version "11.3.4" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.4.tgz#ab6934eca8bcf6f7f6b82742e33591f86301d6fc" + integrity sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-uri@^6.0.1: + version "6.0.5" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.5.tgz#714892aa4a871db671abc5395e5e9447bc306a16" + integrity sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg== + dependencies: + basic-ftp "^5.0.2" + data-uri-to-buffer "^6.0.2" + debug "^4.3.4" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@^11.0.1: + version "11.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-11.1.0.tgz#4f826576e4eb99c7dad383793d2f9f08f67e50a6" + integrity sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw== + dependencies: + foreground-child "^3.3.1" + jackspeak "^4.1.1" + minimatch "^10.1.1" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + +glob@^7.1.7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphql@^15.5.0: + version "15.10.2" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.10.2.tgz#f57f8665cea9e77a80264d7eeb0d687079714e78" + integrity sha512-1PRqdDPAmViWr4h1GVBT8RoPZfWSGZa7kDzleTilOfVIslsgf+cia3Nl95v1KDmR4iERPaT7WzQ+tN4MJmbg3w== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +hjson@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/hjson/-/hjson-3.2.2.tgz#a5a81138f4c0bb427e4b2ac917fafd4b454436cf" + integrity sha512-MkUeB0cTIlppeSsndgESkfFD21T2nXPRaBStLtf3cAYA2bVEFdXlodZB0TukwZiobPD1Ksax5DK4RTZeaXCI3Q== + +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +https-proxy-agent@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" + integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== + dependencies: + agent-base "^7.1.2" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^5.2.0, ignore@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inquirer@^7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + +ip-address@^10.0.1: + version "10.1.0" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.1.0.tgz#d8dcffb34d0e02eb241427444a6e23f5b0595aa4" + integrity sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q== + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +jackspeak@^4.1.1: + version "4.2.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.2.3.tgz#27ef80f33b93412037c3bea4f8eddf80e1931483" + integrity sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg== + dependencies: + "@isaacs/cliui" "^9.0.0" + +jake@^10.8.5: + version "10.9.4" + resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.4.tgz#d626da108c63d5cfb00ab5c25fadc7e0084af8e6" + integrity sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA== + dependencies: + async "^3.2.6" + filelist "^1.0.4" + picocolors "^1.1.1" + +js-yaml@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.1.tgz#854c292467705b699476e1a2decc0c8a3458806b" + integrity sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA== + dependencies: + argparse "^2.0.1" + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.2.1.tgz#b6e31717f22cc37330b081ce0051ed5de53af2f6" + integrity sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonschema@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.5.0.tgz#f6aceb1ab9123563dd901d05f81f9d4883d3b7d8" + integrity sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw== + +jsonschema@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" + integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== + +kuler@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" + integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.19, lodash@^4.17.21: + version "4.18.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.18.1.tgz#ff2b66c1f6326d59513de2407bf881439812771c" + integrity sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q== + +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +logform@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.7.0.tgz#cfca97528ef290f2e125a08396805002b2d060d1" + integrity sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ== + dependencies: + "@colors/colors" "1.6.0" + "@types/triple-beam" "^1.3.2" + fecha "^4.2.0" + ms "^2.1.1" + safe-stable-stringify "^2.3.1" + triple-beam "^1.3.0" + +lru-cache@^11.0.0: + version "11.3.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.3.5.tgz#29047d348c0b2793e3112a01c739bb7c6d855637" + integrity sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw== + +lru-cache@^7.14.1: + version "7.18.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.35: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^10.1.1: + version "10.2.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.5.tgz#bd48687a0be38ed2961399105600f832095861d1" + integrity sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg== + dependencies: + brace-expansion "^5.0.5" + +minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" + integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.9" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.9.tgz#1293ef15db0098b394540e8f9f744f9fda8dee4b" + integrity sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw== + dependencies: + brace-expansion "^2.0.1" + +minipass@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.3.tgz#79389b4eb1bb2d003a9bba87d492f2bd37bdc65b" + integrity sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A== + +moment@^2.29.1: + version "2.30.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae" + integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how== + +ms@^2.1.1, ms@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + +netmask@^2.0.2: + version "2.1.1" + resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.1.1.tgz#80043d265b53aa521b3bd01e8fcdf353f9e1e81e" + integrity sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA== + +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-hash@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" + integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +one-time@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45" + integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g== + dependencies: + fn.name "1.x.x" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +ora@^4.0.3: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.1.1.tgz#566cc0348a15c36f5f0e979612842e02ba9dddbc" + integrity sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +pac-proxy-agent@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz#9cfaf33ff25da36f6147a20844230ec92c06e5df" + integrity sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA== + dependencies: + "@tootallnate/quickjs-emscripten" "^0.23.0" + agent-base "^7.1.2" + debug "^4.3.4" + get-uri "^6.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.6" + pac-resolver "^7.0.1" + socks-proxy-agent "^8.0.5" + +pac-resolver@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-7.0.1.tgz#54675558ea368b64d210fd9c92a640b5f3b8abb6" + integrity sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== + dependencies: + degenerator "^5.0.0" + netmask "^2.0.2" + +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-scurry@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.2.tgz#6be0d0ee02a10d9e0de7a98bae65e182c9061f85" + integrity sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601" + integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== + +proxy-agent@^6.3.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-6.5.0.tgz#9e49acba8e4ee234aacb539f89ed9c23d02f232d" + integrity sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + http-proxy-agent "^7.0.1" + https-proxy-agent "^7.0.6" + lru-cache "^7.14.1" + pac-proxy-agent "^7.1.0" + proxy-from-env "^1.1.0" + socks-proxy-agent "^8.0.5" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +punycode@^2.1.0, punycode@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +readable-stream@^3.4.0, readable-stream@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +reusify@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rxjs@^6.6.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-stable-stringify@^2.2.0, safe-stable-stringify@^2.3.1: + version "2.5.0" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^7.5.4, semver@^7.7.1: + version "7.7.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" + integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.5: + version "8.0.5" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz#b9cdb4e7e998509d7659d689ce7697ac21645bee" + integrity sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw== + dependencies: + agent-base "^7.1.2" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.7" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.7.tgz#e2fb1d9a603add75050a2067db8c381a0b5669ea" + integrity sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A== + dependencies: + ip-address "^10.0.1" + smart-buffer "^4.2.0" + +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg== + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/table/-/table-6.9.0.tgz#50040afa6264141c7566b3b81d4d82c47a8668f5" + integrity sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +text-hex@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" + integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +triple-beam@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" + integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== + +ts-node@^10.2.1: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@^1.9.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.1, tslib@^2.6.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +typescript-json-schema@~0.52.0: + version "0.52.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.52.0.tgz#954560ec90e5486e8f7a5b7706ec59286a708e29" + integrity sha512-3ZdHzx116gZ+D9LmMl5/+d1G3Rpt8baWngKzepYWHnXbAa8Winv64CmFRqLlMKneE1c40yugYDFcWdyX1FjGzQ== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/node" "^16.9.2" + glob "^7.1.7" + safe-stable-stringify "^2.2.0" + ts-node "^10.2.1" + typescript "~4.4.4" + yargs "^17.1.1" + +typescript@^4.9.5: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +typescript@~4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" + integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which@^2.0.1, which@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +winston-daily-rotate-file@^4.5.0: + version "4.7.1" + resolved "https://registry.yarnpkg.com/winston-daily-rotate-file/-/winston-daily-rotate-file-4.7.1.tgz#f60a643af87f8867f23170d8cd87dbe3603a625f" + integrity sha512-7LGPiYGBPNyGHLn9z33i96zx/bd71pjBn9tqQzO3I4Tayv94WPmBNwKC7CO1wPHdP9uvu+Md/1nr6VSH9h0iaA== + dependencies: + file-stream-rotator "^0.6.1" + object-hash "^2.0.1" + triple-beam "^1.3.0" + winston-transport "^4.4.0" + +winston-transport@^4.4.0, winston-transport@^4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.9.0.tgz#3bba345de10297654ea6f33519424560003b3bf9" + integrity sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A== + dependencies: + logform "^2.7.0" + readable-stream "^3.6.2" + triple-beam "^1.3.0" + +winston@^3.3.3: + version "3.19.0" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.19.0.tgz#cc1d1262f5f45946904085cfffe73efb4b7a581d" + integrity sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA== + dependencies: + "@colors/colors" "^1.6.0" + "@dabh/diagnostics" "^2.0.8" + async "^3.2.3" + is-stream "^2.0.0" + logform "^2.7.0" + one-time "^1.0.0" + readable-stream "^3.4.0" + safe-stable-stringify "^2.3.1" + stack-trace "0.0.x" + triple-beam "^1.3.0" + winston-transport "^4.9.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaml@1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yaml@^2.2.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.3.tgz#a0d6bd2efb3dd03c59370223701834e60409bd7d" + integrity sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.1.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yauzl@^3.1.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.3.0.tgz#5be5e287b9a8112941c177734a34bf61a3e11bb4" + integrity sha512-PtGEvEP30p7sbIBJKUBjUnqgTVOyMURc4dLo9iNyAJnNIEz9pm88cCXF21w94Kg3k6RXkeZh5DHOGS0qEONvNQ== + dependencies: + buffer-crc32 "~0.2.3" + pend "~1.2.0" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/amplify.state b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/amplify.state new file mode 100644 index 00000000000..f4f664b5257 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/amplify.state @@ -0,0 +1,9 @@ +{ + "pluginId": "amplify-nodejs-function-runtime-provider", + "functionRuntime": "nodejs", + "useLegacyBuild": true, + "defaultEditorFile": "src/index.js", + "scripts": { + "build": "npm install --no-bin-links --production" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/custom-policies.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/custom-policies.json new file mode 100644 index 00000000000..22b177335f0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/custom-policies.json @@ -0,0 +1,18 @@ +[ + { + "Action": ["sns:Publish"], + "Resource": ["*"] + }, + { + "Action": ["dynamodb:Scan", "dynamodb:Query", "dynamodb:GetItem"], + "Resource": [ + { + "Fn::Sub": ["arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", {}] + } + ] + }, + { + "Action": ["sts:GetCallerIdentity"], + "Resource": ["*"] + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/financetracker-cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/financetracker-cloudformation-template.json new file mode 100644 index 00000000000..6dd8bac8d69 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/financetracker-cloudformation-template.json @@ -0,0 +1,391 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"function-Lambda\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "Parameters": { + "CloudWatchRule": { + "Type": "String", + "Default": "NONE", + "Description": " Schedule Expression" + }, + "deploymentBucketName": { + "Type": "String" + }, + "env": { + "Type": "String" + }, + "s3Key": { + "Type": "String" + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Type": "String" + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Type": "String" + }, + "dependsOn": { + "Type": "String", + "Default": "" + }, + "lambdaLayers": { + "Type": "String", + "Default": "" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String", + "Default": "apifinancetrackerGraphQLAPIIdOutput" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "LambdaFunction": { + "Type": "AWS::Lambda::Function", + "Metadata": { + "aws:asset:path": "./src", + "aws:asset:property": "Code" + }, + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "deploymentBucketName" + }, + "S3Key": { + "Ref": "s3Key" + } + }, + "Handler": "index.handler", + "FunctionName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker2ceb6de29", + { + "Fn::Join": [ + "", + [ + "financetracker", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "Environment": { + "Variables": { + "ENV": { + "Ref": "env" + }, + "REGION": { + "Ref": "AWS::Region" + }, + "BUDGET_ALERT_TOPIC_ARN": { + "Ref": "customcustomfinanceBudgetAlertTopicArn" + }, + "MONTHLY_REPORT_TOPIC_ARN": { + "Ref": "customcustomfinanceMonthlyReportTopicArn" + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_NAME": { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_ARN": { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + "API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + } + } + }, + "Role": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Layers": [], + "Timeout": 25 + } + }, + "LambdaExecutionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetrackerLambdaRole96a64165", + { + "Fn::Join": [ + "", + [ + "financetrackerLambdaRole96a64165", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + } + } + }, + "lambdaexecutionpolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": { + "Fn::Sub": [ + "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", + { + "region": { + "Ref": "AWS::Region" + }, + "account": { + "Ref": "AWS::AccountId" + }, + "lambda": { + "Ref": "LambdaFunction" + } + } + ] + } + } + ] + } + } + }, + "AmplifyResourcesPolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "amplify-lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "dynamodb:Put*", + "dynamodb:Create*", + "dynamodb:BatchWriteItem", + "dynamodb:PartiQLInsert", + "dynamodb:Get*", + "dynamodb:BatchGetItem", + "dynamodb:List*", + "dynamodb:Describe*", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:PartiQLSelect", + "dynamodb:Update*", + "dynamodb:RestoreTable*", + "dynamodb:PartiQLUpdate", + "dynamodb:Delete*", + "dynamodb:PartiQLDelete" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "/index/*" + ] + ] + } + ] + } + ] + } + } + }, + "CustomLambdaExecutionPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "custom-lambda-execution-policy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "sns:Publish" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + }, + { + "Action": [ + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:GetItem" + ], + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", + {} + ] + } + ], + "Effect": "Allow" + }, + { + "Action": [ + "sts:GetCallerIdentity" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + } + ] + }, + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ] + }, + "DependsOn": "LambdaExecutionRole" + } + }, + "Outputs": { + "Name": { + "Value": { + "Ref": "LambdaFunction" + } + }, + "Arn": { + "Value": { + "Fn::GetAtt": [ + "LambdaFunction", + "Arn" + ] + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + }, + "LambdaExecutionRole": { + "Value": { + "Ref": "LambdaExecutionRole" + } + }, + "LambdaExecutionRoleArn": { + "Value": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/function-parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/function-parameters.json new file mode 100644 index 00000000000..f6d67716a92 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/function-parameters.json @@ -0,0 +1,23 @@ +{ + "permissions": { + "storage": { + "Transaction:@model(appsync)": [ + "create", + "read", + "update", + "delete" + ] + } + }, + "lambdaLayers": [], + "dependsOn": [ + { + "category": "custom", + "resourceName": "customfinance", + "attributes": [ + "BudgetAlertTopicArn", + "MonthlyReportTopicArn" + ] + } + ] +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/parameters.json new file mode 100644 index 00000000000..0967ef424bc --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/parameters.json @@ -0,0 +1 @@ +{} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/event.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/event.json new file mode 100644 index 00000000000..fd2722e8599 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/event.json @@ -0,0 +1,5 @@ +{ + "key1": "value1", + "key2": "value2", + "key3": "value3" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/index.js b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/index.js new file mode 100644 index 00000000000..519e5e91239 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/index.js @@ -0,0 +1,209 @@ +/* Amplify Params - DO NOT EDIT + API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT + API_FINANCETRACKER_TRANSACTIONTABLE_ARN + API_FINANCETRACKER_TRANSACTIONTABLE_NAME + BUDGET_ALERT_TOPIC_ARN + MONTHLY_REPORT_TOPIC_ARN + ENV + REGION +Amplify Params - DO NOT EDIT */ const { DynamoDBClient } = require('@aws-sdk/client-dynamodb'); +const { DynamoDBDocumentClient, ScanCommand } = require('@aws-sdk/lib-dynamodb'); +const { SNSClient, PublishCommand } = require('@aws-sdk/client-sns'); + +const dynamoClient = new DynamoDBClient({}); +const dynamodb = DynamoDBDocumentClient.from(dynamoClient); +const sns = new SNSClient({}); + +/** + * Calculates totals from an array of transactions. + * Returns { totalIncome, totalExpenses, balance, savingsRate }. + */ +function calculateTotals(transactions) { + const { totalIncome, totalExpenses } = transactions.reduce( + (acc, transaction) => { + if (transaction.type === 'INCOME') { + acc.totalIncome += transaction.amount; + } else if (transaction.type === 'EXPENSE') { + acc.totalExpenses += transaction.amount; + } + return acc; + }, + { totalIncome: 0, totalExpenses: 0 }, + ); + + const balance = totalIncome - totalExpenses; + const savingsRate = totalIncome > 0 ? parseFloat(((balance / totalIncome) * 100).toFixed(2)) : 0; + + return { totalIncome, totalExpenses, balance, savingsRate }; +} + +/** + * Returns the Transaction table name from the environment variable. + * Throws if not configured. + */ +function getTableName() { + const tableName = process.env.API_FINANCETRACKER_TRANSACTIONTABLE_NAME; + if (!tableName || tableName.includes('NONE')) { + throw new Error('Transaction table name is not configured. Check the API_FINANCETRACKER_TRANSACTIONTABLE_NAME environment variable.'); + } + return tableName; +} + +/** + * AppSync GraphQL resolver for calculating financial summary and sending notifications + * @type {import('@types/aws-lambda').AppSyncResolverHandler} + */ +exports.handler = async (event) => { + console.log(`EVENT: ${JSON.stringify(event, null, 2)}`); + + const fieldName = event.info?.fieldName || event.fieldName; + const args = event.arguments || event.args || {}; + + console.log('Field Name:', fieldName); + + try { + switch (fieldName) { + case 'calculateFinancialSummary': + return await calculateSummaryFromDB(); + + case 'sendMonthlyReport': + return await sendMonthlyReport(args); + + case 'sendBudgetAlert': + return await sendBudgetAlert(args); + + default: + throw new Error(`Unknown field: ${fieldName}`); + } + } catch (error) { + console.error('Handler Error:', error); + + // For calculateFinancialSummary, return zeros instead of null to avoid GraphQL errors + if (fieldName === 'calculateFinancialSummary') { + return { totalIncome: 0, totalExpenses: 0, balance: 0, savingsRate: 0 }; + } + + return { success: false, message: `Error: ${error.message}` }; + } +}; + +async function calculateSummaryFromDB() { + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + console.log('Found transactions:', transactions.length); + + const summary = calculateTotals(transactions); + console.log('Calculated summary:', summary); + return summary; +} + +async function sendMonthlyReport(args) { + const email = args.email; + if (!email) { + return { success: false, message: 'Email is required' }; + } + + try { + const topicArn = process.env.MONTHLY_REPORT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Monthly report topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + const summary = calculateTotals(transactions); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: '📊 Your Monthly Financial Report', + Message: `Hello, + +Here is your monthly financial report: + +💰 Total Income: ${summary.totalIncome.toFixed(2)} +💸 Total Expenses: ${summary.totalExpenses.toFixed(2)} +💵 Balance: ${summary.balance.toFixed(2)} +📈 Savings Rate: ${summary.savingsRate}% + +Total Transactions: ${transactions.length} + +This report was generated on ${new Date().toLocaleDateString()}. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + }, + }), + ); + + return { + success: true, + message: `Monthly report sent! Check ${email} for a confirmation email from AWS SNS, then click the button again.`, + }; + } catch (error) { + console.error('Error sending monthly report:', error); + return { success: false, message: `Failed to send report: ${error.message}` }; + } +} + +async function sendBudgetAlert(args) { + const { email, category, exceeded } = args; + + try { + const topicArn = process.env.BUDGET_ALERT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Budget alert topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send( + new ScanCommand({ + TableName: tableName, + FilterExpression: 'category = :category AND #type = :type', + ExpressionAttributeNames: { '#type': 'type' }, + ExpressionAttributeValues: { ':category': category, ':type': 'EXPENSE' }, + }), + ); + + const categoryTransactions = result.Items || []; + const totalSpent = categoryTransactions.reduce((sum, t) => sum + t.amount, 0); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: `⚠️ Budget Alert: ${category}`, + Message: `Hello, + +⚠️ BUDGET ALERT ⚠️ + +You have exceeded your budget for ${category} by ${exceeded.toFixed(2)}. + +Category: ${category} +Total Spent: ${totalSpent.toFixed(2)} +Number of Transactions: ${categoryTransactions.length} + +Consider reviewing your spending in this category. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + category: { DataType: 'String', StringValue: category }, + exceeded: { DataType: 'Number', StringValue: exceeded.toString() }, + }, + }), + ); + + return { success: true, message: 'Budget alert sent successfully!' }; + } catch (error) { + console.error('Error sending budget alert:', error); + return { success: false, message: `Failed to send alert: ${error.message}` }; + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/package.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/package.json new file mode 100644 index 00000000000..41f603c8d52 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/function/financetracker/src/package.json @@ -0,0 +1,10 @@ +{ + "name": "financetracker", + "version": "2.0.0", + "description": "Lambda function generated by Amplify", + "main": "index.js", + "license": "Apache-2.0", + "devDependencies": { + "@types/aws-lambda": "^8.10.92" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/build/cloudformation-template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/build/cloudformation-template.json new file mode 100644 index 00000000000..d9b5969f570 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/build/cloudformation-template.json @@ -0,0 +1,637 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"storage-S3\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "bucketName": { + "Type": "String" + }, + "authRoleName": { + "Type": "String" + }, + "unauthRoleName": { + "Type": "String" + }, + "authPolicyName": { + "Type": "String" + }, + "unauthPolicyName": { + "Type": "String" + }, + "s3PublicPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PrivatePolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ProtectedPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3UploadsPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ReadPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PermissionsAuthenticatedPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedProtected": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedPrivate": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "AuthenticatedAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "GuestAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "selectedGuestPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + }, + "selectedAuthenticatedPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + }, + "CreateAuthPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthProtected": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedProtected" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthPrivate": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPrivate" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedUploads" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestUploads" + }, + "DISALLOW" + ] + } + ] + }, + "AuthReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "AuthenticatedAllowList" + }, + "DISALLOW" + ] + } + ] + }, + "GuestReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "GuestAllowList" + }, + "DISALLOW" + ] + } + ] + } + }, + "Outputs": { + "BucketName": { + "Description": "Bucket name for the S3 bucket", + "Value": { + "Ref": "S3Bucket" + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + } + }, + "Resources": { + "S3Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "bucketName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "bucketName" + }, + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "GET", + "HEAD", + "PUT", + "POST", + "DELETE" + ], + "AllowedOrigins": [ + "*" + ], + "ExposedHeaders": [ + "x-amz-server-side-encryption", + "x-amz-request-id", + "x-amz-id-2", + "ETag" + ], + "Id": "S3CORSRuleId1", + "MaxAge": 3000 + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "S3AuthPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPublic" + }, + "S3AuthProtectedPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedProtected" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3ProtectedPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthProtected" + }, + "S3AuthPrivatePolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPrivate" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/private/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PrivatePolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPrivate" + }, + "S3AuthUploadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedUploads" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/uploads/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3UploadsPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthUploads" + }, + "S3GuestPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsGuestPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateGuestPublic" + }, + "S3AuthReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*", + "private/${cognito-identity.amazonaws.com:sub}/", + "private/${cognito-identity.amazonaws.com:sub}/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "AuthReadAndList" + }, + "S3GuestReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "GuestReadAndList" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/build/parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/build/parameters.json new file mode 100644 index 00000000000..cf45d8d48ff --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/build/parameters.json @@ -0,0 +1,34 @@ +{ + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "selectedGuestPermissions": [ + "s3:GetObject", + "s3:ListBucket" + ], + "selectedAuthenticatedPermissions": [ + "s3:PutObject", + "s3:GetObject", + "s3:ListBucket", + "s3:DeleteObject" + ], + "unauthRoleName": { + "Ref": "UnauthRoleName" + }, + "authRoleName": { + "Ref": "AuthRoleName" + }, + "s3PrivatePolicy": "Private_policy_20279658", + "s3ProtectedPolicy": "Protected_policy_20279658", + "s3PublicPolicy": "Public_policy_20279658", + "s3ReadPolicy": "read_policy_20279658", + "s3UploadsPolicy": "Uploads_policy_20279658", + "authPolicyName": "s3_amplify_20279658", + "unauthPolicyName": "s3_amplify_20279658", + "AuthenticatedAllowList": "ALLOW", + "GuestAllowList": "ALLOW", + "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedUploads": "s3:PutObject", + "s3PermissionsGuestPublic": "s3:GetObject", + "s3PermissionsGuestUploads": "DISALLOW" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/cli-inputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/cli-inputs.json new file mode 100644 index 00000000000..ceeb0108d90 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/storage/s320279658/cli-inputs.json @@ -0,0 +1,16 @@ +{ + "resourceName": "s320279658", + "policyUUID": "20279658", + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "storageAccess": "authAndGuest", + "guestAccess": [ + "READ" + ], + "authAccess": [ + "CREATE_AND_UPDATE", + "READ", + "DELETE" + ], + "triggerFunction": "NONE", + "groupAccess": {} +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/tags.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/tags.json new file mode 100644 index 00000000000..71f6abe11a6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/tags.json @@ -0,0 +1,10 @@ +[ + { + "Key": "user:Stack", + "Value": "{project-env}" + }, + { + "Key": "user:Application", + "Value": "{project-name}" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/types/amplify-dependent-resources-ref.d.ts new file mode 100644 index 00000000000..5c1c1d0b166 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/backend/types/amplify-dependent-resources-ref.d.ts @@ -0,0 +1,45 @@ +export type AmplifyDependentResourcesAttributes = { + "api": { + "financetracker": { + "GraphQLAPIEndpointOutput": "string", + "GraphQLAPIIdOutput": "string", + "GraphQLAPIKeyOutput": "string" + } + }, + "auth": { + "financetracker331811e6": { + "AppClientID": "string", + "AppClientIDWeb": "string", + "IdentityPoolId": "string", + "IdentityPoolName": "string", + "UserPoolArn": "string", + "UserPoolId": "string", + "UserPoolName": "string" + } + }, + "custom": { + "customfinance": { + "BudgetAlertTopicArn": "string", + "MonthlyReportTopicArn": "string" + }, + "customresolver": { + "DataSourceName": "string", + "ResolverArn": "string" + } + }, + "function": { + "financetracker": { + "Arn": "string", + "LambdaExecutionRole": "string", + "LambdaExecutionRoleArn": "string", + "Name": "string", + "Region": "string" + } + }, + "storage": { + "s320279658": { + "BucketName": "string", + "Region": "string" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/cli.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/cli.json new file mode 100644 index 00000000000..6991bfaca44 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/cli.json @@ -0,0 +1,65 @@ +{ + "features": { + "graphqltransformer": { + "addmissingownerfields": true, + "improvepluralization": false, + "validatetypenamereservedwords": true, + "useexperimentalpipelinedtransformer": true, + "enableiterativegsiupdates": true, + "secondarykeyasgsi": true, + "skipoverridemutationinputtypes": true, + "transformerversion": 2, + "suppressschemamigrationprompt": true, + "securityenhancementnotification": false, + "showfieldauthnotification": false, + "usesubusernamefordefaultidentityclaim": true, + "usefieldnameforprimarykeyconnectionfield": false, + "enableautoindexquerynames": true, + "respectprimarykeyattributesonconnectionfield": true, + "shoulddeepmergedirectiveconfigdefaults": false, + "populateownerfieldforstaticgroupauth": true, + "subscriptionsinheritprimaryauth": false, + "enablegen2migration": false + }, + "frontend-ios": { + "enablexcodeintegration": true + }, + "auth": { + "enablecaseinsensitivity": true, + "useinclusiveterminology": true, + "breakcirculardependency": true, + "forcealiasattributes": false, + "useenabledmfas": true + }, + "codegen": { + "useappsyncmodelgenplugin": true, + "usedocsgeneratorplugin": true, + "usetypesgeneratorplugin": true, + "cleangeneratedmodelsdirectory": true, + "retaincasestyle": true, + "addtimestampfields": true, + "handlelistnullabilitytransparently": true, + "emitauthprovider": true, + "generateindexrules": true, + "enabledartnullsafety": true, + "generatemodelsforlazyloadandcustomselectionset": false + }, + "appsync": { + "generategraphqlpermissions": true + }, + "latestregionsupport": { + "pinpoint": 1, + "translate": 1, + "transcribe": 1, + "rekognition": 1, + "textract": 1, + "comprehend": 1 + }, + "project": { + "overrides": true + } + }, + "debug": { + "shareProjectConfig": false + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/hooks/README.md b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/hooks/README.md new file mode 100644 index 00000000000..8fb601eaebe --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/hooks/README.md @@ -0,0 +1,7 @@ +# Command Hooks + +Command hooks can be used to run custom scripts upon Amplify CLI lifecycle events like pre-push, post-add-function, etc. + +To get started, add your script files based on the expected naming convention in this directory. + +Learn more about the script file naming convention, hook parameters, third party dependencies, and advanced configurations at https://docs.amplify.aws/cli/usage/command-hooks diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/team-provider-info.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/team-provider-info.json new file mode 100644 index 00000000000..b5c77254a9a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/amplify/team-provider-info.json @@ -0,0 +1,36 @@ +{ + "x": { + "awscloudformation": { + "AuthRoleName": "amplify-financetracker-x-x-authRole", + "UnauthRoleArn": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-unauthRole", + "AuthRoleArn": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-authRole", + "Region": "us-east-1", + "DeploymentBucketName": "amplify-financetracker-x-x-deployment", + "UnauthRoleName": "amplify-financetracker-x-x-unauthRole", + "StackName": "amplify-financetracker-x-x", + "StackId": "arn:aws:cloudformation:us-east-1:123456789012:stack/amplify-financetracker-x-x/b5b77e20-3f49-11f1-aca5-1262955767e1", + "AmplifyAppId": "financetracker" + }, + "categories": { + "auth": { + "financetracker331811e6": {} + }, + "function": { + "financetracker": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip" + } + }, + "api": { + "financetracker": {} + }, + "custom": { + "customfinance": {}, + "customresolver": {} + }, + "storage": { + "s320279658": {} + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/package.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/package.json new file mode 100644 index 00000000000..02f95dbf6d0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.generate/package.json @@ -0,0 +1,50 @@ +{ + "name": "@amplify-migration-apps/finance-tracker-snapshot", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview", + "configure": "./backend/configure.sh", + "sanitize": "tsx ../sanitize.ts", + "normalize": "tsx ../normalize.ts", + "typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit", + "pre-push": "npx tsx migration/pre-push.ts", + "post-generate": "npx tsx migration/post-generate.ts", + "post-refactor": "true", + "post-sandbox": "true", + "pre-sandbox": "true", + "post-push": "true", + "test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose", + "test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose", + "test:shared-data": "true", + "test:e2e": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app finance-tracker --profile ${AWS_PROFILE:-default}", + "deploy": "cd ../../packages/amplify-gen2-migration-e2e-system && npx tsx src/cli.ts --app finance-tracker --step deploy --profile ${AWS_PROFILE:-default}" + }, + "dependencies": { + "aws-amplify": "^6.0.0", + "react": "^19.2.0", + "react-dom": "^19.2.0" + }, + "devDependencies": { + "@aws-sdk/client-cognito-identity-provider": "^3.936.0", + "@eslint/js": "^9.39.1", + "@types/jest": "^29.5.14", + "@types/node": "^24.10.1", + "@types/react": "^19.2.5", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.1.1", + "eslint": "^9.39.1", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.5.0", + "jest": "^29.7.0", + "ts-jest": "^29.3.4", + "typescript": "~5.9.3", + "typescript-eslint": "^8.46.4", + "vite": "^7.2.4" + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.description.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.description.txt @@ -0,0 +1 @@ + diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.outputs.json new file mode 100644 index 00000000000..b41712f3dbf --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.outputs.json @@ -0,0 +1,6 @@ +[ + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEvent461D7D58Arn", + "OutputValue": "arn:aws:lambda:us-east-1:123456789012:function:amplify-financetra2604231-TableManagerCustomProvid-bzPcdg49TDmM" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.parameters.json new file mode 100644 index 00000000000..10d35b0f74a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.parameters.json @@ -0,0 +1,6 @@ +[ + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "ParameterValue": "iltux4eqlfcblbluzjzhytjruu" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.template.json new file mode 100644 index 00000000000..1665ab51b63 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataAmplifyTableManagerNestedStackA-x.template.json @@ -0,0 +1,787 @@ +{ + "Resources": { + "AmplifyManagedTableIsCompleteRoleF825222C": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ], + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:CreateTable", + "dynamodb:UpdateTable", + "dynamodb:DeleteTable", + "dynamodb:DescribeTable", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeTimeToLive", + "dynamodb:UpdateContinuousBackups", + "dynamodb:UpdateTimeToLive", + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:ListTagsOfResource" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", + { + "apiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "envName": "NONE" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}", + { + "tableName": "Transaction-adetddan7nd55gwre37yyck3vu-x" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}", + { + "tableName": "Budget-adetddan7nd55gwre37yyck3vu-x" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}", + { + "tableName": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x" + } + ] + } + ] + }, + { + "Action": "lambda:ListTags", + "Effect": "Allow", + "Resource": { + "Fn::Sub": [ + "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:*TableManager*", + {} + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CreateUpdateDeleteTablesPolicy" + } + ], + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/AmplifyManagedTableIsCompleteRole/Resource" + } + }, + "AmplifyManagedTableOnEventRoleB4E71DEA": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ], + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:CreateTable", + "dynamodb:UpdateTable", + "dynamodb:DeleteTable", + "dynamodb:DescribeTable", + "dynamodb:DescribeContinuousBackups", + "dynamodb:DescribeTimeToLive", + "dynamodb:UpdateContinuousBackups", + "dynamodb:UpdateTimeToLive", + "dynamodb:TagResource", + "dynamodb:UntagResource", + "dynamodb:ListTagsOfResource" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*-${apiId}-${envName}", + { + "apiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "envName": "NONE" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}", + { + "tableName": "Transaction-adetddan7nd55gwre37yyck3vu-x" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}", + { + "tableName": "Budget-adetddan7nd55gwre37yyck3vu-x" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tableName}", + { + "tableName": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x" + } + ] + } + ] + }, + { + "Action": "lambda:ListTags", + "Effect": "Allow", + "Resource": { + "Fn::Sub": [ + "arn:${AWS::Partition}:lambda:${AWS::Region}:${AWS::AccountId}:function:*TableManager*", + {} + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CreateUpdateDeleteTablesPolicy" + } + ], + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/AmplifyManagedTableOnEventRole/Resource" + } + }, + "AmplifyManagedTableOnEventRoleDefaultPolicyF6DABCB6": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "states:StartExecution", + "Effect": "Allow", + "Resource": { + "Ref": "AmplifyTableWaiterStateMachine060600BC" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AmplifyManagedTableOnEventRoleDefaultPolicyF6DABCB6", + "Roles": [ + { + "Ref": "AmplifyManagedTableOnEventRoleB4E71DEA" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/AmplifyManagedTableOnEventRole/DefaultPolicy/Resource" + } + }, + "TableManagerCustomProviderframeworkonEvent1DFC2ECC": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "f2c5bec0e463cae18d0bf683be5923ae6bd676a06af1a994bdfa076a66ac07d6.zip" + }, + "Description": "AmplifyManagedTable - onEvent (amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", + "Environment": { + "Variables": { + "WAITER_STATE_MACHINE_ARN": { + "Ref": "AmplifyTableWaiterStateMachine060600BC" + } + } + }, + "Handler": "amplify-table-manager-handler.onEvent", + "Role": { + "Fn::GetAtt": [ + "AmplifyManagedTableOnEventRoleB4E71DEA", + "Arn" + ] + }, + "Runtime": "nodejs24.x", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "Timeout": 840 + }, + "DependsOn": [ + "AmplifyManagedTableOnEventRoleDefaultPolicyF6DABCB6", + "AmplifyManagedTableOnEventRoleB4E71DEA" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider/framework-onEvent/Resource", + "aws:asset:path": "asset.f2c5bec0e463cae18d0bf683be5923ae6bd676a06af1a994bdfa076a66ac07d6", + "aws:asset:is-bundled": false, + "aws:asset:property": "Code" + } + }, + "TableManagerCustomProviderframeworkisComplete2E51021B": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "f2c5bec0e463cae18d0bf683be5923ae6bd676a06af1a994bdfa076a66ac07d6.zip" + }, + "Description": "AmplifyManagedTable - isComplete (amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider)", + "Handler": "amplify-table-manager-handler.isComplete", + "Role": { + "Fn::GetAtt": [ + "AmplifyManagedTableIsCompleteRoleF825222C", + "Arn" + ] + }, + "Runtime": "nodejs24.x", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "Timeout": 840 + }, + "DependsOn": [ + "AmplifyManagedTableIsCompleteRoleF825222C" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/TableManagerCustomProvider/framework-isComplete/Resource", + "aws:asset:path": "asset.f2c5bec0e463cae18d0bf683be5923ae6bd676a06af1a994bdfa076a66ac07d6", + "aws:asset:is-bundled": false, + "aws:asset:property": "Code" + } + }, + "AmplifyTableWaiterStateMachineRole470BE899": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "states.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/AmplifyTableWaiterStateMachine/Role/Resource" + } + }, + "AmplifyTableWaiterStateMachineRoleDefaultPolicy89F3836A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "TableManagerCustomProviderframeworkisComplete2E51021B", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "TableManagerCustomProviderframeworkisComplete2E51021B", + "Arn" + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "AmplifyTableWaiterStateMachineRoleDefaultPolicy89F3836A", + "Roles": [ + { + "Ref": "AmplifyTableWaiterStateMachineRole470BE899" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/AmplifyTableWaiterStateMachine/Role/DefaultPolicy/Resource" + } + }, + "AmplifyTableWaiterStateMachine060600BC": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"framework-isComplete-task\",\"States\":{\"framework-isComplete-task\":{\"End\":true,\"Retry\":[{\"ErrorEquals\":[\"States.ALL\"],\"IntervalSeconds\":10,\"MaxAttempts\":360,\"BackoffRate\":1}],\"Type\":\"Task\",\"Resource\":\"", + { + "Fn::GetAtt": [ + "TableManagerCustomProviderframeworkisComplete2E51021B", + "Arn" + ] + }, + "\"}}}" + ] + ] + }, + "RoleArn": { + "Fn::GetAtt": [ + "AmplifyTableWaiterStateMachineRole470BE899", + "Arn" + ] + } + }, + "DependsOn": [ + "AmplifyTableWaiterStateMachineRoleDefaultPolicy89F3836A", + "AmplifyTableWaiterStateMachineRole470BE899" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/AmplifyTableWaiterStateMachine/Resource" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/zWOQQqDMBBFz9J9nIrSA9RCl6XoAWRMphKNCThJpYTcvUTb1fuft/i/gupSQnnCjQup5sLoAeKD2JPqPMpZ4MZ91LhAbJ0hcXvZnU9ntPzkeqQkDC6DQoj3YKXXzmb3z0lw3SMzeYZrhuAamiBn8g0yJdESu7BKErvtPI7ajvvYTyRhnSKY+PyuSqjy5Ym1LtZgvV4I2oNf+LE3Bc8AAAA=" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Type": "String" + } + }, + "Outputs": { + "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEvent461D7D58Arn": { + "Value": { + "Fn::GetAtt": [ + "TableManagerCustomProviderframeworkonEvent1DFC2ECC", + "Arn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.description.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.description.txt @@ -0,0 +1 @@ + diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.outputs.json new file mode 100644 index 00000000000..e88eca2bcb0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.outputs.json @@ -0,0 +1,14 @@ +[ + { + "OutputKey": "GetAttBudgetTableStreamArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Budget-adetddan7nd55gwre37yyck3vu-x/stream/2026-04-23T19:25:17.433", + "Description": "Your DynamoDB table StreamArn.", + "ExportName": "iltux4eqlfcblbluzjzhytjruu:GetAtt:BudgetTable:StreamArn" + }, + { + "OutputKey": "GetAttBudgetTableName", + "OutputValue": "Budget-adetddan7nd55gwre37yyck3vu-x", + "Description": "Your DynamoDB table name.", + "ExportName": "iltux4eqlfcblbluzjzhytjruu:GetAtt:BudgetTable:Name" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.parameters.json new file mode 100644 index 00000000000..633cd20f556 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.parameters.json @@ -0,0 +1,46 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "true" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthauthenticatedU-mtMR6VW2YKH5" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref", + "ParameterValue": "us-east-1:ccae5924-7e98-4b8f-bf21-ac09c945a04b" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "ParameterValue": "iltux4eqlfcblbluzjzhytjruu" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3", + "ParameterValue": "arn:aws:lambda:us-east-1:123456789012:function:amplify-financetra2604231-TableManagerCustomProvid-bzPcdg49TDmM" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthunauthenticate-rSgiGOevcLBc" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.template.json new file mode 100644 index 00000000000..004863cc84e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataBudgetNestedStackBudgetNestedSt-x.template.json @@ -0,0 +1,2128 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + "NONE", + "NONE" + ] + } + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + }, + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Resources": { + "BudgetTable": { + "Type": "Custom::ImportedAmplifyDynamoDBTable", + "Properties": { + "ServiceToken": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3" + }, + "tableName": "Budget-adetddan7nd55gwre37yyck3vu-x", + "attributeDefinitions": [ + { + "attributeName": "id", + "attributeType": "S" + } + ], + "keySchema": [ + { + "attributeName": "id", + "keyType": "HASH" + } + ], + "provisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "sseSpecification": { + "sseEnabled": false + }, + "streamSpecification": { + "streamViewType": "NEW_AND_OLD_IMAGES" + }, + "deletionProtectionEnabled": true, + "allowDestructiveGraphqlSchemaUpdates": true, + "replaceTableUponGsiUpdate": false, + "isImported": true, + "pointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "billingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/BudgetTable/Default/Default" + } + }, + "BudgetIAMRole782EC899": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": "Budget-adetddan7nd55gwre37yyck3vu-x" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": "Budget-adetddan7nd55gwre37yyck3vu-x" + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "BudgetIAMRole3af77f-", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "-NONE" + ] + ] + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/BudgetIAMRole/Resource" + } + }, + "BudgetDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "BudgetTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + } + }, + "Name": "BudgetTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "BudgetIAMRole782EC899", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "BudgetIAMRole782EC899" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/BudgetDataSource/Resource" + } + }, + "QuerygetBudgetauth0FunctionQuerygetBudgetauth0FunctionAppSyncFunctionAD8C10F2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b3e5411cda152c2308dac0a81ffb999cc9c81ea2a1f51e6ce05a377bef8c4dfd.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/QuerygetBudgetauth0Function/QuerygetBudgetauth0Function.AppSyncFunction" + } + }, + "QuerygetBudgetpostAuth0FunctionQuerygetBudgetpostAuth0FunctionAppSyncFunction25B66B0F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetBudgetpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/QuerygetBudgetpostAuth0Function/QuerygetBudgetpostAuth0Function.AppSyncFunction" + } + }, + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" + } + }, + "DependsOn": [ + "BudgetDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/QueryGetBudgetDataResolverFn/QueryGetBudgetDataResolverFn.AppSyncFunction" + } + }, + "GetBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "getBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetBudgetauth0FunctionQuerygetBudgetauth0FunctionAppSyncFunctionAD8C10F2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetBudgetpostAuth0FunctionQuerygetBudgetpostAuth0FunctionAppSyncFunction25B66B0F", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "BudgetTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/queryGetBudgetResolver" + } + }, + "QuerylistBudgetsauth0FunctionQuerylistBudgetsauth0FunctionAppSyncFunction9A43EAA4": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerylistBudgetsauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b3e5411cda152c2308dac0a81ffb999cc9c81ea2a1f51e6ce05a377bef8c4dfd.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/QuerylistBudgetsauth0Function/QuerylistBudgetsauth0Function.AppSyncFunction" + } + }, + "QuerylistBudgetspostAuth0FunctionQuerylistBudgetspostAuth0FunctionAppSyncFunction47CF03B3": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerylistBudgetspostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/QuerylistBudgetspostAuth0Function/QuerylistBudgetspostAuth0Function.AppSyncFunction" + } + }, + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListBudgetsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9fcbe070ecd3023c5bf5b966fa9584757db9762eef123bad0820bd87591b2174.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" + } + }, + "DependsOn": [ + "BudgetDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/QueryListBudgetsDataResolverFn/QueryListBudgetsDataResolverFn.AppSyncFunction" + } + }, + "ListBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "listBudgets", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerylistBudgetsauth0FunctionQuerylistBudgetsauth0FunctionAppSyncFunction9A43EAA4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerylistBudgetspostAuth0FunctionQuerylistBudgetspostAuth0FunctionAppSyncFunction47CF03B3", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listBudgets\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "BudgetTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/queryListBudgetsResolver" + } + }, + "MutationcreateBudgetinit0FunctionMutationcreateBudgetinit0FunctionAppSyncFunction9E9E3E78": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateBudgetinit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a183ddccbd956316c38ef97177b8f088ef0826f62023323f5ae6053d348ccffc.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationcreateBudgetinit0Function/MutationcreateBudgetinit0Function.AppSyncFunction" + } + }, + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/91ebeb59aea38b515bf310f6fd5135dac2d5467c6c56d0e87c02025be01e936f.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationcreateBudgetauth0Function/MutationcreateBudgetauth0Function.AppSyncFunction" + } + }, + "MutationcreateBudgetpostAuth0FunctionMutationcreateBudgetpostAuth0FunctionAppSyncFunction7FA5D536": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateBudgetpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationcreateBudgetpostAuth0Function/MutationcreateBudgetpostAuth0Function.AppSyncFunction" + } + }, + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fdaf3cc3b1a5888084ab4ee2e57b95e1f55a8aeefbe22f8268bae7681ac04a0e.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "BudgetDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationCreateBudgetDataResolverFn/MutationCreateBudgetDataResolverFn.AppSyncFunction" + } + }, + "CreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "createBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationcreateBudgetinit0FunctionMutationcreateBudgetinit0FunctionAppSyncFunction9E9E3E78", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateBudgetpostAuth0FunctionMutationcreateBudgetpostAuth0FunctionAppSyncFunction7FA5D536", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "BudgetTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/mutationCreateBudgetResolver" + } + }, + "MutationupdateBudgetinit0FunctionMutationupdateBudgetinit0FunctionAppSyncFunction123D5065": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateBudgetinit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationupdateBudgetinit0Function/MutationupdateBudgetinit0Function.AppSyncFunction" + } + }, + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/8e869800b3376e6f4ed7ef1119081db2aa82ecdd3fe53b3a50d54c9e7222688d.vtl" + } + }, + "DependsOn": [ + "BudgetDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationupdateBudgetauth0Function/MutationupdateBudgetauth0Function.AppSyncFunction" + } + }, + "MutationupdateBudgetpostAuth0FunctionMutationupdateBudgetpostAuth0FunctionAppSyncFunction69957D2E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateBudgetpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationupdateBudgetpostAuth0Function/MutationupdateBudgetpostAuth0Function.AppSyncFunction" + } + }, + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "BudgetDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationUpdateBudgetDataResolverFn/MutationUpdateBudgetDataResolverFn.AppSyncFunction" + } + }, + "UpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "updateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationupdateBudgetinit0FunctionMutationupdateBudgetinit0FunctionAppSyncFunction123D5065", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateBudgetpostAuth0FunctionMutationupdateBudgetpostAuth0FunctionAppSyncFunction69957D2E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "BudgetTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/mutationUpdateBudgetResolver" + } + }, + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6257bfd1ef2992bd01df135516c0df15c5ff692f426e0c71c93960be8f8c81df.vtl" + } + }, + "DependsOn": [ + "BudgetDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationdeleteBudgetauth0Function/MutationdeleteBudgetauth0Function.AppSyncFunction" + } + }, + "MutationdeleteBudgetpostAuth0FunctionMutationdeleteBudgetpostAuth0FunctionAppSyncFunction5E92BB6B": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteBudgetpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationdeleteBudgetpostAuth0Function/MutationdeleteBudgetpostAuth0Function.AppSyncFunction" + } + }, + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "BudgetDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/MutationDeleteBudgetDataResolverFn/MutationDeleteBudgetDataResolverFn.AppSyncFunction" + } + }, + "DeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "deleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationdeleteBudgetpostAuth0FunctionMutationdeleteBudgetpostAuth0FunctionAppSyncFunction5E92BB6B", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "BudgetTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/mutationDeleteBudgetResolver" + } + }, + "SubscriptiononCreateBudgetauth0FunctionSubscriptiononCreateBudgetauth0FunctionAppSyncFunction29B75166": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptiononCreateBudgetauth0Function/SubscriptiononCreateBudgetauth0Function.AppSyncFunction" + } + }, + "SubscriptiononCreateBudgetpostAuth0FunctionSubscriptiononCreateBudgetpostAuth0FunctionAppSyncFunction2FBBAEC5": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateBudgetpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptiononCreateBudgetpostAuth0Function/SubscriptiononCreateBudgetpostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnCreateBudgetDataResolverFnSubscriptionOnCreateBudgetDataResolverFnAppSyncFunction5EE48082": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnCreateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptionOnCreateBudgetDataResolverFn/SubscriptionOnCreateBudgetDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononCreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onCreateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateBudgetauth0FunctionSubscriptiononCreateBudgetauth0FunctionAppSyncFunction29B75166", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononCreateBudgetpostAuth0FunctionSubscriptiononCreateBudgetpostAuth0FunctionAppSyncFunction2FBBAEC5", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateBudgetDataResolverFnSubscriptionOnCreateBudgetDataResolverFnAppSyncFunction5EE48082", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/subscriptionOnCreateBudgetResolver" + } + }, + "SubscriptiononUpdateBudgetauth0FunctionSubscriptiononUpdateBudgetauth0FunctionAppSyncFunctionF6F445C1": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononUpdateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptiononUpdateBudgetauth0Function/SubscriptiononUpdateBudgetauth0Function.AppSyncFunction" + } + }, + "SubscriptiononUpdateBudgetpostAuth0FunctionSubscriptiononUpdateBudgetpostAuth0FunctionAppSyncFunction52193120": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononUpdateBudgetpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptiononUpdateBudgetpostAuth0Function/SubscriptiononUpdateBudgetpostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnUpdateBudgetDataResolverFnSubscriptionOnUpdateBudgetDataResolverFnAppSyncFunction53B4A16E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnUpdateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptionOnUpdateBudgetDataResolverFn/SubscriptionOnUpdateBudgetDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononUpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onUpdateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononUpdateBudgetauth0FunctionSubscriptiononUpdateBudgetauth0FunctionAppSyncFunctionF6F445C1", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononUpdateBudgetpostAuth0FunctionSubscriptiononUpdateBudgetpostAuth0FunctionAppSyncFunction52193120", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnUpdateBudgetDataResolverFnSubscriptionOnUpdateBudgetDataResolverFnAppSyncFunction53B4A16E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/subscriptionOnUpdateBudgetResolver" + } + }, + "SubscriptiononDeleteBudgetauth0FunctionSubscriptiononDeleteBudgetauth0FunctionAppSyncFunctionFE073187": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononDeleteBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptiononDeleteBudgetauth0Function/SubscriptiononDeleteBudgetauth0Function.AppSyncFunction" + } + }, + "SubscriptiononDeleteBudgetpostAuth0FunctionSubscriptiononDeleteBudgetpostAuth0FunctionAppSyncFunctionC39F3F82": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononDeleteBudgetpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptiononDeleteBudgetpostAuth0Function/SubscriptiononDeleteBudgetpostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnDeleteBudgetDataResolverFnSubscriptionOnDeleteBudgetDataResolverFnAppSyncFunction7B58ABFC": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnDeleteBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/SubscriptionOnDeleteBudgetDataResolverFn/SubscriptionOnDeleteBudgetDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononDeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onDeleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononDeleteBudgetauth0FunctionSubscriptiononDeleteBudgetauth0FunctionAppSyncFunctionFE073187", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononDeleteBudgetpostAuth0FunctionSubscriptiononDeleteBudgetpostAuth0FunctionAppSyncFunctionC39F3F82", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnDeleteBudgetDataResolverFnSubscriptionOnDeleteBudgetDataResolverFnAppSyncFunction7B58ABFC", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/subscriptionOnDeleteBudgetResolver" + } + }, + "BudgetOwnerDataResolverFnBudgetOwnerDataResolverFnAppSyncFunction6264B211": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "BudgetOwnerDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/041534e5fd916595f752318f161512d7c7f83b9f2cf32d0f0be381c12253ff68.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/064303962e481067b44300212516363b99aaee539b6bafaf756fdd83ff0b60f0.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/BudgetOwnerDataResolverFn/BudgetOwnerDataResolverFn.AppSyncFunction" + } + }, + "BudgetownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "BudgetOwnerDataResolverFnBudgetOwnerDataResolverFnAppSyncFunction6264B211", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Budget\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Budget" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/budgetOwnerResolver" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/1WQ0W6DMAxFv2XvIUNU+4AVtMd1gr1XJjEoJTgodlpViH+fQqdOe7q+ulf2kStdvZW6fIEbF8ZOhXe9Xj+RBW0nYCZVD/QFEWYUjNnUgawTF0i1yCFFg6pOLGH+swM9Z7jxebV3gjnYXn9D7/EIjMrBrNc2+Ec7eNwULAvfyei12etN34BA91z5330kMhmiDjS4MUXYiX4v+yvGTfHhDMworN+zKD7oYzITSgbYcveUZEmi9rgTGB2Nm6JgUV/49VqVusqfubBzRUwkbkbdPvQHoS7ZBTYBAAA=" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Outputs": { + "GetAttBudgetTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "BudgetTable", + "TableStreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "GetAtt:BudgetTable:StreamArn" + ] + ] + } + } + }, + "GetAttBudgetTableName": { + "Description": "Your DynamoDB table name.", + "Value": "Budget-adetddan7nd55gwre37yyck3vu-x", + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "GetAtt:BudgetTable:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.description.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.description.txt @@ -0,0 +1 @@ + diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.outputs.json new file mode 100644 index 00000000000..7c36d293324 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.outputs.json @@ -0,0 +1,14 @@ +[ + { + "OutputKey": "GetAttFinancialSummaryTableName", + "OutputValue": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x", + "Description": "Your DynamoDB table name.", + "ExportName": "iltux4eqlfcblbluzjzhytjruu:GetAtt:FinancialSummaryTable:Name" + }, + { + "OutputKey": "GetAttFinancialSummaryTableStreamArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/FinancialSummary-adetddan7nd55gwre37yyck3vu-x/stream/2026-04-23T19:25:17.489", + "Description": "Your DynamoDB table StreamArn.", + "ExportName": "iltux4eqlfcblbluzjzhytjruu:GetAtt:FinancialSummaryTable:StreamArn" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.parameters.json new file mode 100644 index 00000000000..633cd20f556 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.parameters.json @@ -0,0 +1,46 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "true" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthauthenticatedU-mtMR6VW2YKH5" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref", + "ParameterValue": "us-east-1:ccae5924-7e98-4b8f-bf21-ac09c945a04b" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "ParameterValue": "iltux4eqlfcblbluzjzhytjruu" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3", + "ParameterValue": "arn:aws:lambda:us-east-1:123456789012:function:amplify-financetra2604231-TableManagerCustomProvid-bzPcdg49TDmM" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthunauthenticate-rSgiGOevcLBc" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.template.json new file mode 100644 index 00000000000..5ff83a40b49 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFinancialSummaryNestedStackFina-x.template.json @@ -0,0 +1,2128 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + "NONE", + "NONE" + ] + } + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + }, + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Resources": { + "FinancialSummaryTable": { + "Type": "Custom::ImportedAmplifyDynamoDBTable", + "Properties": { + "ServiceToken": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3" + }, + "tableName": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x", + "attributeDefinitions": [ + { + "attributeName": "id", + "attributeType": "S" + } + ], + "keySchema": [ + { + "attributeName": "id", + "keyType": "HASH" + } + ], + "provisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "sseSpecification": { + "sseEnabled": false + }, + "streamSpecification": { + "streamViewType": "NEW_AND_OLD_IMAGES" + }, + "deletionProtectionEnabled": true, + "allowDestructiveGraphqlSchemaUpdates": true, + "replaceTableUponGsiUpdate": false, + "isImported": true, + "pointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "billingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/FinancialSummaryTable/Default/Default" + } + }, + "FinancialSummaryIAMRole994EE173": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x" + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "FinancialSummaryIAMRedd6e3-", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "-NONE" + ] + ] + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/FinancialSummaryIAMRole/Resource" + } + }, + "FinancialSummaryDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + } + }, + "Name": "FinancialSummaryTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancialSummaryIAMRole994EE173", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "FinancialSummaryIAMRole994EE173" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/FinancialSummaryDataSource/Resource" + } + }, + "QuerygetFinancialSummaryauth0FunctionQuerygetFinancialSummaryauth0FunctionAppSyncFunction5E506611": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b3e5411cda152c2308dac0a81ffb999cc9c81ea2a1f51e6ce05a377bef8c4dfd.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/QuerygetFinancialSummaryauth0Function/QuerygetFinancialSummaryauth0Function.AppSyncFunction" + } + }, + "QuerygetFinancialSummarypostAuth0FunctionQuerygetFinancialSummarypostAuth0FunctionAppSyncFunctionA4647C62": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetFinancialSummarypostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/QuerygetFinancialSummarypostAuth0Function/QuerygetFinancialSummarypostAuth0Function.AppSyncFunction" + } + }, + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/QueryGetFinancialSummaryDataResolverFn/QueryGetFinancialSummaryDataResolverFn.AppSyncFunction" + } + }, + "GetFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "getFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetFinancialSummaryauth0FunctionQuerygetFinancialSummaryauth0FunctionAppSyncFunction5E506611", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetFinancialSummarypostAuth0FunctionQuerygetFinancialSummarypostAuth0FunctionAppSyncFunctionA4647C62", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/queryGetFinancialSummaryResolver" + } + }, + "QuerylistFinancialSummariesauth0FunctionQuerylistFinancialSummariesauth0FunctionAppSyncFunction81E7536D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerylistFinancialSummariesauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b3e5411cda152c2308dac0a81ffb999cc9c81ea2a1f51e6ce05a377bef8c4dfd.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/QuerylistFinancialSummariesauth0Function/QuerylistFinancialSummariesauth0Function.AppSyncFunction" + } + }, + "QuerylistFinancialSummariespostAuth0FunctionQuerylistFinancialSummariespostAuth0FunctionAppSyncFunctionEF101F81": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerylistFinancialSummariespostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/QuerylistFinancialSummariespostAuth0Function/QuerylistFinancialSummariespostAuth0Function.AppSyncFunction" + } + }, + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListFinancialSummariesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9fcbe070ecd3023c5bf5b966fa9584757db9762eef123bad0820bd87591b2174.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/QueryListFinancialSummariesDataResolverFn/QueryListFinancialSummariesDataResolverFn.AppSyncFunction" + } + }, + "ListFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "listFinancialSummaries", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerylistFinancialSummariesauth0FunctionQuerylistFinancialSummariesauth0FunctionAppSyncFunction81E7536D", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerylistFinancialSummariespostAuth0FunctionQuerylistFinancialSummariespostAuth0FunctionAppSyncFunctionEF101F81", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listFinancialSummaries\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/queryListFinancialSummariesResolver" + } + }, + "MutationcreateFinancialSummaryinit0FunctionMutationcreateFinancialSummaryinit0FunctionAppSyncFunction42902302": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateFinancialSummaryinit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a183ddccbd956316c38ef97177b8f088ef0826f62023323f5ae6053d348ccffc.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationcreateFinancialSummaryinit0Function/MutationcreateFinancialSummaryinit0Function.AppSyncFunction" + } + }, + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f9bebf8466dd586faa7ac43fdfbe972915005afb8abb3b20ad6fd811de131925.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationcreateFinancialSummaryauth0Function/MutationcreateFinancialSummaryauth0Function.AppSyncFunction" + } + }, + "MutationcreateFinancialSummarypostAuth0FunctionMutationcreateFinancialSummarypostAuth0FunctionAppSyncFunctionD1D7A44B": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateFinancialSummarypostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationcreateFinancialSummarypostAuth0Function/MutationcreateFinancialSummarypostAuth0Function.AppSyncFunction" + } + }, + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/48f46bb2683d5c6591d8e3959d4101bdf0c91120c682bee7214fc55059de47ef.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationCreateFinancialSummaryDataResolverFn/MutationCreateFinancialSummaryDataResolverFn.AppSyncFunction" + } + }, + "CreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "createFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationcreateFinancialSummaryinit0FunctionMutationcreateFinancialSummaryinit0FunctionAppSyncFunction42902302", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateFinancialSummarypostAuth0FunctionMutationcreateFinancialSummarypostAuth0FunctionAppSyncFunctionD1D7A44B", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/mutationCreateFinancialSummaryResolver" + } + }, + "MutationupdateFinancialSummaryinit0FunctionMutationupdateFinancialSummaryinit0FunctionAppSyncFunction92BBAB79": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateFinancialSummaryinit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationupdateFinancialSummaryinit0Function/MutationupdateFinancialSummaryinit0Function.AppSyncFunction" + } + }, + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/774d1a58d1a8015f23116bb940a36255cd2a0a98720d3b56e801e7178fedc0bd.vtl" + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationupdateFinancialSummaryauth0Function/MutationupdateFinancialSummaryauth0Function.AppSyncFunction" + } + }, + "MutationupdateFinancialSummarypostAuth0FunctionMutationupdateFinancialSummarypostAuth0FunctionAppSyncFunction2515B550": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateFinancialSummarypostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationupdateFinancialSummarypostAuth0Function/MutationupdateFinancialSummarypostAuth0Function.AppSyncFunction" + } + }, + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationUpdateFinancialSummaryDataResolverFn/MutationUpdateFinancialSummaryDataResolverFn.AppSyncFunction" + } + }, + "UpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "updateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationupdateFinancialSummaryinit0FunctionMutationupdateFinancialSummaryinit0FunctionAppSyncFunction92BBAB79", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateFinancialSummarypostAuth0FunctionMutationupdateFinancialSummarypostAuth0FunctionAppSyncFunction2515B550", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/mutationUpdateFinancialSummaryResolver" + } + }, + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6257bfd1ef2992bd01df135516c0df15c5ff692f426e0c71c93960be8f8c81df.vtl" + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationdeleteFinancialSummaryauth0Function/MutationdeleteFinancialSummaryauth0Function.AppSyncFunction" + } + }, + "MutationdeleteFinancialSummarypostAuth0FunctionMutationdeleteFinancialSummarypostAuth0FunctionAppSyncFunctionC7E83251": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteFinancialSummarypostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationdeleteFinancialSummarypostAuth0Function/MutationdeleteFinancialSummarypostAuth0Function.AppSyncFunction" + } + }, + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/MutationDeleteFinancialSummaryDataResolverFn/MutationDeleteFinancialSummaryDataResolverFn.AppSyncFunction" + } + }, + "DeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "deleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationdeleteFinancialSummarypostAuth0FunctionMutationdeleteFinancialSummarypostAuth0FunctionAppSyncFunctionC7E83251", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/mutationDeleteFinancialSummaryResolver" + } + }, + "SubscriptiononCreateFinancialSummaryauth0FunctionSubscriptiononCreateFinancialSummaryauth0FunctionAppSyncFunction2E1E92F4": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptiononCreateFinancialSummaryauth0Function/SubscriptiononCreateFinancialSummaryauth0Function.AppSyncFunction" + } + }, + "SubscriptiononCreateFinancialSummarypostAuth0FunctionSubscriptiononCreateFinancialSummarypostAuth0FunctionAppSyncFunctionCF840444": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateFinancialSummarypostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptiononCreateFinancialSummarypostAuth0Function/SubscriptiononCreateFinancialSummarypostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnCreateFinancialSummaryDataResolverFnSubscriptionOnCreateFinancialSummaryDataResolverFnAppSyncFunction3BFEE2D5": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnCreateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptionOnCreateFinancialSummaryDataResolverFn/SubscriptionOnCreateFinancialSummaryDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononCreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onCreateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateFinancialSummaryauth0FunctionSubscriptiononCreateFinancialSummaryauth0FunctionAppSyncFunction2E1E92F4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononCreateFinancialSummarypostAuth0FunctionSubscriptiononCreateFinancialSummarypostAuth0FunctionAppSyncFunctionCF840444", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateFinancialSummaryDataResolverFnSubscriptionOnCreateFinancialSummaryDataResolverFnAppSyncFunction3BFEE2D5", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/subscriptionOnCreateFinancialSummaryResolver" + } + }, + "SubscriptiononUpdateFinancialSummaryauth0FunctionSubscriptiononUpdateFinancialSummaryauth0FunctionAppSyncFunctionBCD76178": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononUpdateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptiononUpdateFinancialSummaryauth0Function/SubscriptiononUpdateFinancialSummaryauth0Function.AppSyncFunction" + } + }, + "SubscriptiononUpdateFinancialSummarypostAuth0FunctionSubscriptiononUpdateFinancialSummarypostAuth0FunctionAppSyncFunctionE7A252C6": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononUpdateFinancialSummarypostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptiononUpdateFinancialSummarypostAuth0Function/SubscriptiononUpdateFinancialSummarypostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnUpdateFinancialSummaryDataResolverFnSubscriptionOnUpdateFinancialSummaryDataResolverFnAppSyncFunctionB7220105": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnUpdateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptionOnUpdateFinancialSummaryDataResolverFn/SubscriptionOnUpdateFinancialSummaryDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononUpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onUpdateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononUpdateFinancialSummaryauth0FunctionSubscriptiononUpdateFinancialSummaryauth0FunctionAppSyncFunctionBCD76178", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononUpdateFinancialSummarypostAuth0FunctionSubscriptiononUpdateFinancialSummarypostAuth0FunctionAppSyncFunctionE7A252C6", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnUpdateFinancialSummaryDataResolverFnSubscriptionOnUpdateFinancialSummaryDataResolverFnAppSyncFunctionB7220105", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/subscriptionOnUpdateFinancialSummaryResolver" + } + }, + "SubscriptiononDeleteFinancialSummaryauth0FunctionSubscriptiononDeleteFinancialSummaryauth0FunctionAppSyncFunction4AD92A7E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononDeleteFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptiononDeleteFinancialSummaryauth0Function/SubscriptiononDeleteFinancialSummaryauth0Function.AppSyncFunction" + } + }, + "SubscriptiononDeleteFinancialSummarypostAuth0FunctionSubscriptiononDeleteFinancialSummarypostAuth0FunctionAppSyncFunctionAF34787D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononDeleteFinancialSummarypostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptiononDeleteFinancialSummarypostAuth0Function/SubscriptiononDeleteFinancialSummarypostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnDeleteFinancialSummaryDataResolverFnSubscriptionOnDeleteFinancialSummaryDataResolverFnAppSyncFunction13301ED2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnDeleteFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/SubscriptionOnDeleteFinancialSummaryDataResolverFn/SubscriptionOnDeleteFinancialSummaryDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononDeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onDeleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononDeleteFinancialSummaryauth0FunctionSubscriptiononDeleteFinancialSummaryauth0FunctionAppSyncFunction4AD92A7E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononDeleteFinancialSummarypostAuth0FunctionSubscriptiononDeleteFinancialSummarypostAuth0FunctionAppSyncFunctionAF34787D", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnDeleteFinancialSummaryDataResolverFnSubscriptionOnDeleteFinancialSummaryDataResolverFnAppSyncFunction13301ED2", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/subscriptionOnDeleteFinancialSummaryResolver" + } + }, + "FinancialSummaryOwnerDataResolverFnFinancialSummaryOwnerDataResolverFnAppSyncFunction9FBB9772": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "FinancialSummaryOwnerDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/041534e5fd916595f752318f161512d7c7f83b9f2cf32d0f0be381c12253ff68.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/064303962e481067b44300212516363b99aaee539b6bafaf756fdd83ff0b60f0.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/FinancialSummaryOwnerDataResolverFn/FinancialSummaryOwnerDataResolverFn.AppSyncFunction" + } + }, + "FinancialSummaryownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "FinancialSummaryOwnerDataResolverFnFinancialSummaryOwnerDataResolverFnAppSyncFunction9FBB9772", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"FinancialSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "FinancialSummary" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/financialSummaryOwnerResolver" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/1WQ0W6DMAxFv2XvIUNU+4AVtMd1gr1XJjEoJTgodlpViH+fQqdOe7q+ulf2kStdvZW6fIEbF8ZOhXe9Xj+RBW0nYCZVD/QFEWYUjNnUgawTF0i1yCFFg6pOLGH+swM9Z7jxebV3gjnYXn9D7/EIjMrBrNc2+Ec7eNwULAvfyei12etN34BA91z5330kMhmiDjS4MUXYiX4v+yvGTfHhDMworN+zKD7oYzITSgbYcveUZEmi9rgTGB2Nm6JgUV/49VqVusqfubBzRUwkbkbdPvQHoS7ZBTYBAAA=" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Outputs": { + "GetAttFinancialSummaryTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "TableStreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "GetAtt:FinancialSummaryTable:StreamArn" + ] + ] + } + } + }, + "GetAttFinancialSummaryTableName": { + "Description": "Your DynamoDB table name.", + "Value": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x", + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "GetAtt:FinancialSummaryTable:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.description.txt new file mode 100644 index 00000000000..6b3d983ba60 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.description.txt @@ -0,0 +1 @@ +An auto-generated nested stack for the @function directive. diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.outputs.json new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.outputs.json @@ -0,0 +1 @@ +[] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.parameters.json new file mode 100644 index 00000000000..31a26e48ab6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.parameters.json @@ -0,0 +1,22 @@ +[ + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthauthenticatedU-mtMR6VW2YKH5" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref", + "ParameterValue": "us-east-1:ccae5924-7e98-4b8f-bf21-ac09c945a04b" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "ParameterValue": "iltux4eqlfcblbluzjzhytjruu" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthunauthenticate-rSgiGOevcLBc" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.template.json new file mode 100644 index 00000000000..9ea6a1c7fe5 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataFunctionDirectiveStackNestedSta-x.template.json @@ -0,0 +1,730 @@ +{ + "Description": "An auto-generated nested stack for the @function directive.", + "AWSTemplateFormatVersion": "2010-09-09", + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + "NONE", + "NONE" + ] + } + ] + }, + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Resources": { + "FinancetrackerGen2KkrjkngboqLambdaDataSourceServiceRole84AEC335": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/FinancetrackerGen2KkrjkngboqLambdaDataSource/ServiceRole/Resource" + } + }, + "FinancetrackerGen2KkrjkngboqLambdaDataSourceServiceRoleDefaultPolicy0B2ACFC4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-gen2-x", + {} + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-gen2-x" + } + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-gen2-x", + {} + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-gen2-x" + } + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FinancetrackerGen2KkrjkngboqLambdaDataSourceServiceRoleDefaultPolicy0B2ACFC4", + "Roles": [ + { + "Ref": "FinancetrackerGen2KkrjkngboqLambdaDataSourceServiceRole84AEC335" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/FinancetrackerGen2KkrjkngboqLambdaDataSource/ServiceRole/DefaultPolicy/Resource" + } + }, + "FinancetrackerGen2KkrjkngboqLambdaDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "LambdaConfig": { + "LambdaFunctionArn": { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-gen2-x", + {} + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-gen2-x" + } + ] + } + }, + "Name": "FinancetrackerGen2KkrjkngboqLambdaDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancetrackerGen2KkrjkngboqLambdaDataSourceServiceRole84AEC335", + "Arn" + ] + }, + "Type": "AWS_LAMBDA" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/FinancetrackerGen2KkrjkngboqLambdaDataSource/Resource" + } + }, + "InvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceInvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceAppSyncFunctionF978B4EF": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancetrackerGen2KkrjkngboqLambdaDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "InvokeFinancetrackerGen2KkrjkngboqLambdaDataSource", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/808f7fac726c837bf898b5e30d956937515d24c917fb99b23493e4798fd91aa6.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a20e304512b1fde77dc16ed9d5e0ed03817afcab629ce87ef11c99877b7b1e30.vtl" + } + }, + "DependsOn": [ + "FinancetrackerGen2KkrjkngboqLambdaDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/InvokeFinancetrackerGen2KkrjkngboqLambdaDataSource/InvokeFinancetrackerGen2KkrjkngboqLambdaDataSource.AppSyncFunction" + } + }, + "MutationsendMonthlyReportResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "sendMonthlyReport", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationSendMonthlyReportAuthFNMutationSendMonthlyReportAuthFNAppSyncFunctionF794A27D", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceInvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceAppSyncFunctionF978B4EF", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendMonthlyReport\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n{}\n## [End] Stash resolver specific context.. **" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" + }, + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/mutationSendMonthlyReportResolver" + } + }, + "MutationsendBudgetAlertResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "sendBudgetAlert", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationSendBudgetAlertAuthFNMutationSendBudgetAlertAuthFNAppSyncFunction31D396DC", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceInvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceAppSyncFunctionF978B4EF", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendBudgetAlert\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n{}\n## [End] Stash resolver specific context.. **" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" + }, + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/mutationSendBudgetAlertResolver" + } + }, + "QuerycalculateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "calculateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceInvokeFinancetrackerGen2KkrjkngboqLambdaDataSourceAppSyncFunctionF978B4EF", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"calculateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:aws:sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:aws:sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n{}\n## [End] Stash resolver specific context.. **" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/387d5992f5fc03d05de27289457dcc374a84c42a889acb504aff1031047dde00.vtl" + }, + "TypeName": "Query" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/queryCalculateFinancialSummaryResolver" + } + }, + "MutationSendMonthlyReportAuthFNMutationSendMonthlyReportAuthFNAppSyncFunctionF794A27D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationSendMonthlyReportAuthFN", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/MutationSendMonthlyReportAuthFN/MutationSendMonthlyReportAuthFN.AppSyncFunction" + } + }, + "MutationSendBudgetAlertAuthFNMutationSendBudgetAlertAuthFNAppSyncFunction31D396DC": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationSendBudgetAlertAuthFN", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/MutationSendBudgetAlertAuthFN/MutationSendBudgetAlertAuthFN.AppSyncFunction" + } + }, + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryCalculateFinancialSummaryAuthFN", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/QueryCalculateFinancialSummaryAuthFN/QueryCalculateFinancialSummaryAuthFN.AppSyncFunction" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/1WPQYrDMAxFz9K9owkpc4BphlmVYUgOUFRbCWocuUR2Swm5+2CXLrp6+l/6Qmqg+ayh3uFdK+umyvMZ1l/SSK6PaCfTDtIGcRw5iMG7nlaP89kh/CSx2TygksHrVR9iYT2W5jdG7ENaLOX8u3rl2iADj2nBsrkdpCMN/kbLZhhnWLvgy3zhX/BsH1k+q83o/oSqFBW+Mozu4ZDsRDHfs5li9hFHlnEzEhzBRT9uTQ1NfveizNWSJPJM0D35D8l91oALAQAA" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Type": "String" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.description.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.description.txt @@ -0,0 +1 @@ + diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.outputs.json new file mode 100644 index 00000000000..274b250d000 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.outputs.json @@ -0,0 +1,18 @@ +[ + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionTransactionTable42B70DA2TableArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Transaction-adetddan7nd55gwre37yyck3vu-x" + }, + { + "OutputKey": "GetAttTransactionTableName", + "OutputValue": "Transaction-adetddan7nd55gwre37yyck3vu-x", + "Description": "Your DynamoDB table name.", + "ExportName": "iltux4eqlfcblbluzjzhytjruu:GetAtt:TransactionTable:Name" + }, + { + "OutputKey": "GetAttTransactionTableStreamArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Transaction-adetddan7nd55gwre37yyck3vu-x/stream/2026-04-23T19:24:30.500", + "Description": "Your DynamoDB table StreamArn.", + "ExportName": "iltux4eqlfcblbluzjzhytjruu:GetAtt:TransactionTable:StreamArn" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.parameters.json new file mode 100644 index 00000000000..633cd20f556 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.parameters.json @@ -0,0 +1,46 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "true" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthauthenticatedU-mtMR6VW2YKH5" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref", + "ParameterValue": "us-east-1:ccae5924-7e98-4b8f-bf21-ac09c945a04b" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "ParameterValue": "iltux4eqlfcblbluzjzhytjruu" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3", + "ParameterValue": "arn:aws:lambda:us-east-1:123456789012:function:amplify-financetra2604231-TableManagerCustomProvid-bzPcdg49TDmM" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthunauthenticate-rSgiGOevcLBc" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.template.json new file mode 100644 index 00000000000..ac891204118 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-amplifyDataTransactionNestedStackTransacti-x.template.json @@ -0,0 +1,2136 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + "NONE", + "NONE" + ] + } + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + }, + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Resources": { + "TransactionTable": { + "Type": "Custom::ImportedAmplifyDynamoDBTable", + "Properties": { + "ServiceToken": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3" + }, + "tableName": "Transaction-adetddan7nd55gwre37yyck3vu-x", + "attributeDefinitions": [ + { + "attributeName": "id", + "attributeType": "S" + } + ], + "keySchema": [ + { + "attributeName": "id", + "keyType": "HASH" + } + ], + "provisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "sseSpecification": { + "sseEnabled": false + }, + "streamSpecification": { + "streamViewType": "NEW_AND_OLD_IMAGES" + }, + "deletionProtectionEnabled": true, + "allowDestructiveGraphqlSchemaUpdates": true, + "replaceTableUponGsiUpdate": false, + "isImported": true, + "pointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "billingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/TransactionTable/Default/Default" + } + }, + "TransactionIAMRole04BA2E25": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": "Transaction-adetddan7nd55gwre37yyck3vu-x" + } + ] + }, + { + "Fn::Sub": [ + "arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": "Transaction-adetddan7nd55gwre37yyck3vu-x" + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "TransactionIAMRole373077-", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "-NONE" + ] + ] + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/TransactionIAMRole/Resource" + } + }, + "TransactionDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "TransactionTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + } + }, + "Name": "TransactionTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionIAMRole04BA2E25", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "TransactionIAMRole04BA2E25" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/TransactionDataSource/Resource" + } + }, + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b3e5411cda152c2308dac0a81ffb999cc9c81ea2a1f51e6ce05a377bef8c4dfd.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/QuerygetTransactionauth0Function/QuerygetTransactionauth0Function.AppSyncFunction" + } + }, + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/QuerygetTransactionpostAuth0Function/QuerygetTransactionpostAuth0Function.AppSyncFunction" + } + }, + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/08f4d557693d96c1a4efba0f9dc91330e4b19772fd5477c156468843e3d9cb5e.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4c6a2d29f01c6091bd1d9afe16e5849d456c96f17c3b215938c8067399532719.vtl" + } + }, + "DependsOn": [ + "TransactionDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/QueryGetTransactionDataResolverFn/QueryGetTransactionDataResolverFn.AppSyncFunction" + } + }, + "GetTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "getTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "TransactionTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/queryGetTransactionResolver" + } + }, + "QuerylistTransactionsauth0FunctionQuerylistTransactionsauth0FunctionAppSyncFunction47116B1D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerylistTransactionsauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/b3e5411cda152c2308dac0a81ffb999cc9c81ea2a1f51e6ce05a377bef8c4dfd.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/QuerylistTransactionsauth0Function/QuerylistTransactionsauth0Function.AppSyncFunction" + } + }, + "QuerylistTransactionspostAuth0FunctionQuerylistTransactionspostAuth0FunctionAppSyncFunction1802D229": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerylistTransactionspostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/QuerylistTransactionspostAuth0Function/QuerylistTransactionspostAuth0Function.AppSyncFunction" + } + }, + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListTransactionsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/9fcbe070ecd3023c5bf5b966fa9584757db9762eef123bad0820bd87591b2174.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/cc01911d0269d4080ea57505dc445dfc315ef7ad85d3d9d4ea1357858bff451d.vtl" + } + }, + "DependsOn": [ + "TransactionDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/QueryListTransactionsDataResolverFn/QueryListTransactionsDataResolverFn.AppSyncFunction" + } + }, + "ListTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "listTransactions", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerylistTransactionsauth0FunctionQuerylistTransactionsauth0FunctionAppSyncFunction47116B1D", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerylistTransactionspostAuth0FunctionQuerylistTransactionspostAuth0FunctionAppSyncFunction1802D229", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTransactions\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "TransactionTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/queryListTransactionsResolver" + } + }, + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a183ddccbd956316c38ef97177b8f088ef0826f62023323f5ae6053d348ccffc.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationcreateTransactioninit0Function/MutationcreateTransactioninit0Function.AppSyncFunction" + } + }, + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/a8280e4eda357fde390932c92d894b1b6e7ed975f47c8c04cff9c97616c24523.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationcreateTransactionauth0Function/MutationcreateTransactionauth0Function.AppSyncFunction" + } + }, + "MutationcreateTransactionpostAuth0FunctionMutationcreateTransactionpostAuth0FunctionAppSyncFunction349B0158": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationcreateTransactionpostAuth0Function/MutationcreateTransactionpostAuth0Function.AppSyncFunction" + } + }, + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/697acddcee54a52da9d0cb82fe8d9c114fe42f570e2194491b3ede80808a138f.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "TransactionDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationCreateTransactionDataResolverFn/MutationCreateTransactionDataResolverFn.AppSyncFunction" + } + }, + "CreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "createTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateTransactionpostAuth0FunctionMutationcreateTransactionpostAuth0FunctionAppSyncFunction349B0158", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "TransactionTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/mutationCreateTransactionResolver" + } + }, + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06db846fd14e6fc371f22b12b5545ba8e2dbfeda85d8c8d586c71c282166657b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationupdateTransactioninit0Function/MutationupdateTransactioninit0Function.AppSyncFunction" + } + }, + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fd1d16dd6f134eeaefa1b71212848cbf34cd229c427199382c3319ecee611850.vtl" + } + }, + "DependsOn": [ + "TransactionDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationupdateTransactionauth0Function/MutationupdateTransactionauth0Function.AppSyncFunction" + } + }, + "MutationupdateTransactionpostAuth0FunctionMutationupdateTransactionpostAuth0FunctionAppSyncFunction91FA2EF1": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationupdateTransactionpostAuth0Function/MutationupdateTransactionpostAuth0Function.AppSyncFunction" + } + }, + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/474bf0776ec2164a13191d1a0a9e057154931e4918fea5086f49850d02a5371b.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "TransactionDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationUpdateTransactionDataResolverFn/MutationUpdateTransactionDataResolverFn.AppSyncFunction" + } + }, + "UpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "updateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateTransactionpostAuth0FunctionMutationupdateTransactionpostAuth0FunctionAppSyncFunction91FA2EF1", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "TransactionTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/mutationUpdateTransactionResolver" + } + }, + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/1f5fed297da9c32ae3af922bf3a38ccf23b956078887d16891ec06c20c64722c.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6257bfd1ef2992bd01df135516c0df15c5ff692f426e0c71c93960be8f8c81df.vtl" + } + }, + "DependsOn": [ + "TransactionDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationdeleteTransactionauth0Function/MutationdeleteTransactionauth0Function.AppSyncFunction" + } + }, + "MutationdeleteTransactionpostAuth0FunctionMutationdeleteTransactionpostAuth0FunctionAppSyncFunction74658514": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationdeleteTransactionpostAuth0Function/MutationdeleteTransactionpostAuth0Function.AppSyncFunction" + } + }, + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4f7907d1209a2c9953a0c053df402c634e359546d70c7cc5c2e8e21ea734880f.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f4a52b72209a9dfa197b5e7367a5c378c5bb86de6e29ddd9e48b49a3fe54b249.vtl" + } + }, + "DependsOn": [ + "TransactionDataSource" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/MutationDeleteTransactionDataResolverFn/MutationDeleteTransactionDataResolverFn.AppSyncFunction" + } + }, + "DeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "deleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationdeleteTransactionpostAuth0FunctionMutationdeleteTransactionpostAuth0FunctionAppSyncFunction74658514", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "TransactionTable", + "TableArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/mutationDeleteTransactionResolver" + } + }, + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptiononCreateTransactionauth0Function/SubscriptiononCreateTransactionauth0Function.AppSyncFunction" + } + }, + "SubscriptiononCreateTransactionpostAuth0FunctionSubscriptiononCreateTransactionpostAuth0FunctionAppSyncFunctionAF5AB619": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptiononCreateTransactionpostAuth0Function/SubscriptiononCreateTransactionpostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptionOnCreateTransactionDataResolverFn/SubscriptionOnCreateTransactionDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononCreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onCreateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionpostAuth0FunctionSubscriptiononCreateTransactionpostAuth0FunctionAppSyncFunctionAF5AB619", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/subscriptionOnCreateTransactionResolver" + } + }, + "SubscriptiononUpdateTransactionauth0FunctionSubscriptiononUpdateTransactionauth0FunctionAppSyncFunctionABE87EE8": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononUpdateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptiononUpdateTransactionauth0Function/SubscriptiononUpdateTransactionauth0Function.AppSyncFunction" + } + }, + "SubscriptiononUpdateTransactionpostAuth0FunctionSubscriptiononUpdateTransactionpostAuth0FunctionAppSyncFunction5527CFBC": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononUpdateTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptiononUpdateTransactionpostAuth0Function/SubscriptiononUpdateTransactionpostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnUpdateTransactionDataResolverFnSubscriptionOnUpdateTransactionDataResolverFnAppSyncFunctionD7B2BA64": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnUpdateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptionOnUpdateTransactionDataResolverFn/SubscriptionOnUpdateTransactionDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononUpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onUpdateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononUpdateTransactionauth0FunctionSubscriptiononUpdateTransactionauth0FunctionAppSyncFunctionABE87EE8", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononUpdateTransactionpostAuth0FunctionSubscriptiononUpdateTransactionpostAuth0FunctionAppSyncFunction5527CFBC", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnUpdateTransactionDataResolverFnSubscriptionOnUpdateTransactionDataResolverFnAppSyncFunctionD7B2BA64", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/subscriptionOnUpdateTransactionResolver" + } + }, + "SubscriptiononDeleteTransactionauth0FunctionSubscriptiononDeleteTransactionauth0FunctionAppSyncFunction949F3088": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononDeleteTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/15280eef569babaeeee5f837ecf7400c728eec6ca2f4c0437bcbddfcb67fe27b.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptiononDeleteTransactionauth0Function/SubscriptiononDeleteTransactionauth0Function.AppSyncFunction" + } + }, + "SubscriptiononDeleteTransactionpostAuth0FunctionSubscriptiononDeleteTransactionpostAuth0FunctionAppSyncFunction35445C2D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononDeleteTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c1721bcd774e27c514d3454b5be4f9bdd094c0161b57ddf053d618e3b0086a77.vtl" + }, + "ResponseMappingTemplate": "$util.toJson({})" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptiononDeleteTransactionpostAuth0Function/SubscriptiononDeleteTransactionpostAuth0Function.AppSyncFunction" + } + }, + "SubscriptionOnDeleteTransactionDataResolverFnSubscriptionOnDeleteTransactionDataResolverFnAppSyncFunctionC10266AE": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnDeleteTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/fe3c43ada4b9d681a5e2312663ef7a73386424d73b73e51f8e2e9d4b50f7c502.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e0cff47fb007f0bbf2a4e43ca256d6aa7ec109821769fd79fa7c5e83f0e7f9fc.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/SubscriptionOnDeleteTransactionDataResolverFn/SubscriptionOnDeleteTransactionDataResolverFn.AppSyncFunction" + } + }, + "SubscriptiononDeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "onDeleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononDeleteTransactionauth0FunctionSubscriptiononDeleteTransactionauth0FunctionAppSyncFunction949F3088", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptiononDeleteTransactionpostAuth0FunctionSubscriptiononDeleteTransactionpostAuth0FunctionAppSyncFunction35445C2D", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnDeleteTransactionDataResolverFnSubscriptionOnDeleteTransactionDataResolverFnAppSyncFunctionC10266AE", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/subscriptionOnDeleteTransactionResolver" + } + }, + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName" + }, + "FunctionVersion": "2018-05-29", + "Name": "TransactionOwnerDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/041534e5fd916595f752318f161512d7c7f83b9f2cf32d0f0be381c12253ff68.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/064303962e481067b44300212516363b99aaee539b6bafaf756fdd83ff0b60f0.vtl" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/TransactionOwnerDataResolverFn/TransactionOwnerDataResolverFn.AppSyncFunction" + } + }, + "TransactionownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Transaction\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Transaction" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/transactionOwnerResolver" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/1WQ0W6DMAxFv2XvIUNU+4AVtMd1gr1XJjEoJTgodlpViH+fQqdOe7q+ulf2kStdvZW6fIEbF8ZOhXe9Xj+RBW0nYCZVD/QFEWYUjNnUgawTF0i1yCFFg6pOLGH+swM9Z7jxebV3gjnYXn9D7/EIjMrBrNc2+Ec7eNwULAvfyei12etN34BA91z5330kMhmiDjS4MUXYiX4v+yvGTfHhDMworN+zKD7oYzITSgbYcveUZEmi9rgTGB2Nm6JgUV/49VqVusqfubBzRUwkbkbdPvQHoS7ZBTYBAAA=" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Outputs": { + "GetAttTransactionTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "TransactionTable", + "TableStreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "GetAtt:TransactionTable:StreamArn" + ] + ] + } + } + }, + "GetAttTransactionTableName": { + "Description": "Your DynamoDB table name.", + "Value": "Transaction-adetddan7nd55gwre37yyck3vu-x", + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "GetAtt:TransactionTable:Name" + ] + ] + } + } + }, + "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionTransactionTable42B70DA2TableArn": { + "Value": { + "Fn::GetAtt": [ + "TransactionTable", + "TableArn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.description.txt new file mode 100644 index 00000000000..b66e3e0b9e2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"AmplifySandbox","createdWith":"1.11.2","stackType":"auth-Cognito","metadata":{}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.outputs.json new file mode 100644 index 00000000000..e93ed3e550f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.outputs.json @@ -0,0 +1,22 @@ +[ + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref", + "OutputValue": "amplify-financetra2604231-amplifyAuthunauthenticate-rSgiGOevcLBc" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref", + "OutputValue": "us-east-1_Qrh9UxVmy" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolAppClient639403C3Ref", + "OutputValue": "d3i0osngdk8t7lnvejisior6i" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref", + "OutputValue": "amplify-financetra2604231-amplifyAuthauthenticatedU-mtMR6VW2YKH5" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref", + "OutputValue": "us-east-1:ccae5924-7e98-4b8f-bf21-ac09c945a04b" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.parameters.json new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.parameters.json @@ -0,0 +1 @@ +[] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.template.json new file mode 100644 index 00000000000..648e0ac8005 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-auth179371D7-x.template.json @@ -0,0 +1,632 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifySandbox\",\"createdWith\":\"1.11.2\",\"stackType\":\"auth-Cognito\",\"metadata\":{}}", + "Resources": { + "amplifyAuthUserPool4BA7F805": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AccountRecoverySetting": { + "RecoveryMechanisms": [ + { + "Name": "verified_email", + "Priority": 1 + } + ] + }, + "AdminCreateUserConfig": { + "AllowAdminCreateUserOnly": false + }, + "AutoVerifiedAttributes": [ + "email" + ], + "EmailVerificationMessage": "Your verification code is {####}", + "EmailVerificationSubject": "Your verification code", + "MfaConfiguration": "OFF", + "Policies": { + "PasswordPolicy": { + "MinimumLength": 8, + "RequireLowercase": false, + "RequireNumbers": false, + "RequireSymbols": false, + "RequireUppercase": false, + "TemporaryPasswordValidityDays": 7 + } + }, + "Schema": [ + { + "Mutable": true, + "Name": "email", + "Required": true + } + ], + "SmsVerificationMessage": "The verification code to your new account is {####}", + "UserAttributeUpdateSettings": { + "AttributesRequireVerificationBeforeUpdate": [ + "email" + ] + }, + "UserPoolTags": { + "amplify:deployment-type": "sandbox", + "amplify:friendly-name": "amplifyAuth", + "created-by": "amplify" + }, + "UsernameAttributes": [ + "email" + ], + "UsernameConfiguration": { + "CaseSensitive": false + }, + "VerificationMessageTemplate": { + "DefaultEmailOption": "CONFIRM_WITH_CODE", + "EmailMessage": "Your verification code is {####}", + "EmailSubject": "Your verification code", + "SmsMessage": "The verification code to your new account is {####}" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/amplifyAuth/UserPool/Resource" + } + }, + "amplifyAuthUserPoolNativeAppClient79534448": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "AllowedOAuthFlowsUserPoolClient": false, + "AuthSessionValidity": 3, + "EnablePropagateAdditionalUserContextData": false, + "EnableTokenRevocation": true, + "GenerateSecret": false, + "RefreshTokenValidity": 43200, + "SupportedIdentityProviders": [ + "COGNITO" + ], + "TokenValidityUnits": { + "RefreshToken": "minutes" + }, + "UserPoolId": { + "Ref": "amplifyAuthUserPool4BA7F805" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/amplifyAuth/UserPool/NativeAppClient/Resource" + } + }, + "amplifyAuthUserPoolAppClient2626C6F8": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "AllowedOAuthFlows": [ + "code" + ], + "AllowedOAuthFlowsUserPoolClient": true, + "AllowedOAuthScopes": [ + "profile", + "phone", + "email", + "openid", + "aws.cognito.signin.user.admin" + ], + "CallbackURLs": [ + "https://example.com" + ], + "ExplicitAuthFlows": [ + "ALLOW_CUSTOM_AUTH", + "ALLOW_USER_SRP_AUTH", + "ALLOW_REFRESH_TOKEN_AUTH" + ], + "PreventUserExistenceErrors": "ENABLED", + "SupportedIdentityProviders": [ + "COGNITO" + ], + "UserPoolId": { + "Ref": "amplifyAuthUserPool4BA7F805" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/amplifyAuth/UserPoolAppClient/Resource" + } + }, + "amplifyAuthIdentityPool3FDE84CC": { + "Type": "AWS::Cognito::IdentityPool", + "Properties": { + "AllowUnauthenticatedIdentities": true, + "CognitoIdentityProviders": [ + { + "ClientId": { + "Ref": "amplifyAuthUserPoolAppClient2626C6F8" + }, + "ProviderName": { + "Fn::Join": [ + "", + [ + "cognito-idp.", + { + "Ref": "AWS::Region" + }, + ".amazonaws.com/", + { + "Ref": "amplifyAuthUserPool4BA7F805" + } + ] + ] + } + } + ], + "IdentityPoolTags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyAuth" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "SupportedLoginProviders": {} + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/amplifyAuth/IdentityPool" + } + }, + "amplifyAuthauthenticatedUserRoleD8DA3689": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "cognito-identity.amazonaws.com:aud": { + "Ref": "amplifyAuthIdentityPool3FDE84CC" + } + }, + "ForAnyValue:StringLike": { + "cognito-identity.amazonaws.com:amr": "authenticated" + } + }, + "Effect": "Allow", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyAuth" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/amplifyAuth/authenticatedUserRole/Resource" + } + }, + "amplifyAuthunauthenticatedUserRole2B524D9E": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "cognito-identity.amazonaws.com:aud": { + "Ref": "amplifyAuthIdentityPool3FDE84CC" + } + }, + "ForAnyValue:StringLike": { + "cognito-identity.amazonaws.com:amr": "unauthenticated" + } + }, + "Effect": "Allow", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyAuth" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/amplifyAuth/unauthenticatedUserRole/Resource" + } + }, + "amplifyAuthIdentityPoolRoleAttachment045F17C8": { + "Type": "AWS::Cognito::IdentityPoolRoleAttachment", + "Properties": { + "IdentityPoolId": { + "Ref": "amplifyAuthIdentityPool3FDE84CC" + }, + "RoleMappings": { + "UserPoolWebClientRoleMapping": { + "AmbiguousRoleResolution": "AuthenticatedRole", + "IdentityProvider": { + "Fn::Join": [ + "", + [ + "cognito-idp.", + { + "Ref": "AWS::Region" + }, + ".amazonaws.com/", + { + "Ref": "amplifyAuthUserPool4BA7F805" + }, + ":", + { + "Ref": "amplifyAuthUserPoolAppClient2626C6F8" + } + ] + ] + }, + "Type": "Token" + } + }, + "Roles": { + "unauthenticated": { + "Fn::GetAtt": [ + "amplifyAuthunauthenticatedUserRole2B524D9E", + "Arn" + ] + }, + "authenticated": { + "Fn::GetAtt": [ + "amplifyAuthauthenticatedUserRoleD8DA3689", + "Arn" + ] + } + } + }, + "DependsOn": [ + "amplifyAuthIdentityPool3FDE84CC", + "amplifyAuthUserPoolAppClient2626C6F8" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/amplifyAuth/IdentityPoolRoleAttachment" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/01OSwrCMBA9i/t0LAEPIF25Eal0LTEZddp0As1okZC7S5BqV+8PT4Pe1VBvzBwr64bK0xXSEaOgO4uxgzJzvCQb7kwSIHURp1MIXjU3/vGFNJ6QZR39nYNDFpL3Ml7rNnjcixj7GJElKzIjpGKWYsGcs+LgEPq4fekadHncR6JqerLQiNB+8QN0Aq1CzgAAAA==" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Outputs": { + "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref": { + "Value": { + "Ref": "amplifyAuthUserPool4BA7F805" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolAppClient639403C3Ref": { + "Value": { + "Ref": "amplifyAuthUserPoolAppClient2626C6F8" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Value": { + "Ref": "amplifyAuthIdentityPool3FDE84CC" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Value": { + "Ref": "amplifyAuthauthenticatedUserRoleD8DA3689" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Value": { + "Ref": "amplifyAuthunauthenticatedUserRole2B524D9E" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.description.txt new file mode 100644 index 00000000000..46446793250 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"AmplifySandbox","createdWith":"1.22.0","stackType":"custom","metadata":{}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.outputs.json new file mode 100644 index 00000000000..f9b84adb577 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.outputs.json @@ -0,0 +1,22 @@ +[ + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206customfinanceMonthlyReportTopic795F5FD4Ref", + "OutputValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x-customfinanceMonthlyReportTopic558EAC22-M3Fs2Hzpq9xt" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206customfinanceBudgetAlertTopicF822F6FBRef", + "OutputValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x-customfinanceBudgetAlertTopic1D98F61E-z2Bsgiz9acLx" + }, + { + "OutputKey": "customfinanceBudgetAlertTopicArnB3C2C0AB", + "OutputValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x-customfinanceBudgetAlertTopic1D98F61E-z2Bsgiz9acLx", + "Description": "SNS Topic ARN for budget alerts", + "ExportName": "financetracker-BudgetAlertTopicArn-gen2-x" + }, + { + "OutputKey": "customfinanceMonthlyReportTopicArn3264B244", + "OutputValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x-customfinanceMonthlyReportTopic558EAC22-M3Fs2Hzpq9xt", + "Description": "SNS Topic ARN for monthly reports", + "ExportName": "financetracker-MonthlyReportTopicArn-gen2-x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.parameters.json new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.parameters.json @@ -0,0 +1 @@ +[] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.template.json new file mode 100644 index 00000000000..8042741cc11 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x.template.json @@ -0,0 +1,407 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifySandbox\",\"createdWith\":\"1.22.0\",\"stackType\":\"custom\",\"metadata\":{}}", + "Resources": { + "customfinanceBudgetAlertTopic1D98F61E": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Fin Tracker Budget Alerts", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + }, + { + "Key": "Environment", + "Value": "gen2-x" + }, + { + "Key": "ManagedBy", + "Value": "Amplify" + }, + { + "Key": "Project", + "Value": "FinanceTracker" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customfinance/customfinance/BudgetAlertTopic/Resource" + } + }, + "customfinanceBudgetAlertTopicsanjanaravikumarazgmailcom068B0461": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "customfinanceBudgetAlertTopic1D98F61E" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customfinance/customfinance/BudgetAlertTopic/example@gmail.com/Resource" + } + }, + "customfinanceMonthlyReportTopic558EAC22": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Finance Tracker Monthly Reports", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + }, + { + "Key": "Environment", + "Value": "gen2-x" + }, + { + "Key": "ManagedBy", + "Value": "Amplify" + }, + { + "Key": "Project", + "Value": "FinanceTracker" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customfinance/customfinance/MonthlyReportTopic/Resource" + } + }, + "customfinanceMonthlyReportTopicsanjanaravikumarazgmailcom16F3B397": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "customfinanceMonthlyReportTopic558EAC22" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customfinance/customfinance/MonthlyReportTopic/example@gmail.com/Resource" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/02NMQ6DMBAE35LevliWeAE9kUL6yNhGOkjOFneGAvF3ZNFQ7cw0a8E2BszDbax9mPUPB9i7yBJDL87Pym38ZWLYPymjV+1IF/RlYL9gFkxU692PGl5FcpFDUQoRJn6u1oCtVxMj6qWQ4D/C+9oT9buSQocAAAA=" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customfinance/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Outputs": { + "customfinanceBudgetAlertTopicArnB3C2C0AB": { + "Description": "SNS Topic ARN for budget alerts", + "Value": { + "Ref": "customfinanceBudgetAlertTopic1D98F61E" + }, + "Export": { + "Name": "financetracker-BudgetAlertTopicArn-gen2-x" + } + }, + "customfinanceMonthlyReportTopicArn3264B244": { + "Description": "SNS Topic ARN for monthly reports", + "Value": { + "Ref": "customfinanceMonthlyReportTopic558EAC22" + }, + "Export": { + "Name": "financetracker-MonthlyReportTopicArn-gen2-x" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206customfinanceBudgetAlertTopicF822F6FBRef": { + "Value": { + "Ref": "customfinanceBudgetAlertTopic1D98F61E" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206customfinanceMonthlyReportTopic795F5FD4Ref": { + "Value": { + "Ref": "customfinanceMonthlyReportTopic558EAC22" + } + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.description.txt new file mode 100644 index 00000000000..46446793250 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"AmplifySandbox","createdWith":"1.22.0","stackType":"custom","metadata":{}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.outputs.json new file mode 100644 index 00000000000..3019df5f2f9 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.outputs.json @@ -0,0 +1,12 @@ +[ + { + "OutputKey": "customresolverDataSourceName1BC154AE", + "OutputValue": "TransactionsByCategoryDataSource", + "Description": "Name of the custom DynamoDB data source" + }, + { + "OutputKey": "customresolverResolverArn614A0647", + "OutputValue": "arn:aws:appsync:us-east-1:123456789012:apis/iltux4eqlfcblbluzjzhytjruu/types/Query/resolvers/getTransactionsByCategory", + "Description": "ARN of the custom getTransactionsByCategory resolver" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.parameters.json new file mode 100644 index 00000000000..697a0619f41 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.parameters.json @@ -0,0 +1,10 @@ +[ + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2", + "ParameterValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Transaction-adetddan7nd55gwre37yyck3vu-x" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "ParameterValue": "iltux4eqlfcblbluzjzhytjruu" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.template.json new file mode 100644 index 00000000000..295ffeb50b7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-customresolver37EB1DEE-x.template.json @@ -0,0 +1,449 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifySandbox\",\"createdWith\":\"1.22.0\",\"stackType\":\"custom\",\"metadata\":{}}", + "Resources": { + "customresolverTransactionsByCategoryDSRole14A3510C": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": "TransByCatDSRole-gen2-x", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customresolver/customresolver/TransactionsByCategoryDSRole/Resource" + } + }, + "customresolverTransactionsByCategoryDSRoleDefaultPolicyB206EA72": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:GetItem" + ], + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "customresolverTransactionsByCategoryDSRoleDefaultPolicyB206EA72", + "Roles": [ + { + "Ref": "customresolverTransactionsByCategoryDSRole14A3510C" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customresolver/customresolver/TransactionsByCategoryDSRole/DefaultPolicy/Resource" + } + }, + "customresolverTransactionsByCategoryDS5A80352D": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2" + } + ] + } + ] + } + ] + } + ] + } + }, + "Name": "TransactionsByCategoryDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "customresolverTransactionsByCategoryDSRole14A3510C", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customresolver/customresolver/TransactionsByCategoryDS" + } + }, + "customresolverGetTransactionsByCategoryResolverF0745C21": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "customresolverTransactionsByCategoryDS5A80352D", + "Name" + ] + }, + "FieldName": "getTransactionsByCategory", + "RequestMappingTemplate": "\n## Custom VTL resolver for getTransactionsByCategory\n#set($limit = $util.defaultIfNull($ctx.args.limit, 20))\n{\n \"version\": \"2018-05-29\",\n \"operation\": \"Scan\",\n \"filter\": {\n \"expression\": \"category = :category\",\n \"expressionValues\": {\n \":category\": $util.dynamodb.toDynamoDBJson($ctx.args.category)\n }\n },\n \"limit\": $limit\n}", + "ResponseMappingTemplate": "\n## Return the results as a TransactionConnection\n{\n \"items\": $util.toJson($ctx.result.items),\n \"nextToken\": $util.toJson($ctx.result.nextToken)\n}", + "TypeName": "Query" + }, + "DependsOn": [ + "customresolverTransactionsByCategoryDS5A80352D" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customresolver/customresolver/GetTransactionsByCategoryResolver" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/yWOQQqDMBBFz9J9MpVAT2DXbdEDyDQZIRoTcRJFQu5eUlfvv8WDr0A9GmhueLDUZpbOfiG/iCOZPqKeBR48ZIsL5C44Eu3o//wEZ/VZ9VpF4Lry6TXkdvRPjNiHtOkrIA5up62Uau8U1xSL8MEQTHzfVQOqXpjYWrklH+1C0F38AW5ausWfAAAA" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customresolver/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Outputs": { + "customresolverResolverArn614A0647": { + "Description": "ARN of the custom getTransactionsByCategory resolver", + "Value": { + "Fn::GetAtt": [ + "customresolverGetTransactionsByCategoryResolverF0745C21", + "ResolverArn" + ] + } + }, + "customresolverDataSourceName1BC154AE": { + "Description": "Name of the custom DynamoDB data source", + "Value": { + "Fn::GetAtt": [ + "customresolverTransactionsByCategoryDS5A80352D", + "Name" + ] + } + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2": { + "Type": "String" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.description.txt new file mode 100644 index 00000000000..e0845d4715e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"AmplifySandbox","createdWith":"1.21.2","stackType":"api-AppSync","metadata":{"dataSources":"dynamodb","authorizationModes":"amazon_cognito_identity_pools,amazon_cognito_user_pools,api_key,aws_iam","customOperations":"queries,mutations"}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.outputs.json new file mode 100644 index 00000000000..d2ed6552045 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.outputs.json @@ -0,0 +1,22 @@ +[ + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "OutputValue": "iltux4eqlfcblbluzjzhytjruu" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860GraphQLUrl", + "OutputValue": "https://fssl5qlw4vhrjopsneyjxxv7ey.appsync-api.us-east-1.amazonaws.com/graphql" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiBB20EBAE4DestinationBucketArn", + "OutputValue": "arn:aws:s3:::amplify-financetra2604231-amplifydataamplifycodege-ywo1kf4bexqa" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPIDefaultApiKey9BC4ED8AApiKey", + "OutputValue": "da2-fakeapikey00000000000000" + }, + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionTransactionTable42B70DA2TableArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Transaction-adetddan7nd55gwre37yyck3vu-x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.parameters.json new file mode 100644 index 00000000000..8f0e8bdd996 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.parameters.json @@ -0,0 +1,38 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "true" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthauthenticatedU-mtMR6VW2YKH5" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref", + "ParameterValue": "us-east-1:ccae5924-7e98-4b8f-bf21-ac09c945a04b" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref", + "ParameterValue": "us-east-1_Qrh9UxVmy" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthunauthenticate-rSgiGOevcLBc" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.template.json new file mode 100644 index 00000000000..cb7152b6456 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-data7552DF31-x.template.json @@ -0,0 +1,2297 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifySandbox\",\"createdWith\":\"1.21.2\",\"stackType\":\"api-AppSync\",\"metadata\":{\"dataSources\":\"dynamodb\",\"authorizationModes\":\"amazon_cognito_identity_pools,amazon_cognito_user_pools,api_key,aws_iam\",\"customOperations\":\"queries,mutations\"}}", + "Resources": { + "amplifyDataGraphQLAPI42A6FA33": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AdditionalAuthenticationProviders": [ + { + "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", + "UserPoolConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "UserPoolId": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref" + } + } + } + ], + "AuthenticationType": "API_KEY", + "Name": "amplifyData", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/GraphQLAPI/Resource" + } + }, + "amplifyDataGraphQLAPITransformerSchemaFF50A789": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "DefinitionS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7e814ab7907f8a66547f828ccf64f714f92a4f3733242efda1ba188c7db56961.graphql" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/GraphQLAPI/TransformerSchema" + } + }, + "amplifyDataGraphQLAPIDefaultApiKey1C8ED374": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "Expires": 1777577765 + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/GraphQLAPI/DefaultApiKey" + } + }, + "amplifyDataGraphQLAPINONEDS684BF699": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "Name": "NONE_DS", + "Type": "NONE" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/GraphQLAPI/NONE_DS/Resource" + } + }, + "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/38537ec5aebf22e39cc01d6aa9198652c20790024a87de9e166fb367f59c6280.json" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyTableManager.NestedStack/AmplifyTableManager.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManager7BC8354F.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "amplifyDataTransactionNestedStackTransactionNestedStackResource3FC6514A": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3": { + "Fn::GetAtt": [ + "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEvent461D7D58Arn" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/66569180d99a3e2bf5de05b000ce15c547cff298821f9b02eb9cdd9b2a894d07.json" + ] + ] + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Transaction.NestedStack/Transaction.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionE9B7AEB7.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "amplifyDataBudgetNestedStackBudgetNestedStackResource32736D29": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3": { + "Fn::GetAtt": [ + "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEvent461D7D58Arn" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/26f331d13846d320b47e4af18be68996cda7859b0153d7eb6ea46df60809721a.json" + ] + ] + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/Budget.NestedStack/Budget.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataBudget3DC40C50.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "amplifyDataFinancialSummaryNestedStackFinancialSummaryNestedStackResourceDB208327": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResourceCDE2B074Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTab0795D5C3": { + "Fn::GetAtt": [ + "amplifyDataAmplifyTableManagerNestedStackAmplifyTableManagerNestedStackResource86290833", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyTableManagerTableManagerCustomProviderframeworkonEvent461D7D58Arn" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/c744d16f5aefb4e034fa661f99e48bdbc1609d75378bacf4e0fd92efc714d82a.json" + ] + ] + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FinancialSummary.NestedStack/FinancialSummary.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataFinancialSummary1D15C890.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "amplifyDataFunctionDirectiveStackNestedStackFunctionDirectiveStackNestedStackResource1246A302": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPINONEDSD3B1847BName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/814dbaab990f49449fe7c13eb08ecb71fe0820f647196bd1f1adef4b95250f08.json" + ] + ] + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/FunctionDirectiveStack.NestedStack/FunctionDirectiveStack.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataFunctionDirectiveStack4502FA51.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "amplifyDataCalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunctionA7159ADE": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalIncomeDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/5ed6d2b7b1a489d4821299a7cfa56175161dba8ef9e8bafdf60eea8dc9722eba.vtl" + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/CalculatedSummaryTotalIncomeDataResolverFn/CalculatedSummaryTotalIncomeDataResolverFn.AppSyncFunction" + } + }, + "CalculatedSummarytotalIncomeResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "FieldName": "totalIncome", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "amplifyDataCalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunctionA7159ADE", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalIncome\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/calculatedSummaryTotalIncomeResolver" + } + }, + "amplifyDataCalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction0552F328": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalExpensesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c2c3a9736438bb0c19d2ce27c3fbbe023994d660e57cfbdac9b8b9ac88e26e1b.vtl" + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/CalculatedSummaryTotalExpensesDataResolverFn/CalculatedSummaryTotalExpensesDataResolverFn.AppSyncFunction" + } + }, + "CalculatedSummarytotalExpensesResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "FieldName": "totalExpenses", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "amplifyDataCalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction0552F328", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalExpenses\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/calculatedSummaryTotalExpensesResolver" + } + }, + "amplifyDataCalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunction0EEE0DCD": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryBalanceDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/49a0c44eee383130599446f1f6b1848fc9a2e2746a1add8a741f0250607c51b9.vtl" + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/CalculatedSummaryBalanceDataResolverFn/CalculatedSummaryBalanceDataResolverFn.AppSyncFunction" + } + }, + "CalculatedSummarybalanceResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "FieldName": "balance", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "amplifyDataCalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunction0EEE0DCD", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"balance\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/calculatedSummaryBalanceResolver" + } + }, + "amplifyDataCalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunction6034C169": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummarySavingsRateDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/68a13c40ded8c1e75a1695bd6f5f48df5c8563c5e026676f8fd86bf55642578e.vtl" + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/CalculatedSummarySavingsRateDataResolverFn/CalculatedSummarySavingsRateDataResolverFn.AppSyncFunction" + } + }, + "CalculatedSummarysavingsRateResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "FieldName": "savingsRate", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "amplifyDataCalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunction6034C169", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"savingsRate\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/calculatedSummarySavingsRateResolver" + } + }, + "amplifyDataNotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunction79FCF2EC": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultSuccessDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7678428cc442b1982197e68ec6bb96535ae95270ffb18db4012d2798b49a3a5b.vtl" + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/NotificationResultSuccessDataResolverFn/NotificationResultSuccessDataResolverFn.AppSyncFunction" + } + }, + "NotificationResultsuccessResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "FieldName": "success", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "amplifyDataNotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunction79FCF2EC", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"success\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/notificationResultSuccessResolver" + } + }, + "amplifyDataNotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction09988691": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPINONEDS684BF699", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultMessageDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/830fd5a473c43e78ac02d7ec373d9543ca16c5b96b72acdde27ccd8277dec3f2.vtl" + }, + "ResponseMappingTemplateS3Location": { + "Fn::Sub": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/e5ac72a83d18a0cb18ce60e30414111cc0d76e69bd8d494c413d5b55a20705f5.vtl" + } + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/NotificationResultMessageDataResolverFn/NotificationResultMessageDataResolverFn.AppSyncFunction" + } + }, + "NotificationResultmessageResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "FieldName": "message", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "amplifyDataNotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction09988691", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"message\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"authRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"unauthRole\", \"arn:", + { + "Ref": "AWS::Partition" + }, + ":sts::", + { + "Ref": "AWS::AccountId" + }, + ":assumed-role/", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + }, + "/CognitoIdentityCredentials\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + }, + "\"))\n$util.qr($ctx.stash.put(\"adminRoles\", []))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "amplifyDataGraphQLAPITransformerSchemaFF50A789" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/notificationResultMessageResolver" + } + }, + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA": { + "Type": "AWS::S3::Bucket", + "Properties": { + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "GET", + "HEAD" + ], + "AllowedOrigins": [ + { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "AWS::Region" + }, + ".console.aws.amazon.com/amplify" + ] + ] + } + ] + } + ] + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "amplifyData" + }, + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + }, + { + "Key": "aws-cdk:cr-owned:3e0b76f7", + "Value": "true" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyCodegenAssets/AmplifyCodegenAssetsBucket/Resource" + } + }, + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyCodegenAssets/AmplifyCodegenAssetsBucket/Policy/Resource" + } + }, + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketAutoDeleteObjectsCustomResource437F26F5": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" + } + }, + "DependsOn": [ + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucketPolicyF1C1C548" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyCodegenAssets/AmplifyCodegenAssetsBucket/AutoDeleteObjectsCustomResource/Default" + } + }, + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905": { + "Type": "AWS::Lambda::LayerVersion", + "Properties": { + "Content": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "e2659170a0721541efa761a8d5d04d5e36cbbf691c4b15a9053002b7c825055d.zip" + }, + "Description": "/opt/awscli/aws" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyCodegenAssets/AmplifyCodegenAssetsDeployment/AwsCliLayer/Resource", + "aws:asset:path": "asset.e2659170a0721541efa761a8d5d04d5e36cbbf691c4b15a9053002b7c825055d.zip", + "aws:asset:is-bundled": false, + "aws:asset:property": "Content" + } + }, + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929": { + "Type": "Custom::CDKBucketDeployment", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", + "Arn" + ] + }, + "SourceBucketNames": [ + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ], + "SourceObjectKeys": [ + "94380705a5a4ff4feb32f5c84c1b79d8da8952cede8be74b5ebf42a53e2be8ab.zip" + ], + "SourceMarkers": [ + {} + ], + "DestinationBucketName": { + "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" + }, + "WaitForDistributionInvalidation": true, + "Prune": true, + "OutputObjectKeys": true, + "DestinationBucketArn": { + "Fn::GetAtt": [ + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", + "Arn" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/amplifyData/AmplifyCodegenAssets/AmplifyCodegenAssetsDeployment/CustomResource-1536MiB/Default" + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role" + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "aws:asset:path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", + "aws:asset:property": "Code" + } + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ], + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiB/ServiceRole/Resource" + } + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":s3:::", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsBucket9CCB4ACA", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:GetObject*", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*", + "s3:PutObject", + "s3:PutObjectLegalHold", + "s3:PutObjectRetention", + "s3:PutObjectTagging", + "s3:PutObjectVersionTagging", + "s3:Abort*" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "modelIntrospectionSchemaBucketF566B665", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "modelIntrospectionSchemaBucketF566B665", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", + "Roles": [ + { + "Ref": "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiB/ServiceRole/DefaultPolicy/Resource" + } + }, + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "3423a042b818e31c1e34a19d6689ab2e5f9b70fcbe9e71df66f241b20a200bd9.zip" + }, + "Environment": { + "Variables": { + "AWS_CA_BUNDLE": "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" + } + }, + "Handler": "index.handler", + "Layers": [ + { + "Ref": "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentAwsCliLayerE322F905" + } + ], + "MemorySize": 1536, + "Role": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2", + "Arn" + ] + }, + "Runtime": "python3.13", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "Timeout": 900 + }, + "DependsOn": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleDefaultPolicyFF1C635B", + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBServiceRoleA41FC8C2" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/Custom::CDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiB/Resource", + "aws:asset:path": "asset.3423a042b818e31c1e34a19d6689ab2e5f9b70fcbe9e71df66f241b20a200bd9", + "aws:asset:is-bundled": false, + "aws:asset:property": "Code" + } + }, + "modelIntrospectionSchemaBucketF566B665": { + "Type": "AWS::S3::Bucket", + "Properties": { + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + }, + { + "Key": "aws-cdk:cr-owned:dbdddeff", + "Value": "true" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/modelIntrospectionSchemaBucket/Resource" + } + }, + "modelIntrospectionSchemaBucketPolicy4DAB0D15": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "modelIntrospectionSchemaBucketF566B665" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "modelIntrospectionSchemaBucketF566B665", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "modelIntrospectionSchemaBucketF566B665", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "modelIntrospectionSchemaBucketF566B665", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "modelIntrospectionSchemaBucketF566B665", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/modelIntrospectionSchemaBucket/Policy/Resource" + } + }, + "modelIntrospectionSchemaBucketAutoDeleteObjectsCustomResourceFE57309F": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "modelIntrospectionSchemaBucketF566B665" + } + }, + "DependsOn": [ + "modelIntrospectionSchemaBucketPolicy4DAB0D15" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/modelIntrospectionSchemaBucket/AutoDeleteObjectsCustomResource/Default" + } + }, + "modelIntrospectionSchemaBucketDeploymentAwsCliLayer13C432F7": { + "Type": "AWS::Lambda::LayerVersion", + "Properties": { + "Content": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "e2659170a0721541efa761a8d5d04d5e36cbbf691c4b15a9053002b7c825055d.zip" + }, + "Description": "/opt/awscli/aws" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/modelIntrospectionSchemaBucketDeployment/AwsCliLayer/Resource", + "aws:asset:path": "asset.e2659170a0721541efa761a8d5d04d5e36cbbf691c4b15a9053002b7c825055d.zip", + "aws:asset:is-bundled": false, + "aws:asset:property": "Content" + } + }, + "modelIntrospectionSchemaBucketDeploymentCustomResource1536MiB104B97EC": { + "Type": "Custom::CDKBucketDeployment", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomCDKBucketDeployment8693BB64968944B69AAFB0CC9EB8756C1536MiBC5D8AB21", + "Arn" + ] + }, + "SourceBucketNames": [ + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + } + ], + "SourceObjectKeys": [ + "1dc2fa3a2c4f04e37164f36acde0f96ebb5690edcfb55236f37327230ef0ae7e.zip" + ], + "SourceMarkers": [ + {} + ], + "DestinationBucketName": { + "Ref": "modelIntrospectionSchemaBucketF566B665" + }, + "WaitForDistributionInvalidation": true, + "Prune": true, + "OutputObjectKeys": true + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/modelIntrospectionSchemaBucketDeployment/CustomResource-1536MiB/Default" + } + }, + "AMPLIFYDATAGRAPHQLENDPOINTParameter1C2CBB16": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Name": "/amplify/resource_reference/financetracker/e2e-sandbox-x/AMPLIFY_DATA_GRAPHQL_ENDPOINT", + "Tags": { + "amplify:deployment-type": "sandbox", + "created-by": "amplify" + }, + "Type": "String", + "Value": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "GraphQLUrl" + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/AMPLIFY_DATA_GRAPHQL_ENDPOINTParameter/Resource" + } + }, + "AMPLIFYDATAMODELINTROSPECTIONSCHEMABUCKETNAMEParameter47BF4F44": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Name": "/amplify/resource_reference/financetracker/e2e-sandbox-x/AMPLIFY_DATA_MODEL_INTROSPECTION_SCHEMA_BUCKET_NAME", + "Tags": { + "amplify:deployment-type": "sandbox", + "created-by": "amplify" + }, + "Type": "String", + "Value": { + "Ref": "modelIntrospectionSchemaBucketF566B665" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/AMPLIFY_DATA_MODEL_INTROSPECTION_SCHEMA_BUCKET_NAMEParameter/Resource" + } + }, + "AMPLIFYDATAMODELINTROSPECTIONSCHEMAKEYParameterB6AEAE8A": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Name": "/amplify/resource_reference/financetracker/e2e-sandbox-x/AMPLIFY_DATA_MODEL_INTROSPECTION_SCHEMA_KEY", + "Tags": { + "amplify:deployment-type": "sandbox", + "created-by": "amplify" + }, + "Type": "String", + "Value": "modelIntrospectionSchema.json" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/AMPLIFY_DATA_MODEL_INTROSPECTION_SCHEMA_KEYParameter/Resource" + } + }, + "AMPLIFYDATADEFAULTNAMEParameterE7C23CC4": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Name": "/amplify/resource_reference/financetracker/e2e-sandbox-x/AMPLIFY_DATA_DEFAULT_NAME", + "Tags": { + "amplify:deployment-type": "sandbox", + "created-by": "amplify" + }, + "Type": "String", + "Value": "amplifyData" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/AMPLIFY_DATA_DEFAULT_NAMEParameter/Resource" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/6VTTW/bMAz9LctZ0YIUu+zmOtgOK7osBnYZioCRGZeJPjxRTmYI/u+DpCxNt1OxEx9J8+FRj17K5YeFXLyDM89Ve5xr2sn4iBywbQKoo9ggu8ErFHDmbYS+59EqGT976J9/6qqne2AU9d7myreHqqebrFHPaCAVqp6+4CgencUVBGgKab23r7NPg1WBnK2d3VM3eEhJaiQd+oR+Eny3jcCMgWWVgmix1240aIO8H9QRw+paSF/LWKpZaIGJsKAfcWboF9nZx9ntE6Rl+U7mFl9YqyG4FWoM+HV3QBV4Non/mn66qFk7TWp80VTyNygrA02AgGnptwn7d/hpEhrMrgUZ6719gBH9d/ScjGjIdhqDu/okruDGvEkQGBk3TmdPc3xZsqBJMBsZm+DJdmvwYDCgz/0/yTSJbHAToCPbpV65yXrg4Mz1Mi/XkXERvtVJ9BbOrDTJ6sy1przHK/6/eNbenahFn+5kEta1KA/8/rRcyGX6Qw5MNPeDDWRQbkr8DRAeMyU+AwAA" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Type": "String" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Outputs": { + "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Value": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "ApiId" + ] + } + }, + "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860GraphQLUrl": { + "Value": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPI42A6FA33", + "GraphQLUrl" + ] + } + }, + "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiBB20EBAE4DestinationBucketArn": { + "Value": { + "Fn::GetAtt": [ + "amplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiB21775929", + "DestinationBucketArn" + ] + } + }, + "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPIDefaultApiKey9BC4ED8AApiKey": { + "Value": { + "Fn::GetAtt": [ + "amplifyDataGraphQLAPIDefaultApiKey1C8ED374", + "ApiKey" + ] + } + }, + "amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionTransactionTable42B70DA2TableArn": { + "Value": { + "Fn::GetAtt": [ + "amplifyDataTransactionNestedStackTransactionNestedStackResource3FC6514A", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionTransactionTable42B70DA2TableArn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.description.txt new file mode 100644 index 00000000000..907003893a9 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"AmplifySandbox","createdWith":"1.18.0","stackType":"function-Lambda","metadata":{}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.outputs.json new file mode 100644 index 00000000000..088e1033f65 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.outputs.json @@ -0,0 +1,6 @@ +[ + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206functionfinancetrackergen2xlambdaE4871E89Ref", + "OutputValue": "financetracker-gen2-x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.parameters.json new file mode 100644 index 00000000000..0cb10aeb9f4 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.parameters.json @@ -0,0 +1,18 @@ +[ + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2", + "ParameterValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Transaction-adetddan7nd55gwre37yyck3vu-x" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceBudgetAlertTopicF822F6FBRef", + "ParameterValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x-customfinanceBudgetAlertTopic1D98F61E-z2Bsgiz9acLx" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId", + "ParameterValue": "iltux4eqlfcblbluzjzhytjruu" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceMonthlyReportTopic795F5FD4Ref", + "ParameterValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-e2e-sandbox-x-customfinanceBBD6722F-x-customfinanceMonthlyReportTopic558EAC22-M3Fs2Hzpq9xt" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.template.json new file mode 100644 index 00000000000..012841d591f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-function1351588B-x.template.json @@ -0,0 +1,500 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifySandbox\",\"createdWith\":\"1.18.0\",\"stackType\":\"function-Lambda\",\"metadata\":{}}", + "Resources": { + "financetrackergen2xlambdaServiceRole176F6EF2": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "ManagedPolicyArns": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + ] + ] + } + ], + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "financetracker-gen2-x" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/function/financetracker-gen2-x-lambda/ServiceRole/Resource" + } + }, + "financetrackergen2xlambdaServiceRoleDefaultPolicy3883D373": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:Put*", + "dynamodb:Create*", + "dynamodb:BatchWriteItem", + "dynamodb:PartiQLInsert", + "dynamodb:Get*", + "dynamodb:BatchGetItem", + "dynamodb:List*", + "dynamodb:Describe*", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:PartiQLSelect", + "dynamodb:Update*", + "dynamodb:RestoreTable*", + "dynamodb:PartiQLUpdate", + "dynamodb:Delete*", + "dynamodb:PartiQLDelete" + ], + "Effect": "Allow", + "Resource": [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2" + } + ] + }, + { + "Action": "sns:Publish", + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "financetrackergen2xlambdaServiceRoleDefaultPolicy3883D373", + "Roles": [ + { + "Ref": "financetrackergen2xlambdaServiceRole176F6EF2" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/function/financetracker-gen2-x-lambda/ServiceRole/DefaultPolicy/Resource" + } + }, + "financetrackergen2xlambda0DFEA8BB": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Architectures": [ + "x86_64" + ], + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "0a2c16342fc4a96b591fbcf21a445adbef360812ced796067b498b8e7c29c5bf.zip" + }, + "Environment": { + "Variables": { + "BUDGET_ALERT_TOPIC_ARN": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceBudgetAlertTopicF822F6FBRef" + }, + "MONTHLY_REPORT_TOPIC_ARN": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceMonthlyReportTopic795F5FD4Ref" + }, + "ENV": "gen2-x", + "REGION": "us-east-1", + "AMPLIFY_SSM_ENV_CONFIG": "{}", + "API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_ARN": { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2" + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_NAME": { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2" + } + ] + } + ] + } + ] + } + ] + } + } + }, + "EphemeralStorage": { + "Size": 512 + }, + "FunctionName": "financetracker-gen2-x", + "Handler": "index.handler", + "MemorySize": 128, + "Role": { + "Fn::GetAtt": [ + "financetrackergen2xlambdaServiceRole176F6EF2", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "financetracker-gen2-x" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "Timeout": 25 + }, + "DependsOn": [ + "financetrackergen2xlambdaServiceRoleDefaultPolicy3883D373", + "financetrackergen2xlambdaServiceRole176F6EF2" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/function/financetracker-gen2-x-lambda/Resource", + "aws:asset:path": "asset.0a2c16342fc4a96b591fbcf21a445adbef360812ced796067b498b8e7c29c5bf", + "aws:asset:is-bundled": true, + "aws:asset:property": "Code" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/zWOUQqDMBBEz9L/dSuRHqAK/SxFDyBrEmU1JtCNlSLevUTp15uBYWYUqluO+YVWybSZMscdbk8r0Zomkp6AVmk3R3NnqPXB2FHweeCxeB05eGCacauDs1D1/uArONbfZE+1gxQtidgoeE8AKbBc9GRjSWLhrMeq9//SHY5cE2lgP+yQlnGU60flqNLfUZiz9+Ijzxbrkz9tOC8RzAAAAA==" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/function/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceBudgetAlertTopicF822F6FBRef": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceMonthlyReportTopic795F5FD4Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Type": "String" + } + }, + "Outputs": { + "amplifyfinancetrackere2esandbox9663a3a206functionfinancetrackergen2xlambdaE4871E89Ref": { + "Value": { + "Ref": "financetrackergen2xlambda0DFEA8BB" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.description.txt new file mode 100644 index 00000000000..950d1c3cb96 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"AmplifySandbox","createdWith":"1.4.3","stackType":"storage-S3","metadata":{}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.outputs.json new file mode 100644 index 00000000000..7f68500d01f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.outputs.json @@ -0,0 +1,6 @@ +[ + { + "OutputKey": "amplifyfinancetrackere2esandbox9663a3a206storagefinancetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket902C094CRef", + "OutputValue": "amplify-financetra2604231-financetrackera14ace1bd4-m1gc0b4dylcm" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.parameters.json new file mode 100644 index 00000000000..976e86bcb89 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.parameters.json @@ -0,0 +1,10 @@ +[ + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthauthenticatedU-mtMR6VW2YKH5" + }, + { + "ParameterKey": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref", + "ParameterValue": "amplify-financetra2604231-amplifyAuthunauthenticate-rSgiGOevcLBc" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.template.json new file mode 100644 index 00000000000..dd0585fa71c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x-storage0EC3F24A-x.template.json @@ -0,0 +1,806 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifySandbox\",\"createdWith\":\"1.4.3\",\"stackType\":\"storage-S3\",\"metadata\":{}}", + "Resources": { + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "BucketKeyEnabled": false, + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "GET", + "HEAD", + "PUT", + "POST", + "DELETE" + ], + "AllowedOrigins": [ + "*" + ], + "ExposedHeaders": [ + "x-amz-server-side-encryption", + "x-amz-request-id", + "x-amz-id-2", + "ETag" + ], + "MaxAge": 3000 + } + ] + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "amplify:friendly-name", + "Value": "financetrackera14ace1bd4be4b579cb608d44266aea7x-gen2-x" + }, + { + "Key": "aws-cdk:auto-delete-objects", + "Value": "true" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/financetrackera14ace1bd4be4b579cb608d44266aea7x-gen2-x/Bucket/Resource" + } + }, + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucketPolicy8E870F18": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Condition": { + "Bool": { + "aws:SecureTransport": "false" + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + }, + { + "Action": [ + "s3:PutBucketPolicy", + "s3:GetBucket*", + "s3:List*", + "s3:DeleteObject*" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + } + }, + "Resource": [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/financetrackera14ace1bd4be4b579cb608d44266aea7x-gen2-x/Bucket/Policy/Resource" + } + }, + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucketAutoDeleteObjectsCustomResource6F25D99C": { + "Type": "Custom::S3AutoDeleteObjects", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F", + "Arn" + ] + }, + "BucketName": { + "Ref": "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB" + } + }, + "DependsOn": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucketPolicy8E870F18" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/financetrackera14ace1bd4be4b579cb608d44266aea7x-gen2-x/Bucket/AutoDeleteObjectsCustomResource/Default" + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + } + } + ] + }, + "ManagedPolicyArns": [ + { + "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role" + } + }, + "CustomS3AutoDeleteObjectsCustomResourceProviderHandler9D90184F": { + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "S3Bucket": { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "S3Key": "faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6.zip" + }, + "Timeout": 900, + "MemorySize": 128, + "Handler": "index.handler", + "Role": { + "Fn::GetAtt": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Description": { + "Fn::Join": [ + "", + [ + "Lambda function for auto-deleting objects in ", + { + "Ref": "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB" + }, + " S3 bucket." + ] + ] + } + }, + "DependsOn": [ + "CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", + "aws:asset:path": "asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6", + "aws:asset:property": "Code" + } + }, + "FINANCETRACKERA14ACE1BD4BE4B579CB608D44266AEA7919A7GEN2KKRJKNGBOQBUCKETNAMEParameter11BD537A": { + "Type": "AWS::SSM::Parameter", + "Properties": { + "Name": "/amplify/resource_reference/financetracker/e2e-sandbox-x/FINANCETRACKERA_14_ACE_1_BD_4_BE_4_B_579_CB_608_D_44266_AEA_7919_A_7_GEN_2_KKRJKNGBOQ_BUCKET_NAME", + "Tags": { + "amplify:deployment-type": "sandbox", + "created-by": "amplify" + }, + "Type": "String", + "Value": { + "Ref": "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB" + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/FINANCETRACKERA_14_ACE_1_BD_4_BE_4_B_579_CB_608_D_44266_AEA_7919_A_7_GEN_2_KKRJKNGBOQ_BUCKET_NAMEParameter/Resource" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206storageAccess3F45D1FCC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/public/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/*", + "public/" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "amplifyfinancetrackere2esandbox9663a3a206storageAccess3F45D1FCC", + "Roles": [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/amplify-financetracker-e2e-sandbox-x--storageAccess3/Resource" + } + }, + "amplifyfinancetrackere2esandbox9663a3a206storageAccess4AB6EEBEC": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:PutObject", + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/public/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/protected/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/private/*" + ] + ] + } + ] + }, + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/public/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/protected/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/private/*" + ] + ] + } + ] + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/*", + "public/", + "protected/*", + "protected/", + "private/*", + "private/" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + } + }, + { + "Action": "s3:DeleteObject", + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/public/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/protected/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::GetAtt": [ + "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB", + "Arn" + ] + }, + "/private/*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "amplifyfinancetrackere2esandbox9663a3a206storageAccess4AB6EEBEC", + "Roles": [ + { + "Ref": "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + } + ] + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/amplify-financetracker-e2e-sandbox-x--storageAccess4/Resource" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/5VQTUvEMBD9LfacjqWLF2+761nL9igi2XQs0zYJZCa7Ssh/l27A6tHTvMf7gmmhfWigudNXrs0w1wudIT0jCw69aDMrfeX3xDtIh2hmFHX8cAW9psrSJ7nqsfodXv28g5vEUKz7KP4JFxR8OU9ohKv8porU+YXM19Za+D+6S6AXLWjR3aqzYraQegnkxk4HbVEwrBs/JCvSFtK2XlDO6hhZvD0h+xgMrtKG/0hd8BcaMBw0o9ozo/SiR3JjVs4PCBPfX9oG2vW7ExPVITohi3Aq9xtDJzdGegEAAA==" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Type": "String" + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Type": "String" + } + }, + "Outputs": { + "amplifyfinancetrackere2esandbox9663a3a206storagefinancetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket902C094CRef": { + "Value": { + "Ref": "financetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket044586FB" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.description.txt new file mode 100644 index 00000000000..d1c87f28683 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"AmplifySandbox","createdWith":"1.22.0","stackType":"root","metadata":{}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.outputs.json new file mode 100644 index 00000000000..fe86345d5b3 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.outputs.json @@ -0,0 +1,138 @@ +[ + { + "OutputKey": "webClientId", + "OutputValue": "d3i0osngdk8t7lnvejisior6i" + }, + { + "OutputKey": "socialProviders", + "OutputValue": "" + }, + { + "OutputKey": "usernameAttributes", + "OutputValue": "[\"email\"]" + }, + { + "OutputKey": "bucketName", + "OutputValue": "amplify-financetra2604231-financetrackera14ace1bd4-m1gc0b4dylcm" + }, + { + "OutputKey": "signupAttributes", + "OutputValue": "[\"email\"]" + }, + { + "OutputKey": "oauthClientId", + "OutputValue": "d3i0osngdk8t7lnvejisior6i" + }, + { + "OutputKey": "allowUnauthenticatedIdentities", + "OutputValue": "true" + }, + { + "OutputKey": "oauthCognitoDomain", + "OutputValue": "" + }, + { + "OutputKey": "oauthScope", + "OutputValue": "[\"profile\",\"phone\",\"email\",\"openid\",\"aws.cognito.signin.user.admin\"]" + }, + { + "OutputKey": "oauthRedirectSignOut", + "OutputValue": "" + }, + { + "OutputKey": "awsAppsyncAdditionalAuthenticationTypes", + "OutputValue": "AMAZON_COGNITO_USER_POOLS,AWS_IAM" + }, + { + "OutputKey": "mfaTypes", + "OutputValue": "[]" + }, + { + "OutputKey": "mfaConfiguration", + "OutputValue": "OFF" + }, + { + "OutputKey": "storageRegion", + "OutputValue": "us-east-1" + }, + { + "OutputKey": "oauthResponseType", + "OutputValue": "code" + }, + { + "OutputKey": "awsAppsyncApiKey", + "OutputValue": "da2-fakeapikey00000000000000" + }, + { + "OutputKey": "awsAppsyncAuthenticationType", + "OutputValue": "API_KEY" + }, + { + "OutputKey": "oauthRedirectSignIn", + "OutputValue": "https://example.com" + }, + { + "OutputKey": "passwordPolicyMinLength", + "OutputValue": "8" + }, + { + "OutputKey": "awsAppsyncApiEndpoint", + "OutputValue": "https://fssl5qlw4vhrjopsneyjxxv7ey.appsync-api.us-east-1.amazonaws.com/graphql" + }, + { + "OutputKey": "awsAppsyncApiId", + "OutputValue": "iltux4eqlfcblbluzjzhytjruu" + }, + { + "OutputKey": "authRegion", + "OutputValue": "us-east-1" + }, + { + "OutputKey": "buckets", + "OutputValue": "[\"{\\\"name\\\":\\\"financetrackera14ace1bd4be4b579cb608d44266aea7x-gen2-x\\\",\\\"bucketName\\\":\\\"amplify-financetra2604231-financetrackera14ace1bd4-m1gc0b4dylcm\\\",\\\"storageRegion\\\":\\\"us-east-1\\\",\\\"paths\\\":{\\\"public/*\\\":{\\\"guest\\\":[\\\"get\\\",\\\"list\\\"],\\\"authenticated\\\":[\\\"write\\\",\\\"get\\\",\\\"list\\\",\\\"delete\\\"]},\\\"protected/*\\\":{\\\"authenticated\\\":[\\\"write\\\",\\\"get\\\",\\\"list\\\",\\\"delete\\\"]},\\\"private/*\\\":{\\\"authenticated\\\":[\\\"write\\\",\\\"get\\\",\\\"list\\\",\\\"delete\\\"]}}}\"]" + }, + { + "OutputKey": "amplifyApiModelSchemaS3Uri", + "OutputValue": "s3://amplify-financetra2604231-amplifydataamplifycodege-ywo1kf4bexqa/model-schema.graphql" + }, + { + "OutputKey": "groups", + "OutputValue": "[]" + }, + { + "OutputKey": "definedFunctions", + "OutputValue": "[\"financetracker-gen2-x\"]" + }, + { + "OutputKey": "passwordlessOptions", + "OutputValue": "" + }, + { + "OutputKey": "awsAppsyncRegion", + "OutputValue": "us-east-1" + }, + { + "OutputKey": "deploymentType", + "OutputValue": "sandbox" + }, + { + "OutputKey": "passwordPolicyRequirements", + "OutputValue": "[]" + }, + { + "OutputKey": "region", + "OutputValue": "us-east-1" + }, + { + "OutputKey": "userPoolId", + "OutputValue": "us-east-1_Qrh9UxVmy" + }, + { + "OutputKey": "identityPoolId", + "OutputValue": "us-east-1:ccae5924-7e98-4b8f-bf21-ac09c945a04b" + }, + { + "OutputKey": "verificationMechanisms", + "OutputValue": "[\"email\"]" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.parameters.json new file mode 100644 index 00000000000..1e2ac53a819 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.parameters.json @@ -0,0 +1,7 @@ +[ + { + "ParameterKey": "BootstrapVersion", + "ParameterValue": "/cdk-bootstrap/hnb659fds/version", + "ResolvedValue": "31" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.template.json new file mode 100644 index 00000000000..8e1b48e08ad --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-e2e-sandbox-x.template.json @@ -0,0 +1,926 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"AmplifySandbox\",\"createdWith\":\"1.22.0\",\"stackType\":\"root\",\"metadata\":{}}", + "Metadata": { + "AWS::Amplify::Platform": { + "version": "1", + "stackOutputs": [ + "deploymentType", + "region" + ] + }, + "AWS::Amplify::Auth": { + "version": "1", + "stackOutputs": [ + "userPoolId", + "webClientId", + "identityPoolId", + "authRegion", + "allowUnauthenticatedIdentities", + "signupAttributes", + "usernameAttributes", + "verificationMechanisms", + "passwordPolicyMinLength", + "passwordPolicyRequirements", + "mfaConfiguration", + "mfaTypes", + "passwordlessOptions", + "socialProviders", + "oauthCognitoDomain", + "oauthScope", + "oauthRedirectSignIn", + "oauthRedirectSignOut", + "oauthResponseType", + "oauthClientId", + "groups" + ] + }, + "AWS::Amplify::GraphQL": { + "version": "1", + "stackOutputs": [ + "awsAppsyncApiId", + "awsAppsyncApiEndpoint", + "awsAppsyncAuthenticationType", + "awsAppsyncRegion", + "amplifyApiModelSchemaS3Uri", + "awsAppsyncApiKey", + "awsAppsyncAdditionalAuthenticationTypes" + ] + }, + "AWS::Amplify::Function": { + "version": "1", + "stackOutputs": [ + "definedFunctions" + ] + }, + "AWS::Amplify::Storage": { + "version": "1", + "stackOutputs": [ + "buckets", + "storageRegion", + "bucketName" + ] + } + }, + "Outputs": { + "deploymentType": { + "Value": "sandbox" + }, + "region": { + "Value": { + "Ref": "AWS::Region" + } + }, + "userPoolId": { + "Value": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref" + ] + } + }, + "webClientId": { + "Value": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolAppClient639403C3Ref" + ] + } + }, + "identityPoolId": { + "Value": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + ] + } + }, + "authRegion": { + "Value": { + "Ref": "AWS::Region" + } + }, + "allowUnauthenticatedIdentities": { + "Value": "true" + }, + "signupAttributes": { + "Value": "[\"email\"]" + }, + "usernameAttributes": { + "Value": "[\"email\"]" + }, + "verificationMechanisms": { + "Value": "[\"email\"]" + }, + "passwordPolicyMinLength": { + "Value": "8" + }, + "passwordPolicyRequirements": { + "Value": "[]" + }, + "mfaConfiguration": { + "Value": "OFF" + }, + "mfaTypes": { + "Value": "[]" + }, + "passwordlessOptions": { + "Value": "" + }, + "socialProviders": { + "Value": "" + }, + "oauthCognitoDomain": { + "Value": "" + }, + "oauthScope": { + "Value": "[\"profile\",\"phone\",\"email\",\"openid\",\"aws.cognito.signin.user.admin\"]" + }, + "oauthRedirectSignIn": { + "Value": "https://example.com" + }, + "oauthRedirectSignOut": { + "Value": "" + }, + "oauthResponseType": { + "Value": "code" + }, + "oauthClientId": { + "Value": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolAppClient639403C3Ref" + ] + } + }, + "groups": { + "Value": "[]" + }, + "awsAppsyncApiId": { + "Value": { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + ] + } + }, + "awsAppsyncApiEndpoint": { + "Value": { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860GraphQLUrl" + ] + } + }, + "awsAppsyncAuthenticationType": { + "Value": "API_KEY" + }, + "awsAppsyncRegion": { + "Value": { + "Ref": "AWS::Region" + } + }, + "amplifyApiModelSchemaS3Uri": { + "Value": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Fn::Select": [ + 0, + { + "Fn::Split": [ + "/", + { + "Fn::Select": [ + 5, + { + "Fn::Split": [ + ":", + { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataAmplifyCodegenAssetsAmplifyCodegenAssetsDeploymentCustomResource1536MiBB20EBAE4DestinationBucketArn" + ] + } + ] + } + ] + } + ] + } + ] + }, + "/model-schema.graphql" + ] + ] + } + }, + "awsAppsyncApiKey": { + "Value": { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPIDefaultApiKey9BC4ED8AApiKey" + ] + } + }, + "awsAppsyncAdditionalAuthenticationTypes": { + "Value": "AMAZON_COGNITO_USER_POOLS,AWS_IAM" + }, + "definedFunctions": { + "Value": { + "Fn::Join": [ + "", + [ + "[\"", + { + "Fn::GetAtt": [ + "function1351588B", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206functionfinancetrackergen2xlambdaE4871E89Ref" + ] + }, + "\"]" + ] + ] + } + }, + "storageRegion": { + "Value": { + "Ref": "AWS::Region" + } + }, + "bucketName": { + "Value": { + "Fn::GetAtt": [ + "storage0EC3F24A", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206storagefinancetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket902C094CRef" + ] + } + }, + "buckets": { + "Value": { + "Fn::Join": [ + "", + [ + "[\"{\\\"name\\\":\\\"financetrackera14ace1bd4be4b579cb608d44266aea7x-gen2-x\\\",\\\"bucketName\\\":\\\"", + { + "Fn::GetAtt": [ + "storage0EC3F24A", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206storagefinancetrackera14ace1bd4be4b579cb608d44266aea7xgen2xBucket902C094CRef" + ] + }, + "\\\",\\\"storageRegion\\\":\\\"", + { + "Ref": "AWS::Region" + }, + "\\\",\\\"paths\\\":{\\\"public/*\\\":{\\\"guest\\\":[\\\"get\\\",\\\"list\\\"],\\\"authenticated\\\":[\\\"write\\\",\\\"get\\\",\\\"list\\\",\\\"delete\\\"]},\\\"protected/*\\\":{\\\"authenticated\\\":[\\\"write\\\",\\\"get\\\",\\\"list\\\",\\\"delete\\\"]},\\\"private/*\\\":{\\\"authenticated\\\":[\\\"write\\\",\\\"get\\\",\\\"list\\\",\\\"delete\\\"]}}}\"]" + ] + ] + } + } + }, + "Resources": { + "auth179371D7": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/70fb11acd40d2bf3286b3ba8ddcc39c80fabe789aced316a9a38bb7c428359da.json" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/auth.NestedStack/auth.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206authBE0A6716.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "data7552DF31": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthUserPoolBB38D142Ref" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthIdentityPool377D30A7Ref" + ] + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/47d550cb9b558327dd49191a63dea7d6f5e07e5b211ef7246e9d941ca730cc6f.json" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/data.NestedStack/data.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206data5E56D996.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "storage0EC3F24A": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthunauthenticatedUserRoleF67C9A23Ref" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206authNestedStackauthNestedStackResource2157E4C1Outputsamplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref": { + "Fn::GetAtt": [ + "auth179371D7", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206authamplifyAuthauthenticatedUserRole20A0EAC9Ref" + ] + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/ad55ff4b813ba7f827f69c9b3e6ff214896b827e7c2296cb1b38b01f4d0362b4.json" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/storage.NestedStack/storage.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206storage3321E23B.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "function1351588B": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2": { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionTransactionTable42B70DA2TableArn" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceBudgetAlertTopicF822F6FBRef": { + "Fn::GetAtt": [ + "customfinanceBBD6722F", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206customfinanceBudgetAlertTopicF822F6FBRef" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206customfinanceNestedStackcustomfinanceNestedStackResourceFDC4BF76Outputsamplifyfinancetrackere2esandbox9663a3a206customfinanceMonthlyReportTopic795F5FD4Ref": { + "Fn::GetAtt": [ + "customfinanceBBD6722F", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206customfinanceMonthlyReportTopic795F5FD4Ref" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + ] + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/86621839ec5d56329d5f98997307a94873d4e2b6483ae479c1e3bf8307e34232.json" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/function.NestedStack/function.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206functionE452A796.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "customfinanceBBD6722F": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/fc85d5de20e6d04fb512a559bc4af00b13e6afc306f2ddf1f0b891e0c2b1e5c3.json" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customfinance.NestedStack/customfinance.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206customfinance4D1AD3A1.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "customresolver37EB1DEE": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId": { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataGraphQLAPI1D168860ApiId" + ] + }, + "referencetoamplifyfinancetrackere2esandbox9663a3a206dataNestedStackdataNestedStackResource956A4541Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28OutputsB17630B2": { + "Fn::GetAtt": [ + "data7552DF31", + "Outputs.amplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionNestedStackTransactionNestedStackResourceE5410A28Outputsamplifyfinancetrackere2esandbox9663a3a206dataamplifyDataTransactionTransactionTable42B70DA2TableArn" + ] + } + }, + "Tags": [ + { + "Key": "amplify:deployment-type", + "Value": "sandbox" + }, + { + "Key": "created-by", + "Value": "amplify" + } + ], + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" + }, + "/1844a53dd73b22e55a2e3e804e39e30669a2c3d8a3efc1ca63f7c994143a85f2.json" + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete", + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/customresolver.NestedStack/customresolver.NestedStackResource", + "aws:asset:path": "amplifyfinancetrackere2esandbox9663a3a206customresolver470E3FDD.nested.template.json", + "aws:asset:property": "TemplateURL" + } + }, + "CDKMetadata": { + "Type": "AWS::CDK::Metadata", + "Properties": { + "Analytics": "v2:deflate64:H4sIAAAAAAAA/zPSMzI10DNQTCwv1k1OydbNyUzSqw4uSUzO1nFOy/MvLSkoLQGxwEK1Onn5Kal6WcX6ZUYGekYgfVnFmZm6RaV5JZm5qXpBEBoAh6iAllQAAAA=" + }, + "Metadata": { + "aws:cdk:path": "amplify-financetracker-e2e-sandbox-x/CDKMetadata/Default" + }, + "Condition": "CDKMetadataAvailable" + } + }, + "Conditions": { + "CDKMetadataAvailable": { + "Fn::Or": [ + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "af-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-northeast-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-south-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-3" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ap-southeast-4" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "ca-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "cn-northwest-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-central-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-north-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-south-2" + ] + } + ] + }, + { + "Fn::Or": [ + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "eu-west-3" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "il-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-central-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "me-south-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "sa-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-1" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-east-2" + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-1" + ] + } + ] + }, + { + "Fn::Equals": [ + { + "Ref": "AWS::Region" + }, + "us-west-2" + ] + } + ] + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.description.txt new file mode 100644 index 00000000000..6b3d983ba60 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.description.txt @@ -0,0 +1 @@ +An auto-generated nested stack for the @function directive. diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.outputs.json new file mode 100644 index 00000000000..fe51488c706 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.outputs.json @@ -0,0 +1 @@ +[] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.parameters.json new file mode 100644 index 00000000000..7e3f4bfe273 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.parameters.json @@ -0,0 +1,22 @@ +[ + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref", + "ParameterValue": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPI20497F53ApiId", + "ParameterValue": "adetddan7nd55gwre37yyck3vu" + }, + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentBucket7592718ARef", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "referencetotransformerrootstackenv10C5A902Ref", + "ParameterValue": "x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.template.json new file mode 100644 index 00000000000..b363d73a0fd --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-FunctionDirectiveStack-x.template.json @@ -0,0 +1,369 @@ +{ + "Description": "An auto-generated nested stack for the @function directive.", + "AWSTemplateFormatVersion": "2010-09-09", + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + } + }, + "Resources": { + "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "FinancetrackerLambdaDataSourceServiceRoleDefaultPolicy28298548": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "lambda:InvokeFunction", + "Effect": "Allow", + "Resource": [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + }, + { + "Fn::Join": [ + "", + [ + { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + }, + ":*" + ] + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FinancetrackerLambdaDataSourceServiceRoleDefaultPolicy28298548", + "Roles": [ + { + "Ref": "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB" + } + ] + } + }, + "FinancetrackerLambdaDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "LambdaConfig": { + "LambdaFunctionArn": { + "Fn::If": [ + "HasEnvironmentParameter", + { + "Fn::Sub": [ + "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker-${env}", + { + "env": { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + } + ] + }, + { + "Fn::Sub": "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:financetracker" + } + ] + } + }, + "Name": "FinancetrackerLambdaDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancetrackerLambdaDataSourceServiceRole8AA0CCCB", + "Arn" + ] + }, + "Type": "AWS_LAMBDA" + } + }, + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancetrackerLambdaDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "InvokeFinancetrackerLambdaDataSource", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/InvokeFinancetrackerLambdaDataSource.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/InvokeFinancetrackerLambdaDataSource.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancetrackerLambdaDataSource" + ] + }, + "QuerycalculateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "calculateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"calculateFinancialSummary\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.calculateFinancialSummary.res.vtl" + ] + ] + }, + "TypeName": "Query" + } + }, + "MutationsendMonthlyReportResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "sendMonthlyReport", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendMonthlyReport\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.sendMonthlyReport.res.vtl" + ] + ] + }, + "TypeName": "Mutation" + } + }, + "MutationsendBudgetAlertResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "sendBudgetAlert", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "InvokeFinancetrackerLambdaDataSourceInvokeFinancetrackerLambdaDataSourceAppSyncFunction77FD0D03", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": "## [Start] Stash resolver specific context.. **\n$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"sendBudgetAlert\"))\n{}\n## [End] Stash resolver specific context.. **", + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.sendBudgetAlert.res.vtl" + ] + ] + }, + "TypeName": "Mutation" + } + }, + "QueryCalculateFinancialSummaryAuthFNQueryCalculateFinancialSummaryAuthFNAppSyncFunction47E6D325": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryCalculateFinancialSummaryAuthFN", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.calculateFinancialSummary.auth.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + } + }, + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.description.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.description.txt @@ -0,0 +1 @@ + diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.outputs.json new file mode 100644 index 00000000000..d68a55dae4a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.outputs.json @@ -0,0 +1,20 @@ +[ + { + "OutputKey": "GetAttBudgetDataSourceName", + "OutputValue": "BudgetTable", + "Description": "Your model DataSource name.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:BudgetDataSource:Name" + }, + { + "OutputKey": "GetAttBudgetTableStreamArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Budget-adetddan7nd55gwre37yyck3vu-x/stream/2026-04-23T19:25:17.433", + "Description": "Your DynamoDB table StreamArn.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:BudgetTable:StreamArn" + }, + { + "OutputKey": "GetAttBudgetTableName", + "OutputValue": "Budget-adetddan7nd55gwre37yyck3vu-x", + "Description": "Your DynamoDB table name.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:BudgetTable:Name" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.parameters.json new file mode 100644 index 00000000000..3ac339a7787 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.parameters.json @@ -0,0 +1,70 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId", + "ParameterValue": "vo3v72uc6jgijkrbbpoxcknmf4" + }, + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref", + "ParameterValue": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId", + "ParameterValue": "q6lch4ljlfbaxjlsimyw33x6ie" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPI20497F53ApiId", + "ParameterValue": "adetddan7nd55gwre37yyck3vu" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId", + "ParameterValue": "yfpgoobyazg5ligihstmft2ija" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId", + "ParameterValue": "jwlf4swbxbgarh45fc67uml5yi" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId", + "ParameterValue": "dfqav6p55rckjai7lifrsrvhuy" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId", + "ParameterValue": "4zwwuyicvjcebfdx5ib4tsmhhq" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentBucket7592718ARef", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "referencetotransformerrootstackenv10C5A902Ref", + "ParameterValue": "x" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId", + "ParameterValue": "qddohwnaa5awhl3rffpalndelu" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.template.json new file mode 100644 index 00000000000..2cde9e1653f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Budget-x.template.json @@ -0,0 +1,1204 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "BudgetTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Retain" + }, + "BudgetIAMRole782EC899": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Budget-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "BudgetIAMRole3af77f-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "BudgetIAMRoleDefaultPolicyAF75E5EB": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "BudgetTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "BudgetIAMRoleDefaultPolicyAF75E5EB", + "Roles": [ + { + "Ref": "BudgetIAMRole782EC899" + } + ] + } + }, + "BudgetDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "BudgetTable" + } + }, + "Name": "BudgetTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "BudgetIAMRole782EC899", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "BudgetIAMRole782EC899" + ] + }, + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "GetBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryGetBudgetDataResolverFnQueryGetBudgetDataResolverFnAppSyncFunction38D0A5C0", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListBudgetsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listBudgets.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listBudgets.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "ListBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listBudgets", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryListBudgetsDataResolverFnQueryListBudgetsDataResolverFnAppSyncFunction77E13C9A", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listBudgets\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "CreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationcreateBudgetauth0FunctionMutationcreateBudgetauth0FunctionAppSyncFunctionB2E040D5", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationCreateBudgetDataResolverFnMutationCreateBudgetDataResolverFnAppSyncFunctionAB6B8744", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "UpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationupdateBudgetauth0FunctionMutationupdateBudgetauth0FunctionAppSyncFunctionDE6C7FF2", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationUpdateBudgetDataResolverFnMutationUpdateBudgetDataResolverFnAppSyncFunctionCD4E668D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteBudgetauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteBudgetDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteBudget.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "BudgetDataSource" + ] + }, + "DeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteBudgetauth0FunctionMutationdeleteBudgetauth0FunctionAppSyncFunctionED33A36A", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationDeleteBudgetDataResolverFnMutationDeleteBudgetDataResolverFnAppSyncFunctionD420DB57", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "BudgetTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteBudgetResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteBudget", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteBudget\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "BudgetownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Budget\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Budget" + } + } + }, + "Outputs": { + "GetAttBudgetTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "BudgetTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetTable:StreamArn" + ] + ] + } + } + }, + "GetAttBudgetTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "BudgetTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetTable:Name" + ] + ] + } + } + }, + "GetAttBudgetDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "BudgetDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:BudgetDataSource:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.description.txt new file mode 100644 index 00000000000..21e1447423e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.description.txt @@ -0,0 +1 @@ +An auto-generated nested stack. diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.outputs.json new file mode 100644 index 00000000000..291e7aad7f7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.outputs.json @@ -0,0 +1,7 @@ +[ + { + "OutputKey": "EmptyOutput", + "OutputValue": "", + "Description": "An empty output. You may delete this if you have at least one resource above." + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.parameters.json new file mode 100644 index 00000000000..b0412e2da43 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.parameters.json @@ -0,0 +1,22 @@ +[ + { + "ParameterKey": "S3DeploymentBucket", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "AppSyncApiId", + "ParameterValue": "adetddan7nd55gwre37yyck3vu" + }, + { + "ParameterKey": "env", + "ParameterValue": "x" + }, + { + "ParameterKey": "S3DeploymentRootKey", + "ParameterValue": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" + }, + { + "ParameterKey": "AppSyncApiName", + "ParameterValue": "financetracker" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.template.json new file mode 100644 index 00000000000..5fe357d6096 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-CustomResourcesjson-x.template.json @@ -0,0 +1,61 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "An auto-generated nested stack.", + "Metadata": {}, + "Parameters": { + "AppSyncApiId": { + "Type": "String", + "Description": "The id of the AppSync API associated with this project." + }, + "AppSyncApiName": { + "Type": "String", + "Description": "The name of the AppSync API", + "Default": "AppSyncSimpleTransform" + }, + "env": { + "Type": "String", + "Description": "The environment name. e.g. Dev, Test, or Production", + "Default": "NONE" + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "The S3 bucket containing all deployment assets for the project." + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory." + } + }, + "Resources": { + "EmptyResource": { + "Type": "Custom::EmptyResource", + "Condition": "AlwaysFalse" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + ] + }, + "AlwaysFalse": { + "Fn::Equals": [ + "true", + "false" + ] + } + }, + "Outputs": { + "EmptyOutput": { + "Description": "An empty output. You may delete this if you have at least one resource above.", + "Value": "" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.description.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.description.txt @@ -0,0 +1 @@ + diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.outputs.json new file mode 100644 index 00000000000..9794cc3436e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.outputs.json @@ -0,0 +1,20 @@ +[ + { + "OutputKey": "GetAttFinancialSummaryTableName", + "OutputValue": "FinancialSummary-adetddan7nd55gwre37yyck3vu-x", + "Description": "Your DynamoDB table name.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:FinancialSummaryTable:Name" + }, + { + "OutputKey": "GetAttFinancialSummaryDataSourceName", + "OutputValue": "FinancialSummaryTable", + "Description": "Your model DataSource name.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:FinancialSummaryDataSource:Name" + }, + { + "OutputKey": "GetAttFinancialSummaryTableStreamArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/FinancialSummary-adetddan7nd55gwre37yyck3vu-x/stream/2026-04-23T19:25:17.489", + "Description": "Your DynamoDB table StreamArn.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:FinancialSummaryTable:StreamArn" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.parameters.json new file mode 100644 index 00000000000..3ac339a7787 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.parameters.json @@ -0,0 +1,70 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId", + "ParameterValue": "vo3v72uc6jgijkrbbpoxcknmf4" + }, + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref", + "ParameterValue": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId", + "ParameterValue": "q6lch4ljlfbaxjlsimyw33x6ie" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPI20497F53ApiId", + "ParameterValue": "adetddan7nd55gwre37yyck3vu" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId", + "ParameterValue": "yfpgoobyazg5ligihstmft2ija" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId", + "ParameterValue": "jwlf4swbxbgarh45fc67uml5yi" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId", + "ParameterValue": "dfqav6p55rckjai7lifrsrvhuy" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId", + "ParameterValue": "4zwwuyicvjcebfdx5ib4tsmhhq" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentBucket7592718ARef", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "referencetotransformerrootstackenv10C5A902Ref", + "ParameterValue": "x" + }, + { + "ParameterKey": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId", + "ParameterValue": "qddohwnaa5awhl3rffpalndelu" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.template.json new file mode 100644 index 00000000000..b4debd872e6 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-FinancialSummary-x.template.json @@ -0,0 +1,1204 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Type": "String" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "FinancialSummaryTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Retain" + }, + "FinancialSummaryIAMRole994EE173": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "FinancialSummary-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "FinancialSummaryIAMRedd6e3-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "FinancialSummaryIAMRoleDefaultPolicyD577302F": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "FinancialSummaryIAMRoleDefaultPolicyD577302F", + "Roles": [ + { + "Ref": "FinancialSummaryIAMRole994EE173" + } + ] + } + }, + "FinancialSummaryDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "FinancialSummaryTable" + } + }, + "Name": "FinancialSummaryTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "FinancialSummaryIAMRole994EE173", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "FinancialSummaryIAMRole994EE173" + ] + }, + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "GetFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryGetFinancialSummaryDataResolverFnQueryGetFinancialSummaryDataResolverFnAppSyncFunction2891B701", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListFinancialSummariesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listFinancialSummaries.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listFinancialSummaries.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "ListFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listFinancialSummaries", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "QueryListFinancialSummariesDataResolverFnQueryListFinancialSummariesDataResolverFnAppSyncFunction8C65CB26", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listFinancialSummaries\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "CreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationcreateFinancialSummaryauth0FunctionMutationcreateFinancialSummaryauth0FunctionAppSyncFunction3F75F2FD", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationCreateFinancialSummaryDataResolverFnMutationCreateFinancialSummaryDataResolverFnAppSyncFunctionCB03E429", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "UpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationupdateFinancialSummaryauth0FunctionMutationupdateFinancialSummaryauth0FunctionAppSyncFunctionFB36E9F9", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationUpdateFinancialSummaryDataResolverFnMutationUpdateFinancialSummaryDataResolverFnAppSyncFunctionAB865FFF", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteFinancialSummaryauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteFinancialSummaryDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteFinancialSummary.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "FinancialSummaryDataSource" + ] + }, + "DeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteFinancialSummaryauth0FunctionMutationdeleteFinancialSummaryauth0FunctionAppSyncFunction8B31E526", + "FunctionId" + ] + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Fn::GetAtt": [ + "MutationDeleteFinancialSummaryDataResolverFnMutationDeleteFinancialSummaryDataResolverFnAppSyncFunction53ADBB1C", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "FinancialSummaryTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteFinancialSummaryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteFinancialSummary", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + }, + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteFinancialSummary\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "FinancialSummaryownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Ref": "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"FinancialSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "FinancialSummary" + } + } + }, + "Outputs": { + "GetAttFinancialSummaryTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "FinancialSummaryTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryTable:StreamArn" + ] + ] + } + } + }, + "GetAttFinancialSummaryTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "FinancialSummaryTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryTable:Name" + ] + ] + } + } + }, + "GetAttFinancialSummaryDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "FinancialSummaryDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:FinancialSummaryDataSource:Name" + ] + ] + } + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.description.txt new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.description.txt @@ -0,0 +1 @@ + diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.outputs.json new file mode 100644 index 00000000000..b860533cabf --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.outputs.json @@ -0,0 +1,48 @@ +[ + { + "OutputKey": "transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId", + "OutputValue": "jwlf4swbxbgarh45fc67uml5yi" + }, + { + "OutputKey": "transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId", + "OutputValue": "4zwwuyicvjcebfdx5ib4tsmhhq" + }, + { + "OutputKey": "transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId", + "OutputValue": "qddohwnaa5awhl3rffpalndelu" + }, + { + "OutputKey": "GetAttTransactionTableName", + "OutputValue": "Transaction-adetddan7nd55gwre37yyck3vu-x", + "Description": "Your DynamoDB table name.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:TransactionTable:Name" + }, + { + "OutputKey": "GetAttTransactionDataSourceName", + "OutputValue": "TransactionTable", + "Description": "Your model DataSource name.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:TransactionDataSource:Name" + }, + { + "OutputKey": "transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId", + "OutputValue": "vo3v72uc6jgijkrbbpoxcknmf4" + }, + { + "OutputKey": "GetAttTransactionTableStreamArn", + "OutputValue": "arn:aws:dynamodb:us-east-1:123456789012:table/Transaction-adetddan7nd55gwre37yyck3vu-x/stream/2026-04-23T19:24:30.500", + "Description": "Your DynamoDB table StreamArn.", + "ExportName": "adetddan7nd55gwre37yyck3vu:GetAtt:TransactionTable:StreamArn" + }, + { + "OutputKey": "transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId", + "OutputValue": "dfqav6p55rckjai7lifrsrvhuy" + }, + { + "OutputKey": "transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId", + "OutputValue": "yfpgoobyazg5ligihstmft2ija" + }, + { + "OutputKey": "transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId", + "OutputValue": "q6lch4ljlfbaxjlsimyw33x6ie" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.parameters.json new file mode 100644 index 00000000000..2e655442035 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.parameters.json @@ -0,0 +1,42 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref", + "ParameterValue": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name", + "ParameterValue": "NONE_DS" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "referencetotransformerrootstackGraphQLAPI20497F53ApiId", + "ParameterValue": "adetddan7nd55gwre37yyck3vu" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "referencetotransformerrootstackS3DeploymentBucket7592718ARef", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "referencetotransformerrootstackenv10C5A902Ref", + "ParameterValue": "x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.template.json new file mode 100644 index 00000000000..5204f350d7b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x-Transaction-x.template.json @@ -0,0 +1,1536 @@ +{ + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Type": "String" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Type": "String" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Type": "String" + } + }, + "Conditions": { + "HasEnvironmentParameter": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + }, + "NONE" + ] + } + ] + }, + "ShouldUseServerSideEncryption": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "true" + ] + }, + "ShouldUsePayPerRequestBilling": { + "Fn::Equals": [ + { + "Ref": "DynamoDBBillingMode" + }, + "PAY_PER_REQUEST" + ] + }, + "ShouldUsePointInTimeRecovery": { + "Fn::Equals": [ + { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "true" + ] + } + }, + "Resources": { + "TransactionTable": { + "Type": "AWS::DynamoDB::Table", + "Properties": { + "AttributeDefinitions": [ + { + "AttributeName": "id", + "AttributeType": "S" + } + ], + "BillingMode": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + "PAY_PER_REQUEST", + { + "Ref": "AWS::NoValue" + } + ] + }, + "KeySchema": [ + { + "AttributeName": "id", + "KeyType": "HASH" + } + ], + "PointInTimeRecoverySpecification": { + "Fn::If": [ + "ShouldUsePointInTimeRecovery", + { + "PointInTimeRecoveryEnabled": true + }, + { + "Ref": "AWS::NoValue" + } + ] + }, + "ProvisionedThroughput": { + "Fn::If": [ + "ShouldUsePayPerRequestBilling", + { + "Ref": "AWS::NoValue" + }, + { + "ReadCapacityUnits": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "WriteCapacityUnits": { + "Ref": "DynamoDBModelTableWriteIOPS" + } + } + ] + }, + "SSESpecification": { + "SSEEnabled": { + "Fn::If": [ + "ShouldUseServerSideEncryption", + true, + false + ] + } + }, + "StreamSpecification": { + "StreamViewType": "NEW_AND_OLD_IMAGES" + }, + "TableName": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Retain" + }, + "TransactionIAMRole04BA2E25": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "Policies": [ + { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:DeleteItem", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:UpdateItem", + "dynamodb:ConditionCheckItem", + "dynamodb:DescribeTable", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + }, + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${tablename}/*", + { + "tablename": { + "Fn::Join": [ + "", + [ + "Transaction-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + ] + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "DynamoDBAccess" + } + ], + "RoleName": { + "Fn::Join": [ + "", + [ + "TransactionIAMRole373077-", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "-", + { + "Ref": "referencetotransformerrootstackenv10C5A902Ref" + } + ] + ] + } + } + }, + "TransactionIAMRoleDefaultPolicy87E82DF4": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:BatchGetItem", + "dynamodb:GetRecords", + "dynamodb:GetShardIterator", + "dynamodb:Query", + "dynamodb:GetItem", + "dynamodb:Scan", + "dynamodb:ConditionCheckItem", + "dynamodb:BatchWriteItem", + "dynamodb:PutItem", + "dynamodb:UpdateItem", + "dynamodb:DeleteItem", + "dynamodb:DescribeTable" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::GetAtt": [ + "TransactionTable", + "Arn" + ] + }, + { + "Ref": "AWS::NoValue" + } + ] + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionIAMRoleDefaultPolicy87E82DF4", + "Roles": [ + { + "Ref": "TransactionIAMRole04BA2E25" + } + ] + } + }, + "TransactionDataSource": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Ref": "TransactionTable" + } + }, + "Name": "TransactionTable", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionIAMRole04BA2E25", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + }, + "DependsOn": [ + "TransactionIAMRole04BA2E25" + ] + }, + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "QuerygetTransactionpostAuth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.postAuth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryGetTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.getTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "GetTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "getTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryGetTransactionDataResolverFnQueryGetTransactionDataResolverFnAppSyncFunction3FC5A37D", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"getTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "QueryListTransactionsDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listTransactions.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Query.listTransactions.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "ListTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "listTransactions", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QueryListTransactionsDataResolverFnQueryListTransactionsDataResolverFnAppSyncFunctionAC8D8069", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Query\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"listTransactions\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Query" + } + }, + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.init.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationcreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.createTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "CreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "createTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationcreateTransactionauth0FunctionMutationcreateTransactionauth0FunctionAppSyncFunction871A107B", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationCreateTransactionDataResolverFnMutationCreateTransactionDataResolverFnAppSyncFunction280BF4F6", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"createTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactioninit0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.init.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationupdateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationUpdateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.updateTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "UpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "updateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationupdateTransactionauth0FunctionMutationupdateTransactionauth0FunctionAppSyncFunctionA3132436", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationUpdateTransactionDataResolverFnMutationUpdateTransactionDataResolverFnAppSyncFunction46B5091F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"updateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationdeleteTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.auth.1.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "MutationDeleteTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Mutation.deleteTransaction.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "TransactionDataSource" + ] + }, + "DeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "deleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "MutationdeleteTransactionauth0FunctionMutationdeleteTransactionauth0FunctionAppSyncFunctionB2177ED3", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "MutationDeleteTransactionDataResolverFnMutationDeleteTransactionDataResolverFnAppSyncFunction5CA52E8F", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Mutation\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"deleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"AMAZON_DYNAMODB\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n$util.qr($ctx.stash.put(\"tableName\", \"", + { + "Ref": "TransactionTable" + }, + "\"))\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Mutation" + } + }, + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptiononCreateTransactionauth0Function", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.auth.1.req.vtl" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson({})" + } + }, + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "SubscriptionOnCreateTransactionDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Subscription.onCreateTransaction.res.vtl" + ] + ] + } + } + }, + "SubscriptiononCreateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onCreateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onCreateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononUpdateTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onUpdateTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onUpdateTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "SubscriptiononDeleteTransactionResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "onDeleteTransaction", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + }, + { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Subscription\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"onDeleteTransaction\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Subscription" + } + }, + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "DataSourceName": { + "Ref": "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name" + }, + "FunctionVersion": "2018-05-29", + "Name": "TransactionOwnerDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Transaction.owner.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "referencetotransformerrootstackS3DeploymentBucket7592718ARef" + }, + "/", + { + "Ref": "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref" + }, + "/resolvers/Transaction.owner.res.vtl" + ] + ] + } + } + }, + "TransactionownerResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "FieldName": "owner", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"Transaction\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"owner\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "Transaction" + } + } + }, + "Outputs": { + "GetAttTransactionTableStreamArn": { + "Description": "Your DynamoDB table StreamArn.", + "Value": { + "Fn::GetAtt": [ + "TransactionTable", + "StreamArn" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionTable:StreamArn" + ] + ] + } + } + }, + "GetAttTransactionTableName": { + "Description": "Your DynamoDB table name.", + "Value": { + "Ref": "TransactionTable" + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionTable:Name" + ] + ] + } + } + }, + "GetAttTransactionDataSourceName": { + "Description": "Your model DataSource name.", + "Value": { + "Fn::GetAtt": [ + "TransactionDataSource", + "Name" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "referencetotransformerrootstackGraphQLAPI20497F53ApiId" + }, + "GetAtt:TransactionDataSource:Name" + ] + ] + } + } + }, + "transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Value": { + "Fn::GetAtt": [ + "QuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunction66A815B4", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Value": { + "Fn::GetAtt": [ + "QuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunction650F819E", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Value": { + "Fn::GetAtt": [ + "MutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6CF6434F", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Value": { + "Fn::GetAtt": [ + "MutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionF610D403", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Value": { + "Fn::GetAtt": [ + "SubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunctionB9D0F9B2", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Value": { + "Fn::GetAtt": [ + "SubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunction699FBF14", + "FunctionId" + ] + } + }, + "transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Value": { + "Fn::GetAtt": [ + "TransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunction8BF8BF6E", + "FunctionId" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.description.txt new file mode 100644 index 00000000000..f9e13281dee --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"Amplify","createdWith":"14.2.5","stackType":"api-AppSync","metadata":{"whyContinueWithGen1":"Prefer not to answer"}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.outputs.json new file mode 100644 index 00000000000..f3aaeee6095 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.outputs.json @@ -0,0 +1,20 @@ +[ + { + "OutputKey": "GraphQLAPIIdOutput", + "OutputValue": "adetddan7nd55gwre37yyck3vu", + "Description": "Your GraphQL API ID.", + "ExportName": "amplify-financetracker-x-x-apifinancetracker-x:GraphQLApiId" + }, + { + "OutputKey": "GraphQLAPIEndpointOutput", + "OutputValue": "https://qcluzgdzhff3rdbn5r5dg2mnla.appsync-api.us-east-1.amazonaws.com/graphql", + "Description": "Your GraphQL API endpoint.", + "ExportName": "amplify-financetracker-x-x-apifinancetracker-x:GraphQLApiEndpoint" + }, + { + "OutputKey": "GraphQLAPIKeyOutput", + "OutputValue": "da2-fakeapikey00000000000000", + "Description": "Your GraphQL API ID.", + "ExportName": "amplify-financetracker-x-x-apifinancetracker-x:GraphQLApiKey" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.parameters.json new file mode 100644 index 00000000000..44aae03a920 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.parameters.json @@ -0,0 +1,42 @@ +[ + { + "ParameterKey": "DynamoDBModelTableReadIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "DynamoDBEnableServerSideEncryption", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBEnablePointInTimeRecovery", + "ParameterValue": "false" + }, + { + "ParameterKey": "DynamoDBBillingMode", + "ParameterValue": "PAY_PER_REQUEST" + }, + { + "ParameterKey": "S3DeploymentBucket", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "DynamoDBModelTableWriteIOPS", + "ParameterValue": "5" + }, + { + "ParameterKey": "env", + "ParameterValue": "x" + }, + { + "ParameterKey": "S3DeploymentRootKey", + "ParameterValue": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33" + }, + { + "ParameterKey": "AppSyncApiName", + "ParameterValue": "financetracker" + }, + { + "ParameterKey": "AuthCognitoUserPoolId", + "ParameterValue": "us-east-1_LFxofbrDo" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.template.json new file mode 100644 index 00000000000..42f68b18272 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-apifinancetracker-x.template.json @@ -0,0 +1,1196 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Default": "NONE" + }, + "AppSyncApiName": { + "Type": "String", + "Default": "AppSyncSimpleTransform" + }, + "AuthCognitoUserPoolId": { + "Type": "String" + }, + "DynamoDBModelTableReadIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of read IOPS the table should support." + }, + "DynamoDBModelTableWriteIOPS": { + "Type": "Number", + "Default": 5, + "Description": "The number of write IOPS the table should support." + }, + "DynamoDBBillingMode": { + "Type": "String", + "Default": "PAY_PER_REQUEST", + "AllowedValues": [ + "PAY_PER_REQUEST", + "PROVISIONED" + ], + "Description": "Configure @model types to create DynamoDB tables with PAY_PER_REQUEST or PROVISIONED billing modes." + }, + "DynamoDBEnablePointInTimeRecovery": { + "Type": "String", + "Default": "false", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Whether to enable Point in Time Recovery on the table." + }, + "DynamoDBEnableServerSideEncryption": { + "Type": "String", + "Default": "true", + "AllowedValues": [ + "true", + "false" + ], + "Description": "Enable server side encryption powered by KMS." + }, + "S3DeploymentBucket": { + "Type": "String", + "Description": "An S3 Bucket name where assets are deployed" + }, + "S3DeploymentRootKey": { + "Type": "String", + "Description": "An S3 key relative to the S3DeploymentBucket that points to the root of the deployment directory." + } + }, + "Resources": { + "GraphQLAPI": { + "Type": "AWS::AppSync::GraphQLApi", + "Properties": { + "AdditionalAuthenticationProviders": [ + { + "AuthenticationType": "AMAZON_COGNITO_USER_POOLS", + "UserPoolConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "UserPoolId": { + "Ref": "AuthCognitoUserPoolId" + } + } + } + ], + "AuthenticationType": "API_KEY", + "Name": { + "Fn::Join": [ + "", + [ + { + "Ref": "AppSyncApiName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "GraphQLAPITransformerSchema3CB2AE18": { + "Type": "AWS::AppSync::GraphQLSchema", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DefinitionS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/schema.graphql" + ] + ] + } + } + }, + "GraphQLAPIDefaultApiKey215A6DD7": { + "Type": "AWS::AppSync::ApiKey", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Expires": 1777576997 + } + }, + "GraphQLAPINONEDS95A13CF0": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Name": "NONE_DS", + "Type": "NONE" + } + }, + "Transaction": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Transaction.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "Budget": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/Budget.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FinancialSummary": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "DynamoDBModelTableReadIOPS": { + "Ref": "DynamoDBModelTableReadIOPS" + }, + "DynamoDBModelTableWriteIOPS": { + "Ref": "DynamoDBModelTableWriteIOPS" + }, + "DynamoDBBillingMode": { + "Ref": "DynamoDBBillingMode" + }, + "DynamoDBEnablePointInTimeRecovery": { + "Ref": "DynamoDBEnablePointInTimeRecovery" + }, + "DynamoDBEnableServerSideEncryption": { + "Ref": "DynamoDBEnableServerSideEncryption" + }, + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionauth0FunctionQuerygetTransactionauth0FunctionAppSyncFunctionFEAFFE85FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionQuerygetTransactionpostAuth0FunctionQuerygetTransactionpostAuth0FunctionAppSyncFunctionE2F460C1FunctionId" + ] + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationcreateTransactioninit0FunctionMutationcreateTransactioninit0FunctionAppSyncFunction6AFE3BC8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionMutationupdateTransactioninit0FunctionMutationupdateTransactioninit0FunctionAppSyncFunctionD3CE5D54FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptiononCreateTransactionauth0FunctionSubscriptiononCreateTransactionauth0FunctionAppSyncFunction7459F7D8FunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionSubscriptionOnCreateTransactionDataResolverFnSubscriptionOnCreateTransactionDataResolverFnAppSyncFunctionB6BAC21CFunctionId" + ] + }, + "referencetotransformerrootstackTransactionNestedStackTransactionNestedStackResourceD58DD790OutputstransformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId": { + "Fn::GetAtt": [ + "Transaction", + "Outputs.transformerrootstackTransactionTransactionOwnerDataResolverFnTransactionOwnerDataResolverFnAppSyncFunctionE365EE63FunctionId" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FinancialSummary.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "FunctionDirectiveStack": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "referencetotransformerrootstackenv10C5A902Ref": { + "Ref": "env" + }, + "referencetotransformerrootstackGraphQLAPI20497F53ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "referencetotransformerrootstackS3DeploymentBucket7592718ARef": { + "Ref": "S3DeploymentBucket" + }, + "referencetotransformerrootstackS3DeploymentRootKeyA71EA735Ref": { + "Ref": "S3DeploymentRootKey" + }, + "referencetotransformerrootstackGraphQLAPINONEDS2BA9D1C8Name": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + } + }, + "TemplateURL": { + "Fn::Join": [ + "", + [ + "https://s3.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/stacks/FunctionDirectiveStack.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalIncomeDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalIncome.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalIncomeResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalIncome", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalIncomeDataResolverFnCalculatedSummaryTotalIncomeDataResolverFnAppSyncFunction2CDA666E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalIncome\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryTotalExpensesDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.totalExpenses.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarytotalExpensesResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "totalExpenses", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryTotalExpensesDataResolverFnCalculatedSummaryTotalExpensesDataResolverFnAppSyncFunction382F77B9", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"totalExpenses\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummaryBalanceDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.balance.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarybalanceResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "balance", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummaryBalanceDataResolverFnCalculatedSummaryBalanceDataResolverFnAppSyncFunctionA92C0529", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"balance\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "CalculatedSummarySavingsRateDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/CalculatedSummary.savingsRate.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CalculatedSummarysavingsRateResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "savingsRate", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "CalculatedSummarySavingsRateDataResolverFnCalculatedSummarySavingsRateDataResolverFnAppSyncFunctionE6E40789", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"CalculatedSummary\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"savingsRate\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "CalculatedSummary" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultSuccessDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.success.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultsuccessResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "success", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultSuccessDataResolverFnNotificationResultSuccessDataResolverFnAppSyncFunctionFD0100AE", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"success\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E": { + "Type": "AWS::AppSync::FunctionConfiguration", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "DataSourceName": { + "Fn::GetAtt": [ + "GraphQLAPINONEDS95A13CF0", + "Name" + ] + }, + "FunctionVersion": "2018-05-29", + "Name": "NotificationResultMessageDataResolverFn", + "RequestMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.req.vtl" + ] + ] + }, + "ResponseMappingTemplateS3Location": { + "Fn::Join": [ + "", + [ + "s3://", + { + "Ref": "S3DeploymentBucket" + }, + "/", + { + "Ref": "S3DeploymentRootKey" + }, + "/resolvers/NotificationResult.message.res.vtl" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "NotificationResultmessageResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "FieldName": "message", + "Kind": "PIPELINE", + "PipelineConfig": { + "Functions": [ + { + "Fn::GetAtt": [ + "NotificationResultMessageDataResolverFnNotificationResultMessageDataResolverFnAppSyncFunction7028365E", + "FunctionId" + ] + } + ] + }, + "RequestMappingTemplate": { + "Fn::Join": [ + "", + [ + "$util.qr($ctx.stash.put(\"typeName\", \"NotificationResult\"))\n$util.qr($ctx.stash.put(\"fieldName\", \"message\"))\n$util.qr($ctx.stash.put(\"conditions\", []))\n$util.qr($ctx.stash.put(\"metadata\", {}))\n$util.qr($ctx.stash.metadata.put(\"dataSourceType\", \"NONE\"))\n$util.qr($ctx.stash.metadata.put(\"apiId\", \"", + { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "\"))\n$util.qr($ctx.stash.put(\"connectionAttributes\", {}))\n\n$util.qr($ctx.stash.put(\"identityPoolId\", \"us-east-1:84d04a8c-d959-47e8-b551-000ad7a8cef2\"))\n$util.qr($ctx.stash.put(\"adminRoles\", [\"financetracker-x\"]))\n$util.toJson({})" + ] + ] + }, + "ResponseMappingTemplate": "$util.toJson($ctx.prev.result)", + "TypeName": "NotificationResult" + }, + "DependsOn": [ + "GraphQLAPITransformerSchema3CB2AE18" + ] + }, + "CustomResourcesjson": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "Parameters": { + "AppSyncApiId": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "AppSyncApiName": { + "Ref": "AppSyncApiName" + }, + "env": { + "Ref": "env" + }, + "S3DeploymentBucket": { + "Ref": "S3DeploymentBucket" + }, + "S3DeploymentRootKey": { + "Ref": "S3DeploymentRootKey" + } + }, + "TemplateURL": { + "Fn::Join": [ + "/", + [ + "https://s3.amazonaws.com", + { + "Ref": "S3DeploymentBucket" + }, + { + "Ref": "S3DeploymentRootKey" + }, + "stacks", + "CustomResources.json" + ] + ] + } + }, + "DependsOn": [ + "GraphQLAPI", + "GraphQLAPITransformerSchema3CB2AE18", + "Transaction", + "Budget", + "FinancialSummary", + "FunctionDirectiveStack" + ] + } + }, + "Outputs": { + "GraphQLAPIKeyOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPIDefaultApiKey215A6DD7", + "ApiKey" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiKey" + ] + ] + } + } + }, + "GraphQLAPIIdOutput": { + "Description": "Your GraphQL API ID.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "ApiId" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiId" + ] + ] + } + } + }, + "GraphQLAPIEndpointOutput": { + "Description": "Your GraphQL API endpoint.", + "Value": { + "Fn::GetAtt": [ + "GraphQLAPI", + "GraphQLUrl" + ] + }, + "Export": { + "Name": { + "Fn::Join": [ + ":", + [ + { + "Ref": "AWS::StackName" + }, + "GraphQLApiEndpoint" + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"api-AppSync\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.description.txt new file mode 100644 index 00000000000..348d1236678 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"Amplify","createdWith":"14.2.5","stackType":"auth-Cognito","metadata":{"whyContinueWithGen1":"Prefer not to answer"}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.outputs.json new file mode 100644 index 00000000000..2e8e7fa0800 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.outputs.json @@ -0,0 +1,35 @@ +[ + { + "OutputKey": "UserPoolId", + "OutputValue": "us-east-1_LFxofbrDo", + "Description": "Id for the user pool" + }, + { + "OutputKey": "AppClientIDWeb", + "OutputValue": "pdn5tq3qc767u6n4gv9jnic6v", + "Description": "The user pool app client id for web" + }, + { + "OutputKey": "AppClientID", + "OutputValue": "1m28beghjka8l0hg8avja1ab2n", + "Description": "The user pool app client id" + }, + { + "OutputKey": "IdentityPoolId", + "OutputValue": "us-east-1:9c7ebdb2-57df-4b19-95ae-4f621dcfe3e4", + "Description": "Id for the identity pool" + }, + { + "OutputKey": "UserPoolArn", + "OutputValue": "arn:aws:cognito-idp:us-east-1:123456789012:userpool/us-east-1_LFxofbrDo", + "Description": "Arn for the user pool" + }, + { + "OutputKey": "IdentityPoolName", + "OutputValue": "financetracker331811e6_identitypool_331811e6__x" + }, + { + "OutputKey": "UserPoolName", + "OutputValue": "financetracker331811e6_userpool_331811e6" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.parameters.json new file mode 100644 index 00000000000..4400d10c468 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.parameters.json @@ -0,0 +1,146 @@ +[ + { + "ParameterKey": "usernameAttributes", + "ParameterValue": "email" + }, + { + "ParameterKey": "authRoleArn", + "ParameterValue": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-authRole" + }, + { + "ParameterKey": "autoVerifiedAttributes", + "ParameterValue": "email" + }, + { + "ParameterKey": "allowUnauthenticatedIdentities", + "ParameterValue": "true" + }, + { + "ParameterKey": "smsVerificationMessage", + "ParameterValue": "Your verification code is {####}" + }, + { + "ParameterKey": "userpoolClientReadAttributes", + "ParameterValue": "email" + }, + { + "ParameterKey": "breakCircularDependency", + "ParameterValue": "true" + }, + { + "ParameterKey": "mfaTypes", + "ParameterValue": "SMS Text Message" + }, + { + "ParameterKey": "emailVerificationSubject", + "ParameterValue": "Your verification code" + }, + { + "ParameterKey": "sharedId", + "ParameterValue": "331811e6" + }, + { + "ParameterKey": "useDefault", + "ParameterValue": "default" + }, + { + "ParameterKey": "userpoolClientGenerateSecret", + "ParameterValue": "false" + }, + { + "ParameterKey": "mfaConfiguration", + "ParameterValue": "OFF" + }, + { + "ParameterKey": "identityPoolName", + "ParameterValue": "financetracker331811e6_identitypool_331811e6" + }, + { + "ParameterKey": "userPoolGroupList", + "ParameterValue": "" + }, + { + "ParameterKey": "authSelections", + "ParameterValue": "identityPoolAndUserPool" + }, + { + "ParameterKey": "resourceNameTruncated", + "ParameterValue": "financ331811e6" + }, + { + "ParameterKey": "smsAuthenticationMessage", + "ParameterValue": "Your authentication code is {####}" + }, + { + "ParameterKey": "passwordPolicyMinLength", + "ParameterValue": "8" + }, + { + "ParameterKey": "userPoolName", + "ParameterValue": "financetracker331811e6_userpool_331811e6" + }, + { + "ParameterKey": "userpoolClientWriteAttributes", + "ParameterValue": "email" + }, + { + "ParameterKey": "dependsOn", + "ParameterValue": "" + }, + { + "ParameterKey": "useEnabledMfas", + "ParameterValue": "true" + }, + { + "ParameterKey": "usernameCaseSensitive", + "ParameterValue": "false" + }, + { + "ParameterKey": "resourceName", + "ParameterValue": "financetracker331811e6" + }, + { + "ParameterKey": "env", + "ParameterValue": "x" + }, + { + "ParameterKey": "serviceName", + "ParameterValue": "Cognito" + }, + { + "ParameterKey": "emailVerificationMessage", + "ParameterValue": "Your verification code is {####}" + }, + { + "ParameterKey": "userpoolClientRefreshTokenValidity", + "ParameterValue": "30" + }, + { + "ParameterKey": "userpoolClientSetAttributes", + "ParameterValue": "false" + }, + { + "ParameterKey": "unauthRoleArn", + "ParameterValue": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-unauthRole" + }, + { + "ParameterKey": "requiredAttributes", + "ParameterValue": "email" + }, + { + "ParameterKey": "passwordPolicyCharacters", + "ParameterValue": "" + }, + { + "ParameterKey": "aliasAttributes", + "ParameterValue": "" + }, + { + "ParameterKey": "userpoolClientLambdaRole", + "ParameterValue": "financ331811e6_userpoolclient_lambda_role" + }, + { + "ParameterKey": "defaultPasswordPolicy", + "ParameterValue": "false" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.template.json new file mode 100644 index 00000000000..5e89110762c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-authfinancetracker331811e6-x.template.json @@ -0,0 +1,413 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"auth-Cognito\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "identityPoolName": { + "Type": "String" + }, + "allowUnauthenticatedIdentities": { + "Type": "String" + }, + "resourceNameTruncated": { + "Type": "String" + }, + "userPoolName": { + "Type": "String" + }, + "autoVerifiedAttributes": { + "Type": "CommaDelimitedList" + }, + "mfaConfiguration": { + "Type": "String" + }, + "mfaTypes": { + "Type": "CommaDelimitedList" + }, + "smsAuthenticationMessage": { + "Type": "String" + }, + "smsVerificationMessage": { + "Type": "String" + }, + "emailVerificationSubject": { + "Type": "String" + }, + "emailVerificationMessage": { + "Type": "String" + }, + "defaultPasswordPolicy": { + "Type": "String" + }, + "passwordPolicyMinLength": { + "Type": "String" + }, + "passwordPolicyCharacters": { + "Type": "CommaDelimitedList" + }, + "requiredAttributes": { + "Type": "CommaDelimitedList" + }, + "aliasAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientGenerateSecret": { + "Type": "String" + }, + "userpoolClientRefreshTokenValidity": { + "Type": "String" + }, + "userpoolClientWriteAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientReadAttributes": { + "Type": "CommaDelimitedList" + }, + "userpoolClientLambdaRole": { + "Type": "String" + }, + "userpoolClientSetAttributes": { + "Type": "String" + }, + "sharedId": { + "Type": "String" + }, + "resourceName": { + "Type": "String" + }, + "authSelections": { + "Type": "String" + }, + "useDefault": { + "Type": "String" + }, + "usernameAttributes": { + "Type": "CommaDelimitedList" + }, + "userPoolGroupList": { + "Type": "CommaDelimitedList" + }, + "serviceName": { + "Type": "String" + }, + "usernameCaseSensitive": { + "Type": "String" + }, + "useEnabledMfas": { + "Type": "String" + }, + "authRoleArn": { + "Type": "String" + }, + "unauthRoleArn": { + "Type": "String" + }, + "breakCircularDependency": { + "Type": "String" + }, + "dependsOn": { + "Type": "CommaDelimitedList" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "UserPool": { + "Type": "AWS::Cognito::UserPool", + "Properties": { + "AutoVerifiedAttributes": [ + "email" + ], + "EmailVerificationMessage": { + "Ref": "emailVerificationMessage" + }, + "EmailVerificationSubject": { + "Ref": "emailVerificationSubject" + }, + "MfaConfiguration": { + "Ref": "mfaConfiguration" + }, + "Policies": { + "PasswordPolicy": { + "MinimumLength": { + "Ref": "passwordPolicyMinLength" + }, + "RequireLowercase": false, + "RequireNumbers": false, + "RequireSymbols": false, + "RequireUppercase": false + } + }, + "Schema": [ + { + "Mutable": true, + "Name": "email", + "Required": true + } + ], + "UserAttributeUpdateSettings": { + "AttributesRequireVerificationBeforeUpdate": [ + "email" + ] + }, + "UserPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userPoolName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "userPoolName" + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "UsernameAttributes": { + "Ref": "usernameAttributes" + }, + "UsernameConfiguration": { + "CaseSensitive": false + } + } + }, + "UserPoolClientWeb": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_clientWeb", + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClient": { + "Type": "AWS::Cognito::UserPoolClient", + "Properties": { + "ClientName": "financ331811e6_app_client", + "GenerateSecret": { + "Ref": "userpoolClientGenerateSecret" + }, + "RefreshTokenValidity": { + "Ref": "userpoolClientRefreshTokenValidity" + }, + "TokenValidityUnits": { + "RefreshToken": "days" + }, + "UserPoolId": { + "Ref": "UserPool" + } + }, + "DependsOn": [ + "UserPool" + ] + }, + "UserPoolClientRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "lambda.amazonaws.com" + }, + "Action": "sts:AssumeRole" + } + ] + }, + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "userpoolClientLambdaRole" + }, + { + "Fn::Join": [ + "", + [ + "upClientLambdaRole331811e6", + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPool": { + "Type": "AWS::Cognito::IdentityPool", + "Properties": { + "AllowUnauthenticatedIdentities": { + "Ref": "allowUnauthenticatedIdentities" + }, + "CognitoIdentityProviders": [ + { + "ClientId": { + "Ref": "UserPoolClient" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + }, + { + "ClientId": { + "Ref": "UserPoolClientWeb" + }, + "ProviderName": { + "Fn::Sub": [ + "cognito-idp.${region}.amazonaws.com/${client}", + { + "region": { + "Ref": "AWS::Region" + }, + "client": { + "Ref": "UserPool" + } + } + ] + } + } + ], + "IdentityPoolName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker331811e6_identitypool_331811e6", + { + "Fn::Join": [ + "", + [ + "financetracker331811e6_identitypool_331811e6__", + { + "Ref": "env" + } + ] + ] + } + ] + } + } + }, + "IdentityPoolRoleMap": { + "Type": "AWS::Cognito::IdentityPoolRoleAttachment", + "Properties": { + "IdentityPoolId": { + "Ref": "IdentityPool" + }, + "Roles": { + "unauthenticated": { + "Ref": "unauthRoleArn" + }, + "authenticated": { + "Ref": "authRoleArn" + } + } + }, + "DependsOn": [ + "IdentityPool" + ] + } + }, + "Outputs": { + "IdentityPoolId": { + "Description": "Id for the identity pool", + "Value": { + "Ref": "IdentityPool" + } + }, + "IdentityPoolName": { + "Value": { + "Fn::GetAtt": [ + "IdentityPool", + "Name" + ] + } + }, + "UserPoolId": { + "Description": "Id for the user pool", + "Value": { + "Ref": "UserPool" + } + }, + "UserPoolArn": { + "Description": "Arn for the user pool", + "Value": { + "Fn::GetAtt": [ + "UserPool", + "Arn" + ] + } + }, + "UserPoolName": { + "Value": { + "Ref": "userPoolName" + } + }, + "AppClientIDWeb": { + "Description": "The user pool app client id for web", + "Value": { + "Ref": "UserPoolClientWeb" + } + }, + "AppClientID": { + "Description": "The user pool app client id", + "Value": { + "Ref": "UserPoolClient" + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.description.txt new file mode 100644 index 00000000000..7f300b53983 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"Amplify","createdWith":"14.2.5","stackType":"custom-customCDK","metadata":{"whyContinueWithGen1":"Prefer not to answer"}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.outputs.json new file mode 100644 index 00000000000..283f1e94b90 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.outputs.json @@ -0,0 +1,14 @@ +[ + { + "OutputKey": "MonthlyReportTopicArn", + "OutputValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-MonthlyReportTopic8D223100-riowtcOhtvf1", + "Description": "SNS Topic ARN for monthly reports", + "ExportName": "financetracker-MonthlyReportTopicArn-x" + }, + { + "OutputKey": "BudgetAlertTopicArn", + "OutputValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-BudgetAlertTopicF20DF526-R5tDxQli7ASH", + "Description": "SNS Topic ARN for budget alerts", + "ExportName": "financetracker-BudgetAlertTopicArn-x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.parameters.json new file mode 100644 index 00000000000..07ef45182bd --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.parameters.json @@ -0,0 +1,6 @@ +[ + { + "ParameterKey": "env", + "ParameterValue": "x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.template.json new file mode 100644 index 00000000000..b12c33f6841 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomfinance-x.template.json @@ -0,0 +1,83 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + } + }, + "Resources": { + "BudgetAlertTopicF20DF526": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Fin Tracker Budget Alerts" + } + }, + "BudgetAlertTopicsanjanaravikumarazgmailcom9C5B945F": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "BudgetAlertTopicF20DF526" + } + } + }, + "MonthlyReportTopic8D223100": { + "Type": "AWS::SNS::Topic", + "Properties": { + "DisplayName": "Finance Tracker Monthly Reports" + } + }, + "MonthlyReportTopicsanjanaravikumarazgmailcomFBA75CE0": { + "Type": "AWS::SNS::Subscription", + "Properties": { + "Endpoint": "example@gmail.com", + "Protocol": "email", + "TopicArn": { + "Ref": "MonthlyReportTopic8D223100" + } + } + } + }, + "Outputs": { + "BudgetAlertTopicArn": { + "Description": "SNS Topic ARN for budget alerts", + "Value": { + "Ref": "BudgetAlertTopicF20DF526" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-BudgetAlertTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "MonthlyReportTopicArn": { + "Description": "SNS Topic ARN for monthly reports", + "Value": { + "Ref": "MonthlyReportTopic8D223100" + }, + "Export": { + "Name": { + "Fn::Join": [ + "", + [ + "financetracker-MonthlyReportTopicArn-", + { + "Ref": "env" + } + ] + ] + } + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.description.txt new file mode 100644 index 00000000000..7f300b53983 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"Amplify","createdWith":"14.2.5","stackType":"custom-customCDK","metadata":{"whyContinueWithGen1":"Prefer not to answer"}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.outputs.json new file mode 100644 index 00000000000..6593fa78a0e --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.outputs.json @@ -0,0 +1,12 @@ +[ + { + "OutputKey": "DataSourceName", + "OutputValue": "TransactionsByCategoryDataSource", + "Description": "Name of the custom DynamoDB data source" + }, + { + "OutputKey": "ResolverArn", + "OutputValue": "arn:aws:appsync:us-east-1:123456789012:apis/adetddan7nd55gwre37yyck3vu/types/Query/resolvers/getTransactionsByCategory", + "Description": "ARN of the custom getTransactionsByCategory resolver" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.parameters.json new file mode 100644 index 00000000000..d31e9ab6c7c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.parameters.json @@ -0,0 +1,18 @@ +[ + { + "ParameterKey": "apifinancetrackerGraphQLAPIKeyOutput", + "ParameterValue": "da2-fakeapikey00000000000000" + }, + { + "ParameterKey": "apifinancetrackerGraphQLAPIIdOutput", + "ParameterValue": "adetddan7nd55gwre37yyck3vu" + }, + { + "ParameterKey": "apifinancetrackerGraphQLAPIEndpointOutput", + "ParameterValue": "https://qcluzgdzhff3rdbn5r5dg2mnla.appsync-api.us-east-1.amazonaws.com/graphql" + }, + { + "ParameterKey": "env", + "ParameterValue": "x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.template.json new file mode 100644 index 00000000000..4cdc5f8dba8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-customcustomresolver-x.template.json @@ -0,0 +1,150 @@ +{ + "Parameters": { + "env": { + "Type": "String", + "Description": "Current Amplify CLI env name" + }, + "apifinancetrackerGraphQLAPIKeyOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String" + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Type": "String" + } + }, + "Resources": { + "TransactionsByCategoryDSRole265ACEB1": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "appsync.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + }, + "RoleName": { + "Fn::Join": [ + "", + [ + "TransByCatDSRole-", + { + "Ref": "env" + } + ] + ] + } + } + }, + "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "dynamodb:Query", + "dynamodb:Scan", + "dynamodb:GetItem" + ], + "Effect": "Allow", + "Resource": { + "Fn::Sub": "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*" + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "TransactionsByCategoryDSRoleDefaultPolicyDBD3B63A", + "Roles": [ + { + "Ref": "TransactionsByCategoryDSRole265ACEB1" + } + ] + } + }, + "TransactionsByCategoryDS": { + "Type": "AWS::AppSync::DataSource", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DynamoDBConfig": { + "AwsRegion": { + "Ref": "AWS::Region" + }, + "TableName": { + "Fn::Sub": [ + "Transaction-${apiId}-${env}", + { + "apiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "env": { + "Ref": "env" + } + } + ] + } + }, + "Name": "TransactionsByCategoryDataSource", + "ServiceRoleArn": { + "Fn::GetAtt": [ + "TransactionsByCategoryDSRole265ACEB1", + "Arn" + ] + }, + "Type": "AMAZON_DYNAMODB" + } + }, + "GetTransactionsByCategoryResolver": { + "Type": "AWS::AppSync::Resolver", + "Properties": { + "ApiId": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + }, + "DataSourceName": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + }, + "FieldName": "getTransactionsByCategory", + "RequestMappingTemplate": "\n## Custom VTL resolver for getTransactionsByCategory\n#set($limit = $util.defaultIfNull($ctx.args.limit, 20))\n{\n \"version\": \"2018-05-29\",\n \"operation\": \"Scan\",\n \"filter\": {\n \"expression\": \"category = :category\",\n \"expressionValues\": {\n \":category\": $util.dynamodb.toDynamoDBJson($ctx.args.category)\n }\n },\n \"limit\": $limit\n}", + "ResponseMappingTemplate": "\n## Return the results as a TransactionConnection\n{\n \"items\": $util.toJson($ctx.result.items),\n \"nextToken\": $util.toJson($ctx.result.nextToken)\n}", + "TypeName": "Query" + }, + "DependsOn": [ + "TransactionsByCategoryDS" + ] + } + }, + "Outputs": { + "ResolverArn": { + "Description": "ARN of the custom getTransactionsByCategory resolver", + "Value": { + "Fn::GetAtt": [ + "GetTransactionsByCategoryResolver", + "ResolverArn" + ] + } + }, + "DataSourceName": { + "Description": "Name of the custom DynamoDB data source", + "Value": { + "Fn::GetAtt": [ + "TransactionsByCategoryDS", + "Name" + ] + } + } + }, + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"custom-customCDK\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}" +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.description.txt new file mode 100644 index 00000000000..6cc2b5048c0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"Amplify","createdWith":"14.2.5","stackType":"function-Lambda","metadata":{"whyContinueWithGen1":"Prefer not to answer"}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.outputs.json new file mode 100644 index 00000000000..37f8f0c71e1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.outputs.json @@ -0,0 +1,22 @@ +[ + { + "OutputKey": "LambdaExecutionRoleArn", + "OutputValue": "arn:aws:iam::123456789012:role/financetrackerLambdaRole96a64165-x" + }, + { + "OutputKey": "Region", + "OutputValue": "us-east-1" + }, + { + "OutputKey": "Arn", + "OutputValue": "arn:aws:lambda:us-east-1:123456789012:function:financetracker-x" + }, + { + "OutputKey": "Name", + "OutputValue": "financetracker-x" + }, + { + "OutputKey": "LambdaExecutionRole", + "OutputValue": "financetrackerLambdaRole96a64165-x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.parameters.json new file mode 100644 index 00000000000..5234508a894 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.parameters.json @@ -0,0 +1,38 @@ +[ + { + "ParameterKey": "CloudWatchRule", + "ParameterValue": "NONE" + }, + { + "ParameterKey": "s3Key", + "ParameterValue": "amplify-builds/financetracker-36344755354a3948535a-build.zip" + }, + { + "ParameterKey": "dependsOn", + "ParameterValue": "" + }, + { + "ParameterKey": "apifinancetrackerGraphQLAPIIdOutput", + "ParameterValue": "adetddan7nd55gwre37yyck3vu" + }, + { + "ParameterKey": "deploymentBucketName", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "customcustomfinanceMonthlyReportTopicArn", + "ParameterValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-MonthlyReportTopic8D223100-riowtcOhtvf1" + }, + { + "ParameterKey": "customcustomfinanceBudgetAlertTopicArn", + "ParameterValue": "arn:aws:sns:us-east-1:123456789012:amplify-financetracker-x-x-customcustomfinance-x-BudgetAlertTopicF20DF526-R5tDxQli7ASH" + }, + { + "ParameterKey": "lambdaLayers", + "ParameterValue": "" + }, + { + "ParameterKey": "env", + "ParameterValue": "x" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.template.json new file mode 100644 index 00000000000..6dd8bac8d69 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-functionfinancetracker-x.template.json @@ -0,0 +1,391 @@ +{ + "AWSTemplateFormatVersion": "2010-09-09", + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"function-Lambda\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "Parameters": { + "CloudWatchRule": { + "Type": "String", + "Default": "NONE", + "Description": " Schedule Expression" + }, + "deploymentBucketName": { + "Type": "String" + }, + "env": { + "Type": "String" + }, + "s3Key": { + "Type": "String" + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Type": "String" + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Type": "String" + }, + "dependsOn": { + "Type": "String", + "Default": "" + }, + "lambdaLayers": { + "Type": "String", + "Default": "" + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Type": "String", + "Default": "apifinancetrackerGraphQLAPIIdOutput" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + } + }, + "Resources": { + "LambdaFunction": { + "Type": "AWS::Lambda::Function", + "Metadata": { + "aws:asset:path": "./src", + "aws:asset:property": "Code" + }, + "Properties": { + "Code": { + "S3Bucket": { + "Ref": "deploymentBucketName" + }, + "S3Key": { + "Ref": "s3Key" + } + }, + "Handler": "index.handler", + "FunctionName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetracker2ceb6de29", + { + "Fn::Join": [ + "", + [ + "financetracker", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "Environment": { + "Variables": { + "ENV": { + "Ref": "env" + }, + "REGION": { + "Ref": "AWS::Region" + }, + "BUDGET_ALERT_TOPIC_ARN": { + "Ref": "customcustomfinanceBudgetAlertTopicArn" + }, + "MONTHLY_REPORT_TOPIC_ARN": { + "Ref": "customcustomfinanceMonthlyReportTopicArn" + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_NAME": { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "API_FINANCETRACKER_TRANSACTIONTABLE_ARN": { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + "API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT": { + "Ref": "apifinancetrackerGraphQLAPIIdOutput" + } + } + }, + "Role": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + }, + "Runtime": "nodejs22.x", + "Layers": [], + "Timeout": 25 + } + }, + "LambdaExecutionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + "financetrackerLambdaRole96a64165", + { + "Fn::Join": [ + "", + [ + "financetrackerLambdaRole96a64165", + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + } + } + }, + "lambdaexecutionpolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": { + "Fn::Sub": [ + "arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*", + { + "region": { + "Ref": "AWS::Region" + }, + "account": { + "Ref": "AWS::AccountId" + }, + "lambda": { + "Ref": "LambdaFunction" + } + } + ] + } + } + ] + } + } + }, + "AmplifyResourcesPolicy": { + "DependsOn": [ + "LambdaExecutionRole" + ], + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "amplify-lambda-execution-policy", + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ], + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "dynamodb:Put*", + "dynamodb:Create*", + "dynamodb:BatchWriteItem", + "dynamodb:PartiQLInsert", + "dynamodb:Get*", + "dynamodb:BatchGetItem", + "dynamodb:List*", + "dynamodb:Describe*", + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:PartiQLSelect", + "dynamodb:Update*", + "dynamodb:RestoreTable*", + "dynamodb:PartiQLUpdate", + "dynamodb:Delete*", + "dynamodb:PartiQLDelete" + ], + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:dynamodb:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":table/", + { + "Fn::ImportValue": { + "Fn::Sub": "${apifinancetrackerGraphQLAPIIdOutput}:GetAtt:TransactionTable:Name" + } + }, + "/index/*" + ] + ] + } + ] + } + ] + } + } + }, + "CustomLambdaExecutionPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyName": "custom-lambda-execution-policy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "sns:Publish" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + }, + { + "Action": [ + "dynamodb:Scan", + "dynamodb:Query", + "dynamodb:GetItem" + ], + "Resource": [ + { + "Fn::Sub": [ + "arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", + {} + ] + } + ], + "Effect": "Allow" + }, + { + "Action": [ + "sts:GetCallerIdentity" + ], + "Resource": [ + "*" + ], + "Effect": "Allow" + } + ] + }, + "Roles": [ + { + "Ref": "LambdaExecutionRole" + } + ] + }, + "DependsOn": "LambdaExecutionRole" + } + }, + "Outputs": { + "Name": { + "Value": { + "Ref": "LambdaFunction" + } + }, + "Arn": { + "Value": { + "Fn::GetAtt": [ + "LambdaFunction", + "Arn" + ] + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + }, + "LambdaExecutionRole": { + "Value": { + "Ref": "LambdaExecutionRole" + } + }, + "LambdaExecutionRoleArn": { + "Value": { + "Fn::GetAtt": [ + "LambdaExecutionRole", + "Arn" + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.description.txt new file mode 100644 index 00000000000..e01eac85f24 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.description.txt @@ -0,0 +1 @@ +{"createdOn":"Mac","createdBy":"Amplify","createdWith":"14.2.5","stackType":"storage-S3","metadata":{"whyContinueWithGen1":"Prefer not to answer"}} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.outputs.json new file mode 100644 index 00000000000..babe572a1a7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.outputs.json @@ -0,0 +1,11 @@ +[ + { + "OutputKey": "BucketName", + "OutputValue": "financetrackera14ace1bd4be4b579cb608d44266aea7x-x", + "Description": "Bucket name for the S3 bucket" + }, + { + "OutputKey": "Region", + "OutputValue": "us-east-1" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.parameters.json new file mode 100644 index 00000000000..cf1d4535263 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.parameters.json @@ -0,0 +1,86 @@ +[ + { + "ParameterKey": "s3PermissionsGuestPublic", + "ParameterValue": "s3:GetObject" + }, + { + "ParameterKey": "bucketName", + "ParameterValue": "financetrackera14ace1bd4be4b579cb608d44266aea7" + }, + { + "ParameterKey": "s3PublicPolicy", + "ParameterValue": "Public_policy_20279658" + }, + { + "ParameterKey": "AuthenticatedAllowList", + "ParameterValue": "ALLOW" + }, + { + "ParameterKey": "unauthRoleName", + "ParameterValue": "amplify-financetracker-x-x-unauthRole" + }, + { + "ParameterKey": "s3PrivatePolicy", + "ParameterValue": "Private_policy_20279658" + }, + { + "ParameterKey": "selectedGuestPermissions", + "ParameterValue": "s3:GetObject,s3:ListBucket" + }, + { + "ParameterKey": "s3PermissionsAuthenticatedPublic", + "ParameterValue": "s3:PutObject,s3:GetObject,s3:DeleteObject" + }, + { + "ParameterKey": "s3PermissionsAuthenticatedPrivate", + "ParameterValue": "s3:PutObject,s3:GetObject,s3:DeleteObject" + }, + { + "ParameterKey": "s3PermissionsAuthenticatedUploads", + "ParameterValue": "s3:PutObject" + }, + { + "ParameterKey": "s3UploadsPolicy", + "ParameterValue": "Uploads_policy_20279658" + }, + { + "ParameterKey": "env", + "ParameterValue": "x" + }, + { + "ParameterKey": "unauthPolicyName", + "ParameterValue": "s3_amplify_20279658" + }, + { + "ParameterKey": "authRoleName", + "ParameterValue": "amplify-financetracker-x-x-authRole" + }, + { + "ParameterKey": "GuestAllowList", + "ParameterValue": "ALLOW" + }, + { + "ParameterKey": "authPolicyName", + "ParameterValue": "s3_amplify_20279658" + }, + { + "ParameterKey": "s3ProtectedPolicy", + "ParameterValue": "Protected_policy_20279658" + }, + { + "ParameterKey": "s3PermissionsAuthenticatedProtected", + "ParameterValue": "s3:PutObject,s3:GetObject,s3:DeleteObject" + }, + { + "ParameterKey": "s3PermissionsGuestUploads", + "ParameterValue": "DISALLOW" + }, + { + "ParameterKey": "s3ReadPolicy", + "ParameterValue": "read_policy_20279658" + }, + { + "ParameterKey": "selectedAuthenticatedPermissions", + "ParameterValue": "s3:PutObject,s3:GetObject,s3:ListBucket,s3:DeleteObject" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.template.json new file mode 100644 index 00000000000..204a64677c8 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x-storages320279658-x.template.json @@ -0,0 +1,646 @@ +{ + "Description": "{\"createdOn\":\"Mac\",\"createdBy\":\"Amplify\",\"createdWith\":\"14.2.5\",\"stackType\":\"storage-S3\",\"metadata\":{\"whyContinueWithGen1\":\"Prefer not to answer\"}}", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "env": { + "Type": "String" + }, + "bucketName": { + "Type": "String" + }, + "authRoleName": { + "Type": "String" + }, + "unauthRoleName": { + "Type": "String" + }, + "authPolicyName": { + "Type": "String" + }, + "unauthPolicyName": { + "Type": "String" + }, + "s3PublicPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PrivatePolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ProtectedPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3UploadsPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3ReadPolicy": { + "Type": "String", + "Default": "NONE" + }, + "s3PermissionsAuthenticatedPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedProtected": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedPrivate": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsAuthenticatedUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestPublic": { + "Type": "String", + "Default": "DISALLOW" + }, + "s3PermissionsGuestUploads": { + "Type": "String", + "Default": "DISALLOW" + }, + "AuthenticatedAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "GuestAllowList": { + "Type": "String", + "Default": "DISALLOW" + }, + "selectedGuestPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + }, + "selectedAuthenticatedPermissions": { + "Type": "CommaDelimitedList", + "Default": "NONE" + } + }, + "Conditions": { + "ShouldNotCreateEnvResources": { + "Fn::Equals": [ + { + "Ref": "env" + }, + "NONE" + ] + }, + "CreateAuthPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthProtected": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedProtected" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthPrivate": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedPrivate" + }, + "DISALLOW" + ] + } + ] + }, + "CreateAuthUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsAuthenticatedUploads" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestPublic": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestPublic" + }, + "DISALLOW" + ] + } + ] + }, + "CreateGuestUploads": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "s3PermissionsGuestUploads" + }, + "DISALLOW" + ] + } + ] + }, + "AuthReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "AuthenticatedAllowList" + }, + "DISALLOW" + ] + } + ] + }, + "GuestReadAndList": { + "Fn::Not": [ + { + "Fn::Equals": [ + { + "Ref": "GuestAllowList" + }, + "DISALLOW" + ] + } + ] + } + }, + "Outputs": { + "BucketName": { + "Description": "Bucket name for the S3 bucket", + "Value": { + "Ref": "S3Bucket" + } + }, + "Region": { + "Value": { + "Ref": "AWS::Region" + } + } + }, + "Resources": { + "S3Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Fn::If": [ + "ShouldNotCreateEnvResources", + { + "Ref": "bucketName" + }, + { + "Fn::Join": [ + "", + [ + { + "Ref": "bucketName" + }, + { + "Fn::Select": [ + 3, + { + "Fn::Split": [ + "-", + { + "Ref": "AWS::StackName" + } + ] + } + ] + }, + "-", + { + "Ref": "env" + } + ] + ] + } + ] + }, + "CorsConfiguration": { + "CorsRules": [ + { + "AllowedHeaders": [ + "*" + ], + "AllowedMethods": [ + "GET", + "HEAD", + "PUT", + "POST", + "DELETE" + ], + "AllowedOrigins": [ + "*" + ], + "ExposedHeaders": [ + "x-amz-server-side-encryption", + "x-amz-request-id", + "x-amz-id-2", + "ETag" + ], + "Id": "S3CORSRuleId1", + "MaxAge": 3000 + } + ] + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "S3AuthPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPublic" + }, + "S3AuthProtectedPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedProtected" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3ProtectedPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthProtected" + }, + "S3AuthPrivatePolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedPrivate" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/private/${cognito-identity.amazonaws.com:sub}/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PrivatePolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthPrivate" + }, + "S3AuthUploadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsAuthenticatedUploads" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/uploads/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3UploadsPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateAuthUploads" + }, + "S3GuestPublicPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": { + "Fn::Split": [ + ",", + { + "Ref": "s3PermissionsGuestPublic" + } + ] + }, + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/public/*" + ] + ] + } + ] + } + ] + }, + "PolicyName": { + "Ref": "s3PublicPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "CreateGuestPublic" + }, + "S3AuthReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*", + "private/${cognito-identity.amazonaws.com:sub}/", + "private/${cognito-identity.amazonaws.com:sub}/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "authRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "AuthReadAndList" + }, + "S3GuestReadPolicy": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:GetObject", + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + }, + "/protected/*" + ] + ] + } + }, + { + "Action": "s3:ListBucket", + "Condition": { + "StringLike": { + "s3:prefix": [ + "public/", + "public/*", + "protected/", + "protected/*" + ] + } + }, + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "S3Bucket" + } + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": { + "Ref": "s3ReadPolicy" + }, + "Roles": [ + { + "Ref": "unauthRoleName" + } + ] + }, + "DependsOn": [ + "S3Bucket" + ], + "Condition": "GuestReadAndList" + } + } +} diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.description.txt b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.description.txt new file mode 100644 index 00000000000..6e1d8ff2351 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.description.txt @@ -0,0 +1 @@ +Root Stack for AWS Amplify CLI diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.outputs.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.outputs.json new file mode 100644 index 00000000000..da6f50f99ad --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.outputs.json @@ -0,0 +1,42 @@ +[ + { + "OutputKey": "AuthRoleName", + "OutputValue": "amplify-financetracker-x-x-authRole" + }, + { + "OutputKey": "UnauthRoleArn", + "OutputValue": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-unauthRole" + }, + { + "OutputKey": "AuthRoleArn", + "OutputValue": "arn:aws:iam::123456789012:role/amplify-financetracker-x-x-authRole" + }, + { + "OutputKey": "Region", + "OutputValue": "us-east-1", + "Description": "CloudFormation provider root stack Region", + "ExportName": "amplify-financetracker-x-x-Region" + }, + { + "OutputKey": "DeploymentBucketName", + "OutputValue": "amplify-financetracker-x-x-deployment", + "Description": "CloudFormation provider root stack deployment bucket name", + "ExportName": "amplify-financetracker-x-x-DeploymentBucketName" + }, + { + "OutputKey": "UnauthRoleName", + "OutputValue": "amplify-financetracker-x-x-unauthRole" + }, + { + "OutputKey": "StackName", + "OutputValue": "amplify-financetracker-x-x", + "Description": "CloudFormation provider root stack ID", + "ExportName": "amplify-financetracker-x-x-StackName" + }, + { + "OutputKey": "StackId", + "OutputValue": "arn:aws:cloudformation:us-east-1:123456789012:stack/amplify-financetracker-x-x/b5b77e20-3f49-11f1-aca5-1262955767e1", + "Description": "CloudFormation provider root stack name", + "ExportName": "amplify-financetracker-x-x-StackId" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.parameters.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.parameters.json new file mode 100644 index 00000000000..afe72c6c119 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.parameters.json @@ -0,0 +1,14 @@ +[ + { + "ParameterKey": "AuthRoleName", + "ParameterValue": "amplify-financetracker-x-x-authRole" + }, + { + "ParameterKey": "DeploymentBucketName", + "ParameterValue": "amplify-financetracker-x-x-deployment" + }, + { + "ParameterKey": "UnauthRoleName", + "ParameterValue": "amplify-financetracker-x-x-unauthRole" + } +] diff --git a/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.template.json b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.template.json new file mode 100644 index 00000000000..3f6b72c4bed --- /dev/null +++ b/amplify-migration-apps/finance-tracker/_snapshot.pre.refactor/amplify-financetracker-x-x.template.json @@ -0,0 +1,578 @@ +{ + "Description": "Root Stack for AWS Amplify CLI", + "AWSTemplateFormatVersion": "2010-09-09", + "Parameters": { + "DeploymentBucketName": { + "Type": "String", + "Default": "DeploymentBucket", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "AuthRoleName": { + "Type": "String", + "Default": "AuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + }, + "UnauthRoleName": { + "Type": "String", + "Default": "UnAuthRoleName", + "Description": "Name of the common deployment bucket provided by the parent stack" + } + }, + "Outputs": { + "Region": { + "Description": "CloudFormation provider root stack Region", + "Value": { + "Ref": "AWS::Region" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-Region" + } + } + }, + "StackName": { + "Description": "CloudFormation provider root stack ID", + "Value": { + "Ref": "AWS::StackName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackName" + } + } + }, + "StackId": { + "Description": "CloudFormation provider root stack name", + "Value": { + "Ref": "AWS::StackId" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-StackId" + } + } + }, + "AuthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + "UnauthRoleArn": { + "Value": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + }, + "DeploymentBucketName": { + "Description": "CloudFormation provider root stack deployment bucket name", + "Value": { + "Ref": "DeploymentBucketName" + }, + "Export": { + "Name": { + "Fn::Sub": "${AWS::StackName}-DeploymentBucketName" + } + } + }, + "AuthRoleName": { + "Value": { + "Ref": "AuthRole" + } + }, + "UnauthRoleName": { + "Value": { + "Ref": "UnauthRole" + } + } + }, + "Resources": { + "DeploymentBucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Ref": "DeploymentBucketName" + }, + "BucketEncryption": { + "ServerSideEncryptionConfiguration": [ + { + "ServerSideEncryptionByDefault": { + "SSEAlgorithm": "AES256" + } + } + ] + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, + "DeploymentBucketBlockHTTP": { + "Type": "AWS::S3::BucketPolicy", + "Properties": { + "Bucket": { + "Ref": "DeploymentBucketName" + }, + "PolicyDocument": { + "Statement": [ + { + "Action": "s3:*", + "Effect": "Deny", + "Principal": "*", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + }, + "/*" + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:aws:s3:::", + { + "Ref": "DeploymentBucketName" + } + ] + ] + } + ], + "Condition": { + "Bool": { + "aws:SecureTransport": false + } + } + } + ] + } + } + }, + "AuthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "AuthRoleName" + } + } + }, + "UnauthRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Sid": "", + "Effect": "Deny", + "Principal": { + "Federated": "cognito-identity.amazonaws.com" + }, + "Action": "sts:AssumeRoleWithWebIdentity" + } + ] + }, + "RoleName": { + "Ref": "UnauthRoleName" + } + } + }, + "apifinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/api/cloudformation-template.json", + "Parameters": { + "AppSyncApiName": "financetracker", + "DynamoDBBillingMode": "PAY_PER_REQUEST", + "DynamoDBEnableServerSideEncryption": false, + "AuthCognitoUserPoolId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.UserPoolId" + ] + }, + "S3DeploymentBucket": "amplify-financetracker-x-x-deployment", + "S3DeploymentRootKey": "amplify-appsync-files/4dd0c50fb66651ae78c4cfbe5407c48414980f33", + "env": "x" + } + } + }, + "authfinancetracker331811e6": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/auth/financetracker331811e6-cloudformation-template.json", + "Parameters": { + "identityPoolName": "financetracker331811e6_identitypool_331811e6", + "allowUnauthenticatedIdentities": true, + "resourceNameTruncated": "financ331811e6", + "userPoolName": "financetracker331811e6_userpool_331811e6", + "autoVerifiedAttributes": "email", + "mfaConfiguration": "OFF", + "mfaTypes": "SMS Text Message", + "smsAuthenticationMessage": "Your authentication code is {####}", + "smsVerificationMessage": "Your verification code is {####}", + "emailVerificationSubject": "Your verification code", + "emailVerificationMessage": "Your verification code is {####}", + "defaultPasswordPolicy": false, + "passwordPolicyMinLength": 8, + "passwordPolicyCharacters": "", + "requiredAttributes": "email", + "aliasAttributes": "", + "userpoolClientGenerateSecret": false, + "userpoolClientRefreshTokenValidity": 30, + "userpoolClientWriteAttributes": "email", + "userpoolClientReadAttributes": "email", + "userpoolClientLambdaRole": "financ331811e6_userpoolclient_lambda_role", + "userpoolClientSetAttributes": false, + "sharedId": "331811e6", + "resourceName": "financetracker331811e6", + "authSelections": "identityPoolAndUserPool", + "useDefault": "default", + "usernameAttributes": "email", + "userPoolGroupList": "", + "serviceName": "Cognito", + "usernameCaseSensitive": false, + "useEnabledMfas": true, + "authRoleArn": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + }, + "unauthRoleArn": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + }, + "breakCircularDependency": true, + "dependsOn": "", + "env": "x" + } + } + }, + "customcustomfinance": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customfinance-cloudformation-template.json", + "Parameters": { + "env": "x" + } + } + }, + "customcustomresolver": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/custom/customresolver-cloudformation-template.json", + "Parameters": { + "apifinancetrackerGraphQLAPIKeyOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIKeyOutput" + ] + }, + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "apifinancetrackerGraphQLAPIEndpointOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIEndpointOutput" + ] + }, + "env": "x" + } + } + }, + "functionfinancetracker": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/function/financetracker-cloudformation-template.json", + "Parameters": { + "deploymentBucketName": "amplify-financetracker-x-x-deployment", + "s3Key": "amplify-builds/financetracker-36344755354a3948535a-build.zip", + "apifinancetrackerGraphQLAPIIdOutput": { + "Fn::GetAtt": [ + "apifinancetracker", + "Outputs.GraphQLAPIIdOutput" + ] + }, + "customcustomfinanceBudgetAlertTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.BudgetAlertTopicArn" + ] + }, + "customcustomfinanceMonthlyReportTopicArn": { + "Fn::GetAtt": [ + "customcustomfinance", + "Outputs.MonthlyReportTopicArn" + ] + }, + "env": "x" + } + } + }, + "storages320279658": { + "Type": "AWS::CloudFormation::Stack", + "Properties": { + "TemplateURL": "https://s3.amazonaws.com/amplify-financetracker-x-x-deployment/amplify-cfn-templates/storage/cloudformation-template.json", + "Parameters": { + "bucketName": "financetrackera14ace1bd4be4b579cb608d44266aea7", + "selectedGuestPermissions": "s3:GetObject,s3:ListBucket", + "selectedAuthenticatedPermissions": "s3:PutObject,s3:GetObject,s3:ListBucket,s3:DeleteObject", + "unauthRoleName": { + "Ref": "UnauthRoleName" + }, + "authRoleName": { + "Ref": "AuthRoleName" + }, + "s3PrivatePolicy": "Private_policy_20279658", + "s3ProtectedPolicy": "Protected_policy_20279658", + "s3PublicPolicy": "Public_policy_20279658", + "s3ReadPolicy": "read_policy_20279658", + "s3UploadsPolicy": "Uploads_policy_20279658", + "authPolicyName": "s3_amplify_20279658", + "unauthPolicyName": "s3_amplify_20279658", + "AuthenticatedAllowList": "ALLOW", + "GuestAllowList": "ALLOW", + "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject", + "s3PermissionsAuthenticatedUploads": "s3:PutObject", + "s3PermissionsGuestPublic": "s3:GetObject", + "s3PermissionsGuestUploads": "DISALLOW", + "env": "x" + } + } + }, + "UpdateRolesWithIDPFunction": { + "DependsOn": [ + "AuthRole", + "UnauthRole", + "authfinancetracker331811e6" + ], + "Type": "AWS::Lambda::Function", + "Properties": { + "Code": { + "ZipFile": { + "Fn::Join": [ + "\n", + [ + "const response = require('cfn-response');", + "const { IAMClient, GetRoleCommand, UpdateAssumeRolePolicyCommand } = require('@aws-sdk/client-iam');", + "exports.handler = function(event, context) {", + " // Don't return promise, response.send() marks context as done internally", + " const ignoredPromise = handleEvent(event, context)", + "};", + "async function handleEvent(event, context) {", + " try {", + " let authRoleName = event.ResourceProperties.authRoleName;", + " let unauthRoleName = event.ResourceProperties.unauthRoleName;", + " let idpId = event.ResourceProperties.idpId;", + " let authParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'authenticated'}", + " }", + " }]", + " };", + " let unauthParamsJson = {", + " 'Version': '2012-10-17',", + " 'Statement': [{", + " 'Effect': 'Allow',", + " 'Principal': {'Federated': 'cognito-identity.amazonaws.com'},", + " 'Action': 'sts:AssumeRoleWithWebIdentity',", + " 'Condition': {", + " 'StringEquals': {'cognito-identity.amazonaws.com:aud': idpId},", + " 'ForAnyValue:StringLike': {'cognito-identity.amazonaws.com:amr': 'unauthenticated'}", + " }", + " }]", + " };", + " if (event.RequestType === 'Delete') {", + " try {", + " delete authParamsJson.Statement[0].Condition;", + " delete unauthParamsJson.Statement[0].Condition;", + " authParamsJson.Statement[0].Effect = 'Deny'", + " unauthParamsJson.Statement[0].Effect = 'Deny'", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let res = await Promise.all([", + " iam.send(new GetRoleCommand({RoleName: authParams.RoleName})),", + " iam.send(new GetRoleCommand({RoleName: unauthParams.RoleName}))", + " ]);", + " res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.SUCCESS, {Error: err});", + " }", + " } else if (event.RequestType === 'Update' || event.RequestType === 'Create') {", + " const iam = new IAMClient({region: event.ResourceProperties.region});", + " let authParams = {PolicyDocument: JSON.stringify(authParamsJson), RoleName: authRoleName};", + " let unauthParams = {PolicyDocument: JSON.stringify(unauthParamsJson), RoleName: unauthRoleName};", + " const res = await Promise.all([", + " iam.send(new UpdateAssumeRolePolicyCommand(authParams)),", + " iam.send(new UpdateAssumeRolePolicyCommand(unauthParams))", + " ]);", + " response.send(event, context, response.SUCCESS, {});", + " }", + " } catch (err) {", + " console.log(err.stack);", + " response.send(event, context, response.FAILED, {Error: err});", + " }", + "};" + ] + ] + } + }, + "Handler": "index.handler", + "Runtime": "nodejs22.x", + "Timeout": 300, + "Role": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunctionRole", + "Arn" + ] + } + } + }, + "UpdateRolesWithIDPFunctionOutputs": { + "Type": "Custom::LambdaCallout", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "UpdateRolesWithIDPFunction", + "Arn" + ] + }, + "region": { + "Ref": "AWS::Region" + }, + "idpId": { + "Fn::GetAtt": [ + "authfinancetracker331811e6", + "Outputs.IdentityPoolId" + ] + }, + "authRoleName": { + "Ref": "AuthRole" + }, + "unauthRoleName": { + "Ref": "UnauthRole" + } + } + }, + "UpdateRolesWithIDPFunctionRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "RoleName": { + "Fn::Join": [ + "", + [ + { + "Ref": "AuthRole" + }, + "-idp" + ] + ] + }, + "AssumeRolePolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "lambda.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Policies": [ + { + "PolicyName": "UpdateRolesWithIDPFunctionPolicy", + "PolicyDocument": { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Resource": "arn:aws:logs:*:*:*" + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "AuthRole", + "Arn" + ] + } + }, + { + "Effect": "Allow", + "Action": [ + "iam:UpdateAssumeRolePolicy", + "iam:GetRole" + ], + "Resource": { + "Fn::GetAtt": [ + "UnauthRole", + "Arn" + ] + } + } + ] + } + } + ] + } + } + } +} diff --git a/amplify-migration-apps/finance-tracker/backend/configure.sh b/amplify-migration-apps/finance-tracker/backend/configure.sh new file mode 100755 index 00000000000..d7aae212db2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/backend/configure.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -euxo pipefail + +# Copy GraphQL schema +cp -f backend/schema.graphql ./amplify/backend/api/financetracker/schema.graphql + +# Copy Lambda function source +cp -f backend/financetracker.js ./amplify/backend/function/financetracker/src/index.js + +# Copy custom policies for the Lambda function +cp -f backend/custom-policies.json ./amplify/backend/function/financetracker/custom-policies.json + +# Copy CDK stack for customfinance (SNS topics) +cp -f backend/customfinance.ts ./amplify/backend/custom/customfinance/cdk-stack.ts + +# Copy CDK stack for customresolver +cp -f backend/customresolver.ts ./amplify/backend/custom/customresolver/cdk-stack.ts diff --git a/amplify-migration-apps/finance-tracker/backend/custom-policies.json b/amplify-migration-apps/finance-tracker/backend/custom-policies.json new file mode 100644 index 00000000000..22b177335f0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/backend/custom-policies.json @@ -0,0 +1,18 @@ +[ + { + "Action": ["sns:Publish"], + "Resource": ["*"] + }, + { + "Action": ["dynamodb:Scan", "dynamodb:Query", "dynamodb:GetItem"], + "Resource": [ + { + "Fn::Sub": ["arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*", {}] + } + ] + }, + { + "Action": ["sts:GetCallerIdentity"], + "Resource": ["*"] + } +] diff --git a/amplify-migration-apps/finance-tracker/backend/customfinance.ts b/amplify-migration-apps/finance-tracker/backend/customfinance.ts new file mode 100644 index 00000000000..4d048d1e7b2 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/backend/customfinance.ts @@ -0,0 +1,55 @@ +import * as cdk from 'aws-cdk-lib'; +import * as AmplifyHelpers from '@aws-amplify/cli-extensibility-helper'; +import { Construct } from 'constructs'; +import * as sns from 'aws-cdk-lib/aws-sns'; +import * as subscriptions from 'aws-cdk-lib/aws-sns-subscriptions'; + +export class cdkStack extends cdk.Stack { + public readonly budgetAlertTopic: sns.Topic; + public readonly monthlyReportTopic: sns.Topic; + + constructor(scope: Construct, id: string, props?: cdk.StackProps, amplifyResourceProps?: AmplifyHelpers.AmplifyResourceProps) { + super(scope, id, props); + + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + + const amplifyProjectInfo = AmplifyHelpers.getProjectInfo(); + + // 1. SNS Topic for Budget Alerts + this.budgetAlertTopic = new sns.Topic(this, 'BudgetAlertTopic', { + displayName: 'Fin Tracker Budget Alerts', + }); + + this.budgetAlertTopic.addSubscription( + new subscriptions.EmailSubscription('example@gmail.com') + ); + + new cdk.CfnOutput(this, 'BudgetAlertTopicArn', { + value: this.budgetAlertTopic.topicArn, + description: 'SNS Topic ARN for budget alerts', + exportName: `${amplifyProjectInfo.projectName}-BudgetAlertTopicArn-${cdk.Fn.ref('env')}`, + }); + + // 2. SNS Topic for Monthly Reports + this.monthlyReportTopic = new sns.Topic(this, 'MonthlyReportTopic', { + displayName: 'Finance Tracker Monthly Reports', + }); + + this.monthlyReportTopic.addSubscription( + new subscriptions.EmailSubscription('example@gmail.com') + ); + + new cdk.CfnOutput(this, 'MonthlyReportTopicArn', { + value: this.monthlyReportTopic.topicArn, + description: 'SNS Topic ARN for monthly reports', + exportName: `${amplifyProjectInfo.projectName}-MonthlyReportTopicArn-${cdk.Fn.ref('env')}`, + }); + + cdk.Tags.of(this).add('Project', 'FinanceTracker'); + cdk.Tags.of(this).add('Environment', cdk.Fn.ref('env')); + cdk.Tags.of(this).add('ManagedBy', 'Amplify'); + } +} diff --git a/amplify-migration-apps/finance-tracker/backend/customresolver.ts b/amplify-migration-apps/finance-tracker/backend/customresolver.ts new file mode 100644 index 00000000000..64d547c8a95 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/backend/customresolver.ts @@ -0,0 +1,111 @@ +import * as cdk from 'aws-cdk-lib'; +import * as AmplifyHelpers from '@aws-amplify/cli-extensibility-helper'; +import { AmplifyDependentResourcesAttributes } from '../../types/amplify-dependent-resources-ref'; +import { Construct } from 'constructs'; +import * as iam from 'aws-cdk-lib/aws-iam'; + +export class cdkStack extends cdk.Stack { + constructor(scope: Construct, id: string, props?: cdk.StackProps, amplifyResourceProps?: AmplifyHelpers.AmplifyResourceProps) { + super(scope, id, props); + + /* Do not remove - Amplify CLI automatically injects the current deployment environment in this input parameter */ + new cdk.CfnParameter(this, 'env', { + type: 'String', + description: 'Current Amplify CLI env name', + }); + + // Access Amplify-generated resources using Gen1 pattern + const retVal: AmplifyDependentResourcesAttributes = AmplifyHelpers.addResourceDependency(this, + amplifyResourceProps!.category, + amplifyResourceProps!.resourceName, + [ + { category: 'api', resourceName: 'financetracker' }, + ] + ); + + // Gen1 pattern: reference the GraphQL API ID using cdk.Fn.ref + // This is the exact pattern that breaks during Gen2 migration + const apiId = cdk.Fn.ref(retVal.api.financetracker.GraphQLAPIIdOutput); + + // Create IAM role for the DynamoDB data source + const dataSourceRole = new iam.Role(this, 'TransactionsByCategoryDSRole', { + assumedBy: new iam.ServicePrincipal('appsync.amazonaws.com'), + roleName: `TransByCatDSRole-${cdk.Fn.ref('env')}`, + }); + + // Grant DynamoDB access to the role + dataSourceRole.addToPolicy(new iam.PolicyStatement({ + actions: [ + 'dynamodb:Query', + 'dynamodb:Scan', + 'dynamodb:GetItem', + ], + resources: [ + cdk.Fn.sub('arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/Transaction-*'), + ], + })); + + // Create a DynamoDB data source for the custom resolver + // Using Gen1 CfnDataSource pattern (low-level CloudFormation) + const dataSource = new cdk.aws_appsync.CfnDataSource(this, 'TransactionsByCategoryDS', { + apiId: apiId, + name: 'TransactionsByCategoryDataSource', + type: 'AMAZON_DYNAMODB', + dynamoDbConfig: { + tableName: cdk.Fn.sub('Transaction-${apiId}-${env}', { + apiId: apiId, + env: cdk.Fn.ref('env'), + }), + awsRegion: cdk.Fn.ref('AWS::Region'), + }, + serviceRoleArn: dataSourceRole.roleArn, + }); + + // Request mapping template - VTL resolver for querying by category + const requestTemplate = ` +## Custom VTL resolver for getTransactionsByCategory +#set($limit = $util.defaultIfNull($ctx.args.limit, 20)) +{ + "version": "2018-05-29", + "operation": "Scan", + "filter": { + "expression": "category = :category", + "expressionValues": { + ":category": $util.dynamodb.toDynamoDBJson($ctx.args.category) + } + }, + "limit": $limit +}`; + + // Response mapping template + const responseTemplate = ` +## Return the results as a TransactionConnection +{ + "items": $util.toJson($ctx.result.items), + "nextToken": $util.toJson($ctx.result.nextToken) +}`; + + // Create the resolver using Gen1 CfnResolver pattern + const resolver = new cdk.aws_appsync.CfnResolver(this, 'GetTransactionsByCategoryResolver', { + apiId: apiId, + typeName: 'Query', + fieldName: 'getTransactionsByCategory', + dataSourceName: dataSource.attrName, + requestMappingTemplate: requestTemplate, + responseMappingTemplate: responseTemplate, + }); + + resolver.addDependency(dataSource); + + // Output the resolver info + new cdk.CfnOutput(this, 'ResolverArn', { + value: resolver.attrResolverArn, + description: 'ARN of the custom getTransactionsByCategory resolver', + }); + + new cdk.CfnOutput(this, 'DataSourceName', { + value: dataSource.attrName, + description: 'Name of the custom DynamoDB data source', + }); + } +} diff --git a/amplify-migration-apps/finance-tracker/backend/financetracker.js b/amplify-migration-apps/finance-tracker/backend/financetracker.js new file mode 100644 index 00000000000..519e5e91239 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/backend/financetracker.js @@ -0,0 +1,209 @@ +/* Amplify Params - DO NOT EDIT + API_FINANCETRACKER_GRAPHQLAPIIDOUTPUT + API_FINANCETRACKER_TRANSACTIONTABLE_ARN + API_FINANCETRACKER_TRANSACTIONTABLE_NAME + BUDGET_ALERT_TOPIC_ARN + MONTHLY_REPORT_TOPIC_ARN + ENV + REGION +Amplify Params - DO NOT EDIT */ const { DynamoDBClient } = require('@aws-sdk/client-dynamodb'); +const { DynamoDBDocumentClient, ScanCommand } = require('@aws-sdk/lib-dynamodb'); +const { SNSClient, PublishCommand } = require('@aws-sdk/client-sns'); + +const dynamoClient = new DynamoDBClient({}); +const dynamodb = DynamoDBDocumentClient.from(dynamoClient); +const sns = new SNSClient({}); + +/** + * Calculates totals from an array of transactions. + * Returns { totalIncome, totalExpenses, balance, savingsRate }. + */ +function calculateTotals(transactions) { + const { totalIncome, totalExpenses } = transactions.reduce( + (acc, transaction) => { + if (transaction.type === 'INCOME') { + acc.totalIncome += transaction.amount; + } else if (transaction.type === 'EXPENSE') { + acc.totalExpenses += transaction.amount; + } + return acc; + }, + { totalIncome: 0, totalExpenses: 0 }, + ); + + const balance = totalIncome - totalExpenses; + const savingsRate = totalIncome > 0 ? parseFloat(((balance / totalIncome) * 100).toFixed(2)) : 0; + + return { totalIncome, totalExpenses, balance, savingsRate }; +} + +/** + * Returns the Transaction table name from the environment variable. + * Throws if not configured. + */ +function getTableName() { + const tableName = process.env.API_FINANCETRACKER_TRANSACTIONTABLE_NAME; + if (!tableName || tableName.includes('NONE')) { + throw new Error('Transaction table name is not configured. Check the API_FINANCETRACKER_TRANSACTIONTABLE_NAME environment variable.'); + } + return tableName; +} + +/** + * AppSync GraphQL resolver for calculating financial summary and sending notifications + * @type {import('@types/aws-lambda').AppSyncResolverHandler} + */ +exports.handler = async (event) => { + console.log(`EVENT: ${JSON.stringify(event, null, 2)}`); + + const fieldName = event.info?.fieldName || event.fieldName; + const args = event.arguments || event.args || {}; + + console.log('Field Name:', fieldName); + + try { + switch (fieldName) { + case 'calculateFinancialSummary': + return await calculateSummaryFromDB(); + + case 'sendMonthlyReport': + return await sendMonthlyReport(args); + + case 'sendBudgetAlert': + return await sendBudgetAlert(args); + + default: + throw new Error(`Unknown field: ${fieldName}`); + } + } catch (error) { + console.error('Handler Error:', error); + + // For calculateFinancialSummary, return zeros instead of null to avoid GraphQL errors + if (fieldName === 'calculateFinancialSummary') { + return { totalIncome: 0, totalExpenses: 0, balance: 0, savingsRate: 0 }; + } + + return { success: false, message: `Error: ${error.message}` }; + } +}; + +async function calculateSummaryFromDB() { + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + console.log('Found transactions:', transactions.length); + + const summary = calculateTotals(transactions); + console.log('Calculated summary:', summary); + return summary; +} + +async function sendMonthlyReport(args) { + const email = args.email; + if (!email) { + return { success: false, message: 'Email is required' }; + } + + try { + const topicArn = process.env.MONTHLY_REPORT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Monthly report topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send(new ScanCommand({ TableName: tableName })); + const transactions = result.Items || []; + const summary = calculateTotals(transactions); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: '📊 Your Monthly Financial Report', + Message: `Hello, + +Here is your monthly financial report: + +💰 Total Income: ${summary.totalIncome.toFixed(2)} +💸 Total Expenses: ${summary.totalExpenses.toFixed(2)} +💵 Balance: ${summary.balance.toFixed(2)} +📈 Savings Rate: ${summary.savingsRate}% + +Total Transactions: ${transactions.length} + +This report was generated on ${new Date().toLocaleDateString()}. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + }, + }), + ); + + return { + success: true, + message: `Monthly report sent! Check ${email} for a confirmation email from AWS SNS, then click the button again.`, + }; + } catch (error) { + console.error('Error sending monthly report:', error); + return { success: false, message: `Failed to send report: ${error.message}` }; + } +} + +async function sendBudgetAlert(args) { + const { email, category, exceeded } = args; + + try { + const topicArn = process.env.BUDGET_ALERT_TOPIC_ARN; + if (!topicArn || topicArn === 'NONE') { + throw new Error('Budget alert topic ARN not configured'); + } + + const tableName = getTableName(); + + const result = await dynamodb.send( + new ScanCommand({ + TableName: tableName, + FilterExpression: 'category = :category AND #type = :type', + ExpressionAttributeNames: { '#type': 'type' }, + ExpressionAttributeValues: { ':category': category, ':type': 'EXPENSE' }, + }), + ); + + const categoryTransactions = result.Items || []; + const totalSpent = categoryTransactions.reduce((sum, t) => sum + t.amount, 0); + + await sns.send( + new PublishCommand({ + TopicArn: topicArn, + Subject: `⚠️ Budget Alert: ${category}`, + Message: `Hello, + +⚠️ BUDGET ALERT ⚠️ + +You have exceeded your budget for ${category} by ${exceeded.toFixed(2)}. + +Category: ${category} +Total Spent: ${totalSpent.toFixed(2)} +Number of Transactions: ${categoryTransactions.length} + +Consider reviewing your spending in this category. + +Best regards, +Finance Tracker Team`, + MessageAttributes: { + email: { DataType: 'String', StringValue: email }, + category: { DataType: 'String', StringValue: category }, + exceeded: { DataType: 'Number', StringValue: exceeded.toString() }, + }, + }), + ); + + return { success: true, message: 'Budget alert sent successfully!' }; + } catch (error) { + console.error('Error sending budget alert:', error); + return { success: false, message: `Failed to send alert: ${error.message}` }; + } +} diff --git a/amplify-migration-apps/finance-tracker/backend/schema.graphql b/amplify-migration-apps/finance-tracker/backend/schema.graphql new file mode 100644 index 00000000000..2ffc5514d7f --- /dev/null +++ b/amplify-migration-apps/finance-tracker/backend/schema.graphql @@ -0,0 +1,60 @@ +type Transaction @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + description: String! + amount: Float! + type: TransactionType! + category: String! + date: AWSDateTime! + receiptUrl: String + owner: String +} + +enum TransactionType { + INCOME + EXPENSE +} + +type Budget @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + category: String! + limit: Float! + month: String! + owner: String +} + +type FinancialSummary @model @auth(rules: [{ allow: public, operations: [read] }, { allow: owner, operations: [create, read, update, delete] }]) { + id: ID! + totalIncome: Float! + totalExpenses: Float! + balance: Float! + month: String! + owner: String +} + +type CalculatedSummary { + totalIncome: Float! @auth(rules: [{ allow: public }]) + totalExpenses: Float! @auth(rules: [{ allow: public }]) + balance: Float! @auth(rules: [{ allow: public }]) + savingsRate: Float! @auth(rules: [{ allow: public }]) +} + +type NotificationResult { + success: Boolean! @auth(rules: [{ allow: public }]) + message: String! @auth(rules: [{ allow: public }]) +} + +type TransactionConnection { + items: [Transaction] + nextToken: String +} + +type Query { + calculateFinancialSummary: CalculatedSummary @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) + getTransactionsByCategory(category: String!, limit: Int): TransactionConnection +} + +type Mutation { + sendMonthlyReport(email: String!): NotificationResult @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) + sendBudgetAlert(email: String!, category: String!, exceeded: Float!): NotificationResult @function(name: "financetracker-${env}") @auth(rules: [{ allow: public }]) +} + diff --git a/amplify-migration-apps/finance-tracker/eslint.config.js b/amplify-migration-apps/finance-tracker/eslint.config.js new file mode 100644 index 00000000000..6f236359302 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/eslint.config.js @@ -0,0 +1,18 @@ +import js from '@eslint/js'; +import globals from 'globals'; +import reactHooks from 'eslint-plugin-react-hooks'; +import reactRefresh from 'eslint-plugin-react-refresh'; +import tseslint from 'typescript-eslint'; +import { defineConfig, globalIgnores } from 'eslint/config'; + +export default defineConfig([ + globalIgnores(['dist']), + { + files: ['**/*.{ts,tsx}'], + extends: [js.configs.recommended, tseslint.configs.recommended, reactHooks.configs.flat.recommended, reactRefresh.configs.vite], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + }, +]); diff --git a/amplify-migration-apps/finance-tracker/images/add-gen2-main-branch.png b/amplify-migration-apps/finance-tracker/images/add-gen2-main-branch.png new file mode 100644 index 00000000000..236c5d5a772 Binary files /dev/null and b/amplify-migration-apps/finance-tracker/images/add-gen2-main-branch.png differ diff --git a/amplify-migration-apps/finance-tracker/images/add-main-branch.png b/amplify-migration-apps/finance-tracker/images/add-main-branch.png new file mode 100644 index 00000000000..81f5676edb6 Binary files /dev/null and b/amplify-migration-apps/finance-tracker/images/add-main-branch.png differ diff --git a/amplify-migration-apps/finance-tracker/images/app.png b/amplify-migration-apps/finance-tracker/images/app.png new file mode 100644 index 00000000000..e789daeafa7 Binary files /dev/null and b/amplify-migration-apps/finance-tracker/images/app.png differ diff --git a/amplify-migration-apps/finance-tracker/images/deploying-gen2-main-branch.png b/amplify-migration-apps/finance-tracker/images/deploying-gen2-main-branch.png new file mode 100644 index 00000000000..4be42e2231a Binary files /dev/null and b/amplify-migration-apps/finance-tracker/images/deploying-gen2-main-branch.png differ diff --git a/amplify-migration-apps/finance-tracker/images/deploying-main-branch.png b/amplify-migration-apps/finance-tracker/images/deploying-main-branch.png new file mode 100644 index 00000000000..0f19512dc15 Binary files /dev/null and b/amplify-migration-apps/finance-tracker/images/deploying-main-branch.png differ diff --git a/amplify-migration-apps/finance-tracker/images/find-gen2-stack.png b/amplify-migration-apps/finance-tracker/images/find-gen2-stack.png new file mode 100644 index 00000000000..6e62d9e9d1c Binary files /dev/null and b/amplify-migration-apps/finance-tracker/images/find-gen2-stack.png differ diff --git a/amplify-migration-apps/finance-tracker/images/hosting-get-started.png b/amplify-migration-apps/finance-tracker/images/hosting-get-started.png new file mode 100644 index 00000000000..498dfa66164 Binary files /dev/null and b/amplify-migration-apps/finance-tracker/images/hosting-get-started.png differ diff --git a/amplify-migration-apps/finance-tracker/index.html b/amplify-migration-apps/finance-tracker/index.html new file mode 100644 index 00000000000..41733008f53 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/index.html @@ -0,0 +1,13 @@ + + + + + + + finance-tracker + + +
+ + + diff --git a/amplify-migration-apps/finance-tracker/jest.config.js b/amplify-migration-apps/finance-tracker/jest.config.js new file mode 100644 index 00000000000..fb5a9b20fe0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/jest.config.js @@ -0,0 +1,23 @@ +/** @type {import('jest').Config} */ +export default { + testMatch: ['/tests/**/*.test.ts'], + modulePathIgnorePatterns: ['/_snapshot', '/amplify'], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + transform: { + '^.+\\.ts$': ['ts-jest', { + tsconfig: { + target: 'ES2022', + module: 'CommonJS', + moduleResolution: 'node', + esModuleInterop: true, + allowJs: true, + noEmit: true, + strict: true, + skipLibCheck: true, + types: ['node', 'jest'], + }, + }], + }, + testTimeout: 30_000, + setupFilesAfterEnv: ['/tests/jest.setup.ts'], +}; diff --git a/amplify-migration-apps/finance-tracker/migration/config.json b/amplify-migration-apps/finance-tracker/migration/config.json new file mode 100644 index 00000000000..cfcd0b25339 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/migration/config.json @@ -0,0 +1,4 @@ +{ + "refactor": { "skip": true }, + "generate": { "skipValidations": true } +} diff --git a/amplify-migration-apps/finance-tracker/migration/post-generate.ts b/amplify-migration-apps/finance-tracker/migration/post-generate.ts new file mode 100644 index 00000000000..5fa06c48156 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/migration/post-generate.ts @@ -0,0 +1,284 @@ +#!/usr/bin/env npx ts-node +/** + * Post-generate script for finance-tracker app. + * + * Applies manual edits required after `amplify gen2-migration generate`: + * 1. Update branchName in amplify/data/resource.ts + * 2. Convert Lambda function from CommonJS to ESM + * 3. Update frontend import from amplifyconfiguration.json to amplify_outputs.json + * 4. Add SNS publish IAM policy to backend.ts for the Lambda function + * 5. Wire SNS topic ARNs as Lambda environment variables in backend.ts + * 6. Fix custom resolver table name reference + */ + +import { execSync } from 'child_process'; +import fs from 'fs/promises'; +import fsSync from 'fs'; +import path from 'path'; + +function resolveTargetBranch(): string { + if (process.env.AWS_BRANCH) { + return process.env.AWS_BRANCH; + } + return execSync('git rev-parse --abbrev-ref HEAD', { + encoding: 'utf-8', + }).trim(); +} + +async function updateBranchName(appPath: string): Promise { + const resourcePath = path.join(appPath, 'amplify', 'data', 'resource.ts'); + const content = await fs.readFile(resourcePath, 'utf-8'); + const targetBranch = resolveTargetBranch(); + + const updated = content.replace( + /branchName:\s*['"]([^'"]+)['"]/, + `branchName: '${targetBranch}'`, + ); + + await fs.writeFile(resourcePath, updated, 'utf-8'); +} + +/** + * Find the Lambda function directory under amplify/function/. + * The name includes a hash suffix that varies per init. + */ +function resolveFunctionDir(appPath: string): string { + const functionRoot = path.join(appPath, 'amplify', 'function'); + const entries = fsSync.readdirSync(functionRoot); + const fnDir = entries.find((e) => e.startsWith('financetracker')); + if (!fnDir) { + throw new Error( + `No financetracker function found in ${functionRoot}`, + ); + } + return fnDir; +} + +async function convertLambdaToESM(appPath: string): Promise { + const fnDir = resolveFunctionDir(appPath); + const handlerPath = path.join( + appPath, 'amplify', 'function', fnDir, 'index.js', + ); + let content = await fs.readFile(handlerPath, 'utf-8'); + + // Convert require() to import statements + content = content.replace( + /const\s*\{([^}]+)\}\s*=\s*require\(\s*['"]([^'"]+)['"]\s*\);?/g, + 'import {$1} from \'$2\';', + ); + + // Convert exports.handler to export const handler + content = content.replace( + /exports\.handler\s*=\s*async\s*\((\w*)\)\s*=>\s*\{/g, + 'export const handler = async ($1) => {', + ); + + await fs.writeFile(handlerPath, content, 'utf-8'); +} + +async function updateFrontendConfig(appPath: string): Promise { + const mainPath = path.join(appPath, 'src', 'main.tsx'); + const content = await fs.readFile(mainPath, 'utf-8'); + + const updated = content.replace( + /from\s*["']\.\/amplifyconfiguration\.json["']/g, + "from '../amplify_outputs.json'", + ); + + await fs.writeFile(mainPath, updated, 'utf-8'); +} + +async function addSnsPublishPolicy(appPath: string): Promise { + const backendPath = path.join(appPath, 'amplify', 'backend.ts'); + let content = await fs.readFile(backendPath, 'utf-8'); + + if (content.includes('sns:Publish')) return; + + // Add PolicyStatement import if not present + if (!content.includes('PolicyStatement')) { + content = content.replace( + /import\s*\{([^}]*)\bDuration\b([^}]*)\}\s*from\s*["']aws-cdk-lib["']/, + (match, before, after) => { + return `import {${before}Duration${after}} from "aws-cdk-lib";\nimport { PolicyStatement } from "aws-cdk-lib/aws-iam"`; + }, + ); + // If no Duration import exists, add standalone + if (!content.includes('PolicyStatement')) { + content = + 'import { PolicyStatement } from "aws-cdk-lib/aws-iam";\n' + + content; + } + } + + const fnDir = resolveFunctionDir(appPath); + const policyBlock = ` +// Grant Lambda SNS publish permission (replaces Gen1 custom-policies.json) +backend.${fnDir}.resources.lambda.addToRolePolicy( + new PolicyStatement({ + actions: ['sns:Publish'], + resources: ['*'], + }) +); +`; + + content = content.trimEnd() + '\n' + policyBlock; + await fs.writeFile(backendPath, content, 'utf-8'); +} + +/** + * Capture the custom resource instance and pass SNS topic ARNs + * as environment variables to the Lambda function. + */ +async function wireSnsTopicEnvVars(appPath: string): Promise { + const backendPath = path.join(appPath, 'amplify', 'backend.ts'); + let content = await fs.readFile(backendPath, 'utf-8'); + + if (content.includes('BUDGET_ALERT_TOPIC_ARN')) return; + + // Find the custom resource define call (e.g. customfinance.defineCustomfinance(backend)) + // Pattern: .define(backend) + const customResMatch = content.match( + /(\w*finance\w*)\.define\w+\(backend\)/, + ); + + if (!customResMatch) { + console.warn('Could not find custom finance resource define call in backend.ts'); + return; + } + + const [fullMatch, stackName] = customResMatch; + + // Capture the instance with a prefixed name to avoid shadowing the namespace import + const varName = `_${stackName}`; + if (!content.includes(`const ${varName} =`)) { + content = content.replace( + fullMatch, + `const ${varName} = ${fullMatch}`, + ); + } + + const fnDir = resolveFunctionDir(appPath); + const envBlock = ` +// Wire SNS topic ARNs to Lambda environment variables +backend.${fnDir}.addEnvironment( + 'BUDGET_ALERT_TOPIC_ARN', + ${varName}.budgetAlertTopic.topicArn +); +backend.${fnDir}.addEnvironment( + 'MONTHLY_REPORT_TOPIC_ARN', + ${varName}.monthlyReportTopic.topicArn +); +`; + + content = content.trimEnd() + '\n' + envBlock; + await fs.writeFile(backendPath, content, 'utf-8'); +} + +/** + * Replace the Fn.sub table name construction in the custom resolver + * with a direct reference to the Gen2 data resource table. + */ +async function fixCustomResolverTableName(appPath: string): Promise { + const customDir = path.join(appPath, 'amplify', 'custom'); + if (!fsSync.existsSync(customDir)) return; + + const entries = fsSync.readdirSync(customDir); + const resolverDir = entries.find((e) => e.includes('resolver')); + if (!resolverDir) return; + + const resourcePath = path.join(customDir, resolverDir, 'construct.ts'); + if (!fsSync.existsSync(resourcePath)) return; + + let content = await fs.readFile(resourcePath, 'utf-8'); + + // Replace Fn.sub table name pattern with backend.data.resources.tables reference + content = content.replace( + /tableName:\s*cdk\.Fn\.sub\(\s*['"]Transaction-\$\{apiId\}-\$\{(?:env|branchName)\}['"]\s*,\s*\{[^}]+\}\s*\)/g, + "tableName: backend.data.resources.tables['Transaction'].tableName", + ); + + await fs.writeFile(resourcePath, content, 'utf-8'); +} + +/** + * Scan the Lambda function source for @aws-sdk/* imports/requires and + * add them to the root package.json so esbuild can resolve them. + */ +async function addMissingSdkDeps(appPath: string): Promise { + const fnDir = resolveFunctionDir(appPath); + const handlerPath = path.join(appPath, 'amplify', 'function', fnDir, 'index.js'); + const source = await fs.readFile(handlerPath, 'utf-8'); + + const sdkPackages = new Set(); + const patterns = [ + /require\(\s*['"](@aws-sdk\/[^'"]+)['"]\s*\)/g, + /from\s+['"](@aws-sdk\/[^'"]+)['"]/g, + ]; + for (const pattern of patterns) { + for (const [, pkg] of source.matchAll(pattern)) { + sdkPackages.add(pkg); + } + } + + if (sdkPackages.size === 0) return; + + const pkgPath = path.join(appPath, 'package.json'); + const pkg = JSON.parse(await fs.readFile(pkgPath, 'utf-8')); + const deps: Record = pkg.dependencies ?? {}; + + for (const name of sdkPackages) { + if (!deps[name]) { + deps[name] = '*'; + } + } + + pkg.dependencies = deps; + await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2) + '\n', 'utf-8'); + execSync('npm install', { cwd: appPath, stdio: 'inherit' }); +} + +/** + * Add @aws_api_key to the getTransactionsByCategory field and + * TransactionConnection type so API key requests are authorized. + * In Gen1 the custom VTL resolver bypassed schema-level auth; + * Gen2 enforces it. + */ +async function addApiKeyAuthToCustomResolver(appPath: string): Promise { + const resourcePath = path.join(appPath, 'amplify', 'data', 'resource.ts'); + let content = await fs.readFile(resourcePath, 'utf-8'); + + if (content.includes('@aws_api_key')) return; + + content = content.replace( + 'getTransactionsByCategory(category: String!, limit: Int): TransactionConnection', + 'getTransactionsByCategory(category: String!, limit: Int): TransactionConnection @aws_api_key', + ); + + content = content.replace( + 'type TransactionConnection {', + 'type TransactionConnection @aws_api_key {', + ); + + await fs.writeFile(resourcePath, content, 'utf-8'); +} + +export async function postGenerate(appPath: string): Promise { + await updateBranchName(appPath); + await convertLambdaToESM(appPath); + await addMissingSdkDeps(appPath); + await updateFrontendConfig(appPath); + await addSnsPublishPolicy(appPath); + await wireSnsTopicEnvVars(appPath); + await fixCustomResolverTableName(appPath); + await addApiKeyAuthToCustomResolver(appPath); +} + +async function main(): Promise { + const [appPath = process.cwd()] = process.argv.slice(2); + await postGenerate(appPath); +} + +main().catch((error) => { + console.error('Fatal error:', error.message); + process.exit(1); +}); diff --git a/amplify-migration-apps/finance-tracker/migration/pre-push.ts b/amplify-migration-apps/finance-tracker/migration/pre-push.ts new file mode 100644 index 00000000000..db52120b8e0 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/migration/pre-push.ts @@ -0,0 +1,155 @@ +#!/usr/bin/env npx ts-node +/** + * Pre-push script for finance-tracker app. + * + * Applies manual edits required before `amplify push` on Gen1: + * 1. Add customfinance dependency to function-parameters.json + * 2. Add customfinance dependency to backend-config.json (function) + * 3. Add customresolver dependency on API to backend-config.json + * 4. Add CloudFormation parameters and env vars for SNS topic ARNs + */ + +import fs from 'fs'; +import path from 'path'; + +function resolveFunctionName(appPath: string): string { + const functionDir = path.join(appPath, 'amplify', 'backend', 'function'); + const entries = fs.readdirSync(functionDir); + const fnDir = entries.find((e) => e.startsWith('financetracker')); + if (!fnDir) { + throw new Error(`No financetracker function found in ${functionDir}`); + } + return fnDir; +} + +function resolveApiName(appPath: string): string { + const apiDir = path.join(appPath, 'amplify', 'backend', 'api'); + const entries = fs.readdirSync(apiDir); + const api = entries.find((e) => e.startsWith('financetracker')); + if (!api) { + throw new Error(`No financetracker API found in ${apiDir}`); + } + return api; +} + +/** Add customfinance dependency to function-parameters.json. */ +function updateFunctionParameters(appPath: string, functionName: string): void { + const filePath = path.join( + appPath, 'amplify', 'backend', 'function', functionName, 'function-parameters.json', + ); + + const params = fs.existsSync(filePath) + ? JSON.parse(fs.readFileSync(filePath, 'utf-8')) + : {}; + + params.lambdaLayers ??= []; + params.dependsOn ??= []; + + const hasCustomfinance = params.dependsOn.some( + (d: { resourceName?: string }) => d.resourceName === 'customfinance', + ); + + if (!hasCustomfinance) { + params.dependsOn.push({ + category: 'custom', + resourceName: 'customfinance', + attributes: ['BudgetAlertTopicArn', 'MonthlyReportTopicArn'], + }); + } + + fs.writeFileSync(filePath, JSON.stringify(params, null, 2), 'utf-8'); +} + +/** Add customfinance dependency to the function entry in backend-config.json. */ +function updateBackendConfigFunction( + backendConfig: Record, + functionName: string, +): void { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const funcConfig = (backendConfig as any).function?.[functionName]; + if (!funcConfig) return; + + funcConfig.dependsOn ??= []; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const deps = funcConfig.dependsOn as any[]; + + const hasCustomfinance = deps.some((d) => d.resourceName === 'customfinance'); + if (!hasCustomfinance) { + deps.push({ + category: 'custom', + resourceName: 'customfinance', + attributes: ['BudgetAlertTopicArn', 'MonthlyReportTopicArn'], + }); + } +} + +/** Add customresolver entry with API dependency to backend-config.json. */ +function updateBackendConfigCustomResolver( + backendConfig: Record, + apiName: string, +): void { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const custom = ((backendConfig as any).custom ??= {}); + + if (!custom.customresolver) { + custom.customresolver = { + dependsOn: [ + { + attributes: ['GraphQLAPIIdOutput', 'GraphQLAPIEndpointOutput', 'GraphQLAPIKeyOutput'], + category: 'api', + resourceName: apiName, + }, + ], + providerPlugin: 'awscloudformation', + service: 'customCDK', + }; + } +} + +/** Add CloudFormation parameters and env vars for SNS topic ARNs. */ +function updateCloudFormationTemplate(appPath: string, functionName: string): void { + const templatePath = path.join( + appPath, 'amplify', 'backend', 'function', functionName, + `${functionName}-cloudformation-template.json`, + ); + + const template = JSON.parse(fs.readFileSync(templatePath, 'utf-8')); + + // Add parameters + template.Parameters.customcustomfinanceBudgetAlertTopicArn ??= { Type: 'String' }; + template.Parameters.customcustomfinanceMonthlyReportTopicArn ??= { Type: 'String' }; + template.Parameters.dependsOn ??= { Type: 'String', Default: '' }; + template.Parameters.lambdaLayers ??= { Type: 'String', Default: '' }; + + // Add environment variables + const envVars = template.Resources.LambdaFunction.Properties.Environment.Variables; + envVars.BUDGET_ALERT_TOPIC_ARN ??= { Ref: 'customcustomfinanceBudgetAlertTopicArn' }; + envVars.MONTHLY_REPORT_TOPIC_ARN ??= { Ref: 'customcustomfinanceMonthlyReportTopicArn' }; + + fs.writeFileSync(templatePath, JSON.stringify(template, null, 2), 'utf-8'); +} + +export function prePush(appPath: string): void { + const functionName = resolveFunctionName(appPath); + const apiName = resolveApiName(appPath); + + // 1. Update function-parameters.json + updateFunctionParameters(appPath, functionName); + + // 2-3. Update backend-config.json + const backendConfigPath = path.join(appPath, 'amplify', 'backend', 'backend-config.json'); + const backendConfig = JSON.parse(fs.readFileSync(backendConfigPath, 'utf-8')); + updateBackendConfigFunction(backendConfig, functionName); + updateBackendConfigCustomResolver(backendConfig, apiName); + fs.writeFileSync(backendConfigPath, JSON.stringify(backendConfig, null, 2), 'utf-8'); + + // 4. Update CloudFormation template + updateCloudFormationTemplate(appPath, functionName); +} + +function main(): void { + const [appPath = process.cwd()] = process.argv.slice(2); + prePush(appPath); +} + +main(); diff --git a/amplify-migration-apps/finance-tracker/package.json b/amplify-migration-apps/finance-tracker/package.json new file mode 100644 index 00000000000..d8313dc092b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/package.json @@ -0,0 +1,50 @@ +{ + "name": "@amplify-migration-apps/finance-tracker", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "lint": "eslint .", + "preview": "vite preview", + "configure": "./backend/configure.sh", + "sanitize": "tsx ../sanitize.ts", + "normalize": "tsx ../normalize.ts", + "typecheck": "cd _snapshot.post.generate/amplify && npx tsc --noEmit", + "pre-push": "npx tsx migration/pre-push.ts", + "post-generate": "npx tsx migration/post-generate.ts", + "post-refactor": "true", + "post-sandbox": "true", + "pre-sandbox": "true", + "post-push": "true", + "test:gen1": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-src/amplifyconfiguration.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose", + "test:gen2": "APP_CONFIG_PATH=${APP_CONFIG_PATH:-amplify_outputs.json} NODE_OPTIONS='--experimental-vm-modules' jest --verbose", + "test:shared-data": "true", + "test:e2e": "cd ../../packages/amplify-e2e-gen2-migration && npx tsx src/cli.ts --app finance-tracker --profile ${AWS_PROFILE:-default}", + "deploy": "cd ../../packages/amplify-e2e-gen2-migration && npx tsx src/cli.ts --app finance-tracker --step deploy --profile ${AWS_PROFILE:-default}" + }, + "dependencies": { + "aws-amplify": "^6.0.0", + "react": "^19.2.0", + "react-dom": "^19.2.0" + }, + "devDependencies": { + "@aws-sdk/client-cognito-identity-provider": "^3.936.0", + "@eslint/js": "^9.39.1", + "@types/jest": "^29.5.14", + "@types/node": "^24.10.1", + "@types/react": "^19.2.5", + "@types/react-dom": "^19.2.3", + "@vitejs/plugin-react": "^5.1.1", + "eslint": "^9.39.1", + "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-react-refresh": "^0.4.24", + "globals": "^16.5.0", + "jest": "^29.7.0", + "ts-jest": "^29.3.4", + "typescript": "~5.9.3", + "typescript-eslint": "^8.46.4", + "vite": "^7.2.4" + } +} diff --git a/amplify-migration-apps/finance-tracker/public/vite.svg b/amplify-migration-apps/finance-tracker/public/vite.svg new file mode 100644 index 00000000000..e7b8dfb1b2a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/amplify-migration-apps/finance-tracker/src/API.ts b/amplify-migration-apps/finance-tracker/src/API.ts new file mode 100644 index 00000000000..173f7b18c33 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/API.ts @@ -0,0 +1,921 @@ +/* tslint:disable */ +/* eslint-disable */ +// This file was automatically generated and should not be edited. + +export type NotificationResult = { + __typename: "NotificationResult", + success: boolean, + message: string, +}; + +export type CreateTransactionInput = { + id?: string | null, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, +}; + +export enum TransactionType { + INCOME = "INCOME", + EXPENSE = "EXPENSE", +} + + +export type ModelTransactionConditionInput = { + description?: ModelStringInput | null, + amount?: ModelFloatInput | null, + type?: ModelTransactionTypeInput | null, + category?: ModelStringInput | null, + date?: ModelStringInput | null, + receiptUrl?: ModelStringInput | null, + owner?: ModelStringInput | null, + and?: Array< ModelTransactionConditionInput | null > | null, + or?: Array< ModelTransactionConditionInput | null > | null, + not?: ModelTransactionConditionInput | null, + createdAt?: ModelStringInput | null, + updatedAt?: ModelStringInput | null, +}; + +export type ModelStringInput = { + ne?: string | null, + eq?: string | null, + le?: string | null, + lt?: string | null, + ge?: string | null, + gt?: string | null, + contains?: string | null, + notContains?: string | null, + between?: Array< string | null > | null, + beginsWith?: string | null, + attributeExists?: boolean | null, + attributeType?: ModelAttributeTypes | null, + size?: ModelSizeInput | null, +}; + +export enum ModelAttributeTypes { + binary = "binary", + binarySet = "binarySet", + bool = "bool", + list = "list", + map = "map", + number = "number", + numberSet = "numberSet", + string = "string", + stringSet = "stringSet", + _null = "_null", +} + + +export type ModelSizeInput = { + ne?: number | null, + eq?: number | null, + le?: number | null, + lt?: number | null, + ge?: number | null, + gt?: number | null, + between?: Array< number | null > | null, +}; + +export type ModelFloatInput = { + ne?: number | null, + eq?: number | null, + le?: number | null, + lt?: number | null, + ge?: number | null, + gt?: number | null, + between?: Array< number | null > | null, + attributeExists?: boolean | null, + attributeType?: ModelAttributeTypes | null, +}; + +export type ModelTransactionTypeInput = { + eq?: TransactionType | null, + ne?: TransactionType | null, +}; + +export type Transaction = { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, +}; + +export type UpdateTransactionInput = { + id: string, + description?: string | null, + amount?: number | null, + type?: TransactionType | null, + category?: string | null, + date?: string | null, + receiptUrl?: string | null, + owner?: string | null, +}; + +export type DeleteTransactionInput = { + id: string, +}; + +export type CreateBudgetInput = { + id?: string | null, + category: string, + limit: number, + month: string, + owner?: string | null, +}; + +export type ModelBudgetConditionInput = { + category?: ModelStringInput | null, + limit?: ModelFloatInput | null, + month?: ModelStringInput | null, + owner?: ModelStringInput | null, + and?: Array< ModelBudgetConditionInput | null > | null, + or?: Array< ModelBudgetConditionInput | null > | null, + not?: ModelBudgetConditionInput | null, + createdAt?: ModelStringInput | null, + updatedAt?: ModelStringInput | null, +}; + +export type Budget = { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, +}; + +export type UpdateBudgetInput = { + id: string, + category?: string | null, + limit?: number | null, + month?: string | null, + owner?: string | null, +}; + +export type DeleteBudgetInput = { + id: string, +}; + +export type CreateFinancialSummaryInput = { + id?: string | null, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, +}; + +export type ModelFinancialSummaryConditionInput = { + totalIncome?: ModelFloatInput | null, + totalExpenses?: ModelFloatInput | null, + balance?: ModelFloatInput | null, + month?: ModelStringInput | null, + owner?: ModelStringInput | null, + and?: Array< ModelFinancialSummaryConditionInput | null > | null, + or?: Array< ModelFinancialSummaryConditionInput | null > | null, + not?: ModelFinancialSummaryConditionInput | null, + createdAt?: ModelStringInput | null, + updatedAt?: ModelStringInput | null, +}; + +export type FinancialSummary = { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, +}; + +export type UpdateFinancialSummaryInput = { + id: string, + totalIncome?: number | null, + totalExpenses?: number | null, + balance?: number | null, + month?: string | null, + owner?: string | null, +}; + +export type DeleteFinancialSummaryInput = { + id: string, +}; + +export type CalculatedSummary = { + __typename: "CalculatedSummary", + totalIncome: number, + totalExpenses: number, + balance: number, + savingsRate: number, +}; + +export type TransactionConnection = { + __typename: "TransactionConnection", + items?: Array | null, + nextToken?: string | null, +}; + +export type ModelTransactionFilterInput = { + id?: ModelIDInput | null, + description?: ModelStringInput | null, + amount?: ModelFloatInput | null, + type?: ModelTransactionTypeInput | null, + category?: ModelStringInput | null, + date?: ModelStringInput | null, + receiptUrl?: ModelStringInput | null, + owner?: ModelStringInput | null, + createdAt?: ModelStringInput | null, + updatedAt?: ModelStringInput | null, + and?: Array< ModelTransactionFilterInput | null > | null, + or?: Array< ModelTransactionFilterInput | null > | null, + not?: ModelTransactionFilterInput | null, +}; + +export type ModelIDInput = { + ne?: string | null, + eq?: string | null, + le?: string | null, + lt?: string | null, + ge?: string | null, + gt?: string | null, + contains?: string | null, + notContains?: string | null, + between?: Array< string | null > | null, + beginsWith?: string | null, + attributeExists?: boolean | null, + attributeType?: ModelAttributeTypes | null, + size?: ModelSizeInput | null, +}; + +export type ModelTransactionConnection = { + __typename: "ModelTransactionConnection", + items: Array, + nextToken?: string | null, +}; + +export type ModelBudgetFilterInput = { + id?: ModelIDInput | null, + category?: ModelStringInput | null, + limit?: ModelFloatInput | null, + month?: ModelStringInput | null, + owner?: ModelStringInput | null, + createdAt?: ModelStringInput | null, + updatedAt?: ModelStringInput | null, + and?: Array< ModelBudgetFilterInput | null > | null, + or?: Array< ModelBudgetFilterInput | null > | null, + not?: ModelBudgetFilterInput | null, +}; + +export type ModelBudgetConnection = { + __typename: "ModelBudgetConnection", + items: Array, + nextToken?: string | null, +}; + +export type ModelFinancialSummaryFilterInput = { + id?: ModelIDInput | null, + totalIncome?: ModelFloatInput | null, + totalExpenses?: ModelFloatInput | null, + balance?: ModelFloatInput | null, + month?: ModelStringInput | null, + owner?: ModelStringInput | null, + createdAt?: ModelStringInput | null, + updatedAt?: ModelStringInput | null, + and?: Array< ModelFinancialSummaryFilterInput | null > | null, + or?: Array< ModelFinancialSummaryFilterInput | null > | null, + not?: ModelFinancialSummaryFilterInput | null, +}; + +export type ModelFinancialSummaryConnection = { + __typename: "ModelFinancialSummaryConnection", + items: Array, + nextToken?: string | null, +}; + +export type ModelSubscriptionTransactionFilterInput = { + id?: ModelSubscriptionIDInput | null, + description?: ModelSubscriptionStringInput | null, + amount?: ModelSubscriptionFloatInput | null, + type?: ModelSubscriptionStringInput | null, + category?: ModelSubscriptionStringInput | null, + date?: ModelSubscriptionStringInput | null, + receiptUrl?: ModelSubscriptionStringInput | null, + owner?: ModelSubscriptionStringInput | null, + createdAt?: ModelSubscriptionStringInput | null, + updatedAt?: ModelSubscriptionStringInput | null, + and?: Array< ModelSubscriptionTransactionFilterInput | null > | null, + or?: Array< ModelSubscriptionTransactionFilterInput | null > | null, +}; + +export type ModelSubscriptionIDInput = { + ne?: string | null, + eq?: string | null, + le?: string | null, + lt?: string | null, + ge?: string | null, + gt?: string | null, + contains?: string | null, + notContains?: string | null, + between?: Array< string | null > | null, + beginsWith?: string | null, + in?: Array< string | null > | null, + notIn?: Array< string | null > | null, +}; + +export type ModelSubscriptionStringInput = { + ne?: string | null, + eq?: string | null, + le?: string | null, + lt?: string | null, + ge?: string | null, + gt?: string | null, + contains?: string | null, + notContains?: string | null, + between?: Array< string | null > | null, + beginsWith?: string | null, + in?: Array< string | null > | null, + notIn?: Array< string | null > | null, +}; + +export type ModelSubscriptionFloatInput = { + ne?: number | null, + eq?: number | null, + le?: number | null, + lt?: number | null, + ge?: number | null, + gt?: number | null, + between?: Array< number | null > | null, + in?: Array< number | null > | null, + notIn?: Array< number | null > | null, +}; + +export type ModelSubscriptionBudgetFilterInput = { + id?: ModelSubscriptionIDInput | null, + category?: ModelSubscriptionStringInput | null, + limit?: ModelSubscriptionFloatInput | null, + month?: ModelSubscriptionStringInput | null, + owner?: ModelSubscriptionStringInput | null, + createdAt?: ModelSubscriptionStringInput | null, + updatedAt?: ModelSubscriptionStringInput | null, + and?: Array< ModelSubscriptionBudgetFilterInput | null > | null, + or?: Array< ModelSubscriptionBudgetFilterInput | null > | null, +}; + +export type ModelSubscriptionFinancialSummaryFilterInput = { + id?: ModelSubscriptionIDInput | null, + totalIncome?: ModelSubscriptionFloatInput | null, + totalExpenses?: ModelSubscriptionFloatInput | null, + balance?: ModelSubscriptionFloatInput | null, + month?: ModelSubscriptionStringInput | null, + owner?: ModelSubscriptionStringInput | null, + createdAt?: ModelSubscriptionStringInput | null, + updatedAt?: ModelSubscriptionStringInput | null, + and?: Array< ModelSubscriptionFinancialSummaryFilterInput | null > | null, + or?: Array< ModelSubscriptionFinancialSummaryFilterInput | null > | null, +}; + +export type SendMonthlyReportMutationVariables = { + email: string, +}; + +export type SendMonthlyReportMutation = { + sendMonthlyReport?: { + __typename: "NotificationResult", + success: boolean, + message: string, + } | null, +}; + +export type SendBudgetAlertMutationVariables = { + email: string, + category: string, + exceeded: number, +}; + +export type SendBudgetAlertMutation = { + sendBudgetAlert?: { + __typename: "NotificationResult", + success: boolean, + message: string, + } | null, +}; + +export type CreateTransactionMutationVariables = { + input: CreateTransactionInput, + condition?: ModelTransactionConditionInput | null, +}; + +export type CreateTransactionMutation = { + createTransaction?: { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type UpdateTransactionMutationVariables = { + input: UpdateTransactionInput, + condition?: ModelTransactionConditionInput | null, +}; + +export type UpdateTransactionMutation = { + updateTransaction?: { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type DeleteTransactionMutationVariables = { + input: DeleteTransactionInput, + condition?: ModelTransactionConditionInput | null, +}; + +export type DeleteTransactionMutation = { + deleteTransaction?: { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type CreateBudgetMutationVariables = { + input: CreateBudgetInput, + condition?: ModelBudgetConditionInput | null, +}; + +export type CreateBudgetMutation = { + createBudget?: { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type UpdateBudgetMutationVariables = { + input: UpdateBudgetInput, + condition?: ModelBudgetConditionInput | null, +}; + +export type UpdateBudgetMutation = { + updateBudget?: { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type DeleteBudgetMutationVariables = { + input: DeleteBudgetInput, + condition?: ModelBudgetConditionInput | null, +}; + +export type DeleteBudgetMutation = { + deleteBudget?: { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type CreateFinancialSummaryMutationVariables = { + input: CreateFinancialSummaryInput, + condition?: ModelFinancialSummaryConditionInput | null, +}; + +export type CreateFinancialSummaryMutation = { + createFinancialSummary?: { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type UpdateFinancialSummaryMutationVariables = { + input: UpdateFinancialSummaryInput, + condition?: ModelFinancialSummaryConditionInput | null, +}; + +export type UpdateFinancialSummaryMutation = { + updateFinancialSummary?: { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type DeleteFinancialSummaryMutationVariables = { + input: DeleteFinancialSummaryInput, + condition?: ModelFinancialSummaryConditionInput | null, +}; + +export type DeleteFinancialSummaryMutation = { + deleteFinancialSummary?: { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type CalculateFinancialSummaryQueryVariables = { +}; + +export type CalculateFinancialSummaryQuery = { + calculateFinancialSummary?: { + __typename: "CalculatedSummary", + totalIncome: number, + totalExpenses: number, + balance: number, + savingsRate: number, + } | null, +}; + +export type GetTransactionsByCategoryQueryVariables = { + category: string, + limit?: number | null, +}; + +export type GetTransactionsByCategoryQuery = { + getTransactionsByCategory?: { + __typename: "TransactionConnection", + items?: Array< { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null > | null, + nextToken?: string | null, + } | null, +}; + +export type GetTransactionQueryVariables = { + id: string, +}; + +export type GetTransactionQuery = { + getTransaction?: { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type ListTransactionsQueryVariables = { + filter?: ModelTransactionFilterInput | null, + limit?: number | null, + nextToken?: string | null, +}; + +export type ListTransactionsQuery = { + listTransactions?: { + __typename: "ModelTransactionConnection", + items: Array< { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null >, + nextToken?: string | null, + } | null, +}; + +export type GetBudgetQueryVariables = { + id: string, +}; + +export type GetBudgetQuery = { + getBudget?: { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type ListBudgetsQueryVariables = { + filter?: ModelBudgetFilterInput | null, + limit?: number | null, + nextToken?: string | null, +}; + +export type ListBudgetsQuery = { + listBudgets?: { + __typename: "ModelBudgetConnection", + items: Array< { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null >, + nextToken?: string | null, + } | null, +}; + +export type GetFinancialSummaryQueryVariables = { + id: string, +}; + +export type GetFinancialSummaryQuery = { + getFinancialSummary?: { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type ListFinancialSummariesQueryVariables = { + filter?: ModelFinancialSummaryFilterInput | null, + limit?: number | null, + nextToken?: string | null, +}; + +export type ListFinancialSummariesQuery = { + listFinancialSummaries?: { + __typename: "ModelFinancialSummaryConnection", + items: Array< { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null >, + nextToken?: string | null, + } | null, +}; + +export type OnCreateTransactionSubscriptionVariables = { + filter?: ModelSubscriptionTransactionFilterInput | null, +}; + +export type OnCreateTransactionSubscription = { + onCreateTransaction?: { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnUpdateTransactionSubscriptionVariables = { + filter?: ModelSubscriptionTransactionFilterInput | null, +}; + +export type OnUpdateTransactionSubscription = { + onUpdateTransaction?: { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnDeleteTransactionSubscriptionVariables = { + filter?: ModelSubscriptionTransactionFilterInput | null, +}; + +export type OnDeleteTransactionSubscription = { + onDeleteTransaction?: { + __typename: "Transaction", + id: string, + description: string, + amount: number, + type: TransactionType, + category: string, + date: string, + receiptUrl?: string | null, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnCreateBudgetSubscriptionVariables = { + filter?: ModelSubscriptionBudgetFilterInput | null, +}; + +export type OnCreateBudgetSubscription = { + onCreateBudget?: { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnUpdateBudgetSubscriptionVariables = { + filter?: ModelSubscriptionBudgetFilterInput | null, +}; + +export type OnUpdateBudgetSubscription = { + onUpdateBudget?: { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnDeleteBudgetSubscriptionVariables = { + filter?: ModelSubscriptionBudgetFilterInput | null, +}; + +export type OnDeleteBudgetSubscription = { + onDeleteBudget?: { + __typename: "Budget", + id: string, + category: string, + limit: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnCreateFinancialSummarySubscriptionVariables = { + filter?: ModelSubscriptionFinancialSummaryFilterInput | null, +}; + +export type OnCreateFinancialSummarySubscription = { + onCreateFinancialSummary?: { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnUpdateFinancialSummarySubscriptionVariables = { + filter?: ModelSubscriptionFinancialSummaryFilterInput | null, +}; + +export type OnUpdateFinancialSummarySubscription = { + onUpdateFinancialSummary?: { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; + +export type OnDeleteFinancialSummarySubscriptionVariables = { + filter?: ModelSubscriptionFinancialSummaryFilterInput | null, +}; + +export type OnDeleteFinancialSummarySubscription = { + onDeleteFinancialSummary?: { + __typename: "FinancialSummary", + id: string, + totalIncome: number, + totalExpenses: number, + balance: number, + month: string, + owner?: string | null, + createdAt: string, + updatedAt: string, + } | null, +}; diff --git a/amplify-migration-apps/finance-tracker/src/App.css b/amplify-migration-apps/finance-tracker/src/App.css new file mode 100644 index 00000000000..0705859d0ab --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/App.css @@ -0,0 +1,393 @@ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + min-height: 100vh; +} + +.app-container { + max-width: 1200px; + margin: 0 auto; + padding: 20px; + color: #333; + width: 100%; +} + +.app-header { + display: flex; + justify-content: space-between; + align-items: center; + background: white; + padding: 20px 30px; + border-radius: 12px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + margin-bottom: 30px; +} + +.app-header h1 { + font-size: 2rem; + color: #667eea; +} + +.user-info { + display: flex; + align-items: center; + gap: 15px; +} + +.user-info span { + font-weight: 500; + color: #555; +} + +.auth-container { + background: white; + padding: 60px 40px; + border-radius: 12px; + text-align: center; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + margin-top: 100px; + max-width: 500px; + margin-left: auto; + margin-right: auto; +} + +.auth-container h1 { + color: #667eea; + margin-bottom: 30px; +} + +.auth-container h2 { + color: #667eea; + margin-bottom: 20px; + font-size: 1.5rem; +} + +.auth-container p { + margin: 20px 0; + color: #666; +} + +.auth-container form { + text-align: left; + margin-top: 20px; +} + +.auth-tabs { + display: flex; + gap: 10px; + margin-bottom: 30px; + border-bottom: 2px solid #e5e7eb; +} + +.auth-tabs button { + flex: 1; + padding: 12px; + background: none; + border: none; + border-bottom: 3px solid transparent; + font-size: 1rem; + font-weight: 600; + color: #888; + cursor: pointer; + transition: all 0.3s; + margin-bottom: -2px; +} + +.auth-tabs button.active { + color: #667eea; + border-bottom-color: #667eea; +} + +.auth-tabs button:hover { + color: #667eea; +} + +.demo-note { + font-size: 0.9rem; + color: #999; + margin-top: 30px; +} + +.summary-cards { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 20px; + margin-bottom: 30px; +} + +.email-actions { + display: flex; + justify-content: center; + gap: 15px; + margin-bottom: 30px; +} + +.btn-email { + padding: 14px 28px; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + color: white; + border: none; + border-radius: 8px; + font-size: 1rem; + font-weight: 600; + cursor: pointer; + transition: all 0.3s; + box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); +} + +.btn-email:hover:not(:disabled) { + transform: translateY(-2px); + box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4); +} + +.btn-email:disabled { + opacity: 0.6; + cursor: not-allowed; +} + +.card { + background: white; + padding: 25px; + border-radius: 12px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + text-align: center; +} + +.card h3 { + font-size: 0.9rem; + text-transform: uppercase; + letter-spacing: 1px; + color: #888; + margin-bottom: 10px; +} + +.card .amount { + font-size: 2rem; + font-weight: bold; + margin: 0; +} + +.card.income .amount { + color: #10b981; +} + +.card.expense .amount { + color: #ef4444; +} + +.card.balance .amount { + color: #667eea; +} + +.card.savings .amount { + color: #f59e0b; +} + +.main-content { + display: grid; + grid-template-columns: 1fr 2fr; + gap: 30px; +} + +@media (max-width: 968px) { + .main-content { + grid-template-columns: 1fr; + } +} + +.form-section, +.transactions-section { + background: white; + padding: 30px; + border-radius: 12px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.form-section h2, +.transactions-section h2 { + margin-bottom: 20px; + color: #667eea; +} + +.form-group { + margin-bottom: 20px; +} + +.form-group label { + display: block; + margin-bottom: 8px; + font-weight: 500; + color: #555; +} + +.form-group input, +.form-group select { + width: 100%; + padding: 12px; + border: 2px solid #e5e7eb; + border-radius: 8px; + font-size: 1rem; + transition: border-color 0.3s; +} + +.form-group input:focus, +.form-group select:focus { + outline: none; + border-color: #667eea; +} + +.btn-primary, +.btn-secondary { + padding: 12px 24px; + border: none; + border-radius: 8px; + font-size: 1rem; + font-weight: 600; + cursor: pointer; + transition: all 0.3s; +} + +.btn-primary { + background: #667eea; + color: white; + width: 100%; +} + +.btn-primary:hover:not(:disabled) { + background: #5568d3; + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); +} + +.btn-primary:disabled { + opacity: 0.6; + cursor: not-allowed; +} + +.btn-secondary { + background: #f3f4f6; + color: #555; +} + +.btn-secondary:hover { + background: #e5e7eb; +} + +.transactions-list { + display: flex; + flex-direction: column; + gap: 15px; +} + +.transaction-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 20px; + border-radius: 8px; + border-left: 4px solid; + background: #f9fafb; +} + +.transaction-item.income { + border-left-color: #10b981; +} + +.transaction-item.expense { + border-left-color: #ef4444; +} + +.transaction-info h4 { + margin-bottom: 5px; + color: #333; +} + +.transaction-info .category { + font-size: 0.85rem; + color: #888; + margin-bottom: 3px; +} + +.transaction-info .date { + font-size: 0.8rem; + color: #aaa; +} + +.receipt-link { + display: inline-block; + margin-top: 8px; + font-size: 0.85rem; + color: #667eea; + text-decoration: none; +} + +.receipt-link:hover { + text-decoration: underline; +} + +.transaction-amount { + font-size: 1.5rem; + font-weight: bold; +} + +.transaction-amount .positive { + color: #10b981; +} + +.transaction-amount .negative { + color: #ef4444; +} + +.empty-state { + text-align: center; + color: #999; + padding: 40px; + font-style: italic; +} + +.app-footer { + background: white; + padding: 20px; + border-radius: 12px; + text-align: center; + margin-top: 30px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +.app-footer p { + color: #888; + font-size: 0.9rem; +} + +/* Category filter */ +.category-filter { + display: flex; + gap: 8px; + align-items: center; + margin-bottom: 16px; + flex-wrap: wrap; +} + +.category-filter input { + flex: 1; + min-width: 150px; + padding: 8px 12px; + border: 1px solid #ddd; + border-radius: 6px; + font-size: 14px; +} + +.filter-info { + width: 100%; + font-size: 13px; + color: #666; + margin-top: 4px; +} diff --git a/amplify-migration-apps/finance-tracker/src/App.tsx b/amplify-migration-apps/finance-tracker/src/App.tsx new file mode 100644 index 00000000000..21a97b3a8f3 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/App.tsx @@ -0,0 +1,281 @@ +import { useEffect, useState } from 'react'; +import { generateClient } from 'aws-amplify/api'; +import { signIn, signOut, getCurrentUser, signUp, confirmSignUp } from 'aws-amplify/auth'; +import { uploadData, getUrl } from 'aws-amplify/storage'; +import { listTransactions, calculateFinancialSummary, getTransactionsByCategory } from './graphql/queries'; +import { createTransaction, sendMonthlyReport, sendBudgetAlert } from './graphql/mutations'; +import { TransactionType } from './API'; +import './App.css'; + +const authenticatedClient = generateClient({ authMode: 'userPool' }); +const publicClient = generateClient({ authMode: 'apiKey' }); + +interface Transaction { + id: string; + description: string; + amount: number; + type: 'INCOME' | 'EXPENSE'; + category: string; + date: string; + receiptUrl?: string; +} + +interface FinancialSummary { + totalIncome: number; + totalExpenses: number; + balance: number; + savingsRate: number; +} + +function App() { + const [user, setUser] = useState(null); + const [transactions, setTransactions] = useState([]); + const [summary, setSummary] = useState(null); + const [loading, setLoading] = useState(false); + const [authMode, setAuthMode] = useState<'signin' | 'signup'>('signin'); + const [filterCategory, setFilterCategory] = useState(''); + const [filteredTransactions, setFilteredTransactions] = useState([]); + const [showFiltered, setShowFiltered] = useState(false); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + const [confirmationCode, setConfirmationCode] = useState(''); + const [needsConfirmation, setNeedsConfirmation] = useState(false); + const [description, setDescription] = useState(''); + const [amount, setAmount] = useState(''); + const [type, setType] = useState(TransactionType.EXPENSE); + const [category, setCategory] = useState(''); + const [receiptFile, setReceiptFile] = useState(null); + + useEffect(() => { checkUser(); }, []); + useEffect(() => { if (user) fetchTransactions(); }, [user]); + useEffect(() => { if (transactions.length > 0) calculateSummaryFn(); }, [transactions]); + + const checkUser = async () => { + try { const currentUser = await getCurrentUser(); setUser(currentUser); } + catch { console.log('Not signed in'); } + }; + + const handleSignUp = async (e: React.FormEvent) => { + e.preventDefault(); + try { + setLoading(true); + await signUp({ username: email, password, options: { userAttributes: { email } } }); + setNeedsConfirmation(true); + alert('Sign up successful! Check your email for confirmation code.'); + } catch (error: any) { alert(`Sign up failed: ${error.message}`); } + finally { setLoading(false); } + }; + + const handleConfirmSignUp = async (e: React.FormEvent) => { + e.preventDefault(); + try { + setLoading(true); + await confirmSignUp({ username: email, confirmationCode }); + alert('Email confirmed! You can now sign in.'); + setNeedsConfirmation(false); + setAuthMode('signin'); + } catch (error: any) { alert(`Confirmation failed: ${error.message}`); } + finally { setLoading(false); } + }; + + const handleSignIn = async (e: React.FormEvent) => { + e.preventDefault(); + try { setLoading(true); await signIn({ username: email, password }); await checkUser(); } + catch (error: any) { alert(`Sign in failed: ${error.message}`); } + finally { setLoading(false); } + }; + + const handleSignOut = async () => { + try { await signOut(); setUser(null); setTransactions([]); setSummary(null); } + catch (error) { console.error('Error signing out:', error); } + }; + + const fetchTransactions = async () => { + try { + setLoading(true); + const result: any = await publicClient.graphql({ query: listTransactions }); + setTransactions(result.data.listTransactions.items); + } catch (error) { console.error('Error fetching transactions:', error); } + finally { setLoading(false); } + }; + + const handleAddTransaction = async (e: React.FormEvent) => { + e.preventDefault(); + if (!description || !amount || !category) { alert('Please fill in all fields'); return; } + try { + setLoading(true); + let receiptUrl = ''; + if (receiptFile) { + const fileName = `public/receipts/${Date.now()}-${receiptFile.name}`; + await uploadData({ path: fileName, data: receiptFile }).result; + const urlResult = await getUrl({ path: fileName }); + receiptUrl = urlResult.url.toString(); + } + await authenticatedClient.graphql({ + query: createTransaction, + variables: { input: { description, amount: parseFloat(amount), type, category, date: new Date().toISOString(), receiptUrl: receiptUrl || undefined } }, + }); + setDescription(''); setAmount(''); setCategory(''); setReceiptFile(null); + await fetchTransactions(); + } catch (error) { console.error('Error adding transaction:', error); alert('Failed to add transaction'); } + finally { setLoading(false); } + }; + + const calculateSummaryFn = async () => { + try { + const result: any = await publicClient.graphql({ query: calculateFinancialSummary }); + setSummary(result.data.calculateFinancialSummary); + } catch (error) { console.error('Error calculating summary:', error); } + }; + + const handleFilterByCategory = async () => { + if (!filterCategory.trim()) { setShowFiltered(false); return; } + try { + setLoading(true); + const result: any = await publicClient.graphql({ query: getTransactionsByCategory, variables: { category: filterCategory, limit: 50 } }); + setFilteredTransactions(result.data.getTransactionsByCategory.items || []); + setShowFiltered(true); + } catch (error) { console.error('Error filtering:', error); alert('Failed to filter transactions'); } + finally { setLoading(false); } + }; + + const handleClearFilter = () => { setFilterCategory(''); setFilteredTransactions([]); setShowFiltered(false); }; + + const handleSendMonthlyReport = async () => { + if (!user) return; + try { + setLoading(true); + const userEmail = user.signInDetails?.loginId || email; + const result: any = await publicClient.graphql({ query: sendMonthlyReport, variables: { email: userEmail } }); + if (result.data.sendMonthlyReport.success) alert('✅ Monthly report sent!'); + else alert('❌ ' + result.data.sendMonthlyReport.message); + } catch (error: any) { alert('Failed to send report: ' + (error.errors?.[0]?.message || error.message)); } + finally { setLoading(false); } + }; + + const handleSendBudgetAlert = async () => { + if (!user) return; + const alertCategory = prompt('Enter the budget category (e.g., Food, Entertainment):'); + if (!alertCategory) return; + const exceededStr = prompt('How much did you exceed the budget by?'); + if (!exceededStr) return; + const exceeded = parseFloat(exceededStr); + if (isNaN(exceeded)) { alert('Please enter a valid number.'); return; } + try { + setLoading(true); + const userEmail = user.signInDetails?.loginId || email; + const result: any = await publicClient.graphql({ query: sendBudgetAlert, variables: { email: userEmail, category: alertCategory, exceeded } }); + if (result.data.sendBudgetAlert.success) alert('✅ Budget alert sent!'); + else alert('❌ ' + result.data.sendBudgetAlert.message); + } catch (error: any) { alert('Failed to send alert: ' + (error.errors?.[0]?.message || error.message)); } + finally { setLoading(false); } + }; + + if (!user) { + if (needsConfirmation) { + return ( +
+

💰 Finance Tracker

+
+

Confirm Your Email

+
+
setConfirmationCode(e.target.value)} placeholder="Enter code from email" required />
+ +
+
+
+ ); + } + return ( +
+

💰 Finance Tracker

+
+
+ + +
+ {authMode === 'signin' ? ( +
+
setEmail(e.target.value)} placeholder="your@email.com" required />
+
setPassword(e.target.value)} placeholder="Password" required />
+ +
+ ) : ( +
+
setEmail(e.target.value)} placeholder="your@email.com" required />
+
setPassword(e.target.value)} placeholder="Min 8 characters" required minLength={8} />
+ +
+ )} +

Demo: Uses Amplify Auth • GraphQL API • S3 Storage • Lambda

+
+
+ ); + } + + return ( +
+
+

💰 Finance Tracker

+
+ Welcome, {user.username} + +
+
+ {summary && ( +
+

Total Income

${summary.totalIncome.toFixed(2)}

+

Total Expenses

${summary.totalExpenses.toFixed(2)}

+

Balance

${summary.balance.toFixed(2)}

+

Savings Rate

{summary.savingsRate}%

+
+ )} +
+ + +
+
+
+

Add Transaction

+
+
+
setDescription(e.target.value)} placeholder="e.g., Grocery shopping" />
+
setAmount(e.target.value)} placeholder="0.00" />
+
setCategory(e.target.value)} placeholder="e.g., Food, Salary, Entertainment" />
+
setReceiptFile(e.target.files?.[0] || null)} />
+ +
+
+
+

Recent Transactions

+
+ setFilterCategory(e.target.value)} placeholder="Filter by category..." /> + + {showFiltered && } + {showFiltered &&

Showing {filteredTransactions.length} transactions in "{filterCategory}"

} +
+ {loading &&

Loading...

} + {!showFiltered && transactions.length === 0 && !loading &&

No transactions yet. Add your first one!

} +
+ {(showFiltered ? filteredTransactions : transactions).map((transaction) => ( +
+
+

{transaction.description}

+

{transaction.category}

+

{new Date(transaction.date).toLocaleDateString()}

+ {transaction.receiptUrl && 📎 View Receipt} +
+
+ {transaction.type === 'INCOME' ? '+' : '-'}${transaction.amount.toFixed(2)} +
+
+ ))} +
+
+
+

🔧 Powered by: Amplify Auth • GraphQL API • S3 Storage • Lambda Functions • Custom Resources

+
+ ); +} + +export default App; diff --git a/amplify-migration-apps/finance-tracker/src/assets/react.svg b/amplify-migration-apps/finance-tracker/src/assets/react.svg new file mode 100644 index 00000000000..6c87de9bb33 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/amplify-migration-apps/finance-tracker/src/graphql/mutations.ts b/amplify-migration-apps/finance-tracker/src/graphql/mutations.ts new file mode 100644 index 00000000000..80ae2a49935 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/graphql/mutations.ts @@ -0,0 +1,219 @@ +/* tslint:disable */ +/* eslint-disable */ +// this is an auto generated file. This will be overwritten + +import * as APITypes from "../API"; +type GeneratedMutation = string & { + __generatedMutationInput: InputType; + __generatedMutationOutput: OutputType; +}; + +export const sendMonthlyReport = /* GraphQL */ `mutation SendMonthlyReport($email: String!) { + sendMonthlyReport(email: $email) { + success + message + __typename + } +} +` as GeneratedMutation< + APITypes.SendMonthlyReportMutationVariables, + APITypes.SendMonthlyReportMutation +>; +export const sendBudgetAlert = /* GraphQL */ `mutation SendBudgetAlert( + $email: String! + $category: String! + $exceeded: Float! +) { + sendBudgetAlert(email: $email, category: $category, exceeded: $exceeded) { + success + message + __typename + } +} +` as GeneratedMutation< + APITypes.SendBudgetAlertMutationVariables, + APITypes.SendBudgetAlertMutation +>; +export const createTransaction = /* GraphQL */ `mutation CreateTransaction( + $input: CreateTransactionInput! + $condition: ModelTransactionConditionInput +) { + createTransaction(input: $input, condition: $condition) { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.CreateTransactionMutationVariables, + APITypes.CreateTransactionMutation +>; +export const updateTransaction = /* GraphQL */ `mutation UpdateTransaction( + $input: UpdateTransactionInput! + $condition: ModelTransactionConditionInput +) { + updateTransaction(input: $input, condition: $condition) { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.UpdateTransactionMutationVariables, + APITypes.UpdateTransactionMutation +>; +export const deleteTransaction = /* GraphQL */ `mutation DeleteTransaction( + $input: DeleteTransactionInput! + $condition: ModelTransactionConditionInput +) { + deleteTransaction(input: $input, condition: $condition) { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.DeleteTransactionMutationVariables, + APITypes.DeleteTransactionMutation +>; +export const createBudget = /* GraphQL */ `mutation CreateBudget( + $input: CreateBudgetInput! + $condition: ModelBudgetConditionInput +) { + createBudget(input: $input, condition: $condition) { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.CreateBudgetMutationVariables, + APITypes.CreateBudgetMutation +>; +export const updateBudget = /* GraphQL */ `mutation UpdateBudget( + $input: UpdateBudgetInput! + $condition: ModelBudgetConditionInput +) { + updateBudget(input: $input, condition: $condition) { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.UpdateBudgetMutationVariables, + APITypes.UpdateBudgetMutation +>; +export const deleteBudget = /* GraphQL */ `mutation DeleteBudget( + $input: DeleteBudgetInput! + $condition: ModelBudgetConditionInput +) { + deleteBudget(input: $input, condition: $condition) { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.DeleteBudgetMutationVariables, + APITypes.DeleteBudgetMutation +>; +export const createFinancialSummary = /* GraphQL */ `mutation CreateFinancialSummary( + $input: CreateFinancialSummaryInput! + $condition: ModelFinancialSummaryConditionInput +) { + createFinancialSummary(input: $input, condition: $condition) { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.CreateFinancialSummaryMutationVariables, + APITypes.CreateFinancialSummaryMutation +>; +export const updateFinancialSummary = /* GraphQL */ `mutation UpdateFinancialSummary( + $input: UpdateFinancialSummaryInput! + $condition: ModelFinancialSummaryConditionInput +) { + updateFinancialSummary(input: $input, condition: $condition) { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.UpdateFinancialSummaryMutationVariables, + APITypes.UpdateFinancialSummaryMutation +>; +export const deleteFinancialSummary = /* GraphQL */ `mutation DeleteFinancialSummary( + $input: DeleteFinancialSummaryInput! + $condition: ModelFinancialSummaryConditionInput +) { + deleteFinancialSummary(input: $input, condition: $condition) { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedMutation< + APITypes.DeleteFinancialSummaryMutationVariables, + APITypes.DeleteFinancialSummaryMutation +>; diff --git a/amplify-migration-apps/finance-tracker/src/graphql/queries.ts b/amplify-migration-apps/finance-tracker/src/graphql/queries.ts new file mode 100644 index 00000000000..e0b399e0b92 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/graphql/queries.ts @@ -0,0 +1,175 @@ +/* tslint:disable */ +/* eslint-disable */ +// this is an auto generated file. This will be overwritten + +import * as APITypes from "../API"; +type GeneratedQuery = string & { + __generatedQueryInput: InputType; + __generatedQueryOutput: OutputType; +}; + +export const calculateFinancialSummary = /* GraphQL */ `query CalculateFinancialSummary { + calculateFinancialSummary { + totalIncome + totalExpenses + balance + savingsRate + __typename + } +} +` as GeneratedQuery< + APITypes.CalculateFinancialSummaryQueryVariables, + APITypes.CalculateFinancialSummaryQuery +>; +export const getTransactionsByCategory = /* GraphQL */ `query GetTransactionsByCategory($category: String!, $limit: Int) { + getTransactionsByCategory(category: $category, limit: $limit) { + items { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } + nextToken + __typename + } +} +` as GeneratedQuery< + APITypes.GetTransactionsByCategoryQueryVariables, + APITypes.GetTransactionsByCategoryQuery +>; +export const getTransaction = /* GraphQL */ `query GetTransaction($id: ID!) { + getTransaction(id: $id) { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedQuery< + APITypes.GetTransactionQueryVariables, + APITypes.GetTransactionQuery +>; +export const listTransactions = /* GraphQL */ `query ListTransactions( + $filter: ModelTransactionFilterInput + $limit: Int + $nextToken: String +) { + listTransactions(filter: $filter, limit: $limit, nextToken: $nextToken) { + items { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } + nextToken + __typename + } +} +` as GeneratedQuery< + APITypes.ListTransactionsQueryVariables, + APITypes.ListTransactionsQuery +>; +export const getBudget = /* GraphQL */ `query GetBudget($id: ID!) { + getBudget(id: $id) { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedQuery; +export const listBudgets = /* GraphQL */ `query ListBudgets( + $filter: ModelBudgetFilterInput + $limit: Int + $nextToken: String +) { + listBudgets(filter: $filter, limit: $limit, nextToken: $nextToken) { + items { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } + nextToken + __typename + } +} +` as GeneratedQuery< + APITypes.ListBudgetsQueryVariables, + APITypes.ListBudgetsQuery +>; +export const getFinancialSummary = /* GraphQL */ `query GetFinancialSummary($id: ID!) { + getFinancialSummary(id: $id) { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedQuery< + APITypes.GetFinancialSummaryQueryVariables, + APITypes.GetFinancialSummaryQuery +>; +export const listFinancialSummaries = /* GraphQL */ `query ListFinancialSummaries( + $filter: ModelFinancialSummaryFilterInput + $limit: Int + $nextToken: String +) { + listFinancialSummaries( + filter: $filter + limit: $limit + nextToken: $nextToken + ) { + items { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } + nextToken + __typename + } +} +` as GeneratedQuery< + APITypes.ListFinancialSummariesQueryVariables, + APITypes.ListFinancialSummariesQuery +>; diff --git a/amplify-migration-apps/finance-tracker/src/graphql/subscriptions.ts b/amplify-migration-apps/finance-tracker/src/graphql/subscriptions.ts new file mode 100644 index 00000000000..7feaa53d87b --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/graphql/subscriptions.ts @@ -0,0 +1,193 @@ +/* tslint:disable */ +/* eslint-disable */ +// this is an auto generated file. This will be overwritten + +import * as APITypes from "../API"; +type GeneratedSubscription = string & { + __generatedSubscriptionInput: InputType; + __generatedSubscriptionOutput: OutputType; +}; + +export const onCreateTransaction = /* GraphQL */ `subscription OnCreateTransaction( + $filter: ModelSubscriptionTransactionFilterInput + $owner: String +) { + onCreateTransaction(filter: $filter, owner: $owner) { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnCreateTransactionSubscriptionVariables, + APITypes.OnCreateTransactionSubscription +>; +export const onUpdateTransaction = /* GraphQL */ `subscription OnUpdateTransaction( + $filter: ModelSubscriptionTransactionFilterInput + $owner: String +) { + onUpdateTransaction(filter: $filter, owner: $owner) { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnUpdateTransactionSubscriptionVariables, + APITypes.OnUpdateTransactionSubscription +>; +export const onDeleteTransaction = /* GraphQL */ `subscription OnDeleteTransaction( + $filter: ModelSubscriptionTransactionFilterInput + $owner: String +) { + onDeleteTransaction(filter: $filter, owner: $owner) { + id + description + amount + type + category + date + receiptUrl + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnDeleteTransactionSubscriptionVariables, + APITypes.OnDeleteTransactionSubscription +>; +export const onCreateBudget = /* GraphQL */ `subscription OnCreateBudget( + $filter: ModelSubscriptionBudgetFilterInput + $owner: String +) { + onCreateBudget(filter: $filter, owner: $owner) { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnCreateBudgetSubscriptionVariables, + APITypes.OnCreateBudgetSubscription +>; +export const onUpdateBudget = /* GraphQL */ `subscription OnUpdateBudget( + $filter: ModelSubscriptionBudgetFilterInput + $owner: String +) { + onUpdateBudget(filter: $filter, owner: $owner) { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnUpdateBudgetSubscriptionVariables, + APITypes.OnUpdateBudgetSubscription +>; +export const onDeleteBudget = /* GraphQL */ `subscription OnDeleteBudget( + $filter: ModelSubscriptionBudgetFilterInput + $owner: String +) { + onDeleteBudget(filter: $filter, owner: $owner) { + id + category + limit + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnDeleteBudgetSubscriptionVariables, + APITypes.OnDeleteBudgetSubscription +>; +export const onCreateFinancialSummary = /* GraphQL */ `subscription OnCreateFinancialSummary( + $filter: ModelSubscriptionFinancialSummaryFilterInput + $owner: String +) { + onCreateFinancialSummary(filter: $filter, owner: $owner) { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnCreateFinancialSummarySubscriptionVariables, + APITypes.OnCreateFinancialSummarySubscription +>; +export const onUpdateFinancialSummary = /* GraphQL */ `subscription OnUpdateFinancialSummary( + $filter: ModelSubscriptionFinancialSummaryFilterInput + $owner: String +) { + onUpdateFinancialSummary(filter: $filter, owner: $owner) { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnUpdateFinancialSummarySubscriptionVariables, + APITypes.OnUpdateFinancialSummarySubscription +>; +export const onDeleteFinancialSummary = /* GraphQL */ `subscription OnDeleteFinancialSummary( + $filter: ModelSubscriptionFinancialSummaryFilterInput + $owner: String +) { + onDeleteFinancialSummary(filter: $filter, owner: $owner) { + id + totalIncome + totalExpenses + balance + month + owner + createdAt + updatedAt + __typename + } +} +` as GeneratedSubscription< + APITypes.OnDeleteFinancialSummarySubscriptionVariables, + APITypes.OnDeleteFinancialSummarySubscription +>; diff --git a/amplify-migration-apps/finance-tracker/src/index.css b/amplify-migration-apps/finance-tracker/src/index.css new file mode 100644 index 00000000000..21de8bd1171 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/index.css @@ -0,0 +1,72 @@ +:root { + font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + justify-content: center; + min-width: 320px; + min-height: 100vh; +} + +#root { + width: 100%; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/amplify-migration-apps/finance-tracker/src/main.tsx b/amplify-migration-apps/finance-tracker/src/main.tsx new file mode 100644 index 00000000000..0851058047c --- /dev/null +++ b/amplify-migration-apps/finance-tracker/src/main.tsx @@ -0,0 +1,14 @@ +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import './index.css'; +import App from './App.tsx'; + +import { Amplify } from 'aws-amplify'; +import amplifyconfig from './amplifyconfiguration.json'; +Amplify.configure(amplifyconfig); + +createRoot(document.getElementById('root')!).render( + + + , +); diff --git a/amplify-migration-apps/finance-tracker/tests/api.test.ts b/amplify-migration-apps/finance-tracker/tests/api.test.ts new file mode 100644 index 00000000000..4000b2f5802 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tests/api.test.ts @@ -0,0 +1,227 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { generateClient } from 'aws-amplify/api'; +import { signIn, signOut } from 'aws-amplify/auth'; +import { signUp, config } from './signup'; +import { + getTransaction, listTransactions, + calculateFinancialSummary, + getFinancialSummary, listFinancialSummaries, + getTransactionsByCategory, +} from '../src/graphql/queries'; +import { + createTransaction, updateTransaction, deleteTransaction, + createFinancialSummary, deleteFinancialSummary, + sendMonthlyReport, sendBudgetAlert, +} from '../src/graphql/mutations'; +import { TransactionType } from '../src/API'; + +// Mutations require owner auth; reads work with API key +const authClient = () => generateClient({ authMode: 'userPool' }); +const publicClient = () => generateClient({ authMode: 'apiKey' }); + +beforeAll(async () => { + const creds = await signUp(config); + await signIn({ username: creds.username, password: creds.password }); +}, 60_000); + +afterAll(async () => { + await signOut(); +}); + +describe('Transaction', () => { + let transactionId: string; + + it('creates a transaction with correct fields', async () => { + const input = { + description: `Grocery shopping - ${Date.now()}`, + amount: 85.50, + type: TransactionType.EXPENSE, + category: 'Food', + date: new Date().toISOString(), + }; + + const result = await authClient().graphql({ query: createTransaction, variables: { input } }); + const txn = (result as any).data.createTransaction; + transactionId = txn.id; + + expect(typeof txn.id).toBe('string'); + expect(txn.id.length).toBeGreaterThan(0); + expect(txn.description).toBe(input.description); + expect(txn.amount).toBe(85.50); + expect(txn.type).toBe(TransactionType.EXPENSE); + expect(txn.category).toBe('Food'); + expect(txn.createdAt).toBeDefined(); + expect(txn.updatedAt).toBeDefined(); + }); + + it('reads a transaction by id', async () => { + const result = await publicClient().graphql({ query: getTransaction, variables: { id: transactionId } }); + const txn = (result as any).data.getTransaction; + + expect(txn).not.toBeNull(); + expect(txn.id).toBe(transactionId); + expect(txn.category).toBe('Food'); + }); + + it('updates a transaction and persists changes', async () => { + const updatedDesc = `Updated grocery - ${Date.now()}`; + await authClient().graphql({ + query: updateTransaction, + variables: { input: { id: transactionId, description: updatedDesc, amount: 92.00 } }, + }); + + const result = await publicClient().graphql({ query: getTransaction, variables: { id: transactionId } }); + const txn = (result as any).data.getTransaction; + + expect(txn.description).toBe(updatedDesc); + expect(txn.amount).toBe(92.00); + }); + + it('lists transactions', async () => { + const result = await publicClient().graphql({ query: listTransactions }); + const items = (result as any).data.listTransactions.items; + + expect(Array.isArray(items)).toBe(true); + expect(items.length).toBeGreaterThan(0); + }); + + it('deletes a transaction', async () => { + await authClient().graphql({ query: deleteTransaction, variables: { input: { id: transactionId } } }); + + const result = await publicClient().graphql({ query: getTransaction, variables: { id: transactionId } }); + expect((result as any).data.getTransaction).toBeNull(); + }); +}); + +describe('FinancialSummary', () => { + let summaryId: string; + + it('creates a financial summary', async () => { + const input = { + totalIncome: 5000.00, + totalExpenses: 3200.00, + balance: 1800.00, + month: '2026-04', + }; + + const result = await authClient().graphql({ query: createFinancialSummary, variables: { input } }); + const summary = (result as any).data.createFinancialSummary; + summaryId = summary.id; + + expect(typeof summary.id).toBe('string'); + expect(summary.totalIncome).toBe(5000.00); + expect(summary.totalExpenses).toBe(3200.00); + expect(summary.balance).toBe(1800.00); + expect(summary.month).toBe('2026-04'); + expect(summary.createdAt).toBeDefined(); + }); + + it('reads a financial summary by id', async () => { + const result = await publicClient().graphql({ query: getFinancialSummary, variables: { id: summaryId } }); + const summary = (result as any).data.getFinancialSummary; + + expect(summary).not.toBeNull(); + expect(summary.id).toBe(summaryId); + expect(summary.month).toBe('2026-04'); + }); + + it('lists financial summaries', async () => { + const result = await publicClient().graphql({ query: listFinancialSummaries }); + const items = (result as any).data.listFinancialSummaries.items; + + expect(Array.isArray(items)).toBe(true); + expect(items.length).toBeGreaterThan(0); + }); + + it('deletes a financial summary', async () => { + await authClient().graphql({ query: deleteFinancialSummary, variables: { input: { id: summaryId } } }); + + const result = await publicClient().graphql({ query: getFinancialSummary, variables: { id: summaryId } }); + expect((result as any).data.getFinancialSummary).toBeNull(); + }); +}); + +describe('Lambda-backed operations', () => { + it('calculateFinancialSummary returns numeric fields', async () => { + await authClient().graphql({ + query: createTransaction, + variables: { + input: { + description: `Summary test income - ${Date.now()}`, + amount: 1000.00, + type: TransactionType.INCOME, + category: 'Salary', + date: new Date().toISOString(), + }, + }, + }); + + const result = await publicClient().graphql({ query: calculateFinancialSummary }); + const summary = (result as any).data.calculateFinancialSummary; + + expect(summary).not.toBeNull(); + expect(typeof summary.totalIncome).toBe('number'); + expect(typeof summary.totalExpenses).toBe('number'); + expect(typeof summary.balance).toBe('number'); + expect(typeof summary.savingsRate).toBe('number'); + expect(summary.totalIncome).toBeGreaterThanOrEqual(0); + }); + + it('sendMonthlyReport returns success response', async () => { + const result = await publicClient().graphql({ + query: sendMonthlyReport, + variables: { email: 'test@example.com' }, + }); + const report = (result as any).data.sendMonthlyReport; + + expect(report).not.toBeNull(); + expect(typeof report.success).toBe('boolean'); + expect(typeof report.message).toBe('string'); + expect(report.message.length).toBeGreaterThan(0); + }); + + it('sendBudgetAlert returns success response', async () => { + const result = await publicClient().graphql({ + query: sendBudgetAlert, + variables: { email: 'test@example.com', category: 'Food', exceeded: 50.00 }, + }); + const alert = (result as any).data.sendBudgetAlert; + + expect(alert).not.toBeNull(); + expect(typeof alert.success).toBe('boolean'); + expect(typeof alert.message).toBe('string'); + expect(alert.message.length).toBeGreaterThan(0); + }); +}); + +describe('Custom VTL resolver', () => { + it('getTransactionsByCategory returns filtered transactions', async () => { + const category = `TestCategory-${Date.now()}`; + + await authClient().graphql({ + query: createTransaction, + variables: { + input: { + description: `Category filter test - ${Date.now()}`, + amount: 42.00, + type: TransactionType.EXPENSE, + category, + date: new Date().toISOString(), + }, + }, + }); + + const result = await publicClient().graphql({ + query: getTransactionsByCategory, + variables: { category, limit: 10 }, + }); + const connection = (result as any).data.getTransactionsByCategory; + + expect(connection).not.toBeNull(); + expect(Array.isArray(connection.items)).toBe(true); + expect(connection.items.length).toBeGreaterThan(0); + for (const item of connection.items) { + expect(item.category).toBe(category); + } + }); +}); diff --git a/amplify-migration-apps/finance-tracker/tests/budget.test.ts b/amplify-migration-apps/finance-tracker/tests/budget.test.ts new file mode 100644 index 00000000000..7eff08458e1 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tests/budget.test.ts @@ -0,0 +1,77 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { generateClient } from 'aws-amplify/api'; +import { signIn, signOut } from 'aws-amplify/auth'; +import { signUp, config } from './signup'; +import { getBudget, listBudgets } from '../src/graphql/queries'; +import { createBudget, updateBudget, deleteBudget } from '../src/graphql/mutations'; + +// Mutations require owner auth; reads work with API key +const authClient = () => generateClient({ authMode: 'userPool' }); +const publicClient = () => generateClient({ authMode: 'apiKey' }); + +beforeAll(async () => { + const creds = await signUp(config); + await signIn({ username: creds.username, password: creds.password }); +}, 60_000); + +afterAll(async () => { + await signOut(); +}); + +describe('Budget', () => { + let budgetId: string; + + it('creates a budget with correct fields', async () => { + const input = { + category: 'Entertainment', + limit: 200.00, + month: '2026-04', + }; + + const result = await authClient().graphql({ query: createBudget, variables: { input } }); + const budget = (result as any).data.createBudget; + budgetId = budget.id; + + expect(typeof budget.id).toBe('string'); + expect(budget.category).toBe('Entertainment'); + expect(budget.limit).toBe(200.00); + expect(budget.month).toBe('2026-04'); + expect(budget.createdAt).toBeDefined(); + }); + + it('reads a budget by id', async () => { + const result = await publicClient().graphql({ query: getBudget, variables: { id: budgetId } }); + const budget = (result as any).data.getBudget; + + expect(budget).not.toBeNull(); + expect(budget.id).toBe(budgetId); + expect(budget.category).toBe('Entertainment'); + }); + + it('updates a budget limit', async () => { + await authClient().graphql({ + query: updateBudget, + variables: { input: { id: budgetId, limit: 300.00 } }, + }); + + const result = await publicClient().graphql({ query: getBudget, variables: { id: budgetId } }); + const budget = (result as any).data.getBudget; + + expect(budget.limit).toBe(300.00); + }); + + it('lists budgets', async () => { + const result = await publicClient().graphql({ query: listBudgets }); + const items = (result as any).data.listBudgets.items; + + expect(Array.isArray(items)).toBe(true); + expect(items.length).toBeGreaterThan(0); + }); + + it('deletes a budget', async () => { + await authClient().graphql({ query: deleteBudget, variables: { input: { id: budgetId } } }); + + const result = await publicClient().graphql({ query: getBudget, variables: { id: budgetId } }); + expect((result as any).data.getBudget).toBeNull(); + }); +}); diff --git a/amplify-migration-apps/finance-tracker/tests/jest.setup.ts b/amplify-migration-apps/finance-tracker/tests/jest.setup.ts new file mode 100644 index 00000000000..bb0b4613b66 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tests/jest.setup.ts @@ -0,0 +1 @@ +jest.retryTimes(3); diff --git a/amplify-migration-apps/finance-tracker/tests/signup.ts b/amplify-migration-apps/finance-tracker/tests/signup.ts new file mode 100644 index 00000000000..1c84498437d --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tests/signup.ts @@ -0,0 +1,65 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { Amplify } from 'aws-amplify'; +import { + CognitoIdentityProviderClient, + AdminCreateUserCommand, + AdminSetUserPasswordCommand, +} from '@aws-sdk/client-cognito-identity-provider'; +import * as fs from 'fs'; +import { randomBytes } from 'crypto'; + +import { webcrypto } from 'crypto'; +if (typeof globalThis.crypto === 'undefined') { + (globalThis as any).crypto = webcrypto; +} + +const CONFIG_PATH = process.env.APP_CONFIG_PATH; +if (!CONFIG_PATH) { + throw new Error('APP_CONFIG_PATH environment variable is required'); +} + +export const config = JSON.parse(fs.readFileSync(CONFIG_PATH, { encoding: 'utf-8' })); +Amplify.configure(config); + +export async function signUp(cfg: any): Promise<{ username: string; password: string }> { + const gen2Auth = (cfg as any)?.auth; + const userPoolId = cfg.aws_user_pools_id ?? gen2Auth?.user_pool_id; + const region = cfg.aws_cognito_region ?? gen2Auth?.aws_region; + + const uname = generateTestEmail(); + const pwd = generateTestPassword(); + + const cognitoClient = new CognitoIdentityProviderClient({ region }); + + await cognitoClient.send(new AdminCreateUserCommand({ + UserPoolId: userPoolId, + Username: uname, + TemporaryPassword: pwd, + MessageAction: 'SUPPRESS', + UserAttributes: [ + { Name: 'email', Value: uname }, + { Name: 'email_verified', Value: 'true' }, + ], + })); + + await cognitoClient.send(new AdminSetUserPasswordCommand({ + UserPoolId: userPoolId, + Username: uname, + Password: pwd, + Permanent: true, + })); + + return { username: uname, password: pwd }; +} + +function generateTestPassword(): string { + return `Test${randomSuffix()}!Aa1`; +} + +function generateTestEmail(): string { + return `testuser-${randomSuffix()}@test.example.com`; +} + +function randomSuffix(): string { + return randomBytes(4).toString('hex'); +} diff --git a/amplify-migration-apps/finance-tracker/tests/storage.test.ts b/amplify-migration-apps/finance-tracker/tests/storage.test.ts new file mode 100644 index 00000000000..88e44e510bc --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tests/storage.test.ts @@ -0,0 +1,48 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { signIn, signOut } from 'aws-amplify/auth'; +import { uploadData, getUrl } from 'aws-amplify/storage'; +import { signUp, config } from './signup'; + +beforeAll(async () => { + const creds = await signUp(config); + await signIn({ username: creds.username, password: creds.password }); +}, 60_000); + +afterAll(async () => { + await signOut(); +}); + +describe('S3 storage', () => { + it('uploads a receipt image', async () => { + const testImageBase64 = + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='; + const imageBuffer = Buffer.from(testImageBase64, 'base64'); + const filePath = `public/uploads/${Date.now()}-receipt.png`; + + const result = await uploadData({ + path: filePath, + data: imageBuffer, + options: { contentType: 'image/png' }, + }).result; + + expect(result.path).toBe(filePath); + }); + + it('gets a signed URL for an uploaded receipt', async () => { + const testImageBase64 = + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=='; + const imageBuffer = Buffer.from(testImageBase64, 'base64'); + const filePath = `public/uploads/${Date.now()}-receipt-url.png`; + + await uploadData({ + path: filePath, + data: imageBuffer, + options: { contentType: 'image/png' }, + }).result; + + const result = await getUrl({ path: filePath }); + + expect(result.url).toBeDefined(); + expect(result.url.toString()).toContain('receipt'); + }); +}); diff --git a/amplify-migration-apps/finance-tracker/tsconfig.app.json b/amplify-migration-apps/finance-tracker/tsconfig.app.json new file mode 100644 index 00000000000..c8fd289645a --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tsconfig.app.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2022", + "useDefineForClassFields": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "types": ["vite/client"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/amplify-migration-apps/finance-tracker/tsconfig.json b/amplify-migration-apps/finance-tracker/tsconfig.json new file mode 100644 index 00000000000..1ffef600d95 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ] +} diff --git a/amplify-migration-apps/finance-tracker/tsconfig.node.json b/amplify-migration-apps/finance-tracker/tsconfig.node.json new file mode 100644 index 00000000000..8a67f62f4ce --- /dev/null +++ b/amplify-migration-apps/finance-tracker/tsconfig.node.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2023", + "lib": ["ES2023"], + "module": "ESNext", + "types": ["node"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "erasableSyntaxOnly": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/amplify-migration-apps/finance-tracker/vite.config.ts b/amplify-migration-apps/finance-tracker/vite.config.ts new file mode 100644 index 00000000000..4a5def4c3d7 --- /dev/null +++ b/amplify-migration-apps/finance-tracker/vite.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; + +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], +}); diff --git a/amplify-migration-apps/fitness-tracker/_snapshot.post.generate/package.json b/amplify-migration-apps/fitness-tracker/_snapshot.post.generate/package.json index dae481aaf80..dd20033efd8 100644 --- a/amplify-migration-apps/fitness-tracker/_snapshot.post.generate/package.json +++ b/amplify-migration-apps/fitness-tracker/_snapshot.post.generate/package.json @@ -47,7 +47,6 @@ "@aws-amplify/backend": "^1.18.0", "@aws-amplify/backend-cli": "^1.8.0", "@aws-amplify/backend-data": "^1.6.2", - "@aws-sdk/client-cognito-identity-provider": "^3.936.0", "@aws-sdk/client-lambda": "^3.936.0", "@eslint/js": "^9.39.1", "@types/aws-lambda": "^8.10.92", diff --git a/amplify-migration-apps/media-vault/_snapshot.post.generate/package.json b/amplify-migration-apps/media-vault/_snapshot.post.generate/package.json index dd5d10dadda..6e49a2461fa 100644 --- a/amplify-migration-apps/media-vault/_snapshot.post.generate/package.json +++ b/amplify-migration-apps/media-vault/_snapshot.post.generate/package.json @@ -42,7 +42,6 @@ "@aws-amplify/backend": "^1.18.0", "@aws-amplify/backend-cli": "^1.8.0", "@aws-amplify/backend-data": "^1.6.2", - "@aws-sdk/client-cognito-identity-provider": "^3.936.0", "@eslint/js": "^9.39.1", "@types/aws-lambda": "^8.10.92", "@types/jest": "^29.5.14", diff --git a/amplify-migration-apps/product-catalog/_snapshot.post.generate/package.json b/amplify-migration-apps/product-catalog/_snapshot.post.generate/package.json index 4a79cbab678..07fe71d9968 100644 --- a/amplify-migration-apps/product-catalog/_snapshot.post.generate/package.json +++ b/amplify-migration-apps/product-catalog/_snapshot.post.generate/package.json @@ -46,7 +46,6 @@ "@aws-amplify/backend-data": "^1.6.2", "@aws-sdk/client-appsync": "^3.936.0", "@aws-sdk/client-cognito-identity-provider": "^3.936.0", - "@aws-sdk/client-ssm": "^3.936.0", "@eslint/js": "^9.39.1", "@types/aws-lambda": "^8.10.92", "@types/jest": "^29.5.14", diff --git a/amplify-migration-apps/store-locator/_snapshot.post.generate/package.json b/amplify-migration-apps/store-locator/_snapshot.post.generate/package.json index b4230e3befc..045d2ae535f 100644 --- a/amplify-migration-apps/store-locator/_snapshot.post.generate/package.json +++ b/amplify-migration-apps/store-locator/_snapshot.post.generate/package.json @@ -44,7 +44,6 @@ "@aws-amplify/backend": "^1.18.0", "@aws-amplify/backend-cli": "^1.8.0", "@aws-amplify/backend-data": "^1.6.2", - "@aws-sdk/client-cognito-identity-provider": "^3.936.0", "@aws-sdk/client-lambda": "^3.936.0", "@eslint/js": "^9.39.1", "@types/aws-lambda": "^8.10.92", diff --git a/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate.test.ts b/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate.test.ts index f6c3d7479e6..17fe5a639b3 100644 --- a/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate.test.ts @@ -60,6 +60,10 @@ test('mood-board snapshot', async () => { await testSnapshot('mood-board'); }); +test('finance-tracker snapshot', async () => { + await testSnapshot('finance-tracker'); +}); + test('store-locator snapshot', async () => { await testSnapshot('store-locator'); }); diff --git a/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.test.ts b/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.test.ts index bd90858d066..f049182b95c 100644 --- a/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.test.ts @@ -210,7 +210,7 @@ class MyStack extends cdk.Stack { `; const output = transformOnly(code); - expect(output).toContain('backend: any'); + expect(output).toContain('backend: Backend'); }); }); diff --git a/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.test.ts b/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.test.ts index 3eb909b583a..9b5f3f5c8f3 100644 --- a/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.test.ts +++ b/packages/amplify-cli/src/__tests__/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.test.ts @@ -1,7 +1,6 @@ import { CustomResourceGenerator } from '../../../../../../commands/gen2-migration/generate/amplify/custom-resources/custom.generator'; import { BackendGenerator } from '../../../../../../commands/gen2-migration/generate/amplify/backend.generator'; import { RootPackageJsonGenerator } from '../../../../../../commands/gen2-migration/generate/package.json.generator'; -import { createGen1App } from '../../_helpers/create-gen1-app'; import { SpinningLogger } from '../../../../../../commands/gen2-migration/_common/spinning-logger'; jest.unmock('fs-extra'); @@ -14,7 +13,7 @@ jest.mock('@aws-amplify/amplify-cli-core', () => { ...actual.JSONUtilities, readJson: jest.fn().mockImplementation((filePath: string, opts?: unknown) => { if (typeof filePath === 'string' && filePath.endsWith('package.json')) { - return { dependencies: { 'aws-cdk-lib': '^2.0.0' }, devDependencies: {} }; + return { dependencies: { 'my-custom-dep': '^1.0.0' }, devDependencies: { 'my-dev-dep': '^2.0.0' } }; } if (typeof filePath === 'string' && filePath.endsWith('project-config.json')) { return { projectName: 'testProject' }; @@ -45,7 +44,6 @@ jest.mock('node:fs/promises', () => ({ const CDK_STACK_CONTENT = ` import * as cdk from 'aws-cdk-lib'; import * as AmplifyHelpers from '@aws-amplify/cli-extensibility-helper'; -import { AmplifyDependentResourcesAttributes } from '../../types/amplify-dependent-resources-ref'; export class cdkStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { @@ -70,13 +68,7 @@ describe('CustomResourceGenerator', () => { }); it('returns one operation describing the custom resource', async () => { - const gen1App = await createGen1App({ - providers: { awscloudformation: { StackName: 'amplify-test-main-123456', Region: 'us-east-1' } }, - }); - jest.spyOn(gen1App, 'json').mockReturnValue({}); - jest.spyOn(gen1App, 'fileExists').mockReturnValue(false); - - const generator = new CustomResourceGenerator(gen1App, backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); + const generator = new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); const ops = await generator.plan(); expect(ops).toHaveLength(1); @@ -85,13 +77,7 @@ describe('CustomResourceGenerator', () => { }); it('copies resource directory and transforms cdk-stack.ts', async () => { - const gen1App = await createGen1App({ - providers: { awscloudformation: { StackName: 'amplify-test-main-123456', Region: 'us-east-1' } }, - }); - jest.spyOn(gen1App, 'json').mockReturnValue({}); - jest.spyOn(gen1App, 'fileExists').mockReturnValue(false); - - const generator = new CustomResourceGenerator(gen1App, backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); + const generator = new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); const ops = await generator.plan(); await ops[0].execute(); @@ -100,35 +86,23 @@ describe('CustomResourceGenerator', () => { expect.stringContaining('myCustom'), expect.objectContaining({ recursive: true }), ); - expect(mockRename).toHaveBeenCalledWith(expect.stringContaining('cdk-stack.ts'), expect.stringContaining('resource.ts')); + expect(mockRename).toHaveBeenCalledWith(expect.stringContaining('cdk-stack.ts'), expect.stringContaining('construct.ts')); }); - it('contributes namespace import and post-define call to backend', async () => { - const gen1App = await createGen1App({ - providers: { awscloudformation: { StackName: 'amplify-test-main-123456', Region: 'us-east-1' } }, - }); - jest.spyOn(gen1App, 'json').mockReturnValue({}); - jest.spyOn(gen1App, 'fileExists').mockReturnValue(false); - + it('contributes namespace import and post-define statement to backend', async () => { const addNamespaceImportSpy = jest.spyOn(backendGenerator, 'addNamespaceImport'); - const addPostDefineBackendCallSpy = jest.spyOn(backendGenerator, 'addPostDefineBackendCall'); + const addPostDefineStatementSpy = jest.spyOn(backendGenerator, 'addPostDefineBackendStatement'); - const generator = new CustomResourceGenerator(gen1App, backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); + const generator = new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); const ops = await generator.plan(); await ops[0].execute(); expect(addNamespaceImportSpy).toHaveBeenCalledWith('myCustom', './custom/myCustom/resource'); - expect(addPostDefineBackendCallSpy).toHaveBeenCalledWith('_custom_myCustom', expect.stringContaining('cdkStack')); + expect(addPostDefineStatementSpy).toHaveBeenCalledWith(expect.stringContaining('myCustom.defineMyCustom(backend)')); }); it('removes build artifacts', async () => { - const gen1App = await createGen1App({ - providers: { awscloudformation: { StackName: 'amplify-test-main-123456', Region: 'us-east-1' } }, - }); - jest.spyOn(gen1App, 'json').mockReturnValue({}); - jest.spyOn(gen1App, 'fileExists').mockReturnValue(false); - - const generator = new CustomResourceGenerator(gen1App, backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); + const generator = new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); const ops = await generator.plan(); await ops[0].execute(); @@ -138,32 +112,48 @@ describe('CustomResourceGenerator', () => { expect(rmPaths.some((p: string) => p.includes('node_modules'))).toBe(true); }); - it('merges dependencies into root package.json', async () => { - const gen1App = await createGen1App({ - providers: { awscloudformation: { StackName: 'amplify-test-main-123456', Region: 'us-east-1' } }, + it('merges non-excluded dependencies into root package.json', async () => { + const addDependencySpy = jest.spyOn(packageJsonGenerator, 'addDependency'); + const addDevDependencySpy = jest.spyOn(packageJsonGenerator, 'addDevDependency'); + + const generator = new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); + const ops = await generator.plan(); + await ops[0].execute(); + + expect(addDependencySpy).toHaveBeenCalledWith('my-custom-dep', '^1.0.0'); + expect(addDevDependencySpy).toHaveBeenCalledWith('my-dev-dep', '^2.0.0'); + }); + + it('excludes CDK and Amplify helper dependencies', async () => { + const { JSONUtilities } = jest.requireMock('@aws-amplify/amplify-cli-core'); + JSONUtilities.readJson.mockImplementation((filePath: string) => { + if (filePath.endsWith('package.json')) { + return { + dependencies: { 'aws-cdk-lib': '^2.0.0', '@aws-cdk/aws-sns': '^1.0.0', '@aws-amplify/cli-extensibility-helper': '^3.0.0' }, + devDependencies: { constructs: '^10.0.0', 'aws-cdk': '^2.0.0' }, + }; + } + if (filePath.endsWith('project-config.json')) { + return { projectName: 'testProject' }; + } + return {}; }); - jest.spyOn(gen1App, 'json').mockReturnValue({}); - jest.spyOn(gen1App, 'fileExists').mockReturnValue(false); const addDependencySpy = jest.spyOn(packageJsonGenerator, 'addDependency'); + const addDevDependencySpy = jest.spyOn(packageJsonGenerator, 'addDevDependency'); - const generator = new CustomResourceGenerator(gen1App, backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); + const generator = new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); const ops = await generator.plan(); await ops[0].execute(); - expect(addDependencySpy).toHaveBeenCalledWith('aws-cdk-lib', '^2.0.0'); + expect(addDependencySpy).not.toHaveBeenCalled(); + expect(addDevDependencySpy).not.toHaveBeenCalled(); }); it('throws when cdk-stack.ts cannot be read', async () => { - const gen1App = await createGen1App({ - providers: { awscloudformation: { StackName: 'amplify-test-main-123456', Region: 'us-east-1' } }, - }); - jest.spyOn(gen1App, 'json').mockReturnValue({}); - jest.spyOn(gen1App, 'fileExists').mockReturnValue(false); - mockReadFile.mockRejectedValue(new Error('ENOENT: no such file')); - const generator = new CustomResourceGenerator(gen1App, backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); + const generator = new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, 'myCustom', logger); const ops = await generator.plan(); await expect(ops[0].execute()).rejects.toThrow(); }); diff --git a/packages/amplify-cli/src/commands/gen2-migration/_common/gen1-app.ts b/packages/amplify-cli/src/commands/gen2-migration/_common/gen1-app.ts index fa1bfd13009..b42660f290d 100644 --- a/packages/amplify-cli/src/commands/gen2-migration/_common/gen1-app.ts +++ b/packages/amplify-cli/src/commands/gen2-migration/_common/gen1-app.ts @@ -35,6 +35,7 @@ export const KNOWN_RESOURCE_KEYS = [ 'geo:Map', 'geo:PlaceIndex', 'geo:GeofenceCollection', + 'custom:customCDK', ] as const; export enum KNOWN_FEATURES { diff --git a/packages/amplify-cli/src/commands/gen2-migration/assess.ts b/packages/amplify-cli/src/commands/gen2-migration/assess.ts index 85903cd2bfa..50edcf56113 100644 --- a/packages/amplify-cli/src/commands/gen2-migration/assess.ts +++ b/packages/amplify-cli/src/commands/gen2-migration/assess.ts @@ -13,6 +13,7 @@ import { FunctionAssessor } from './assess/function/function.assessor'; import { GeoFenceCollectionAssessor } from './assess/geo/geo-geofence-collection.assessor'; import { GeoMapAssessor } from './assess/geo/geo-map.assessor'; import { GeoPlaceIndexAssessor } from './assess/geo/geo-place-index.assessor'; +import { CustomCdkAssessor } from './assess/custom/custom-cdk.assessor'; /** * Evaluates migration readiness by discovering resources and @@ -63,6 +64,9 @@ export class AmplifyMigrationAssessor { case 'geo:PlaceIndex': assessors.push(new GeoPlaceIndexAssessor(this.gen1App, resource)); break; + case 'custom:customCDK': + assessors.push(new CustomCdkAssessor(resource)); + break; case 'UNKNOWN': combined.recordResource({ resource, diff --git a/packages/amplify-cli/src/commands/gen2-migration/assess/custom/custom-cdk.assessor.ts b/packages/amplify-cli/src/commands/gen2-migration/assess/custom/custom-cdk.assessor.ts new file mode 100644 index 00000000000..483a991d0dc --- /dev/null +++ b/packages/amplify-cli/src/commands/gen2-migration/assess/custom/custom-cdk.assessor.ts @@ -0,0 +1,16 @@ +import { Assessor } from '../assessor'; +import { Assessment, supported, notApplicable } from '../assessment'; +import { DiscoveredResource } from '../../_common/gen1-app'; + +/** + * Assesses migration readiness for a CDK custom resource. + * Custom resources are stateless — generate is supported, refactor is not applicable. + */ +export class CustomCdkAssessor implements Assessor { + public constructor(private readonly resource: DiscoveredResource) {} + + /** Records resource-level support for this custom CDK resource. */ + public record(assessment: Assessment): void { + assessment.recordResource({ resource: this.resource, generate: supported(), refactor: notApplicable() }); + } +} diff --git a/packages/amplify-cli/src/commands/gen2-migration/generate.ts b/packages/amplify-cli/src/commands/gen2-migration/generate.ts index 506902b6c9d..b46068ee6f5 100644 --- a/packages/amplify-cli/src/commands/gen2-migration/generate.ts +++ b/packages/amplify-cli/src/commands/gen2-migration/generate.ts @@ -25,6 +25,7 @@ import { GeoGenerator } from './generate/amplify/geo/geo.generator'; import { GeoMapGenerator } from './generate/amplify/geo/map.generator'; import { GeoPlaceIndexGenerator } from './generate/amplify/geo/place-index.generator'; import { GeoGeofenceCollectionGenerator } from './generate/amplify/geo/geofence-collection.generator'; +import { CustomResourceGenerator } from './generate/amplify/custom-resources/custom.generator'; const AMPLIFY_DIR = 'amplify'; @@ -152,6 +153,12 @@ export class AmplifyMigrationGenerateStep extends AmplifyMigrationStep { break; } + case 'custom:customCDK': + generators.push( + new CustomResourceGenerator(backendGenerator, packageJsonGenerator, outputDir, resource.resourceName, this.logger), + ); + break; + // unsupported/unknown resources - skip them. // the assessment validation will surface these to the user // and require confirmation of missing capabilities. diff --git a/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.ts b/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.ts index 138fe1a8e29..bb080095880 100644 --- a/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.ts +++ b/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/amplify-helper-transformer.ts @@ -73,6 +73,17 @@ export class AmplifyHelperTransformer { if (moduleSpecifier.text === '@aws-amplify/cli-extensibility-helper') { return undefined; } + // Transform CDK v1 scoped imports (@aws-cdk/aws-xxx) to CDK v2 (aws-cdk-lib/aws-xxx) + if (moduleSpecifier.text.startsWith('@aws-cdk/')) { + const v2Module = moduleSpecifier.text.replace('@aws-cdk/', 'aws-cdk-lib/'); + return ts.factory.updateImportDeclaration( + node, + node.modifiers, + node.importClause, + ts.factory.createStringLiteral(v2Module), + node.assertClause, + ); + } } } @@ -182,6 +193,13 @@ export class AmplifyHelperTransformer { ts.isIdentifier(declaration.initializer.expression) && removedModuleIdentifiers.has(declaration.initializer.expression.text) ) { + // Track the variable name as a dependency variable so that + // cdk.Fn.ref(retVal.api.xxx.attribute) and retVal.api.xxx.attribute + // property access chains are transformed to Gen2 equivalents. + if (ts.isIdentifier(declaration.name)) { + dependencyVariables.add(declaration.name.text); + hasDependencies = true; + } return undefined; } @@ -323,7 +341,7 @@ export class AmplifyHelperTransformer { undefined, 'backend', undefined, - ts.factory.createKeywordTypeNode(ts.SyntaxKind.AnyKeyword), + ts.factory.createTypeReferenceNode('Backend', undefined), undefined, ); baseParams.push(backendParam); @@ -348,18 +366,6 @@ export class AmplifyHelperTransformer { return result.transformed[0] as ts.SourceFile; } - /** - * Parses, transforms, and prints a cdk-stack.ts file in one call. - * Combines createSourceFile → transform → addBranchNameVariable → print. - */ - public static transformAndPrint(filePath: string, content: string, projectName?: string): string { - const sourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true); - const transformed = AmplifyHelperTransformer.transform(sourceFile, projectName); - const withBranchName = AmplifyHelperTransformer.addBranchNameVariable(transformed, projectName); - const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }); - return printer.printFile(withBranchName); - } - /** * Inserts branchName and projectName variable declarations after imports. */ diff --git a/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.ts b/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.ts index 2a0f9f94cba..8fd9278eb0d 100644 --- a/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.ts +++ b/packages/amplify-cli/src/commands/gen2-migration/generate/amplify/custom-resources/custom.generator.ts @@ -1,11 +1,11 @@ import path from 'node:path'; import fs from 'node:fs/promises'; -import { AmplifyFault, JSONUtilities } from '@aws-amplify/amplify-cli-core'; +import ts from 'typescript'; +import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; import { Planner } from '../../../_common/planner'; import { AmplifyMigrationOperation } from '../../../_common/operation'; import { BackendGenerator } from '../backend.generator'; import { RootPackageJsonGenerator } from '../../package.json.generator'; -import { Gen1App } from '../../../_common/gen1-app'; import { AmplifyHelperTransformer } from './amplify-helper-transformer'; import { SpinningLogger } from '../../../_common/spinning-logger'; @@ -14,20 +14,39 @@ const TYPES_DIR = 'types'; const AMPLIFY_DIR = 'amplify'; const BACKEND_DIR = 'backend'; const FILTER_FILES = new Set(['package.json', 'yarn.lock']); -const BUILD_ARTIFACTS = ['build', 'node_modules', '.npmrc', 'yarn.lock', 'tsconfig.json']; +const BUILD_ARTIFACTS = ['build', 'node_modules', '.npmrc', 'yarn.lock', 'package-lock.json', 'tsconfig.json']; + +/** + * Packages that should not be merged into the root package.json. + * CDK v1 scoped packages are subsumed by aws-cdk-lib in v2. + * Gen2 devDependencies (aws-cdk-lib, constructs, aws-cdk) are already + * provided by RootPackageJsonGenerator. Gen1-only helpers are unused in Gen2. + */ +const EXCLUDED_DEPENDENCIES = new Set(['aws-cdk-lib', 'constructs', 'aws-cdk', '@aws-amplify/cli-extensibility-helper']); + +/** Returns true if the package name should be excluded from the root package.json. */ +function isExcludedDependency(name: string): boolean { + return EXCLUDED_DEPENDENCIES.has(name) || name.startsWith('@aws-cdk/'); +} + +/** Capitalizes the first letter of a string. */ +function capitalize(s: string): string { + return s.charAt(0).toUpperCase() + s.slice(1); +} /** * Generates a single custom resource and contributes to backend.ts. * * 1. Copies the custom resource directory (excluding package.json, yarn.lock) * 2. Transforms cdk-stack.ts using AmplifyHelperTransformer (Gen1 → Gen2) - * 3. Renames cdk-stack.ts to resource.ts - * 4. Removes build artifacts - * 5. Merges custom resource dependencies into root package.json - * 6. Contributes import and stack creation to backend.ts + * 3. Renames the class to the capitalized resource name + * 4. Renames cdk-stack.ts to construct.ts + * 5. Generates a resource.ts wrapper with defineXxx(backend) function + * 6. Removes build artifacts + * 7. Merges custom resource dependencies into root package.json + * 8. Contributes import and defineXxx call to backend.ts */ export class CustomResourceGenerator implements Planner { - private readonly gen1App: Gen1App; private readonly backendGenerator: BackendGenerator; private readonly packageJsonGenerator: RootPackageJsonGenerator; private readonly outputDir: string; @@ -35,14 +54,12 @@ export class CustomResourceGenerator implements Planner { private readonly logger: SpinningLogger; public constructor( - gen1App: Gen1App, backendGenerator: BackendGenerator, packageJsonGenerator: RootPackageJsonGenerator, outputDir: string, resourceName: string, logger: SpinningLogger, ) { - this.gen1App = gen1App; this.backendGenerator = backendGenerator; this.packageJsonGenerator = packageJsonGenerator; this.outputDir = outputDir; @@ -64,8 +81,6 @@ export class CustomResourceGenerator implements Planner { validate: () => undefined, describe: async () => [`Migrate amplify/custom/${this.resourceName}/resource.ts`], execute: async () => { - this.logger.info(`Migrating custom/${this.resourceName}/resource.ts`); - // Copy resource directory (excluding filtered files) await fs.mkdir(destResourcePath, { recursive: true }); await fs.cp(sourceResourcePath, destResourcePath, { @@ -73,7 +88,8 @@ export class CustomResourceGenerator implements Planner { filter: (src) => !FILTER_FILES.has(path.basename(src)), }); - // Copy types directory if it exists (idempotent — multiple generators may do this) + // Copy types directory if it exists. Idempotent — harmless if + // multiple CustomResourceGenerator instances repeat this. const sourceTypesPath = path.join(rootDir, AMPLIFY_DIR, BACKEND_DIR, TYPES_DIR); const destTypesPath = path.join(this.outputDir, AMPLIFY_DIR, TYPES_DIR); try { @@ -88,15 +104,16 @@ export class CustomResourceGenerator implements Planner { } const projectName = await readProjectName(rootDir); - const className = await extractClassName(sourceResourcePath); const dependencies = await extractDependencies(sourceResourcePath); + const constructClassName = capitalize(this.resourceName); - await transformResource(destResourcePath, projectName); + await transformResource(destResourcePath, projectName, this.resourceName, constructClassName, dependencies); await removeBuildArtifacts(destResourcePath); - await renameCdkStack(destResourcePath); + await renameCdkStackToConstruct(destResourcePath); + await generateResourceWrapper(destResourcePath, this.resourceName, constructClassName, dependencies); await this.mergeDependencies(sourceResourcePath); - this.contributeToBackend(className, dependencies); + this.contributeToBackend(constructClassName); }, }, ]; @@ -111,59 +128,38 @@ export class CustomResourceGenerator implements Planner { const pkg = JSONUtilities.readJson<{ dependencies?: Record; devDependencies?: Record }>(pkgJsonPath); if (pkg?.dependencies) { for (const [name, version] of Object.entries(pkg.dependencies)) { - this.packageJsonGenerator.addDependency(name, version); + if (!isExcludedDependency(name)) { + this.packageJsonGenerator.addDependency(name, version); + } } } if (pkg?.devDependencies) { for (const [name, version] of Object.entries(pkg.devDependencies)) { - this.packageJsonGenerator.addDevDependency(name, version); + if (!isExcludedDependency(name)) { + this.packageJsonGenerator.addDevDependency(name, version); + } } } } catch (e) { - throw new AmplifyFault('ResourceNotFoundFault', { - message: `Failed to read package.json for custom resource '${this.resourceName}': ${e}`, - }); + throw new Error(`Failed to read package.json for custom resource '${this.resourceName}': ${String(e)}`); } } /** - * Contributes import and instantiation for this custom resource to backend.ts. + * Contributes import and defineXxx call for this custom resource to backend.ts. */ - private contributeToBackend(className: string | undefined, dependencies: string[]): void { - if (!className) return; - - // Custom resources render directly into backend.ts as CDK constructs - // They use addPostDefineBackendCall to instantiate after defineBackend - const args: string[] = [`backend.createStack('${this.resourceName}')`, `'${this.resourceName}'`]; - if (dependencies.length > 0) { - args.push('backend'); - } + private contributeToBackend(constructClassName: string): void { + const alias = this.resourceName; + const defineFnName = `define${constructClassName}`; - this.backendGenerator.addNamespaceImport(this.resourceName, `./custom/${this.resourceName}/resource`); - this.backendGenerator.addPostDefineBackendCall( - `_custom_${this.resourceName}`, - `new ${this.resourceName}.${className}(${args.join(', ')})`, - ); + this.backendGenerator.addNamespaceImport(alias, `./custom/${this.resourceName}/resource`); + this.backendGenerator.addPostDefineBackendStatement(`${alias}.${defineFnName}(backend)`); } } /** - * Extracts the exported class name from a cdk-stack.ts file. - */ -async function extractClassName(sourceResourcePath: string): Promise { - const cdkStackFilePath = path.join(sourceResourcePath, 'cdk-stack.ts'); - try { - const content = await fs.readFile(cdkStackFilePath, { encoding: 'utf-8' }); - return content.match(/export class (\w+)/)?.[1]; - } catch (e) { - throw new AmplifyFault('ResourceNotFoundFault', { - message: `Failed to read cdk-stack.ts for custom resource '${sourceResourcePath}': ${e}`, - }); - } -} - -/** - * Extracts category dependencies from AmplifyHelpers.addResourceDependency calls. + * Extracts category dependencies from AmplifyHelpers.addResourceDependency calls + * and amplify-dependent-resources-ref imports. */ async function extractDependencies(sourceResourcePath: string): Promise { const cdkStackFilePath = path.join(sourceResourcePath, 'cdk-stack.ts'); @@ -171,6 +167,7 @@ async function extractDependencies(sourceResourcePath: string): Promise { +async function transformResource( + destResourcePath: string, + projectName: string | undefined, + resourceName: string, + constructClassName: string, + dependencies: string[], +): Promise { const cdkStackFilePath = path.join(destResourcePath, 'cdk-stack.ts'); let content = await fs.readFile(cdkStackFilePath, { encoding: 'utf-8' }); @@ -215,18 +231,31 @@ async function transformResource(destResourcePath: string, projectName: string | } } - // Replace CfnParameter for env with default value - content = content.replace( - /new cdk\.CfnParameter\(this, ['"]env['"], {[\s\S]*?}\);/, - `new cdk.CfnParameter(this, "env", { - type: "String", - description: "Current Amplify CLI env name", - default: \`\${branchName}\` - });`, - ); + // Apply AST-based transformations (handles CfnParameter removal, dependency rewrites, etc.) + const sourceFile = ts.createSourceFile(cdkStackFilePath, content, ts.ScriptTarget.Latest, true); + const transformedFile = AmplifyHelperTransformer.transform(sourceFile, projectName); + const transformedWithBranchName = AmplifyHelperTransformer.addBranchNameVariable(transformedFile, projectName); + const printer = ts.createPrinter({ newLine: ts.NewLineKind.LineFeed }); + content = printer.printFile(transformedWithBranchName); + + // Rename the exported class from its original name to the capitalized resource name + content = content.replace(/export class \w+/, `export class ${constructClassName}`); - // Apply AST-based transformations - content = AmplifyHelperTransformer.transformAndPrint(cdkStackFilePath, content, projectName); + // Add Backend type import only when the construct has dependencies + // (i.e., when the transformer added a `backend` parameter). + // Place it after other imports to match expected output. + if (dependencies.length > 0) { + const importRegex2 = /(import.*from.*['"].*['"];?\s*\n)/g; + let lastImportMatch2: RegExpExecArray | null = null; + let regexMatch2: RegExpExecArray | null; + while ((regexMatch2 = importRegex2.exec(content)) !== null) { + lastImportMatch2 = regexMatch2; + } + if (lastImportMatch2) { + const insertIndex = lastImportMatch2.index + lastImportMatch2[0].length; + content = content.slice(0, insertIndex) + "import type { Backend } from '../../backend';\n" + content.slice(insertIndex); + } + } await fs.writeFile(cdkStackFilePath, content, { encoding: 'utf-8' }); } @@ -245,20 +274,49 @@ async function removeBuildArtifacts(destResourcePath: string): Promise { } /** - * Renames cdk-stack.ts to resource.ts. + * Renames cdk-stack.ts to construct.ts. */ -async function renameCdkStack(destResourcePath: string): Promise { +async function renameCdkStackToConstruct(destResourcePath: string): Promise { const cdkStackPath = path.join(destResourcePath, 'cdk-stack.ts'); - const resourceFilePath = path.join(destResourcePath, 'resource.ts'); + const constructPath = path.join(destResourcePath, 'construct.ts'); try { - await fs.rename(cdkStackPath, resourceFilePath); + await fs.rename(cdkStackPath, constructPath); } catch (e) { - throw new AmplifyFault('FileNotFoundFault', { - message: `Failed to rename cdk-stack.ts to resource.ts for custom resource: ${e}`, - }); + throw new Error(`Failed to rename cdk-stack.ts to construct.ts for custom resource: ${String(e)}`); } } +/** + * Generates a resource.ts wrapper that exports a defineXxx(backend) function. + */ +async function generateResourceWrapper( + destResourcePath: string, + resourceName: string, + constructClassName: string, + dependencies: string[], +): Promise { + const defineFnName = `define${constructClassName}`; + const args = [`backend.createStack('${resourceName}')`, `'${resourceName}'`]; + + // Pass backend when the resource has dependencies on other categories + if (dependencies.length > 0) { + args.push('backend'); + } + + const content = [ + "import type { Backend } from '../../backend';", + `import { ${constructClassName} } from './construct';`, + '', + `export function ${defineFnName}(backend: Backend) {`, + ` return new ${constructClassName}(${args.join(', ')});`, + '}', + '', + ].join('\n'); + + const resourceTsPath = path.join(destResourcePath, 'resource.ts'); + await fs.writeFile(resourceTsPath, content, 'utf-8'); +} + /** * Reads the project name from amplify/.config/project-config.json. */ @@ -268,8 +326,6 @@ async function readProjectName(rootDir: string): Promise { const projectConfig = JSONUtilities.readJson<{ projectName?: string }>(projectConfigPath); return projectConfig?.projectName; } catch (e) { - throw new AmplifyFault('ConfigurationFault', { - message: `Failed to read project config: ${e}`, - }); + throw new Error(`Failed to read project config: ${String(e)}`); } } diff --git a/packages/amplify-cli/src/commands/gen2-migration/generate/package.json.generator.ts b/packages/amplify-cli/src/commands/gen2-migration/generate/package.json.generator.ts index f8ec1bde1d0..e0ca1d594b9 100644 --- a/packages/amplify-cli/src/commands/gen2-migration/generate/package.json.generator.ts +++ b/packages/amplify-cli/src/commands/gen2-migration/generate/package.json.generator.ts @@ -1,5 +1,6 @@ import path from 'node:path'; import fs from 'node:fs/promises'; +import { coerce, gt } from 'semver'; import { Planner } from '../_common/planner'; import { AmplifyMigrationOperation } from '../_common/operation'; import { JSONUtilities } from '@aws-amplify/amplify-cli-core'; @@ -33,12 +34,30 @@ function sortKeys(obj: Record): Record { }, {}); } +/** + * Returns the higher of two semver version strings. Falls back to + * `incoming` when either value cannot be coerced to a valid semver + * (e.g. `*`, `latest`, git URLs). + */ +function maxVersion(existing: string | undefined, incoming: string): string { + if (!existing) { + return incoming; + } + const coercedExisting = coerce(existing); + const coercedIncoming = coerce(incoming); + if (coercedExisting && coercedIncoming) { + return gt(coercedIncoming, coercedExisting) ? incoming : existing; + } + return incoming; +} + /** * Accumulates dependencies from category generators and writes the * root package.json with Gen2 TypeScript dependencies. * * Category generators call `addDependency()` and `addDevDependency()` - * during their `plan()` phase. + * during their `plan()` phase. When the same package is added more + * than once, the higher semver version is retained. */ export class RootPackageJsonGenerator implements Planner { private readonly dependencies: Record = {}; @@ -53,14 +72,14 @@ export class RootPackageJsonGenerator implements Planner { * Adds a runtime dependency. */ public addDependency(name: string, version: string): void { - this.dependencies[name] = version; + this.dependencies[name] = maxVersion(this.dependencies[name], version); } /** * Adds a dev dependency. */ public addDevDependency(name: string, version: string): void { - this.devDependencies[name] = version; + this.devDependencies[name] = maxVersion(this.devDependencies[name], version); } /** @@ -90,17 +109,40 @@ export class RootPackageJsonGenerator implements Planner { } } + const mergedDevDependencies: Record = { + ...(packageJson.devDependencies ?? {}), + }; + for (const [name, version] of Object.entries(this.devDependencies)) { + mergedDevDependencies[name] = maxVersion(mergedDevDependencies[name], version); + } + for (const [name, version] of Object.entries(GEN2_DEV_DEPENDENCIES)) { + mergedDevDependencies[name] = maxVersion(mergedDevDependencies[name], version); + } + + // Remove from devDependencies any package that is also in + // dependencies. Runtime deps take precedence — npm/yarn makes + // them available in both contexts. + const mergedDependencies: Record = { + ...(packageJson.dependencies ?? {}), + }; + for (const [name, version] of Object.entries(this.dependencies)) { + mergedDependencies[name] = maxVersion(mergedDependencies[name], version); + } + for (const name of Object.keys(mergedDependencies)) { + delete mergedDevDependencies[name]; + } + // Remove CDK v1 scoped packages and Gen1-only helpers that are + // never valid in Gen2 (may be left over from a previous run). + for (const name of Object.keys(mergedDependencies)) { + if (name.startsWith('@aws-cdk/') || name === '@aws-amplify/cli-extensibility-helper') { + delete mergedDependencies[name]; + } + } + const patched: PackageJson = { ...packageJson, - dependencies: sortKeys({ - ...(packageJson.dependencies ?? {}), - ...this.dependencies, - }), - devDependencies: sortKeys({ - ...(packageJson.devDependencies ?? {}), - ...this.devDependencies, - ...GEN2_DEV_DEPENDENCIES, - }), + dependencies: sortKeys(mergedDependencies), + devDependencies: sortKeys(mergedDevDependencies), }; await fs.mkdir(path.dirname(packageJsonPath), { recursive: true }); diff --git a/packages/amplify-cli/src/commands/gen2-migration/lock.ts b/packages/amplify-cli/src/commands/gen2-migration/lock.ts index 54d4689ff91..b19493b731d 100644 --- a/packages/amplify-cli/src/commands/gen2-migration/lock.ts +++ b/packages/amplify-cli/src/commands/gen2-migration/lock.ts @@ -206,7 +206,8 @@ export class AmplifyMigrationLockStep extends AmplifyMigrationStep { case 'geo:Map': case 'geo:PlaceIndex': case 'geo:GeofenceCollection': - case 'function:Lambda': { + case 'function:Lambda': + case 'custom:customCDK': { break; } diff --git a/packages/amplify-e2e-gen2-migration/src/core/app.ts b/packages/amplify-e2e-gen2-migration/src/core/app.ts index cae9330ce99..1af11b29d62 100644 --- a/packages/amplify-e2e-gen2-migration/src/core/app.ts +++ b/packages/amplify-e2e-gen2-migration/src/core/app.ts @@ -29,6 +29,7 @@ interface MigrationConfig { * Per-step configuration overrides. */ readonly lock?: StepConfig; + readonly generate?: StepConfig; readonly refactor?: RefactorConfig; } @@ -339,7 +340,8 @@ export class App { */ public async generate(): Promise { await this.refreshCredentials(); - await this.runMigrationStep('generate'); + const extraArgs = this.migrationConfig.generate?.skipValidations ? ['--skip-validations'] : []; + await this.runMigrationStep('generate', extraArgs); this.removeGitignoreLine('amplify_outputs*'); }