-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updates to data fetching * Update coaching stuff * Adding sleep view * Add react table * Sleep chart * Changes from other projects * Amplify stuff * Sleep points * Git ignore + missing translation * Change to production deployments * Remove meta files * Remove data view
- Loading branch information
1 parent
b29a94d
commit 52dfa19
Showing
39 changed files
with
4,911 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"AppSyncApiName": "nyxoDev", | ||
"DynamoDBBillingMode": "PAY_PER_REQUEST", | ||
"DynamoDBEnableServerSideEncryption": "false", | ||
"AuthCognitoUserPoolId": { | ||
"Fn::GetAtt": [ | ||
"authnyxodev", | ||
"Outputs.UserPoolId" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,327 @@ | ||
type SleepData | ||
@model | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: owner | ||
ownerField: "viewers" | ||
mutations: null | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: ID! | ||
userId: ID! | ||
user: User! @connection(fields: ["userId"]) | ||
date: String! | ||
rating: Int | ||
night: [NightSegment] | ||
} | ||
|
||
type NightSegment { | ||
value: String! | ||
sourceName: String! | ||
sourceId: String! | ||
startDate: String! | ||
endDate: String! | ||
} | ||
|
||
type Request | ||
@model | ||
@auth( | ||
rules: [ | ||
{ | ||
allow: owner | ||
ownerField: "owner" | ||
mutations: [create] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: owner | ||
ownerField: "userId" | ||
mutations: [delete, update] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete] | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: ID! | ||
requesterName: String! | ||
requesterId: String! | ||
userName: String! | ||
userId: String! | ||
accepted: Boolean! | ||
} | ||
|
||
type User | ||
@key( | ||
name: "byConnectionId" | ||
fields: ["connectionId"] | ||
queryField: "userByConnectionId" | ||
) | ||
@model | ||
@auth( | ||
rules: [ | ||
{ | ||
allow: owner | ||
ownerField: "owner" | ||
mutations: [update, delete] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete] | ||
queries: [get, list] | ||
} | ||
{ allow: groups, groups: ["coach"], mutations: null, queries: [get, list] } | ||
] | ||
) { | ||
connectionId: String | ||
id: ID! | ||
email: String! | ||
nickname: String | ||
darkMode: Boolean | ||
intercomId: String | ||
activeCoaching: CoachingData @connection(name: "ActiveCoachingMonth") | ||
sleepPoints: SleepPoints | ||
} | ||
|
||
type SleepPoints { | ||
efficiency: Int | ||
duration: Int | ||
socialJetLag: Int | ||
timing: Int | ||
} | ||
|
||
type CoachingData | ||
@key(name: "byUser", fields: ["userId"], queryField: "coachingByUser") | ||
@model | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: owner | ||
ownerField: "viewers" | ||
mutations: null | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: ID! | ||
userId: ID! | ||
user: User! @connection(fields: ["userId"]) | ||
stage: Stage | ||
active: User @connection(name: "ActiveCoachingMonth") | ||
activeWeek: String | ||
started: String | ||
ended: String | ||
weeks: [Week] | ||
lessons: [String] | ||
} | ||
|
||
enum Stage { | ||
ONGOING | ||
PAUSED | ||
COMPLETED | ||
} | ||
|
||
type Week { | ||
started: String | ||
ended: String | ||
locked: Boolean | ||
slug: String | ||
} | ||
|
||
type Habit | ||
@model | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: owner | ||
ownerField: "viewers" | ||
mutations: null | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: ID! | ||
userId: ID! | ||
user: User! @connection(fields: ["userId"]) | ||
dayStreak: Int | ||
longestDayStreak: Int | ||
latestCompletedDate: String | ||
title: String! | ||
description: String | ||
date: String! | ||
days: [DayCompletionRecord]! | ||
archived: Boolean | ||
period: Period! | ||
} | ||
|
||
enum Period { | ||
morning | ||
afternoon | ||
evening | ||
} | ||
|
||
type DayCompletionRecord { | ||
key: String | ||
value: Int | ||
} | ||
|
||
type Night | ||
@model | ||
@aws_iam | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ allow: private, provider: iam, operations: [read] } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: owner | ||
ownerField: "viewers" | ||
mutations: null | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: ID! | ||
userId: ID! | ||
user: User! @connection(fields: ["userId"]) | ||
sourceId: String! | ||
sourceName: String! | ||
value: NightValue! | ||
startDate: String! | ||
endDate: String! | ||
totalDuration: Int! | ||
} | ||
|
||
enum NightValue { | ||
InBed | ||
Asleep | ||
Awake | ||
} | ||
|
||
type LikedContent | ||
@model | ||
@key(name: "bySlug", fields: ["slug", "id"], queryField: "likedContentBySlug") | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete, update, create] | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: ID! | ||
name: String | ||
type: String | ||
slug: String | ||
} | ||
|
||
type NightRating | ||
@model | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete] | ||
queries: [get, list] | ||
} | ||
{ | ||
allow: owner | ||
ownerField: "viewers" | ||
mutations: null | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: ID! | ||
userId: ID! | ||
user: User! @connection(fields: ["userId"]) | ||
rating: Int! | ||
date: String! | ||
} | ||
|
||
type FeedbackContent | ||
@model | ||
@key( | ||
name: "bySlug" | ||
fields: ["slug", "id"] | ||
queryField: "feedbackContentBySlug" | ||
) | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete, update, create] | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: String | ||
type: String | ||
slug: String! | ||
rating: Int! | ||
} | ||
|
||
type Comments | ||
@model | ||
@key(name: "bySlug", fields: ["slug", "id"], queryField: "commentsBySlug") | ||
@auth( | ||
rules: [ | ||
{ allow: owner } | ||
{ | ||
allow: groups | ||
groups: ["admin"] | ||
mutations: [delete, update, create] | ||
queries: [get, list] | ||
} | ||
] | ||
) { | ||
id: String | ||
type: String | ||
slug: String! | ||
firstName: String | ||
lastName: String | ||
guest: Boolean | ||
comment: String! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"Version": 4, | ||
"ElasticsearchWarning": true, | ||
"StackMapping": { | ||
"QueryfeedbackContentBySlugResolver": "FeedbackContent" | ||
} | ||
} |
Oops, something went wrong.