Skip to content

Commit

Permalink
Merge pull request #15 from JohnRamberger/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
JohnRamberger authored Feb 3, 2023
2 parents 8995b82 + 9827d3d commit 2be20a3
Show file tree
Hide file tree
Showing 26 changed files with 2,121 additions and 243 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
amplify-codegen-temp\models
2 changes: 1 addition & 1 deletion amplify/backend/api/hacklyticsportal2023/cli-inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"conflictResolution": {
"defaultResolutionStrategy": {
"type": "AUTOMERGE"
"type": "OPTIMISTIC_CONCURRENCY"
}
},
"additionalAuthTypes": [
Expand Down
67 changes: 56 additions & 11 deletions amplify/backend/api/hacklyticsportal2023/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ type AdminSettings
@model
@auth(
rules: [
{ allow: public }
{
allow: groups
groups: ["Administrator"]
operations: [read, create, update, delete]
}
{ allow: private, operations: [read] }
]
) {
id: ID!
hacklyticsOpen: Boolean
participantEmails: [String]
}

type Event
Expand All @@ -33,6 +34,7 @@ type Event
start: AWSDateTime
end: AWSDateTime
location: String
points: Int
checkins: [Checkin] @hasMany
}

Expand All @@ -57,17 +59,60 @@ type Checkin
}

type Query {
# @model
# @auth(
# rules: [
# {
# allow: groups
# groups: ["AndroidApp"]
# operations: [read, create, update, delete]
# }
# ]
# )
getUserById(user_uuid: String): String
@function(name: "hacklyticsportal20232e32fd51-${env}")
listUsers: String @function(name: "hacklyticsportal2023listusers-${env}")
}

type Points
@model
@auth(
rules: [
{
allow: groups
groups: ["Administrator"]
operations: [read, create, update, delete]
}
{ allow: private, operations: [read, create, update] }
]
) {
userID: String!
userName: String
points: Int!
}

type ScavengerHunt
@model
@auth(
rules: [
{
allow: groups
groups: ["Administrator"]
operations: [read, create, update, delete]
}
{ allow: private, operations: [read] }
]
) {
id: ID!
name: String!
description: String
status: Boolean
points: Int
}

type ScavengerHuntCheckin
@model
@auth(
rules: [
{
allow: groups
groups: ["Administrator"]
operations: [read, create, update, delete]
}
{ allow: private, operations: [read, create] }
]
) {
id: ID!
checkpointID: String!
userID: String!
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"ElasticsearchWarning": true,
"ResolverConfig": {
"project": {
"ConflictHandler": "AUTOMERGE",
"ConflictHandler": "OPTIMISTIC_CONCURRENCY",
"ConflictDetection": "VERSION"
}
}
Expand Down
156 changes: 95 additions & 61 deletions amplify/backend/backend-config.json
Original file line number Diff line number Diff line change
@@ -1,107 +1,141 @@
{
"auth": {
"hacklyticsportal2023": {
"service": "Cognito",
"providerPlugin": "awscloudformation",
"dependsOn": [],
"customAuth": false,
"frontendAuthConfig": {
"socialProviders": [],
"usernameAttributes": [
"EMAIL"
],
"signupAttributes": [
"BIRTHDATE",
"EMAIL",
"NAME"
],
"passwordProtectionSettings": {
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": []
},
"mfaConfiguration": "OPTIONAL",
"mfaTypes": [
"TOTP"
],
"verificationMechanisms": [
"EMAIL"
]
}
}
},
"api": {
"hacklyticsportal2023": {
"service": "AppSync",
"providerPlugin": "awscloudformation",
"dependsOn": [
{
"category": "auth",
"resourceName": "hacklyticsportal2023",
"attributes": [
"UserPoolId"
]
],
"category": "auth",
"resourceName": "hacklyticsportal2023"
}
],
"output": {
"authConfig": {
"defaultAuthentication": {
"authenticationType": "AMAZON_COGNITO_USER_POOLS",
"userPoolConfig": {
"userPoolId": "authhacklyticsportal2023"
}
},
"additionalAuthenticationProviders": [
{
"authenticationType": "API_KEY",
"apiKeyConfig": {
"apiKeyExpirationDays": 7,
"apiKeyExpirationDate": "2022-12-11T03:26:24.343Z",
"apiKeyExpirationDays": 7,
"description": ""
}
},
"authenticationType": "API_KEY"
},
{
"authenticationType": "AWS_IAM"
}
]
],
"defaultAuthentication": {
"authenticationType": "AMAZON_COGNITO_USER_POOLS",
"userPoolConfig": {
"userPoolId": "authhacklyticsportal2023"
}
}
}
}
},
"providerPlugin": "awscloudformation",
"service": "AppSync"
}
},
"storage": {
"imagestorage": {
"service": "S3",
"auth": {
"hacklyticsportal2023": {
"customAuth": false,
"dependsOn": [],
"frontendAuthConfig": {
"mfaConfiguration": "OPTIONAL",
"mfaTypes": [
"TOTP"
],
"passwordProtectionSettings": {
"passwordPolicyCharacters": [],
"passwordPolicyMinLength": 8
},
"signupAttributes": [
"BIRTHDATE",
"EMAIL",
"NAME"
],
"socialProviders": [],
"usernameAttributes": [
"EMAIL"
],
"verificationMechanisms": [
"EMAIL"
]
},
"providerPlugin": "awscloudformation",
"dependsOn": []
"service": "Cognito"
}
},
"function": {
"hacklyticsportal20232e32fd51": {
"build": true,
"providerPlugin": "awscloudformation",
"service": "Lambda",
"dependsOn": [
{
"category": "auth",
"resourceName": "hacklyticsportal2023",
"attributes": [
"UserPoolId"
]
],
"category": "auth",
"resourceName": "hacklyticsportal2023"
}
]
],
"providerPlugin": "awscloudformation",
"service": "Lambda"
},
"hacklyticsportal2023listusers": {
"build": true,
"providerPlugin": "awscloudformation",
"service": "Lambda",
"dependsOn": [
{
"category": "auth",
"resourceName": "hacklyticsportal2023",
"attributes": [
"UserPoolId"
]
],
"category": "auth",
"resourceName": "hacklyticsportal2023"
}
],
"providerPlugin": "awscloudformation",
"service": "Lambda"
}
},
"parameters": {
"AMPLIFY_function_hacklyticsportal20232e32fd51_deploymentBucketName": {
"usedBy": [
{
"category": "function",
"resourceName": "hacklyticsportal20232e32fd51"
}
]
},
"AMPLIFY_function_hacklyticsportal20232e32fd51_s3Key": {
"usedBy": [
{
"category": "function",
"resourceName": "hacklyticsportal20232e32fd51"
}
]
},
"AMPLIFY_function_hacklyticsportal2023listusers_deploymentBucketName": {
"usedBy": [
{
"category": "function",
"resourceName": "hacklyticsportal2023listusers"
}
]
},
"AMPLIFY_function_hacklyticsportal2023listusers_s3Key": {
"usedBy": [
{
"category": "function",
"resourceName": "hacklyticsportal2023listusers"
}
]
}
},
"storage": {
"imagestorage": {
"dependsOn": [],
"providerPlugin": "awscloudformation",
"service": "S3"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,14 @@
"Value": {
"Ref": "LambdaExecutionRole"
}
},
"LambdaExecutionRoleArn": {
"Value": {
"Fn::GetAtt": [
"LambdaExecutionRole",
"Arn"
]
}
}
}
}
Loading

0 comments on commit 2be20a3

Please sign in to comment.