From 8e3aa34f541f8decbd00cbdf906ab60115daa5f3 Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Fri, 19 Apr 2024 20:43:03 +0530 Subject: [PATCH] fix(amplify-headless-interface): added lambda auth type to headless api payloads --- .../schemas/api/1/AddApiRequest.schema.json | 23 +++++++++++++++++++ .../api/1/UpdateApiRequest.schema.json | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json b/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json index 9fda5cb294e..703c63e1e14 100644 --- a/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json +++ b/packages/amplify-headless-interface/schemas/api/1/AddApiRequest.schema.json @@ -45,6 +45,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] }, @@ -64,6 +67,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] } @@ -144,6 +150,23 @@ }, "required": ["mode", "openIDClientID", "openIDIssuerURL", "openIDProviderName"] }, + "AppSyncLambdaAuthType": { + "description": "Specifies that the AppSync API should be secured using a Lambda Function.", + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["AWS_LAMBDA"] + }, + "lambdaFunction": { + "type": "string" + }, + "ttlSeconds": { + "type": "string" + } + }, + "required": ["mode", "lambdaFunction"] + }, "ConflictResolution": { "description": "Defines a strategy for resolving API write conflicts.", "type": "object", diff --git a/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json b/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json index a4cbb0a3d66..e66c1d10b69 100644 --- a/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json +++ b/packages/amplify-headless-interface/schemas/api/1/UpdateApiRequest.schema.json @@ -52,6 +52,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] }, @@ -71,6 +74,9 @@ }, { "$ref": "#/definitions/AppSyncOpenIDConnectAuthType" + }, + { + "$ref": "#/definitions/AppSyncLambdaAuthType" } ] } @@ -150,6 +156,23 @@ }, "required": ["mode", "openIDClientID", "openIDIssuerURL", "openIDProviderName"] }, + "AppSyncLambdaAuthType": { + "description": "Specifies that the AppSync API should be secured using a Lambda Function.", + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": ["AWS_LAMBDA"] + }, + "lambdaFunction": { + "type": "string" + }, + "ttlSeconds": { + "type": "string" + } + }, + "required": ["mode", "lambdaFunction"] + }, "ConflictResolution": { "description": "Defines a strategy for resolving API write conflicts.", "type": "object",