diff --git a/.graphqlconfig.yml b/.graphqlconfig.yml
new file mode 100644
index 0000000..60da087
--- /dev/null
+++ b/.graphqlconfig.yml
@@ -0,0 +1,15 @@
+projects:
+ thrifty:
+ schemaPath: app/src/main/graphql/schema.json
+ includes:
+ - app/src/main/graphql/**/*.graphql
+ excludes:
+ - ./amplify/**
+ extensions:
+ amplify:
+ codeGenTarget: ''
+ generatedFileName: ''
+ docsFilePath: app/src/main/graphql/com/amazonaws/amplify/generated/graphql
+extensions:
+ amplify:
+ version: 3
diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
deleted file mode 100644
index b40952a..0000000
--- a/.idea/deploymentTargetDropDown.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 112d5d7..0a14513 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -3,34 +3,44 @@
diff --git a/amplify/.config/project-config.json b/amplify/.config/project-config.json
index 866fd39..8119c68 100644
--- a/amplify/.config/project-config.json
+++ b/amplify/.config/project-config.json
@@ -1,13 +1,13 @@
{
- "providers": [
- "awscloudformation"
- ],
- "projectName": "Thrifty",
+ "projectName": "thrifty",
"version": "3.1",
"frontend": "android",
"android": {
"config": {
"ResDir": "app/src/main/res"
}
- }
+ },
+ "providers": [
+ "awscloudformation"
+ ]
}
\ No newline at end of file
diff --git a/amplify/README.md b/amplify/README.md
new file mode 100644
index 0000000..7c0a9e2
--- /dev/null
+++ b/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/backend/analytics/ThriftyOWUjV/parameters.json b/amplify/backend/analytics/ThriftyOWUjV/parameters.json
deleted file mode 100755
index 6ee94f9..0000000
--- a/amplify/backend/analytics/ThriftyOWUjV/parameters.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "appName": "ThriftyOWUjV",
- "roleName": "pinpointLambdaRolee733af87",
- "cloudformationPolicyName": "cloudformationPolicye733af87",
- "cloudWatchPolicyName": "cloudWatchPolicye733af87",
- "pinpointPolicyName": "pinpointPolicye733af87",
- "authPolicyName": "pinpoint_amplify_e733af87",
- "unauthPolicyName": "pinpoint_amplify_e733af87",
- "authRoleName": {
- "Ref": "AuthRoleName"
- },
- "unauthRoleName": {
- "Ref": "UnauthRoleName"
- },
- "authRoleArn": {
- "Fn::GetAtt": [
- "AuthRole",
- "Arn"
- ]
- },
- "appId": "f06bd624184f4c90bc7556672ddd9619"
-}
\ No newline at end of file
diff --git a/amplify/backend/analytics/thrifty/parameters.json b/amplify/backend/analytics/thrifty/parameters.json
new file mode 100644
index 0000000..fcff32e
--- /dev/null
+++ b/amplify/backend/analytics/thrifty/parameters.json
@@ -0,0 +1,21 @@
+{
+ "appName": "thrifty",
+ "roleName": "pinpointLambdaRole66d02b86",
+ "cloudformationPolicyName": "cloudformationPolicy66d02b86",
+ "cloudWatchPolicyName": "cloudWatchPolicy66d02b86",
+ "pinpointPolicyName": "pinpointPolicy66d02b86",
+ "authPolicyName": "pinpoint_amplify_66d02b86",
+ "unauthPolicyName": "pinpoint_amplify_66d02b86",
+ "authRoleName": {
+ "Ref": "AuthRoleName"
+ },
+ "unauthRoleName": {
+ "Ref": "UnauthRoleName"
+ },
+ "authRoleArn": {
+ "Fn::GetAtt": [
+ "AuthRole",
+ "Arn"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/amplify/backend/analytics/ThriftyOWUjV/pinpoint-cloudformation-template.json b/amplify/backend/analytics/thrifty/pinpoint-cloudformation-template.json
old mode 100755
new mode 100644
similarity index 99%
rename from amplify/backend/analytics/ThriftyOWUjV/pinpoint-cloudformation-template.json
rename to amplify/backend/analytics/thrifty/pinpoint-cloudformation-template.json
index 27ff3d0..d63a49a
--- a/amplify/backend/analytics/ThriftyOWUjV/pinpoint-cloudformation-template.json
+++ b/amplify/backend/analytics/thrifty/pinpoint-cloudformation-template.json
@@ -1,6 +1,6 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
- "Description": "Pinpoint resource stack creation using Amplify CLI",
+ "Description": "{\"createdOn\":\"Linux\",\"createdBy\":\"Amplify\",\"createdWith\":\"7.5.4\",\"stackType\":\"analytics-Pinpoint\",\"metadata\":{}}",
"Parameters": {
"appName": {
"Type": "String"
diff --git a/amplify/backend/api/thrifty/cli-inputs.json b/amplify/backend/api/thrifty/cli-inputs.json
old mode 100755
new mode 100644
index 8619fe6..ab77544
--- a/amplify/backend/api/thrifty/cli-inputs.json
+++ b/amplify/backend/api/thrifty/cli-inputs.json
@@ -1,26 +1,26 @@
{
"version": 1,
"serviceConfiguration": {
+ "apiName": "thrifty",
"serviceName": "AppSync",
+ "gqlSchemaPath": "/tmp/amplify-5f4ff87e-eb3f-47d2-a2dc-8391321807a4/amplify/backend/api/thrifty/schema.graphql",
"defaultAuthType": {
- "mode": "AMAZON_COGNITO_USER_POOLS",
- "cognitoUserPoolId": "auththrifty21f6c364"
+ "mode": "API_KEY",
+ "keyDescription": "api key description",
+ "expirationTime": 30
},
"conflictResolution": {
"defaultResolutionStrategy": {
"type": "AUTOMERGE"
}
},
- "apiName": "thrifty",
- "gqlSchemaPath": "/tmp/amplify-b38aed8f-cc0e-48c1-ab26-b93ee968bf10/amplify/backend/api/thrifty/schema.graphql",
"additionalAuthTypes": [
{
- "mode": "API_KEY",
- "keyDescription": "api key description",
- "expirationTime": 30
+ "mode": "AWS_IAM"
},
{
- "mode": "AWS_IAM"
+ "mode": "AMAZON_COGNITO_USER_POOLS",
+ "cognitoUserPoolId": "auththrifty84b44427"
}
]
}
diff --git a/amplify/backend/api/thrifty/parameters.json b/amplify/backend/api/thrifty/parameters.json
old mode 100755
new mode 100644
index 90e1080..79b1aac
--- a/amplify/backend/api/thrifty/parameters.json
+++ b/amplify/backend/api/thrifty/parameters.json
@@ -4,9 +4,9 @@
"DynamoDBEnableServerSideEncryption": false,
"AuthCognitoUserPoolId": {
"Fn::GetAtt": [
- "auththrifty21f6c364",
+ "auththrifty84b44427",
"Outputs.UserPoolId"
]
},
- "AuthModeLastUpdated": "2021-11-28T17:20:48.071Z"
+ "AuthModeLastUpdated": "2021-12-01T01:19:54.436Z"
}
\ No newline at end of file
diff --git a/amplify/backend/api/thrifty/resolvers/README.md b/amplify/backend/api/thrifty/resolvers/README.md
old mode 100755
new mode 100644
diff --git a/amplify/backend/api/thrifty/schema.graphql b/amplify/backend/api/thrifty/schema.graphql
old mode 100755
new mode 100644
index 27ddccd..577f606
--- a/amplify/backend/api/thrifty/schema.graphql
+++ b/amplify/backend/api/thrifty/schema.graphql
@@ -1,33 +1,27 @@
-type Favorite @model @auth(rules: [{allow: private}]) @key(name: "byUser", fields: ["userID"]) {
+type User @model @auth(rules: [{allow: public}]){
id: ID!
- titleFav: String!
- imageFav: String!
- priceFav: String!
- sizeFav: String!
- categoryFav: String!
- userID: ID
+ email: String!
+ favProducts: [Favorite] @hasMany
}
-type User @model @auth(rules: [{allow: private}]) {
+type Favorite @model @auth(rules: [{allow: public}]){
id: ID!
- email: String!
- Favorite: [Favorite] @connection(keyName: "byUser", fields: ["id"])
+ product: Product @hasOne
}
-
-type Category @model @auth(rules: [{allow: private}]) {
+type Category @model @auth(rules: [{allow: public}]) {
id: ID!
- name: String!
- Products: [Product] @connection(keyName: "byCategory", fields: ["id"])
+ name: String
+ Products: [Product] @hasMany(indexName: "byCategory", fields: ["id"])
}
-type Product @model @auth(rules: [{allow: private}]) @key(name: "byCategory", fields: ["categoryID"]) {
+type Product @model {
id: ID!
title: String!
description: String!
price: String!
size: String!
color: String!
- categoryID: ID
- image: String!
+ image: String
+ categoryID: ID @index(name: "byCategory")
}
\ No newline at end of file
diff --git a/amplify/backend/api/thrifty/stacks/CustomResources.json b/amplify/backend/api/thrifty/stacks/CustomResources.json
old mode 100755
new mode 100644
diff --git a/amplify/backend/api/thrifty/transform.conf.json b/amplify/backend/api/thrifty/transform.conf.json
old mode 100755
new mode 100644
diff --git a/amplify/backend/auth/thrifty21f6c364/thrifty21f6c364-cloudformation-template.yml b/amplify/backend/auth/thrifty21f6c364/thrifty21f6c364-cloudformation-template.yml
deleted file mode 100755
index 950de39..0000000
--- a/amplify/backend/auth/thrifty21f6c364/thrifty21f6c364-cloudformation-template.yml
+++ /dev/null
@@ -1,432 +0,0 @@
-
-AWSTemplateFormatVersion: 2010-09-09
-
-Parameters:
- env:
- Type: String
- authRoleArn:
- Type: String
- unauthRoleArn:
- 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: Number
-
-
- passwordPolicyCharacters:
- Type: CommaDelimitedList
-
-
- requiredAttributes:
- Type: CommaDelimitedList
-
-
- aliasAttributes:
- Type: CommaDelimitedList
-
-
- userpoolClientGenerateSecret:
- Type: String
-
-
- userpoolClientRefreshTokenValidity:
- Type: Number
-
-
- 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
-
-
- dependsOn:
- Type: CommaDelimitedList
-
-Conditions:
- ShouldNotCreateEnvResources: !Equals [ !Ref env, NONE ]
-
- ShouldOutputAppClientSecrets: !Equals [!Ref userpoolClientGenerateSecret, true ]
-
-
-Resources:
-
-
- # BEGIN SNS ROLE RESOURCE
- SNSRole:
- # Created to allow the UserPool SMS Config to publish via the Simple Notification Service during MFA Process
- Type: AWS::IAM::Role
- Properties:
- RoleName: !If [ShouldNotCreateEnvResources, 'thrift21f6c364_sns-role', !Join ['',[ 'sns', '21f6c364', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
- AssumeRolePolicyDocument:
- Version: "2012-10-17"
- Statement:
- - Sid: ""
- Effect: "Allow"
- Principal:
- Service: "cognito-idp.amazonaws.com"
- Action:
- - "sts:AssumeRole"
- Condition:
- StringEquals:
- sts:ExternalId: thrift21f6c364_role_external_id
- Policies:
- -
- PolicyName: thrift21f6c364-sns-policy
- PolicyDocument:
- Version: "2012-10-17"
- Statement:
- -
- Effect: "Allow"
- Action:
- - "sns:Publish"
- Resource: "*"
- # BEGIN USER POOL RESOURCES
- UserPool:
- # Created upon user selection
- # Depends on SNS Role for Arn if MFA is enabled
- Type: AWS::Cognito::UserPool
- UpdateReplacePolicy: Retain
- Properties:
- UserPoolName: !If [ShouldNotCreateEnvResources, !Ref userPoolName, !Join ['',[!Ref userPoolName, '-', !Ref env]]]
-
-
- UsernameConfiguration:
- CaseSensitive: false
-
- Schema:
-
- -
- Name: email
- Required: true
- Mutable: true
-
-
-
-
- AutoVerifiedAttributes:
-
- - email
-
-
-
- EmailVerificationMessage: !Ref emailVerificationMessage
- EmailVerificationSubject: !Ref emailVerificationSubject
-
- Policies:
- PasswordPolicy:
- MinimumLength: !Ref passwordPolicyMinLength
- RequireLowercase: false
- RequireNumbers: false
- RequireSymbols: false
- RequireUppercase: false
-
- UsernameAttributes: !Ref usernameAttributes
-
-
- MfaConfiguration: !Ref mfaConfiguration
- SmsVerificationMessage: !Ref smsVerificationMessage
- SmsAuthenticationMessage: !Ref smsAuthenticationMessage
- SmsConfiguration:
- SnsCallerArn: !GetAtt SNSRole.Arn
- ExternalId: thrift21f6c364_role_external_id
-
-
- UserPoolClientWeb:
- # Created provide application access to user pool
- # Depends on UserPool for ID reference
- Type: "AWS::Cognito::UserPoolClient"
- Properties:
- ClientName: thrift21f6c364_app_clientWeb
-
- RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity
- UserPoolId: !Ref UserPool
- DependsOn: UserPool
- UserPoolClient:
- # Created provide application access to user pool
- # Depends on UserPool for ID reference
- Type: "AWS::Cognito::UserPoolClient"
- Properties:
- ClientName: thrift21f6c364_app_client
-
- GenerateSecret: !Ref userpoolClientGenerateSecret
- RefreshTokenValidity: !Ref userpoolClientRefreshTokenValidity
- UserPoolId: !Ref UserPool
- DependsOn: UserPool
- # BEGIN USER POOL LAMBDA RESOURCES
- UserPoolClientRole:
- # Created to execute Lambda which gets userpool app client config values
- Type: 'AWS::IAM::Role'
- Properties:
- RoleName: !If [ShouldNotCreateEnvResources, !Ref userpoolClientLambdaRole, !Join ['',['upClientLambdaRole', '21f6c364', !Select [3, !Split ['-', !Ref 'AWS::StackName']], '-', !Ref env]]]
- AssumeRolePolicyDocument:
- Version: '2012-10-17'
- Statement:
- - Effect: Allow
- Principal:
- Service:
- - lambda.amazonaws.com
- Action:
- - 'sts:AssumeRole'
- DependsOn: UserPoolClient
- UserPoolClientLambda:
- # Lambda which gets userpool app client config values
- # Depends on UserPool for id
- # Depends on UserPoolClientRole for role ARN
- Type: 'AWS::Lambda::Function'
- Properties:
- Code:
- ZipFile: !Join
- - |+
- - - 'const response = require(''cfn-response'');'
- - 'const aws = require(''aws-sdk'');'
- - 'const identity = new aws.CognitoIdentityServiceProvider();'
- - 'exports.handler = (event, context, callback) => {'
- - ' if (event.RequestType == ''Delete'') { '
- - ' response.send(event, context, response.SUCCESS, {})'
- - ' }'
- - ' if (event.RequestType == ''Update'' || event.RequestType == ''Create'') {'
- - ' const params = {'
- - ' ClientId: event.ResourceProperties.clientId,'
- - ' UserPoolId: event.ResourceProperties.userpoolId'
- - ' };'
- - ' identity.describeUserPoolClient(params).promise()'
- - ' .then((res) => {'
- - ' response.send(event, context, response.SUCCESS, {''appSecret'': res.UserPoolClient.ClientSecret});'
- - ' })'
- - ' .catch((err) => {'
- - ' response.send(event, context, response.FAILED, {err});'
- - ' });'
- - ' }'
- - '};'
- Handler: index.handler
- Runtime: nodejs12.x
- Timeout: 300
- Role: !GetAtt
- - UserPoolClientRole
- - Arn
- DependsOn: UserPoolClientRole
- UserPoolClientLambdaPolicy:
- # Sets userpool policy for the role that executes the Userpool Client Lambda
- # Depends on UserPool for Arn
- # Marked as depending on UserPoolClientRole for easier to understand CFN sequencing
- Type: 'AWS::IAM::Policy'
- Properties:
- PolicyName: thrift21f6c364_userpoolclient_lambda_iam_policy
- Roles:
- - !Ref UserPoolClientRole
- PolicyDocument:
- Version: '2012-10-17'
- Statement:
- - Effect: Allow
- Action:
- - 'cognito-idp:DescribeUserPoolClient'
- Resource: !GetAtt UserPool.Arn
- DependsOn: UserPoolClientLambda
- UserPoolClientLogPolicy:
- # Sets log policy for the role that executes the Userpool Client Lambda
- # Depends on UserPool for Arn
- # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing
- Type: 'AWS::IAM::Policy'
- Properties:
- PolicyName: thrift21f6c364_userpoolclient_lambda_log_policy
- Roles:
- - !Ref UserPoolClientRole
- PolicyDocument:
- Version: 2012-10-17
- Statement:
- - Effect: Allow
- Action:
- - 'logs:CreateLogGroup'
- - 'logs:CreateLogStream'
- - 'logs:PutLogEvents'
- Resource: !Sub
- - arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*
- - { region: !Ref "AWS::Region", account: !Ref "AWS::AccountId", lambda: !Ref UserPoolClientLambda}
- DependsOn: UserPoolClientLambdaPolicy
- UserPoolClientInputs:
- # Values passed to Userpool client Lambda
- # Depends on UserPool for Id
- # Depends on UserPoolClient for Id
- # Marked as depending on UserPoolClientLambdaPolicy for easier to understand CFN sequencing
- Type: 'Custom::LambdaCallout'
- Properties:
- ServiceToken: !GetAtt UserPoolClientLambda.Arn
- clientId: !Ref UserPoolClient
- userpoolId: !Ref UserPool
- DependsOn: UserPoolClientLogPolicy
-
-
-
-
-
-
-
- # BEGIN IDENTITY POOL RESOURCES
-
-
- IdentityPool:
- # Always created
- Type: AWS::Cognito::IdentityPool
- Properties:
- IdentityPoolName: !If [ShouldNotCreateEnvResources, 'thrifty21f6c364_identitypool_21f6c364', !Join ['',['thrifty21f6c364_identitypool_21f6c364', '__', !Ref env]]]
-
- CognitoIdentityProviders:
- - ClientId: !Ref UserPoolClient
- ProviderName: !Sub
- - cognito-idp.${region}.amazonaws.com/${client}
- - { region: !Ref "AWS::Region", client: !Ref UserPool}
- - ClientId: !Ref UserPoolClientWeb
- ProviderName: !Sub
- - cognito-idp.${region}.amazonaws.com/${client}
- - { region: !Ref "AWS::Region", client: !Ref UserPool}
-
- AllowUnauthenticatedIdentities: !Ref allowUnauthenticatedIdentities
-
-
- DependsOn: UserPoolClientInputs
-
-
- IdentityPoolRoleMap:
- # Created to map Auth and Unauth roles to the identity pool
- # Depends on Identity Pool for ID ref
- Type: AWS::Cognito::IdentityPoolRoleAttachment
- Properties:
- IdentityPoolId: !Ref IdentityPool
- Roles:
- unauthenticated: !Ref unauthRoleArn
- authenticated: !Ref authRoleArn
- DependsOn: IdentityPool
-
-
-Outputs :
-
- IdentityPoolId:
- Value: !Ref 'IdentityPool'
- Description: Id for the identity pool
- IdentityPoolName:
- Value: !GetAtt IdentityPool.Name
-
-
-
-
- UserPoolId:
- Value: !Ref 'UserPool'
- Description: Id for the user pool
- UserPoolArn:
- Value: !GetAtt UserPool.Arn
- Description: Arn for the user pool
- UserPoolName:
- Value: !Ref userPoolName
- AppClientIDWeb:
- Value: !Ref 'UserPoolClientWeb'
- Description: The user pool app client id for web
- AppClientID:
- Value: !Ref 'UserPoolClient'
- Description: The user pool app client id
- AppClientSecret:
- Value: !GetAtt UserPoolClientInputs.appSecret
- Condition: ShouldOutputAppClientSecrets
-
-
-
-
-
-
-
-
diff --git a/amplify/backend/auth/thrifty21f6c364/parameters.json b/amplify/backend/auth/thrifty84b44427/cli-inputs.json
old mode 100755
new mode 100644
similarity index 63%
rename from amplify/backend/auth/thrifty21f6c364/parameters.json
rename to amplify/backend/auth/thrifty84b44427/cli-inputs.json
index 93c33f4..4d7a393
--- a/amplify/backend/auth/thrifty21f6c364/parameters.json
+++ b/amplify/backend/auth/thrifty84b44427/cli-inputs.json
@@ -1,14 +1,16 @@
{
- "identityPoolName": "thrifty21f6c364_identitypool_21f6c364",
+ "version": "1",
+ "cognitoConfig": {
+ "identityPoolName": "thrifty84b44427_identitypool_84b44427",
"allowUnauthenticatedIdentities": true,
- "resourceNameTruncated": "thrift21f6c364",
- "userPoolName": "thrifty21f6c364_userpool_21f6c364",
+ "resourceNameTruncated": "thrift84b44427",
+ "userPoolName": "thrifty84b44427_userpool_84b44427",
"autoVerifiedAttributes": [
- "email"
+ "email"
],
"mfaConfiguration": "OFF",
"mfaTypes": [
- "SMS Text Message"
+ "SMS Text Message"
],
"smsAuthenticationMessage": "Your authentication code is {####}",
"smsVerificationMessage": "Your verification code is {####}",
@@ -18,40 +20,43 @@
"passwordPolicyMinLength": 8,
"passwordPolicyCharacters": [],
"requiredAttributes": [
- "email"
+ "email"
],
"aliasAttributes": [],
"userpoolClientGenerateSecret": false,
"userpoolClientRefreshTokenValidity": 30,
"userpoolClientWriteAttributes": [
- "email"
+ "email"
],
"userpoolClientReadAttributes": [
- "email"
+ "email"
],
- "userpoolClientLambdaRole": "thrift21f6c364_userpoolclient_lambda_role",
+ "userpoolClientLambdaRole": "thrift84b44427_userpoolclient_lambda_role",
"userpoolClientSetAttributes": false,
- "sharedId": "21f6c364",
- "resourceName": "thrifty21f6c364",
+ "sharedId": "84b44427",
+ "resourceName": "thrifty84b44427",
"authSelections": "identityPoolAndUserPool",
- "authRoleArn": {
- "Fn::GetAtt": [
- "AuthRole",
- "Arn"
- ]
- },
- "unauthRoleArn": {
- "Fn::GetAtt": [
- "UnauthRole",
- "Arn"
- ]
- },
"useDefault": "default",
"usernameAttributes": [
- "email"
+ "email"
],
"userPoolGroupList": [],
"serviceName": "Cognito",
"usernameCaseSensitive": false,
+ "useEnabledMfas": true,
+ "authRoleArn": {
+ "Fn::GetAtt": [
+ "AuthRole",
+ "Arn"
+ ]
+ },
+ "unauthRoleArn": {
+ "Fn::GetAtt": [
+ "UnauthRole",
+ "Arn"
+ ]
+ },
+ "breakCircularDependency": true,
"dependsOn": []
+ }
}
\ No newline at end of file
diff --git a/amplify/backend/backend-config.json b/amplify/backend/backend-config.json
old mode 100755
new mode 100644
index 27082ea..8779720
--- a/amplify/backend/backend-config.json
+++ b/amplify/backend/backend-config.json
@@ -6,21 +6,21 @@
"output": {
"authConfig": {
"defaultAuthentication": {
- "authenticationType": "AMAZON_COGNITO_USER_POOLS",
- "userPoolConfig": {
- "userPoolId": "auththrifty21f6c364"
+ "authenticationType": "API_KEY",
+ "apiKeyConfig": {
+ "apiKeyExpirationDays": 30,
+ "description": "api key description"
}
},
"additionalAuthenticationProviders": [
{
- "authenticationType": "API_KEY",
- "apiKeyConfig": {
- "apiKeyExpirationDays": 30,
- "description": "api key description"
- }
+ "authenticationType": "AWS_IAM"
},
{
- "authenticationType": "AWS_IAM"
+ "authenticationType": "AMAZON_COGNITO_USER_POOLS",
+ "userPoolConfig": {
+ "userPoolId": "auththrifty84b44427"
+ }
}
]
}
@@ -28,13 +28,14 @@
}
},
"auth": {
- "thrifty21f6c364": {
+ "thrifty84b44427": {
"service": "Cognito",
"providerPlugin": "awscloudformation",
"dependsOn": [],
"customAuth": false,
"frontendAuthConfig": {
- "loginMechanisms": [
+ "socialProviders": [],
+ "usernameAttributes": [
"EMAIL"
],
"signupAttributes": [
@@ -55,23 +56,24 @@
}
},
"storage": {
- "SSDStorage": {
+ "s309898101": {
"service": "S3",
+ "providerPlugin": "awscloudformation",
+ "dependsOn": []
+ }
+ },
+ "analytics": {
+ "thrifty": {
+ "service": "Pinpoint",
"providerPlugin": "awscloudformation"
}
},
"notifications": {
- "ThriftyOWUjV": {
+ "thrifty5eqiV": {
"service": "Pinpoint",
"channels": [
"FCM"
]
}
- },
- "analytics": {
- "ThriftyOWUjV": {
- "service": "Pinpoint",
- "providerPlugin": "awscloudformation"
- }
}
}
\ No newline at end of file
diff --git a/amplify/backend/storage/SSDStorage/parameters.json b/amplify/backend/storage/SSDStorage/parameters.json
deleted file mode 100755
index 3ab7dad..0000000
--- a/amplify/backend/storage/SSDStorage/parameters.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "bucketName": "thrifty9ac428d5d3084fb499b8aaa6395680b8",
- "authPolicyName": "s3_amplify_2b6f0a5b",
- "unauthPolicyName": "s3_amplify_2b6f0a5b",
- "authRoleName": {
- "Ref": "AuthRoleName"
- },
- "unauthRoleName": {
- "Ref": "UnauthRoleName"
- },
- "selectedGuestPermissions": [
- "s3:GetObject",
- "s3:ListBucket"
- ],
- "selectedAuthenticatedPermissions": [
- "s3:PutObject",
- "s3:GetObject",
- "s3:ListBucket",
- "s3:DeleteObject"
- ],
- "s3PermissionsAuthenticatedPublic": "s3:PutObject,s3:GetObject,s3:DeleteObject",
- "s3PublicPolicy": "Public_policy_0e1bbdf5",
- "s3PermissionsAuthenticatedUploads": "s3:PutObject",
- "s3UploadsPolicy": "Uploads_policy_0e1bbdf5",
- "s3PermissionsAuthenticatedProtected": "s3:PutObject,s3:GetObject,s3:DeleteObject",
- "s3ProtectedPolicy": "Protected_policy_0e1bbdf5",
- "s3PermissionsAuthenticatedPrivate": "s3:PutObject,s3:GetObject,s3:DeleteObject",
- "s3PrivatePolicy": "Private_policy_0e1bbdf5",
- "AuthenticatedAllowList": "ALLOW",
- "s3ReadPolicy": "read_policy_0e1bbdf5",
- "s3PermissionsGuestPublic": "DISALLOW",
- "s3PermissionsGuestUploads": "DISALLOW",
- "GuestAllowList": "DISALLOW",
- "triggerFunction": "NONE"
-}
\ No newline at end of file
diff --git a/amplify/backend/storage/SSDStorage/s3-cloudformation-template.json b/amplify/backend/storage/SSDStorage/s3-cloudformation-template.json
deleted file mode 100755
index 112e432..0000000
--- a/amplify/backend/storage/SSDStorage/s3-cloudformation-template.json
+++ /dev/null
@@ -1,657 +0,0 @@
-{
- "AWSTemplateFormatVersion": "2010-09-09",
- "Description": "S3 resource stack creation using Amplify CLI",
- "Parameters": {
- "bucketName": {
- "Type": "String"
- },
- "authPolicyName": {
- "Type": "String"
- },
- "unauthPolicyName": {
- "Type": "String"
- },
- "authRoleName": {
- "Type": "String"
- },
- "unauthRoleName": {
- "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"
- },
- "env": {
- "Type": "String"
- },
- "triggerFunction": {
- "Type": "String"
- }
-
-
- },
- "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"
- ]
- }]
- }
- },
- "Resources": {
- "S3Bucket": {
- "Type": "AWS::S3::Bucket",
-
- "DeletionPolicy" : "Retain",
- "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"
- }
- ]
- }
- }
- },
-
-
- "S3AuthPublicPolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "CreateAuthPublic",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3PublicPolicy"
- },
- "Roles": [
- {
- "Ref": "authRoleName"
- }
- ],
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": {
- "Fn::Split" : [ "," , {
- "Ref": "s3PermissionsAuthenticatedPublic"
- } ]
- },
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- },
- "/public/*"
- ]
- ]
- }
- ]
- }
- ]
- }
- }
- },
- "S3AuthProtectedPolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "CreateAuthProtected",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3ProtectedPolicy"
- },
- "Roles": [
- {
- "Ref": "authRoleName"
- }
- ],
- "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}/*"
- ]
- ]
- }
- ]
- }
- ]
- }
- }
- },
- "S3AuthPrivatePolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "CreateAuthPrivate",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3PrivatePolicy"
- },
- "Roles": [
- {
- "Ref": "authRoleName"
- }
- ],
- "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}/*"
- ]
- ]
- }
- ]
- }
- ]
- }
- }
- },
- "S3AuthUploadPolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "CreateAuthUploads",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3UploadsPolicy"
- },
- "Roles": [
- {
- "Ref": "authRoleName"
- }
- ],
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": {
- "Fn::Split" : [ "," , {
- "Ref": "s3PermissionsAuthenticatedUploads"
- } ]
- },
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- },
- "/uploads/*"
- ]
- ]
- }
- ]
- }
- ]
- }
- }
- },
- "S3AuthReadPolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "AuthReadAndList",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3ReadPolicy"
- },
- "Roles": [
- {
- "Ref": "authRoleName"
- }
- ],
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": [
- "s3:GetObject"
- ],
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- },
- "/protected/*"
- ]
- ]
- }
- ]
- },
- {
- "Effect": "Allow",
- "Action": [
- "s3:ListBucket"
- ],
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- }
- ]
- ]
- }
- ],
- "Condition": {
- "StringLike": {
- "s3:prefix": [
- "public/",
- "public/*",
- "protected/",
- "protected/*",
- "private/${cognito-identity.amazonaws.com:sub}/",
- "private/${cognito-identity.amazonaws.com:sub}/*"
- ]
- }
- }
- }
- ]
- }
- }
- },
- "S3GuestPublicPolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "CreateGuestPublic",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3PublicPolicy"
- },
- "Roles": [
- {
- "Ref": "unauthRoleName"
- }
- ],
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": {
- "Fn::Split" : [ "," , {
- "Ref": "s3PermissionsGuestPublic"
- } ]
- },
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- },
- "/public/*"
- ]
- ]
- }
- ]
- }
- ]
- }
- }
- },
- "S3GuestUploadPolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "CreateGuestUploads",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3UploadsPolicy"
- },
- "Roles": [
- {
- "Ref": "unauthRoleName"
- }
- ],
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": {
- "Fn::Split" : [ "," , {
- "Ref": "s3PermissionsGuestUploads"
- } ]
- },
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- },
- "/uploads/*"
- ]
- ]
- }
- ]
- }
- ]
- }
- }
- },
- "S3GuestReadPolicy": {
- "DependsOn": [
- "S3Bucket"
- ],
- "Condition": "GuestReadAndList",
- "Type": "AWS::IAM::Policy",
- "Properties": {
- "PolicyName": {
- "Ref": "s3ReadPolicy"
- },
- "Roles": [
- {
- "Ref": "unauthRoleName"
- }
- ],
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": [
- "s3:GetObject"
- ],
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- },
- "/protected/*"
- ]
- ]
- }
- ]
- },
- {
- "Effect": "Allow",
- "Action": [
- "s3:ListBucket"
- ],
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:aws:s3:::",
- {
- "Ref": "S3Bucket"
- }
- ]
- ]
- }
- ],
- "Condition": {
- "StringLike": {
- "s3:prefix": [
- "public/",
- "public/*",
- "protected/",
- "protected/*"
- ]
- }
- }
- }
- ]
- }
- }
- }
- },
- "Outputs": {
- "BucketName": {
- "Value": {
- "Ref": "S3Bucket"
- },
- "Description": "Bucket name for the S3 bucket"
- },
- "Region": {
- "Value": {
- "Ref": "AWS::Region"
- }
- }
- }
-}
diff --git a/amplify/backend/storage/SSDStorage/storage-params.json b/amplify/backend/storage/SSDStorage/storage-params.json
deleted file mode 100755
index 9e26dfe..0000000
--- a/amplify/backend/storage/SSDStorage/storage-params.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/amplify/backend/storage/s309898101/cli-inputs.json b/amplify/backend/storage/s309898101/cli-inputs.json
new file mode 100644
index 0000000..3f70b53
--- /dev/null
+++ b/amplify/backend/storage/s309898101/cli-inputs.json
@@ -0,0 +1,18 @@
+{
+ "resourceName": "s309898101",
+ "policyUUID": "09898101",
+ "bucketName": "thrifty4d8578a46fc748a3b17117f3d1686853",
+ "storageAccess": "authAndGuest",
+ "guestAccess": [
+ "CREATE_AND_UPDATE",
+ "READ",
+ "DELETE"
+ ],
+ "authAccess": [
+ "CREATE_AND_UPDATE",
+ "READ",
+ "DELETE"
+ ],
+ "triggerFunction": "NONE",
+ "groupAccess": {}
+}
\ No newline at end of file
diff --git a/amplify/backend/tags.json b/amplify/backend/tags.json
old mode 100755
new mode 100644
diff --git a/amplify/backend/types/amplify-dependent-resources-ref.d.ts b/amplify/backend/types/amplify-dependent-resources-ref.d.ts
index d1ed9b8..6f6f8b8 100644
--- a/amplify/backend/types/amplify-dependent-resources-ref.d.ts
+++ b/amplify/backend/types/amplify-dependent-resources-ref.d.ts
@@ -1,12 +1,13 @@
export type AmplifyDependentResourcesAttributes = {
"api": {
"thrifty": {
+ "GraphQLAPIKeyOutput": "string",
"GraphQLAPIIdOutput": "string",
"GraphQLAPIEndpointOutput": "string"
}
},
"auth": {
- "thrifty21f6c364": {
+ "thrifty84b44427": {
"IdentityPoolId": "string",
"IdentityPoolName": "string",
"UserPoolId": "string",
@@ -17,13 +18,13 @@ export type AmplifyDependentResourcesAttributes = {
}
},
"storage": {
- "SSDStorage": {
+ "s309898101": {
"BucketName": "string",
"Region": "string"
}
},
"analytics": {
- "ThriftyOWUjV": {
+ "thrifty": {
"Region": "string",
"Id": "string",
"appName": "string"
diff --git a/amplify/cli.json b/amplify/cli.json
old mode 100755
new mode 100644
index 1b1a4f5..44db5c6
--- a/amplify/cli.json
+++ b/amplify/cli.json
@@ -4,10 +4,12 @@
"addmissingownerfields": true,
"improvepluralization": false,
"validatetypenamereservedwords": true,
- "useexperimentalpipelinedtransformer": false,
+ "useexperimentalpipelinedtransformer": true,
"enableiterativegsiupdates": true,
"secondarykeyasgsi": true,
- "skipoverridemutationinputtypes": true
+ "skipoverridemutationinputtypes": true,
+ "transformerversion": 2,
+ "suppressschemamigrationprompt": true
},
"frontend-ios": {
"enablexcodeintegration": true
@@ -16,7 +18,8 @@
"enablecaseinsensitivity": true,
"useinclusiveterminology": true,
"breakcirculardependency": true,
- "forcealiasattributes": false
+ "forcealiasattributes": false,
+ "useenabledmfas": true
},
"codegen": {
"useappsyncmodelgenplugin": true,
diff --git a/amplify/team-provider-info.json b/amplify/team-provider-info.json
index 9d31790..82a34ac 100644
--- a/amplify/team-provider-info.json
+++ b/amplify/team-provider-info.json
@@ -1,26 +1,27 @@
{
- "dev": {
+ "env": {
"awscloudformation": {
- "AuthRoleName": "amplify-thrifty-dev-144858-authRole",
- "UnauthRoleArn": "arn:aws:iam::459760485083:role/amplify-thrifty-dev-144858-unauthRole",
- "AuthRoleArn": "arn:aws:iam::459760485083:role/amplify-thrifty-dev-144858-authRole",
+ "AuthRoleName": "amplify-thrifty-env-00527-authRole",
+ "UnauthRoleArn": "arn:aws:iam::459760485083:role/amplify-thrifty-env-00527-unauthRole",
+ "AuthRoleArn": "arn:aws:iam::459760485083:role/amplify-thrifty-env-00527-authRole",
"Region": "eu-central-1",
- "DeploymentBucketName": "amplify-thrifty-dev-144858-deployment",
- "UnauthRoleName": "amplify-thrifty-dev-144858-unauthRole",
- "StackName": "amplify-thrifty-dev-144858",
- "StackId": "arn:aws:cloudformation:eu-central-1:459760485083:stack/amplify-thrifty-dev-144858/659b7da0-4f80-11ec-a95f-022ef605612a",
- "AmplifyAppId": "d2xhz0mn88sj6z"
+ "DeploymentBucketName": "amplify-thrifty-env-00527-deployment",
+ "UnauthRoleName": "amplify-thrifty-env-00527-unauthRole",
+ "StackName": "amplify-thrifty-env-00527",
+ "StackId": "arn:aws:cloudformation:eu-central-1:459760485083:stack/amplify-thrifty-env-00527/a347a100-5229-11ec-a2be-06c6fc68457a",
+ "AmplifyAppId": "d17opvzdzewrwi"
},
"categories": {
+ "auth": {
+ "thrifty84b44427": {},
+ "true": {}
+ },
"notifications": {
"Pinpoint": {
- "Name": "ThriftyOWUjV-dev",
- "Id": "f06bd624184f4c90bc7556672ddd9619",
+ "Name": "thrifty5eqiV-env",
+ "Id": "22791ad444a648fea9bb95e1e8e1a9e3",
"Region": "eu-central-1"
}
- },
- "auth": {
- "thrifty21f6c364": {}
}
}
}
diff --git a/app/build.gradle b/app/build.gradle
index 036fd14..f523ffa 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -33,13 +33,16 @@ dependencies {
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
-
+ implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.amazonaws:aws-android-sdk-pinpoint:2.36.0'
implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.36.0'
-
+ implementation 'com.google.android.gms:play-services-location:18.0.0'
+ implementation 'com.google.android.gms:play-services-maps:18.0.0'
implementation 'com.amplifyframework:aws-analytics-pinpoint:1.30.0'
implementation 'com.amplifyframework:aws-storage-s3:1.30.0'
implementation 'com.amplifyframework:aws-auth-cognito:1.30.0'
+ implementation 'com.squareup.okhttp3:okhttp:4.9.0'
+ implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
implementation 'com.amplifyframework:core:1.30.0'
implementation 'com.amplifyframework:aws-datastore:1.30.0'
implementation 'com.amplifyframework:aws-api:1.30.0'
@@ -54,6 +57,8 @@ dependencies {
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
+ implementation 'com.github.onimur:handle-path-oz:1.0.7'
+ implementation 'com.squareup.picasso:picasso:2.71828'
}
apply plugin: 'com.google.gms.google-services'
diff --git a/app/google-services.json b/app/google-services.json
index 0bb730c..8ddd0ea 100644
--- a/app/google-services.json
+++ b/app/google-services.json
@@ -1,33 +1,33 @@
{
"project_info": {
- "project_number": "608816577570",
- "project_id": "thrifty-7d9f7",
- "storage_bucket": "thrifty-7d9f7.appspot.com"
+ "project_number": "769634010297",
+ "project_id": "thrifty-d9005",
+ "storage_bucket": "thrifty-d9005.appspot.com"
},
"client": [
{
"client_info": {
- "mobilesdk_app_id": "1:608816577570:android:812e4f298ed2836c925e7b",
+ "mobilesdk_app_id": "1:769634010297:android:2fd2b3c21694d15e458768",
"android_client_info": {
"package_name": "com.example.thrifty"
}
},
"oauth_client": [
{
- "client_id": "608816577570-4k85dlc0p227aj9ofddejrfjdbmcj5s1.apps.googleusercontent.com",
+ "client_id": "769634010297-jf1f9rgqei2i0qc3g5e83g6gogb9clh2.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
- "current_key": "AIzaSyCI4K3t7Dae5qYAEs02EyaAaCJqYOx76Ag"
+ "current_key": "AIzaSyBOBczkb4VAAqK2-zafGG5JIzONEjO8Lgw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
- "client_id": "608816577570-4k85dlc0p227aj9ofddejrfjdbmcj5s1.apps.googleusercontent.com",
+ "client_id": "769634010297-jf1f9rgqei2i0qc3g5e83g6gogb9clh2.apps.googleusercontent.com",
"client_type": 3
}
]
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 0ae36f0..21baac9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,6 +1,13 @@
+
+
+
+
+
+
+
+
+
-
-
@@ -39,11 +50,10 @@
android:name=".MenClothes"
android:exported="false" />
diff --git a/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/mutations.graphql b/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/mutations.graphql
new file mode 100644
index 0000000..381815e
--- /dev/null
+++ b/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/mutations.graphql
@@ -0,0 +1,286 @@
+# this is an auto generated file. This will be overwritten
+mutation CreateProduct(
+ $input: CreateProductInput!
+ $condition: ModelProductConditionInput
+) {
+ createProduct(input: $input, condition: $condition) {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation UpdateProduct(
+ $input: UpdateProductInput!
+ $condition: ModelProductConditionInput
+) {
+ updateProduct(input: $input, condition: $condition) {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation DeleteProduct(
+ $input: DeleteProductInput!
+ $condition: ModelProductConditionInput
+) {
+ deleteProduct(input: $input, condition: $condition) {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation CreateUser(
+ $input: CreateUserInput!
+ $condition: ModelUserConditionInput
+) {
+ createUser(input: $input, condition: $condition) {
+ id
+ email
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation UpdateUser(
+ $input: UpdateUserInput!
+ $condition: ModelUserConditionInput
+) {
+ updateUser(input: $input, condition: $condition) {
+ id
+ email
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation DeleteUser(
+ $input: DeleteUserInput!
+ $condition: ModelUserConditionInput
+) {
+ deleteUser(input: $input, condition: $condition) {
+ id
+ email
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation CreateCategory(
+ $input: CreateCategoryInput!
+ $condition: ModelCategoryConditionInput
+) {
+ createCategory(input: $input, condition: $condition) {
+ id
+ name
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation UpdateCategory(
+ $input: UpdateCategoryInput!
+ $condition: ModelCategoryConditionInput
+) {
+ updateCategory(input: $input, condition: $condition) {
+ id
+ name
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+mutation DeleteCategory(
+ $input: DeleteCategoryInput!
+ $condition: ModelCategoryConditionInput
+) {
+ deleteCategory(input: $input, condition: $condition) {
+ id
+ name
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
diff --git a/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/queries.graphql b/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/queries.graphql
new file mode 100644
index 0000000..370dec0
--- /dev/null
+++ b/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/queries.graphql
@@ -0,0 +1,253 @@
+# this is an auto generated file. This will be overwritten
+query GetProduct($id: ID!) {
+ getProduct(id: $id) {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+query ListProducts(
+ $filter: ModelProductFilterInput
+ $limit: Int
+ $nextToken: String
+) {
+ listProducts(filter: $filter, limit: $limit, nextToken: $nextToken) {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+}
+query SyncProducts(
+ $filter: ModelProductFilterInput
+ $limit: Int
+ $nextToken: String
+ $lastSync: AWSTimestamp
+) {
+ syncProducts(
+ filter: $filter
+ limit: $limit
+ nextToken: $nextToken
+ lastSync: $lastSync
+ ) {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+}
+query GetUser($id: ID!) {
+ getUser(id: $id) {
+ id
+ email
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+query ListUsers(
+ $filter: ModelUserFilterInput
+ $limit: Int
+ $nextToken: String
+) {
+ listUsers(filter: $filter, limit: $limit, nextToken: $nextToken) {
+ items {
+ id
+ email
+ Products {
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+}
+query SyncUsers(
+ $filter: ModelUserFilterInput
+ $limit: Int
+ $nextToken: String
+ $lastSync: AWSTimestamp
+) {
+ syncUsers(
+ filter: $filter
+ limit: $limit
+ nextToken: $nextToken
+ lastSync: $lastSync
+ ) {
+ items {
+ id
+ email
+ Products {
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+}
+query GetCategory($id: ID!) {
+ getCategory(id: $id) {
+ id
+ name
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+query ListCategories(
+ $filter: ModelCategoryFilterInput
+ $limit: Int
+ $nextToken: String
+) {
+ listCategories(filter: $filter, limit: $limit, nextToken: $nextToken) {
+ items {
+ id
+ name
+ Products {
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+}
+query SyncCategories(
+ $filter: ModelCategoryFilterInput
+ $limit: Int
+ $nextToken: String
+ $lastSync: AWSTimestamp
+) {
+ syncCategories(
+ filter: $filter
+ limit: $limit
+ nextToken: $nextToken
+ lastSync: $lastSync
+ ) {
+ items {
+ id
+ name
+ Products {
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+}
diff --git a/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/subscriptions.graphql b/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/subscriptions.graphql
new file mode 100644
index 0000000..6aaf8e8
--- /dev/null
+++ b/app/src/main/graphql/com/amazonaws/amplify/generated/graphql/subscriptions.graphql
@@ -0,0 +1,259 @@
+# this is an auto generated file. This will be overwritten
+subscription OnCreateProduct {
+ onCreateProduct {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnUpdateProduct {
+ onUpdateProduct {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnDeleteProduct {
+ onDeleteProduct {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnCreateUser {
+ onCreateUser {
+ id
+ email
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnUpdateUser {
+ onUpdateUser {
+ id
+ email
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnDeleteUser {
+ onDeleteUser {
+ id
+ email
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnCreateCategory {
+ onCreateCategory {
+ id
+ name
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnUpdateCategory {
+ onUpdateCategory {
+ id
+ name
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
+subscription OnDeleteCategory {
+ onDeleteCategory {
+ id
+ name
+ Products {
+ items {
+ id
+ title
+ description
+ price
+ size
+ color
+ image
+ isFav
+ isCart
+ categoryID
+ userID
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+ nextToken
+ startedAt
+ }
+ createdAt
+ updatedAt
+ _version
+ _deleted
+ _lastChangedAt
+ }
+}
diff --git a/app/src/main/graphql/schema.json b/app/src/main/graphql/schema.json
new file mode 100644
index 0000000..a2a35b2
--- /dev/null
+++ b/app/src/main/graphql/schema.json
@@ -0,0 +1,4643 @@
+{
+ "__schema": {
+ "queryType": {
+ "name": "Query"
+ },
+ "mutationType": {
+ "name": "Mutation"
+ },
+ "subscriptionType": {
+ "name": "Subscription"
+ },
+ "types": [
+ {
+ "kind": "OBJECT",
+ "name": "Query",
+ "description": null,
+ "fields": [
+ {
+ "name": "getProduct",
+ "description": null,
+ "args": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "listProducts",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelProductConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "syncProducts",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lastSync",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelProductConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "getUser",
+ "description": null,
+ "args": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "listUsers",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelUserConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "syncUsers",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lastSync",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelUserConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "getCategory",
+ "description": null,
+ "args": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "listCategories",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelCategoryConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "syncCategories",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lastSync",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelCategoryConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "ID",
+ "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Product",
+ "description": null,
+ "fields": [
+ {
+ "name": "id",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "price",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "size",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "color",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "image",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "isFav",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "isCart",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "categoryID",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "userID",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSDateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSDateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_deleted",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_lastChangedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "String",
+ "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "description": "The `Boolean` scalar type represents `true` or `false`.",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSDateTime",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Int",
+ "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "price",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "size",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "color",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "image",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isFav",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelBooleanInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isCart",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelBooleanInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "categoryID",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "userID",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "and",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "or",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "not",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "ne",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "eq",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "le",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "ge",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "gt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "contains",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "notContains",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "between",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "beginsWith",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeExists",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeType",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "ModelAttributeTypes",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "size",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelSizeInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "ModelAttributeTypes",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": [
+ {
+ "name": "binary",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "binarySet",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "bool",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "list",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "map",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "number",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "numberSet",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "string",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "stringSet",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_null",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelSizeInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "ne",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "eq",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "le",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "ge",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "gt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "between",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "ne",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "eq",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "le",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "ge",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "gt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "contains",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "notContains",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "between",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "beginsWith",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeExists",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeType",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "ModelAttributeTypes",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "size",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelSizeInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelBooleanInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "ne",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "eq",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeExists",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeType",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "ModelAttributeTypes",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "ModelProductConnection",
+ "description": null,
+ "fields": [
+ {
+ "name": "items",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "startedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "User",
+ "description": null,
+ "fields": [
+ {
+ "name": "id",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "Products",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "sortDirection",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "ModelSortDirection",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelProductConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSDateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSDateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_deleted",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_lastChangedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "ModelSortDirection",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": [
+ {
+ "name": "ASC",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "DESC",
+ "description": null,
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserFilterInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "and",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserFilterInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "or",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserFilterInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "not",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "ModelUserConnection",
+ "description": null,
+ "fields": [
+ {
+ "name": "items",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "startedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Category",
+ "description": null,
+ "fields": [
+ {
+ "name": "id",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "Products",
+ "description": null,
+ "args": [
+ {
+ "name": "filter",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "sortDirection",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "ModelSortDirection",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "limit",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "ModelProductConnection",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "createdAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSDateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "updatedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSDateTime",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_deleted",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "_lastChangedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryFilterInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "and",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryFilterInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "or",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryFilterInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "not",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryFilterInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "ModelCategoryConnection",
+ "description": null,
+ "fields": [
+ {
+ "name": "items",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "nextToken",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "startedAt",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "AWSTimestamp",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Mutation",
+ "description": null,
+ "fields": [
+ {
+ "name": "createProduct",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateProductInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "updateProduct",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateProductInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "deleteProduct",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "DeleteProductInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "createUser",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateUserInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "updateUser",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateUserInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "deleteUser",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "DeleteUserInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "createCategory",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateCategoryInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "updateCategory",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateCategoryInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "deleteCategory",
+ "description": null,
+ "args": [
+ {
+ "name": "input",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "DeleteCategoryInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "condition",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateProductInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "price",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "size",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "color",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "image",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isFav",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isCart",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "categoryID",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "userID",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductConditionInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "price",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "size",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "color",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "image",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isFav",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelBooleanInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isCart",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelBooleanInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "categoryID",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "userID",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIDInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "and",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductConditionInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "or",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductConditionInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "not",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelProductConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateProductInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "title",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "price",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "size",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "color",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "image",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isFav",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "isCart",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "categoryID",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "userID",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "DeleteProductInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateUserInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserConditionInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "and",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserConditionInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "or",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserConditionInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "not",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelUserConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateUserInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "email",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "DeleteUserInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "CreateCategoryInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryConditionInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelStringInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "and",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryConditionInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "or",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryConditionInput",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "not",
+ "description": null,
+ "type": {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelCategoryConditionInput",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "UpdateCategoryInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "DeleteCategoryInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "id",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "ID",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "_version",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "Subscription",
+ "description": null,
+ "fields": [
+ {
+ "name": "onCreateProduct",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onUpdateProduct",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onDeleteProduct",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Product",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onCreateUser",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onUpdateUser",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onDeleteUser",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "User",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onCreateCategory",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onUpdateCategory",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "onDeleteCategory",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "Category",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Schema",
+ "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",
+ "fields": [
+ {
+ "name": "types",
+ "description": "A list of all types supported by this server.",
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "queryType",
+ "description": "The type that query operations will be rooted at.",
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "mutationType",
+ "description": "If this server supports mutation, the type that mutation operations will be rooted at.",
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "subscriptionType",
+ "description": "If this server support subscription, the type that subscription operations will be rooted at.",
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "directives",
+ "description": "A list of all directives supported by this server.",
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",
+ "fields": [
+ {
+ "name": "kind",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "name",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "fields",
+ "description": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false"
+ }
+ ],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "interfaces",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "possibleTypes",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "enumValues",
+ "description": null,
+ "args": [
+ {
+ "name": "includeDeprecated",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": "false"
+ }
+ ],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "inputFields",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ofType",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__TypeKind",
+ "description": "An enum describing what kind of type a given `__Type` is.",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": [
+ {
+ "name": "SCALAR",
+ "description": "Indicates this type is a scalar.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Indicates this type is a union. `possibleTypes` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Indicates this type is an enum. `enumValues` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Indicates this type is an input object. `inputFields` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "LIST",
+ "description": "Indicates this type is a list. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "NON_NULL",
+ "description": "Indicates this type is a non-null. `ofType` is a valid field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Field",
+ "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",
+ "fields": [
+ {
+ "name": "name",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "args",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "type",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",
+ "fields": [
+ {
+ "name": "name",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "type",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__Type",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "defaultValue",
+ "description": "A GraphQL-formatted string representing the default value for this input value.",
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__EnumValue",
+ "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",
+ "fields": [
+ {
+ "name": "name",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "isDeprecated",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "deprecationReason",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "OBJECT",
+ "name": "__Directive",
+ "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
+ "fields": [
+ {
+ "name": "name",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "description",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "locations",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "args",
+ "description": null,
+ "args": [],
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "OBJECT",
+ "name": "__InputValue",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "inputFields": null,
+ "interfaces": [],
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "ENUM",
+ "name": "__DirectiveLocation",
+ "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": [
+ {
+ "name": "QUERY",
+ "description": "Location adjacent to a query operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "MUTATION",
+ "description": "Location adjacent to a mutation operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SUBSCRIPTION",
+ "description": "Location adjacent to a subscription operation.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD",
+ "description": "Location adjacent to a field.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_DEFINITION",
+ "description": "Location adjacent to a fragment definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FRAGMENT_SPREAD",
+ "description": "Location adjacent to a fragment spread.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INLINE_FRAGMENT",
+ "description": "Location adjacent to an inline fragment.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "VARIABLE_DEFINITION",
+ "description": "Location adjacent to a variable definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCHEMA",
+ "description": "Location adjacent to a schema definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "SCALAR",
+ "description": "Location adjacent to a scalar definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "OBJECT",
+ "description": "Location adjacent to an object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "FIELD_DEFINITION",
+ "description": "Location adjacent to a field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ARGUMENT_DEFINITION",
+ "description": "Location adjacent to an argument definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INTERFACE",
+ "description": "Location adjacent to an interface definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "UNION",
+ "description": "Location adjacent to a union definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM",
+ "description": "Location adjacent to an enum definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "ENUM_VALUE",
+ "description": "Location adjacent to an enum value definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_OBJECT",
+ "description": "Location adjacent to an input object type definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ },
+ {
+ "name": "INPUT_FIELD_DEFINITION",
+ "description": "Location adjacent to an input object field definition.",
+ "isDeprecated": false,
+ "deprecationReason": null
+ }
+ ],
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSDate",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSTime",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSEmail",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSJSON",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSURL",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSPhone",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "AWSIPAddress",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "BigInt",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Double",
+ "description": null,
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelIntInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "ne",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "eq",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "le",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "ge",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "gt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "between",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Int",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeExists",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeType",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "ModelAttributeTypes",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "INPUT_OBJECT",
+ "name": "ModelFloatInput",
+ "description": null,
+ "fields": null,
+ "inputFields": [
+ {
+ "name": "ne",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "eq",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "le",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "lt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "ge",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "gt",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "between",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Float",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeExists",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ },
+ "defaultValue": null
+ },
+ {
+ "name": "attributeType",
+ "description": null,
+ "type": {
+ "kind": "ENUM",
+ "name": "ModelAttributeTypes",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ],
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
+ "name": "Float",
+ "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ }
+ ],
+ "directives": [
+ {
+ "name": "aws_subscribe",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION"
+ ],
+ "args": [
+ {
+ "name": "mutations",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "defaultValue": null
+ }
+ ]
+ },
+ {
+ "name": "deprecated",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION",
+ "INPUT_FIELD_DEFINITION",
+ "ENUM",
+ "ENUM_VALUE"
+ ],
+ "args": [
+ {
+ "name": "reason",
+ "description": null,
+ "type": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ },
+ "defaultValue": null
+ }
+ ]
+ },
+ {
+ "name": "aws_auth",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION"
+ ],
+ "args": [
+ {
+ "name": "cognito_groups",
+ "description": null,
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ }
+ },
+ "defaultValue": null
+ }
+ ]
+ },
+ {
+ "name": "aws_api_key",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION",
+ "OBJECT"
+ ],
+ "args": []
+ },
+ {
+ "name": "aws_iam",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION",
+ "OBJECT"
+ ],
+ "args": []
+ },
+ {
+ "name": "aws_lambda",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION",
+ "OBJECT"
+ ],
+ "args": []
+ },
+ {
+ "name": "aws_oidc",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION",
+ "OBJECT"
+ ],
+ "args": []
+ },
+ {
+ "name": "aws_cognito_user_pools",
+ "description": null,
+ "locations": [
+ "FIELD_DEFINITION",
+ "OBJECT"
+ ],
+ "args": [
+ {
+ "name": "cognito_groups",
+ "description": null,
+ "type": {
+ "kind": "LIST",
+ "name": null,
+ "ofType": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "String",
+ "ofType": null
+ }
+ }
+ },
+ "defaultValue": null
+ }
+ ]
+ },
+ {
+ "name": "skip",
+ "description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Skipped when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ]
+ },
+ {
+ "name": "include",
+ "description": "Directs the executor to include this field or fragment only when the `if` argument is true.",
+ "locations": [
+ "FIELD",
+ "FRAGMENT_SPREAD",
+ "INLINE_FRAGMENT"
+ ],
+ "args": [
+ {
+ "name": "if",
+ "description": "Included when true.",
+ "type": {
+ "kind": "NON_NULL",
+ "name": null,
+ "ofType": {
+ "kind": "SCALAR",
+ "name": "Boolean",
+ "ofType": null
+ }
+ },
+ "defaultValue": null
+ }
+ ]
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/amplifyframework/datastore/generated/model/AmplifyModelProvider.java b/app/src/main/java/com/amplifyframework/datastore/generated/model/AmplifyModelProvider.java
index c7a5842..192bd1f 100644
--- a/app/src/main/java/com/amplifyframework/datastore/generated/model/AmplifyModelProvider.java
+++ b/app/src/main/java/com/amplifyframework/datastore/generated/model/AmplifyModelProvider.java
@@ -13,7 +13,7 @@
*/
public final class AmplifyModelProvider implements ModelProvider {
- private static final String AMPLIFY_MODEL_VERSION = "1c29971a13d9fcd249685dddf076b501";
+ private static final String AMPLIFY_MODEL_VERSION = "1cea3b9ec91799ef5053a0efc500bf3e";
private static AmplifyModelProvider amplifyGeneratedModelInstance;
private AmplifyModelProvider() {
@@ -34,7 +34,7 @@ public static AmplifyModelProvider getInstance() {
@Override
public Set> models() {
final Set> modifiableSet = new HashSet<>(
- Arrays.>asList(Favorite.class, User.class, Category.class, Product.class)
+ Arrays.>asList(Category.class, Product.class)
);
return Immutable.of(modifiableSet);
diff --git a/app/src/main/java/com/amplifyframework/datastore/generated/model/Category.java b/app/src/main/java/com/amplifyframework/datastore/generated/model/Category.java
index fa1633b..b40326c 100644
--- a/app/src/main/java/com/amplifyframework/datastore/generated/model/Category.java
+++ b/app/src/main/java/com/amplifyframework/datastore/generated/model/Category.java
@@ -23,13 +23,13 @@
/** This is an auto generated class representing the Category type in your schema. */
@SuppressWarnings("all")
@ModelConfig(pluralName = "Categories", authRules = {
- @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ })
+ @AuthRule(allow = AuthStrategy.PUBLIC, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ })
})
public final class Category implements Model {
public static final QueryField ID = field("Category", "id");
public static final QueryField NAME = field("Category", "name");
private final @ModelField(targetType="ID", isRequired = true) String id;
- private final @ModelField(targetType="String", isRequired = true) String name;
+ private final @ModelField(targetType="String") String name;
private final @ModelField(targetType="Product") @HasMany(associatedWith = "categoryID", type = Product.class) List Products = null;
private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt;
private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt;
@@ -96,7 +96,7 @@ public String toString() {
.toString();
}
- public static NameStep builder() {
+ public static BuildStep builder() {
return new Builder();
}
@@ -119,18 +119,14 @@ public CopyOfBuilder copyOfBuilder() {
return new CopyOfBuilder(id,
name);
}
- public interface NameStep {
- BuildStep name(String name);
- }
-
-
public interface BuildStep {
Category build();
BuildStep id(String id);
+ BuildStep name(String name);
}
- public static class Builder implements NameStep, BuildStep {
+ public static class Builder implements BuildStep {
private String id;
private String name;
@Override
@@ -144,7 +140,6 @@ public Category build() {
@Override
public BuildStep name(String name) {
- Objects.requireNonNull(name);
this.name = name;
return this;
}
diff --git a/app/src/main/java/com/amplifyframework/datastore/generated/model/Favorite.java b/app/src/main/java/com/amplifyframework/datastore/generated/model/Favorite.java
deleted file mode 100644
index 58c2d7b..0000000
--- a/app/src/main/java/com/amplifyframework/datastore/generated/model/Favorite.java
+++ /dev/null
@@ -1,325 +0,0 @@
-package com.amplifyframework.datastore.generated.model;
-
-import com.amplifyframework.core.model.temporal.Temporal;
-
-import java.util.List;
-import java.util.UUID;
-import java.util.Objects;
-
-import androidx.core.util.ObjectsCompat;
-
-import com.amplifyframework.core.model.AuthStrategy;
-import com.amplifyframework.core.model.Model;
-import com.amplifyframework.core.model.ModelOperation;
-import com.amplifyframework.core.model.annotations.AuthRule;
-import com.amplifyframework.core.model.annotations.Index;
-import com.amplifyframework.core.model.annotations.ModelConfig;
-import com.amplifyframework.core.model.annotations.ModelField;
-import com.amplifyframework.core.model.query.predicate.QueryField;
-
-import static com.amplifyframework.core.model.query.predicate.QueryField.field;
-
-/** This is an auto generated class representing the Favorite type in your schema. */
-@SuppressWarnings("all")
-@ModelConfig(pluralName = "Favorites", authRules = {
- @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ })
-})
-@Index(name = "byUser", fields = {"userID"})
-public final class Favorite implements Model {
- public static final QueryField ID = field("Favorite", "id");
- public static final QueryField TITLE_FAV = field("Favorite", "titleFav");
- public static final QueryField IMAGE_FAV = field("Favorite", "imageFav");
- public static final QueryField PRICE_FAV = field("Favorite", "priceFav");
- public static final QueryField SIZE_FAV = field("Favorite", "sizeFav");
- public static final QueryField CATEGORY_FAV = field("Favorite", "categoryFav");
- public static final QueryField USER_ID = field("Favorite", "userID");
- private final @ModelField(targetType="ID", isRequired = true) String id;
- private final @ModelField(targetType="String", isRequired = true) String titleFav;
- private final @ModelField(targetType="String", isRequired = true) String imageFav;
- private final @ModelField(targetType="String", isRequired = true) String priceFav;
- private final @ModelField(targetType="String", isRequired = true) String sizeFav;
- private final @ModelField(targetType="String", isRequired = true) String categoryFav;
- private final @ModelField(targetType="ID") String userID;
- private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt;
- private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt;
- public String getId() {
- return id;
- }
-
- public String getTitleFav() {
- return titleFav;
- }
-
- public String getImageFav() {
- return imageFav;
- }
-
- public String getPriceFav() {
- return priceFav;
- }
-
- public String getSizeFav() {
- return sizeFav;
- }
-
- public String getCategoryFav() {
- return categoryFav;
- }
-
- public String getUserId() {
- return userID;
- }
-
- public Temporal.DateTime getCreatedAt() {
- return createdAt;
- }
-
- public Temporal.DateTime getUpdatedAt() {
- return updatedAt;
- }
-
- private Favorite(String id, String titleFav, String imageFav, String priceFav, String sizeFav, String categoryFav, String userID) {
- this.id = id;
- this.titleFav = titleFav;
- this.imageFav = imageFav;
- this.priceFav = priceFav;
- this.sizeFav = sizeFav;
- this.categoryFav = categoryFav;
- this.userID = userID;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- } else if(obj == null || getClass() != obj.getClass()) {
- return false;
- } else {
- Favorite favorite = (Favorite) obj;
- return ObjectsCompat.equals(getId(), favorite.getId()) &&
- ObjectsCompat.equals(getTitleFav(), favorite.getTitleFav()) &&
- ObjectsCompat.equals(getImageFav(), favorite.getImageFav()) &&
- ObjectsCompat.equals(getPriceFav(), favorite.getPriceFav()) &&
- ObjectsCompat.equals(getSizeFav(), favorite.getSizeFav()) &&
- ObjectsCompat.equals(getCategoryFav(), favorite.getCategoryFav()) &&
- ObjectsCompat.equals(getUserId(), favorite.getUserId()) &&
- ObjectsCompat.equals(getCreatedAt(), favorite.getCreatedAt()) &&
- ObjectsCompat.equals(getUpdatedAt(), favorite.getUpdatedAt());
- }
- }
-
- @Override
- public int hashCode() {
- return new StringBuilder()
- .append(getId())
- .append(getTitleFav())
- .append(getImageFav())
- .append(getPriceFav())
- .append(getSizeFav())
- .append(getCategoryFav())
- .append(getUserId())
- .append(getCreatedAt())
- .append(getUpdatedAt())
- .toString()
- .hashCode();
- }
-
- @Override
- public String toString() {
- return new StringBuilder()
- .append("Favorite {")
- .append("id=" + String.valueOf(getId()) + ", ")
- .append("titleFav=" + String.valueOf(getTitleFav()) + ", ")
- .append("imageFav=" + String.valueOf(getImageFav()) + ", ")
- .append("priceFav=" + String.valueOf(getPriceFav()) + ", ")
- .append("sizeFav=" + String.valueOf(getSizeFav()) + ", ")
- .append("categoryFav=" + String.valueOf(getCategoryFav()) + ", ")
- .append("userID=" + String.valueOf(getUserId()) + ", ")
- .append("createdAt=" + String.valueOf(getCreatedAt()) + ", ")
- .append("updatedAt=" + String.valueOf(getUpdatedAt()))
- .append("}")
- .toString();
- }
-
- public static TitleFavStep builder() {
- return new Builder();
- }
-
- /**
- * WARNING: This method should not be used to build an instance of this object for a CREATE mutation.
- * This is a convenience method to return an instance of the object with only its ID populated
- * to be used in the context of a parameter in a delete mutation or referencing a foreign key
- * in a relationship.
- * @param id the id of the existing item this instance will represent
- * @return an instance of this model with only ID populated
- */
- public static Favorite justId(String id) {
- return new Favorite(
- id,
- null,
- null,
- null,
- null,
- null,
- null
- );
- }
-
- public CopyOfBuilder copyOfBuilder() {
- return new CopyOfBuilder(id,
- titleFav,
- imageFav,
- priceFav,
- sizeFav,
- categoryFav,
- userID);
- }
- public interface TitleFavStep {
- ImageFavStep titleFav(String titleFav);
- }
-
-
- public interface ImageFavStep {
- PriceFavStep imageFav(String imageFav);
- }
-
-
- public interface PriceFavStep {
- SizeFavStep priceFav(String priceFav);
- }
-
-
- public interface SizeFavStep {
- CategoryFavStep sizeFav(String sizeFav);
- }
-
-
- public interface CategoryFavStep {
- BuildStep categoryFav(String categoryFav);
- }
-
-
- public interface BuildStep {
- Favorite build();
- BuildStep id(String id);
- BuildStep userId(String userId);
- }
-
-
- public static class Builder implements TitleFavStep, ImageFavStep, PriceFavStep, SizeFavStep, CategoryFavStep, BuildStep {
- private String id;
- private String titleFav;
- private String imageFav;
- private String priceFav;
- private String sizeFav;
- private String categoryFav;
- private String userID;
- @Override
- public Favorite build() {
- String id = this.id != null ? this.id : UUID.randomUUID().toString();
-
- return new Favorite(
- id,
- titleFav,
- imageFav,
- priceFav,
- sizeFav,
- categoryFav,
- userID);
- }
-
- @Override
- public ImageFavStep titleFav(String titleFav) {
- Objects.requireNonNull(titleFav);
- this.titleFav = titleFav;
- return this;
- }
-
- @Override
- public PriceFavStep imageFav(String imageFav) {
- Objects.requireNonNull(imageFav);
- this.imageFav = imageFav;
- return this;
- }
-
- @Override
- public SizeFavStep priceFav(String priceFav) {
- Objects.requireNonNull(priceFav);
- this.priceFav = priceFav;
- return this;
- }
-
- @Override
- public CategoryFavStep sizeFav(String sizeFav) {
- Objects.requireNonNull(sizeFav);
- this.sizeFav = sizeFav;
- return this;
- }
-
- @Override
- public BuildStep categoryFav(String categoryFav) {
- Objects.requireNonNull(categoryFav);
- this.categoryFav = categoryFav;
- return this;
- }
-
- @Override
- public BuildStep userId(String userId) {
- this.userID = userId;
- return this;
- }
-
- /**
- * @param id id
- * @return Current Builder instance, for fluent method chaining
- */
- public BuildStep id(String id) {
- this.id = id;
- return this;
- }
- }
-
-
- public final class CopyOfBuilder extends Builder {
- private CopyOfBuilder(String id, String titleFav, String imageFav, String priceFav, String sizeFav, String categoryFav, String userId) {
- super.id(id);
- super.titleFav(titleFav)
- .imageFav(imageFav)
- .priceFav(priceFav)
- .sizeFav(sizeFav)
- .categoryFav(categoryFav)
- .userId(userId);
- }
-
- @Override
- public CopyOfBuilder titleFav(String titleFav) {
- return (CopyOfBuilder) super.titleFav(titleFav);
- }
-
- @Override
- public CopyOfBuilder imageFav(String imageFav) {
- return (CopyOfBuilder) super.imageFav(imageFav);
- }
-
- @Override
- public CopyOfBuilder priceFav(String priceFav) {
- return (CopyOfBuilder) super.priceFav(priceFav);
- }
-
- @Override
- public CopyOfBuilder sizeFav(String sizeFav) {
- return (CopyOfBuilder) super.sizeFav(sizeFav);
- }
-
- @Override
- public CopyOfBuilder categoryFav(String categoryFav) {
- return (CopyOfBuilder) super.categoryFav(categoryFav);
- }
-
- @Override
- public CopyOfBuilder userId(String userId) {
- return (CopyOfBuilder) super.userId(userId);
- }
- }
-
-}
diff --git a/app/src/main/java/com/amplifyframework/datastore/generated/model/Product.java b/app/src/main/java/com/amplifyframework/datastore/generated/model/Product.java
index 0cc6a03..76365ca 100644
--- a/app/src/main/java/com/amplifyframework/datastore/generated/model/Product.java
+++ b/app/src/main/java/com/amplifyframework/datastore/generated/model/Product.java
@@ -8,10 +8,7 @@
import androidx.core.util.ObjectsCompat;
-import com.amplifyframework.core.model.AuthStrategy;
import com.amplifyframework.core.model.Model;
-import com.amplifyframework.core.model.ModelOperation;
-import com.amplifyframework.core.model.annotations.AuthRule;
import com.amplifyframework.core.model.annotations.Index;
import com.amplifyframework.core.model.annotations.ModelConfig;
import com.amplifyframework.core.model.annotations.ModelField;
@@ -21,9 +18,7 @@
/** This is an auto generated class representing the Product type in your schema. */
@SuppressWarnings("all")
-@ModelConfig(pluralName = "Products", authRules = {
- @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ })
-})
+@ModelConfig(pluralName = "Products")
@Index(name = "byCategory", fields = {"categoryID"})
public final class Product implements Model {
public static final QueryField ID = field("Product", "id");
@@ -32,16 +27,16 @@ public final class Product implements Model {
public static final QueryField PRICE = field("Product", "price");
public static final QueryField SIZE = field("Product", "size");
public static final QueryField COLOR = field("Product", "color");
- public static final QueryField CATEGORY_ID = field("Product", "categoryID");
public static final QueryField IMAGE = field("Product", "image");
+ public static final QueryField CATEGORY_ID = field("Product", "categoryID");
private final @ModelField(targetType="ID", isRequired = true) String id;
private final @ModelField(targetType="String", isRequired = true) String title;
private final @ModelField(targetType="String", isRequired = true) String description;
private final @ModelField(targetType="String", isRequired = true) String price;
private final @ModelField(targetType="String", isRequired = true) String size;
private final @ModelField(targetType="String", isRequired = true) String color;
+ private final @ModelField(targetType="String") String image;
private final @ModelField(targetType="ID") String categoryID;
- private final @ModelField(targetType="String", isRequired = true) String image;
private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt;
private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt;
public String getId() {
@@ -68,14 +63,14 @@ public String getColor() {
return color;
}
- public String getCategoryId() {
- return categoryID;
- }
-
public String getImage() {
return image;
}
+ public String getCategoryId() {
+ return categoryID;
+ }
+
public Temporal.DateTime getCreatedAt() {
return createdAt;
}
@@ -84,15 +79,15 @@ public Temporal.DateTime getUpdatedAt() {
return updatedAt;
}
- private Product(String id, String title, String description, String price, String size, String color, String categoryID, String image) {
+ private Product(String id, String title, String description, String price, String size, String color, String image, String categoryID) {
this.id = id;
this.title = title;
this.description = description;
this.price = price;
this.size = size;
this.color = color;
- this.categoryID = categoryID;
this.image = image;
+ this.categoryID = categoryID;
}
@Override
@@ -109,8 +104,8 @@ public boolean equals(Object obj) {
ObjectsCompat.equals(getPrice(), product.getPrice()) &&
ObjectsCompat.equals(getSize(), product.getSize()) &&
ObjectsCompat.equals(getColor(), product.getColor()) &&
- ObjectsCompat.equals(getCategoryId(), product.getCategoryId()) &&
ObjectsCompat.equals(getImage(), product.getImage()) &&
+ ObjectsCompat.equals(getCategoryId(), product.getCategoryId()) &&
ObjectsCompat.equals(getCreatedAt(), product.getCreatedAt()) &&
ObjectsCompat.equals(getUpdatedAt(), product.getUpdatedAt());
}
@@ -125,8 +120,8 @@ public int hashCode() {
.append(getPrice())
.append(getSize())
.append(getColor())
- .append(getCategoryId())
.append(getImage())
+ .append(getCategoryId())
.append(getCreatedAt())
.append(getUpdatedAt())
.toString()
@@ -143,8 +138,8 @@ public String toString() {
.append("price=" + String.valueOf(getPrice()) + ", ")
.append("size=" + String.valueOf(getSize()) + ", ")
.append("color=" + String.valueOf(getColor()) + ", ")
- .append("categoryID=" + String.valueOf(getCategoryId()) + ", ")
.append("image=" + String.valueOf(getImage()) + ", ")
+ .append("categoryID=" + String.valueOf(getCategoryId()) + ", ")
.append("createdAt=" + String.valueOf(getCreatedAt()) + ", ")
.append("updatedAt=" + String.valueOf(getUpdatedAt()))
.append("}")
@@ -183,8 +178,8 @@ public CopyOfBuilder copyOfBuilder() {
price,
size,
color,
- categoryID,
- image);
+ image,
+ categoryID);
}
public interface TitleStep {
DescriptionStep title(String title);
@@ -207,23 +202,19 @@ public interface SizeStep {
public interface ColorStep {
- ImageStep color(String color);
- }
-
-
- public interface ImageStep {
- BuildStep image(String image);
+ BuildStep color(String color);
}
public interface BuildStep {
Product build();
BuildStep id(String id);
+ BuildStep image(String image);
BuildStep categoryId(String categoryId);
}
- public static class Builder implements TitleStep, DescriptionStep, PriceStep, SizeStep, ColorStep, ImageStep, BuildStep {
+ public static class Builder implements TitleStep, DescriptionStep, PriceStep, SizeStep, ColorStep, BuildStep {
private String id;
private String title;
private String description;
@@ -243,8 +234,8 @@ public Product build() {
price,
size,
color,
- categoryID,
- image);
+ image,
+ categoryID);
}
@Override
@@ -276,7 +267,7 @@ public ColorStep size(String size) {
}
@Override
- public ImageStep color(String color) {
+ public BuildStep color(String color) {
Objects.requireNonNull(color);
this.color = color;
return this;
@@ -284,7 +275,6 @@ public ImageStep color(String color) {
@Override
public BuildStep image(String image) {
- Objects.requireNonNull(image);
this.image = image;
return this;
}
@@ -307,7 +297,7 @@ public BuildStep id(String id) {
public final class CopyOfBuilder extends Builder {
- private CopyOfBuilder(String id, String title, String description, String price, String size, String color, String categoryId, String image) {
+ private CopyOfBuilder(String id, String title, String description, String price, String size, String color, String image, String categoryId) {
super.id(id);
super.title(title)
.description(description)
diff --git a/app/src/main/java/com/amplifyframework/datastore/generated/model/User.java b/app/src/main/java/com/amplifyframework/datastore/generated/model/User.java
index 5e33a2e..5d76174 100644
--- a/app/src/main/java/com/amplifyframework/datastore/generated/model/User.java
+++ b/app/src/main/java/com/amplifyframework/datastore/generated/model/User.java
@@ -23,14 +23,15 @@
/** This is an auto generated class representing the User type in your schema. */
@SuppressWarnings("all")
@ModelConfig(pluralName = "Users", authRules = {
- @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ })
+ @AuthRule(allow = AuthStrategy.PRIVATE, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ }),
+ @AuthRule(allow = AuthStrategy.PUBLIC, operations = { ModelOperation.CREATE, ModelOperation.UPDATE, ModelOperation.DELETE, ModelOperation.READ })
})
public final class User implements Model {
public static final QueryField ID = field("User", "id");
public static final QueryField EMAIL = field("User", "email");
private final @ModelField(targetType="ID", isRequired = true) String id;
- private final @ModelField(targetType="String", isRequired = true) String email;
- private final @ModelField(targetType="Favorite") @HasMany(associatedWith = "userID", type = Favorite.class) List Favorite = null;
+ private final @ModelField(targetType="String") String email;
+ private final @ModelField(targetType="Product") @HasMany(associatedWith = "userID", type = Product.class) List Products = null;
private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime createdAt;
private @ModelField(targetType="AWSDateTime", isReadOnly = true) Temporal.DateTime updatedAt;
public String getId() {
@@ -41,8 +42,8 @@ public String getEmail() {
return email;
}
- public List getFavorite() {
- return Favorite;
+ public List getProducts() {
+ return Products;
}
public Temporal.DateTime getCreatedAt() {
@@ -96,7 +97,7 @@ public String toString() {
.toString();
}
- public static EmailStep builder() {
+ public static BuildStep builder() {
return new Builder();
}
@@ -119,18 +120,14 @@ public CopyOfBuilder copyOfBuilder() {
return new CopyOfBuilder(id,
email);
}
- public interface EmailStep {
- BuildStep email(String email);
- }
-
-
public interface BuildStep {
User build();
BuildStep id(String id);
+ BuildStep email(String email);
}
- public static class Builder implements EmailStep, BuildStep {
+ public static class Builder implements BuildStep {
private String id;
private String email;
@Override
@@ -144,7 +141,6 @@ public User build() {
@Override
public BuildStep email(String email) {
- Objects.requireNonNull(email);
this.email = email;
return this;
}
diff --git a/app/src/main/java/com/example/thrifty/Accessories.java b/app/src/main/java/com/example/thrifty/Accessories.java
index 46d6e5a..d2996f7 100644
--- a/app/src/main/java/com/example/thrifty/Accessories.java
+++ b/app/src/main/java/com/example/thrifty/Accessories.java
@@ -52,15 +52,15 @@ public boolean handleMessage(@NonNull Message msg) {
return false;
}
});
- Amplify.API.query(
- ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("accessories")),
- response -> {
- for (Product product : response.getData()) {
- categorizedProducts.add(product);
- }
- categorizedHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
+// Amplify.API.query(
+// ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("accessories")),
+// response -> {
+// for (Product product : response.getData()) {
+// categorizedProducts.add(product);
+// }
+// categorizedHandler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
}
diff --git a/app/src/main/java/com/example/thrifty/Admin.java b/app/src/main/java/com/example/thrifty/Admin.java
index 0e41ca6..ac7a2b9 100644
--- a/app/src/main/java/com/example/thrifty/Admin.java
+++ b/app/src/main/java/com/example/thrifty/Admin.java
@@ -19,7 +19,8 @@
import com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin;
import com.amplifyframework.core.Amplify;
import com.amplifyframework.datastore.AWSDataStorePlugin;
-import com.amplifyframework.datastore.generated.model.Category;
+//import com.amplifyframework.datastore.generated.model.Category;
+//import com.amplifyframework.datastore.generated.model.Product;
import com.amplifyframework.datastore.generated.model.Product;
import com.amplifyframework.storage.s3.AWSS3StoragePlugin;
@@ -93,14 +94,22 @@ public void onClick(View v) {
.size(setsize)
.color(setcolor)
.image("")
- .categoryId(setcategory)
.build();
+ Log.i("Khair", "this is the product: "+ product.getId());
+
+// Amplify.API.mutate(
+// ModelMutation.create(product),
+// response -> Log.i("MyAmplifyApp", "Added Todo with id: " + response.getData().getId()),
+// error -> Log.e("MyAmplifyApp", "Create failed", error)
+// );
+
+
+ Amplify.DataStore.save(
+ product,success->Log.i("Khair","Shitttttttttttttttttttttttttttt"+success.item().getId()),
+ error->Log.e("Jamal","So Shittttttttttttttttttttt")
+ );
+
- Amplify.API.mutate(
- ModelMutation.create(product),
- response -> Log.i("MyAmplifyApp", "Added Todo with id: " + response.getData().getId()),
- error -> Log.e("MyAmplifyApp", "Create failed", error)
- );
});
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/thrifty/Belts.java b/app/src/main/java/com/example/thrifty/Belts.java
index 89b9c36..d998698 100644
--- a/app/src/main/java/com/example/thrifty/Belts.java
+++ b/app/src/main/java/com/example/thrifty/Belts.java
@@ -50,15 +50,15 @@ public boolean handleMessage(@NonNull Message msg) {
return false;
}
});
- Amplify.API.query(
- ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("belts")),
- response -> {
- for (Product product : response.getData()) {
- categorizedProducts.add(product);
- }
- categorizedHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
+// Amplify.API.query(
+// ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("belts")),
+// response -> {
+// for (Product product : response.getData()) {
+// categorizedProducts.add(product);
+// }
+// categorizedHandler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
}
diff --git a/app/src/main/java/com/example/thrifty/CartActivity.java b/app/src/main/java/com/example/thrifty/CartActivity.java
new file mode 100644
index 0000000..ac416ab
--- /dev/null
+++ b/app/src/main/java/com/example/thrifty/CartActivity.java
@@ -0,0 +1,64 @@
+package com.example.thrifty;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.fragment.app.FragmentTransaction;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Toolbar;
+
+import com.example.thrifty.fragments.FirstCartFragment;
+import com.google.android.material.bottomnavigation.BottomNavigationItemView;
+import com.google.android.material.bottomnavigation.BottomNavigationView;
+
+public class CartActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_cart);
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
+ toolbar.setNavigationIcon(R.drawable.ic_baseline_arrow_back_ios_new_24);
+ toolbar.setNavigationOnClickListener(v -> {
+ Intent intent = new Intent(CartActivity.this, MainActivity.class);
+ startActivity(intent);
+ });
+ bottomNav();
+
+ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+ transaction.replace(R.id.container,new FirstCartFragment());
+ transaction.commit();
+ }
+
+ public void bottomNav(){
+ BottomNavigationView bottomNavigationView = findViewById(R.id.bottomNavigationView);
+ bottomNavigationView.setSelectedItemId(R.id.cart);
+ BottomNavigationItemView homeNav = findViewById(R.id.homeNav);
+ BottomNavigationItemView search = findViewById(R.id.search);
+// BottomNavigationItemView cart = findViewById(R.id.cart);
+// BottomNavigationItemView wishlist = findViewById(R.id.wishlist);
+ BottomNavigationItemView profile = findViewById(R.id.profile);
+
+ search.setOnClickListener(view -> {
+ Intent intent = new Intent(getApplicationContext(), Categories.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK| Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ });
+
+ homeNav.setOnClickListener(view -> {
+ Intent intent = new Intent(getApplicationContext(), MainActivity.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK| Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ });
+
+ profile.setOnClickListener(view -> {
+ Intent intent = new Intent(getApplicationContext(), Profile.class);
+ intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK| Intent.FLAG_ACTIVITY_NEW_TASK);
+ startActivity(intent);
+ });
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/thrifty/KidsClothes.java b/app/src/main/java/com/example/thrifty/KidsClothes.java
index 3e51c65..238d345 100644
--- a/app/src/main/java/com/example/thrifty/KidsClothes.java
+++ b/app/src/main/java/com/example/thrifty/KidsClothes.java
@@ -48,15 +48,15 @@ public boolean handleMessage(@NonNull Message msg) {
return false;
}
});
- Amplify.API.query(
- ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("kids_clothes")),
- response -> {
- for (Product product : response.getData()) {
- categorizedProducts.add(product);
- }
- categorizedHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
+// Amplify.API.query(
+// ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("kids_clothes")),
+// response -> {
+// for (Product product : response.getData()) {
+// categorizedProducts.add(product);
+// }
+// categorizedHandler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/thrifty/MainActivity.java b/app/src/main/java/com/example/thrifty/MainActivity.java
index 391d655..c11a2c6 100644
--- a/app/src/main/java/com/example/thrifty/MainActivity.java
+++ b/app/src/main/java/com/example/thrifty/MainActivity.java
@@ -23,6 +23,7 @@
import android.util.Log;
import android.widget.Button;
+import android.widget.ImageView;
import com.amazonaws.mobile.client.AWSMobileClient;
import com.amazonaws.mobile.client.Callback;
@@ -43,6 +44,8 @@
import com.amplifyframework.datastore.generated.model.Product;
import com.amplifyframework.storage.s3.AWSS3StoragePlugin;
import com.example.thrifty.adapters.NewItemsAdapter;
+import com.example.thrifty.emergency.Products;
+import com.example.thrifty.emergency.Utils;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.material.bottomnavigation.BottomNavigationItemView;
import com.google.android.material.bottomnavigation.BottomNavigationView;
@@ -50,17 +53,25 @@
import java.util.ArrayList;
import java.util.List;
+import com.squareup.picasso.Picasso;
+import com.squareup.picasso.Picasso;
public class MainActivity extends AppCompatActivity {
- private static PinpointManager pinpointManager;
- private static final String TAG = "MainActivity";
+ public static PinpointManager pinpointManager;
+ public static final String TAG = "MainActivity";
- private final List newProducts = new ArrayList<>();
- private final List popularProducts = new ArrayList<>();
- private final List suggestProducts = new ArrayList<>();
- private final List categorizedProducts = new ArrayList<>();
+// public List newProducts = new ArrayList<>();
+// public List popularProducts = new ArrayList<>();
+// public List suggestProducts = new ArrayList<>();
+// public List categorizedProducts = new ArrayList<>();
+
+// Locally
+
+ public List newProducts = new ArrayList<>();
+ public List popularProducts = new ArrayList<>();
+ public List suggestProducts = new ArrayList<>();
RecyclerView newItemRecView, suggestedRecView, popularRecView;
@@ -70,10 +81,12 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
configure();
bottomNav();
- initRecyclerViews();
+// initRecyclerViews();
+ initRecyclerViewLocally();
getPinpointManager(getApplicationContext());
assignUserIdToEndpoint();
createNotificationChannel();
+ Utils.initSharedPreferences(this);
findViewById(R.id.admin).setOnClickListener(new View.OnClickListener() {
@Override
@@ -85,6 +98,25 @@ public void onClick(View view) {
}
+ private void initRecyclerViewLocally() {
+ newItemRecView = findViewById(R.id.newItemsRecView);
+ suggestedRecView = findViewById(R.id.suggestedRecView);
+ popularRecView = findViewById(R.id.popularRecView);
+
+ newItemRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(),RecyclerView.HORIZONTAL,false));
+ suggestedRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.HORIZONTAL,false));
+ popularRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(),RecyclerView.HORIZONTAL,false));
+
+
+ ArrayList allProducts = Utils.getAllProducts(getApplicationContext());
+
+ if (null!= allProducts){
+ newItemRecView.setAdapter(new NewItemsAdapter(allProducts , MainActivity.this));
+ }
+
+
+ }
+
private void configure() {
try {
Amplify.addPlugin(new AWSPinpointAnalyticsPlugin(getApplication()));
@@ -105,7 +137,7 @@ public void bottomNav(){
bottomNavigationView.setSelectedItemId(R.id.homeNav);
BottomNavigationItemView homeNav = findViewById(R.id.homeNav);
BottomNavigationItemView search = findViewById(R.id.search);
-// BottomNavigationItemView cart = findViewById(R.id.cart);
+ BottomNavigationItemView cart = findViewById(R.id.cart);
// BottomNavigationItemView wishlist = findViewById(R.id.wishlist);
BottomNavigationItemView profile = findViewById(R.id.profile);
@@ -127,79 +159,86 @@ public void bottomNav(){
startActivity(intent);
});
- }
-
- private void initRecyclerViews(){
- newItemRecView = findViewById(R.id.newItemsRecView);
- suggestedRecView = findViewById(R.id.suggestedRecView);
- popularRecView = findViewById(R.id.popularRecView);
-
- newItemRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(),RecyclerView.HORIZONTAL,false));
- suggestedRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.HORIZONTAL,false));
- popularRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(),RecyclerView.HORIZONTAL,false));
-
- newItemRecView.setAdapter(new NewItemsAdapter(newProducts , MainActivity.this));
- Handler handler = new Handler(Looper.myLooper(), new Handler.Callback() {
- @SuppressLint("NotifyDataSetChanged")
- @Override
- public boolean handleMessage(@NonNull Message message) {
- newItemRecView.getAdapter().notifyDataSetChanged();
- return false;
- }
- });
-
-
- popularRecView.setAdapter(new NewItemsAdapter(popularProducts , MainActivity.this));
- Handler popularHandler = new Handler(Looper.myLooper(), new Handler.Callback() {
- @SuppressLint("NotifyDataSetChanged")
- @Override
- public boolean handleMessage(@NonNull Message message) {
- popularRecView.getAdapter().notifyDataSetChanged();
- return false;
- }
- });
-
- suggestedRecView.setAdapter(new NewItemsAdapter(suggestProducts , MainActivity.this));
- Handler suggestHandler = new Handler(Looper.myLooper(), new Handler.Callback() {
- @SuppressLint("NotifyDataSetChanged")
- @Override
- public boolean handleMessage(@NonNull Message message) {
- suggestedRecView.getAdapter().notifyDataSetChanged();
- return false;
- }
+ cart.setOnClickListener(view -> {
+ Intent intent = new Intent(getApplicationContext(), CartActivity.class);
+ startActivity(intent);
});
- Amplify.API.query(
- ModelQuery.list(Product.class),
- response -> {
- for (Product product : response.getData()) {
- newProducts.add(product);
- }
- handler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
-
- Amplify.API.query(
- ModelQuery.list(Product.class),
- response -> {
- for (Product product : response.getData()) {
- popularProducts.add(product);
- }
- popularHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
-
- Amplify.API.query(
- ModelQuery.list(Product.class),
- response -> {
- for (Product product : response.getData()) {
- suggestProducts.add(product);
- }
- suggestHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
}
+// private void initRecyclerViews(){
+// newItemRecView = findViewById(R.id.newItemsRecView);
+// suggestedRecView = findViewById(R.id.suggestedRecView);
+// popularRecView = findViewById(R.id.popularRecView);
+//
+// newItemRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(),RecyclerView.HORIZONTAL,false));
+// suggestedRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(), RecyclerView.HORIZONTAL,false));
+// popularRecView.setLayoutManager(new LinearLayoutManager(getApplicationContext(),RecyclerView.HORIZONTAL,false));
+//
+// newItemRecView.setAdapter(new NewItemsAdapter(newProducts , MainActivity.this));
+// Handler handler = new Handler(Looper.myLooper(), new Handler.Callback() {
+// @SuppressLint("NotifyDataSetChanged")
+// @Override
+// public boolean handleMessage(@NonNull Message message) {
+// newItemRecView.getAdapter().notifyDataSetChanged();
+// return false;
+// }
+// });
+//
+//
+// popularRecView.setAdapter(new NewItemsAdapter(popularProducts , MainActivity.this));
+// Handler popularHandler = new Handler(Looper.myLooper(), new Handler.Callback() {
+// @SuppressLint("NotifyDataSetChanged")
+// @Override
+// public boolean handleMessage(@NonNull Message message) {
+// popularRecView.getAdapter().notifyDataSetChanged();
+// return false;
+// }
+// });
+//
+// suggestedRecView.setAdapter(new NewItemsAdapter(suggestProducts , MainActivity.this));
+// Handler suggestHandler = new Handler(Looper.myLooper(), new Handler.Callback() {
+// @SuppressLint("NotifyDataSetChanged")
+// @Override
+// public boolean handleMessage(@NonNull Message message) {
+// suggestedRecView.getAdapter().notifyDataSetChanged();
+//
+//
+// return false;
+// }
+// });
+//
+// Amplify.API.query(
+// ModelQuery.list(Product.class),
+// response -> {
+// for (Product product : response.getData()) {
+// newProducts.add(product);
+// }
+// handler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
+//
+// Amplify.API.query(
+// ModelQuery.list(Product.class),
+// response -> {
+// for (Product product : response.getData()) {
+// popularProducts.add(product);
+// }
+// popularHandler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
+//
+//// Amplify.API.query(
+//// ModelQuery.list(Product.class),
+//// response -> {
+//// for (Product product : response.getData()) {
+//// suggestProducts.add(product);
+//// }
+//// suggestHandler.sendEmptyMessage(1);
+//// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+//// );
+// }
+
@Override
protected void onResume() {
super.onResume();
@@ -207,7 +246,7 @@ protected void onResume() {
stopButton.setVisibility(View.GONE);
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);
String email1 = sharedPreferences.getString("email", "Your email");
- if (email1.equals("aboud.coding@gmail.com")){
+ if (email1.equals("jamalwari2@gmail.com")){
stopButton.setVisibility(View.VISIBLE);
}
}
diff --git a/app/src/main/java/com/example/thrifty/MenClothes.java b/app/src/main/java/com/example/thrifty/MenClothes.java
index ad229d1..0b11dbe 100644
--- a/app/src/main/java/com/example/thrifty/MenClothes.java
+++ b/app/src/main/java/com/example/thrifty/MenClothes.java
@@ -50,15 +50,15 @@ public boolean handleMessage(@NonNull Message msg) {
}
});
- Amplify.API.query(
- ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("men_clothes")),
- response -> {
- for (Product product : response.getData()) {
- categorizedProducts.add(product);
- }
- categorizedHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
+// Amplify.API.query(
+// ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("men_clothes")),
+// response -> {
+// for (Product product : response.getData()) {
+// categorizedProducts.add(product);
+// }
+// categorizedHandler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/thrifty/ProductView.java b/app/src/main/java/com/example/thrifty/ProductView.java
index 3b99aaf..8a35c1e 100644
--- a/app/src/main/java/com/example/thrifty/ProductView.java
+++ b/app/src/main/java/com/example/thrifty/ProductView.java
@@ -15,6 +15,7 @@
import com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin;
import com.amplifyframework.core.Amplify;
import com.amplifyframework.datastore.AWSDataStorePlugin;
+import com.amplifyframework.datastore.generated.model.Product;
import com.amplifyframework.storage.s3.AWSS3StoragePlugin;
public class ProductView extends AppCompatActivity {
@@ -46,14 +47,36 @@ protected void onCreate(Bundle savedInstanceState) {
String title = intent.getStringExtra("Title");
String price = intent.getStringExtra("price");
String category = intent.getStringExtra("category");
+ String description = intent.getStringExtra("Description");
TextView textView = findViewById(R.id.txtTitle);
TextView priceTxt = findViewById(R.id.txtPrice);
TextView categoryTxt = findViewById(R.id.category);
+ TextView descriptionText = findViewById(R.id.descriptionText);
textView.setText(title);
priceTxt.setText(price);
categoryTxt.setText(category);
+ descriptionText.setText(description);
+
+ findViewById(R.id.addToCart).setOnClickListener(view -> {
+ Intent intent1 = new Intent(ProductView.this, CartActivity.class);
+ intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK| Intent.FLAG_ACTIVITY_NEW_TASK);
+
+// String name = title.toString();
+// String priceItem = price;
+// Product product = new Product.Builder()
+// .title(name)
+// .description("")
+// .price("10000$")
+// .size("")
+// .color("")
+// .image("")
+// .build();
+
+
+ startActivity(intent1);
+ });
}
diff --git a/app/src/main/java/com/example/thrifty/Watches.java b/app/src/main/java/com/example/thrifty/Watches.java
index 7d1d7b1..40c1c76 100644
--- a/app/src/main/java/com/example/thrifty/Watches.java
+++ b/app/src/main/java/com/example/thrifty/Watches.java
@@ -49,15 +49,15 @@ public boolean handleMessage(@NonNull Message msg) {
return false;
}
});
- Amplify.API.query(
- ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("watches")),
- response -> {
- for (Product product : response.getData()) {
- categorizedProducts.add(product);
- }
- categorizedHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
+// Amplify.API.query(
+// ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("watches")),
+// response -> {
+// for (Product product : response.getData()) {
+// categorizedProducts.add(product);
+// }
+// categorizedHandler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/thrifty/WomenClothes.java b/app/src/main/java/com/example/thrifty/WomenClothes.java
index 2cfb8c4..1b08c7a 100644
--- a/app/src/main/java/com/example/thrifty/WomenClothes.java
+++ b/app/src/main/java/com/example/thrifty/WomenClothes.java
@@ -50,15 +50,15 @@ public boolean handleMessage(@NonNull Message msg) {
}
});
- Amplify.API.query(
- ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("women_clothes")),
- response -> {
- for (Product product : response.getData()) {
- categorizedProducts.add(product);
- }
- categorizedHandler.sendEmptyMessage(1);
- }, error -> Log.e("MyAmplifyApp", "Query failure", error)
- );
+// Amplify.API.query(
+// ModelQuery.list(Product.class,Product.CATEGORY_ID.eq("women_clothes")),
+// response -> {
+// for (Product product : response.getData()) {
+// categorizedProducts.add(product);
+// }
+// categorizedHandler.sendEmptyMessage(1);
+// }, error -> Log.e("MyAmplifyApp", "Query failure", error)
+// );
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/thrifty/adapters/AccessoriesAdapter.java b/app/src/main/java/com/example/thrifty/adapters/AccessoriesAdapter.java
index 56c07c6..c709d26 100644
--- a/app/src/main/java/com/example/thrifty/adapters/AccessoriesAdapter.java
+++ b/app/src/main/java/com/example/thrifty/adapters/AccessoriesAdapter.java
@@ -36,7 +36,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
TextView price = holder.itemView.findViewById(R.id.price);
title.setText(holder.product.getTitle());
- category.setText(holder.product.getCategoryId());
+// category.setText(holder.product.getCategoryId());
price.setText(holder.product.getPrice());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@@ -44,7 +44,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
public void onClick(View view) {
Intent goToDetails = new Intent(view.getContext(), ProductView.class);
goToDetails.putExtra("Title",products.get(position).getTitle());
- goToDetails.putExtra("category",products.get(position).getCategoryId());
+// goToDetails.putExtra("category",products.get(position).getCategoryId());
goToDetails.putExtra("price", products.get(position).getPrice());
view.getContext().startActivity(goToDetails);
diff --git a/app/src/main/java/com/example/thrifty/adapters/BeltsAdapter.java b/app/src/main/java/com/example/thrifty/adapters/BeltsAdapter.java
index da73aec..99fb2eb 100644
--- a/app/src/main/java/com/example/thrifty/adapters/BeltsAdapter.java
+++ b/app/src/main/java/com/example/thrifty/adapters/BeltsAdapter.java
@@ -36,7 +36,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
TextView price = holder.itemView.findViewById(R.id.price);
title.setText(holder.product.getTitle());
- category.setText(holder.product.getCategoryId());
+// category.setText(holder.product.getCategoryId());
price.setText(holder.product.getPrice());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@@ -44,7 +44,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
public void onClick(View view) {
Intent goToDetails = new Intent(view.getContext(), ProductView.class);
goToDetails.putExtra("Title",products.get(position).getTitle());
- goToDetails.putExtra("category",products.get(position).getCategoryId());
+// goToDetails.putExtra("category",products.get(position).getCategoryId());
goToDetails.putExtra("price", products.get(position).getPrice());
view.getContext().startActivity(goToDetails);
diff --git a/app/src/main/java/com/example/thrifty/adapters/CartAdapter.java b/app/src/main/java/com/example/thrifty/adapters/CartAdapter.java
new file mode 100644
index 0000000..74525ae
--- /dev/null
+++ b/app/src/main/java/com/example/thrifty/adapters/CartAdapter.java
@@ -0,0 +1,105 @@
+package com.example.thrifty.adapters;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageButton;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.amplifyframework.datastore.generated.model.Product;
+import com.example.thrifty.CartActivity;
+import com.example.thrifty.R;
+
+import org.w3c.dom.Text;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CartAdapter extends RecyclerView.Adapter{
+
+ public interface DeleteItem{
+ void onDeleteItem(Product product);
+ }
+
+ private DeleteItem deleteItem;
+ private Fragment fragment;
+ List items = new ArrayList<>();
+
+ Context context;
+ public CartAdapter(List items, CartActivity cartActivity){
+ this.items = items;
+ }
+
+ public CartAdapter(Fragment fragment, Context context) {
+ this.fragment = fragment;
+ this.context = context;
+ }
+
+ @NonNull
+ @Override
+ public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.cart_item,parent,false);
+ return new ViewHolder(view);
+ }
+
+ @SuppressLint("SetTextI18n")
+ @Override
+ public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
+ holder.product = items.get(position);
+ TextView txtName = holder.itemView.findViewById(R.id.txtName);
+ TextView txtPrice = holder.itemView.findViewById(R.id.price);
+ ImageButton imageButton = holder.itemView.findViewById(R.id.deleteBtn);
+
+ txtName.setText(holder.product.getTitle());
+ txtPrice.setText(holder.product.getPrice()+"$");
+
+ imageButton.setOnClickListener(view -> {
+
+ AlertDialog.Builder builder = new AlertDialog.Builder(context)
+ .setTitle("Deleting......")
+ .setMessage("Are Sure You Want To Remove This Item? ")
+ .setNegativeButton("NO", (dialogInterface, i) -> {
+
+ }).setPositiveButton("YES", (dialogInterface, i) -> {
+//Here is the deleting from the cart
+ try{
+ deleteItem = (DeleteItem) fragment;
+ }catch (Exception e){
+ e.getMessage();
+ }
+
+ });
+ builder.create().show();
+ });
+
+
+ }
+
+ @Override
+ public int getItemCount() {
+ return items.size();
+ }
+
+ @SuppressLint("NotifyDataSetChanged")
+ public void setItems(List items){
+ this.items = items;
+ notifyDataSetChanged();
+ }
+
+ public static class ViewHolder extends RecyclerView.ViewHolder{
+ public Product product;
+ public View itemView;
+ public ViewHolder(@NonNull View itemView) {
+ super(itemView);
+ this.itemView = itemView;
+ }
+ }
+}
diff --git a/app/src/main/java/com/example/thrifty/adapters/KidsClothesAdapter.java b/app/src/main/java/com/example/thrifty/adapters/KidsClothesAdapter.java
index bae81b9..dad1629 100644
--- a/app/src/main/java/com/example/thrifty/adapters/KidsClothesAdapter.java
+++ b/app/src/main/java/com/example/thrifty/adapters/KidsClothesAdapter.java
@@ -36,7 +36,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
TextView price = holder.itemView.findViewById(R.id.price);
title.setText(holder.product.getTitle());
- category.setText(holder.product.getCategoryId());
+// category.setText(holder.product.getCategoryId());
price.setText(holder.product.getPrice());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@@ -44,7 +44,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
public void onClick(View view) {
Intent goToDetails = new Intent(view.getContext(), ProductView.class);
goToDetails.putExtra("Title",products.get(position).getTitle());
- goToDetails.putExtra("category",products.get(position).getCategoryId());
+// goToDetails.putExtra("category",products.get(position).getCategoryId());
goToDetails.putExtra("price", products.get(position).getPrice());
view.getContext().startActivity(goToDetails);
diff --git a/app/src/main/java/com/example/thrifty/adapters/MenClothesAdapter.java b/app/src/main/java/com/example/thrifty/adapters/MenClothesAdapter.java
index 407eedb..d534b6d 100644
--- a/app/src/main/java/com/example/thrifty/adapters/MenClothesAdapter.java
+++ b/app/src/main/java/com/example/thrifty/adapters/MenClothesAdapter.java
@@ -36,7 +36,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
TextView price = holder.itemView.findViewById(R.id.price);
title.setText(holder.product.getTitle());
- category.setText(holder.product.getCategoryId());
+// category.setText(holder.product.getCategoryId());
price.setText(holder.product.getPrice());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@@ -44,7 +44,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
public void onClick(View view) {
Intent goToDetails = new Intent(view.getContext(), ProductView.class);
goToDetails.putExtra("Title",products.get(position).getTitle());
- goToDetails.putExtra("category",products.get(position).getCategoryId());
+// goToDetails.putExtra("category",products.get(position).getCategoryId());
goToDetails.putExtra("price", products.get(position).getPrice());
view.getContext().startActivity(goToDetails);
diff --git a/app/src/main/java/com/example/thrifty/adapters/NewItemsAdapter.java b/app/src/main/java/com/example/thrifty/adapters/NewItemsAdapter.java
index 7b70297..f78c4fb 100644
--- a/app/src/main/java/com/example/thrifty/adapters/NewItemsAdapter.java
+++ b/app/src/main/java/com/example/thrifty/adapters/NewItemsAdapter.java
@@ -10,6 +10,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
+import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
@@ -18,7 +19,7 @@
import com.amplifyframework.api.graphql.model.ModelMutation;
import com.amplifyframework.core.Amplify;
-import com.amplifyframework.datastore.generated.model.Favorite;
+//import com.amplifyframework.datastore.generated.model.Favorite;
import com.amplifyframework.datastore.generated.model.Product;
import java.util.ArrayList;
@@ -27,14 +28,14 @@
import com.example.thrifty.MainActivity;
import com.example.thrifty.ProductView;
import com.example.thrifty.R;
-
-
+import com.example.thrifty.emergency.Products;
+import com.squareup.picasso.Picasso;
public class NewItemsAdapter extends RecyclerView.Adapter {
- List products = new ArrayList<>();
+ List products = new ArrayList<>();
- public NewItemsAdapter(List products, MainActivity mainActivity){
+ public NewItemsAdapter(List products, MainActivity mainActivity){
this.products = products;
}
@@ -48,10 +49,12 @@ public NewItemsHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType
@Override
public void onBindViewHolder(@NonNull NewItemsHolder holder, @SuppressLint("RecyclerView") int position) {
+// holder.product = products.get(position);
holder.product = products.get(position);
TextView title = holder.itemView.findViewById(R.id.titlefrag1);
TextView category = holder.itemView.findViewById(R.id.categoryfrag);
TextView price = holder.itemView.findViewById(R.id.price);
+ ImageView image = holder.itemView.findViewById(R.id.idIVCourseImage);
// TextView email = holder.itemView.findViewById(R.id.editTextTextPersonName6);
Button btn = holder.itemView.findViewById(R.id.button2);
@@ -59,29 +62,30 @@ public void onBindViewHolder(@NonNull NewItemsHolder holder, @SuppressLint("Recy
@Override
public void onClick(View view) {
Toast.makeText(view.getContext(), "fav Button Clicked", Toast.LENGTH_LONG).show();
- String name = title.getText().toString();
- String cat = category.getText().toString();
-// String emailText = email.getText().toString();
- Favorite favorite = new Favorite.Builder()
- .titleFav(name)
- .imageFav("categoryFav")
- .priceFav("15")
- .sizeFav("15")
- .categoryFav(cat)
- .userId("emailText")
- .build();
- Amplify.API.mutate(
- ModelMutation.create(favorite),
- response -> Log.i("MyAmplifyApp", "Added Todo with id: " + response.getData().getId()),
- error -> Log.e("MyAmplifyApp", "Create failed", error)
-
- );
+// String name = title.getText().toString();
+// String cat = category.getText().toString();
+//// String emailText = email.getText().toString();
+// Favorite favorite = new Favorite.Builder()
+// .titleFav(name)
+// .imageFav("categoryFav")
+// .priceFav("15")
+// .sizeFav("15")
+// .categoryFav(cat)
+// .userId("emailText")
+// .build();
+// Amplify.API.mutate(
+// ModelMutation.create(favorite),
+// response -> Log.i("MyAmplifyApp", "Added Todo with id: " + response.getData().getId()),
+// error -> Log.e("MyAmplifyApp", "Create failed", error)
+//
+// );
}
});
title.setText(holder.product.getTitle());
- category.setText(holder.product.getCategoryId());
+// category.setText(holder.product.getCategoryId());
price.setText(holder.product.getPrice());
+ Picasso.get().load(holder.product.getImageUrl()).into(image);
holder.itemView.findViewById(R.id.card).setOnClickListener(new View.OnClickListener() {
@@ -89,7 +93,8 @@ public void onClick(View view) {
public void onClick(View view) {
Intent goToDetails = new Intent(view.getContext(), ProductView.class);
goToDetails.putExtra("Title",products.get(position).getTitle());
- goToDetails.putExtra("category",products.get(position).getCategoryId());
+// goToDetails.putExtra("category",products.get(position).getCategoryId());
+ goToDetails.putExtra("Description",products.get(position).getDescription());
goToDetails.putExtra("price", products.get(position).getPrice());
view.getContext().startActivity(goToDetails);
@@ -104,7 +109,7 @@ public int getItemCount() {
}
public static class NewItemsHolder extends RecyclerView.ViewHolder{
- public Product product;
+ public Products product;
public View itemView;
public NewItemsHolder(@NonNull View itemView) {
super(itemView);
diff --git a/app/src/main/java/com/example/thrifty/adapters/WatchesAdapter.java b/app/src/main/java/com/example/thrifty/adapters/WatchesAdapter.java
index ff6e8dc..9a09638 100644
--- a/app/src/main/java/com/example/thrifty/adapters/WatchesAdapter.java
+++ b/app/src/main/java/com/example/thrifty/adapters/WatchesAdapter.java
@@ -36,7 +36,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
TextView price = holder.itemView.findViewById(R.id.price);
title.setText(holder.product.getTitle());
- category.setText(holder.product.getCategoryId());
+// category.setText(holder.product.getCategoryId());
price.setText(holder.product.getPrice());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@@ -44,7 +44,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
public void onClick(View view) {
Intent goToDetails = new Intent(view.getContext(), ProductView.class);
goToDetails.putExtra("Title",products.get(position).getTitle());
- goToDetails.putExtra("category",products.get(position).getCategoryId());
+// goToDetails.putExtra("category",products.get(position).getCategoryId());
goToDetails.putExtra("price", products.get(position).getPrice());
view.getContext().startActivity(goToDetails);
diff --git a/app/src/main/java/com/example/thrifty/adapters/WomenClothesAdapter.java b/app/src/main/java/com/example/thrifty/adapters/WomenClothesAdapter.java
index 7ba2550..26c9c75 100644
--- a/app/src/main/java/com/example/thrifty/adapters/WomenClothesAdapter.java
+++ b/app/src/main/java/com/example/thrifty/adapters/WomenClothesAdapter.java
@@ -34,7 +34,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
TextView price = holder.itemView.findViewById(R.id.price);
title.setText(holder.product.getTitle());
- category.setText(holder.product.getCategoryId());
+// category.setText(holder.product.getCategoryId());
price.setText(holder.product.getPrice());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@@ -42,7 +42,7 @@ public void onBindViewHolder(CategorizedProductHolder holder, @SuppressLint("Rec
public void onClick(View view) {
Intent goToDetails = new Intent(view.getContext(), ProductView.class);
goToDetails.putExtra("Title",products.get(position).getTitle());
- goToDetails.putExtra("category",products.get(position).getCategoryId());
+// goToDetails.putExtra("category",products.get(position).getCategoryId());
goToDetails.putExtra("price", products.get(position).getPrice());
view.getContext().startActivity(goToDetails);
diff --git a/app/src/main/java/com/example/thrifty/emergency/Products.java b/app/src/main/java/com/example/thrifty/emergency/Products.java
new file mode 100644
index 0000000..d70ce86
--- /dev/null
+++ b/app/src/main/java/com/example/thrifty/emergency/Products.java
@@ -0,0 +1,58 @@
+package com.example.thrifty.emergency;
+
+public class Products {
+
+ private int id;
+ private String title;
+ private String price;
+ private String description;
+ private String imageUrl;
+
+ public Products( String title, String price, String description, String imageUrl) {
+ this.id = Utils.getID();
+ this.title = title;
+ this.price = price;
+ this.description = description;
+ this.imageUrl = imageUrl;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getPrice() {
+ return price;
+ }
+
+ public void setPrice(String price) {
+ this.price = price;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getImageUrl() {
+ return imageUrl;
+ }
+
+ public void setImageUrl(String imageUrl) {
+ this.imageUrl = imageUrl;
+ }
+}
diff --git a/app/src/main/java/com/example/thrifty/emergency/Utils.java b/app/src/main/java/com/example/thrifty/emergency/Utils.java
new file mode 100644
index 0000000..f69f464
--- /dev/null
+++ b/app/src/main/java/com/example/thrifty/emergency/Utils.java
@@ -0,0 +1,53 @@
+package com.example.thrifty.emergency;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+
+public class Utils {
+
+ private static int ID = 0;
+ private static final String ALL_ITEMS_KEY = "all_items";
+ private static final String DB_NAME = "fake_DB";
+ private static Gson gson = new Gson();
+ private static Type productListType = new TypeToken>(){}.getType();
+
+ public static void initSharedPreferences(Context context){
+ SharedPreferences sharedPreferences = context.getSharedPreferences(DB_NAME,context.MODE_PRIVATE);
+ ArrayList products = gson.fromJson(sharedPreferences.getString(ALL_ITEMS_KEY,null),productListType);
+ if (null == products){
+ initItems(context);
+ }
+ }
+
+ private static void initItems(Context context) {
+ ArrayList allProducts = new ArrayList<>();
+ Products shorts = new Products("Adidas Shorts",
+ "20$",
+ "This is good for football matches",
+ "https://assets.adidas.com/images/h_840,f_auto,q_auto:sensitive,fl_lossy,c_fill,g_auto/6980a04f4ad24115bbbaa88d01220ab4_9366/3-Stripes_Shorts_Black_DH5798_21_model.jpg");
+
+ allProducts.add(shorts);
+
+ SharedPreferences sharedPreferences = context.getSharedPreferences(DB_NAME,context.MODE_PRIVATE);
+ SharedPreferences.Editor editor = sharedPreferences.edit();
+ editor.putString(ALL_ITEMS_KEY, gson.toJson(allProducts));
+ editor.commit();
+ }
+
+ public static ArrayList getAllProducts(Context context){
+ SharedPreferences sharedPreferences = context.getSharedPreferences(DB_NAME,context.MODE_PRIVATE);
+ ArrayList products = gson.fromJson(sharedPreferences.getString(ALL_ITEMS_KEY,null),productListType);
+ return products;
+ }
+
+ public static int getID() {
+ ID++;
+ return ID;
+ }
+}
diff --git a/app/src/main/java/com/example/thrifty/fragments/FirstCartFragment.java b/app/src/main/java/com/example/thrifty/fragments/FirstCartFragment.java
new file mode 100644
index 0000000..54ced37
--- /dev/null
+++ b/app/src/main/java/com/example/thrifty/fragments/FirstCartFragment.java
@@ -0,0 +1,54 @@
+package com.example.thrifty.fragments;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.amplifyframework.datastore.generated.model.Product;
+import com.example.thrifty.CartActivity;
+import com.example.thrifty.R;
+import com.example.thrifty.adapters.CartAdapter;
+
+public class FirstCartFragment extends Fragment implements CartAdapter.DeleteItem {
+
+ private RecyclerView recyclerView;
+ private TextView txtTotalPrice, txtNoItems;
+ private Button nextButton;
+ private RelativeLayout relativeLayout;
+
+ private CartAdapter cartAdapter;
+
+ @Nullable
+ @Override
+ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+ View view = inflater.inflate(R.layout.first_cart_fragment, container, false);
+ initViews(view);
+ cartAdapter = new CartAdapter(this, getActivity());
+ recyclerView.setAdapter(cartAdapter);
+ recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
+ return view;
+ }
+
+ private void initViews(View view){
+ recyclerView = view.findViewById(R.id.recyclerView);
+ txtTotalPrice = view.findViewById(R.id.txtTotalPrice);
+ txtNoItems = view.findViewById(R.id.txtNoItems);
+ nextButton = view.findViewById(R.id.nextButton);
+ relativeLayout = view.findViewById(R.id.itemsRelLayout);
+ }
+
+ @Override
+ public void onDeleteItem(Product product) {
+
+ }
+}
diff --git a/app/src/main/res/drawable/button_selector.xml b/app/src/main/res/drawable/button_selector.xml
new file mode 100644
index 0000000..f780d52
--- /dev/null
+++ b/app/src/main/res/drawable/button_selector.xml
@@ -0,0 +1,24 @@
+
+
+ -
+
+
-
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_baseline_delete_24.xml b/app/src/main/res/drawable/ic_baseline_delete_24.xml
new file mode 100644
index 0000000..3c4030b
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_delete_24.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/tab_color.xml b/app/src/main/res/drawable/tab_color.xml
new file mode 100644
index 0000000..d99c24f
--- /dev/null
+++ b/app/src/main/res/drawable/tab_color.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_cart.xml b/app/src/main/res/layout/activity_cart.xml
new file mode 100644
index 0000000..a50dbab
--- /dev/null
+++ b/app/src/main/res/layout/activity_cart.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 2ae910d..48976f1 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -117,6 +117,8 @@
android:id="@+id/bottomNavigationView"
android:layout_width="match_parent"
android:layout_height="75dp"
+ app:itemIconTint="@drawable/tab_color"
+ app:itemTextColor="@drawable/tab_color"
android:layout_alignParentBottom="true"
app:menu="@menu/bottom_nav_menu" />
diff --git a/app/src/main/res/layout/activity_product_view.xml b/app/src/main/res/layout/activity_product_view.xml
index 7a42762..8023666 100644
--- a/app/src/main/res/layout/activity_product_view.xml
+++ b/app/src/main/res/layout/activity_product_view.xml
@@ -29,11 +29,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar"
- android:text="Add To Cart"
+ android:layout_marginStart="20dp"
+ android:layout_marginEnd="20dp"
android:elevation="5dp"
android:padding="10dp"
- android:layout_marginStart="20dp"
- android:layout_marginEnd="20dp"/>
+ android:text="Add To Cart" />