Sam Hulick
04/08/2022, 6:31 PMsst.Api
customDomain working:
Type '{ cdk: { domainName: string; certificate: acm.ICertificate; }; }' is not assignable to type 'string | ApiDomainProps | undefined'.
The types of 'cdk.domainName' are incompatible between these types.
Type 'string' is not assignable to type 'IDomainName'.ts(2345)
the documentation says domainName can be a string, yet it’s complaining about thatthdxr
04/08/2022, 6:35 PMcdk
propthdxr
04/08/2022, 6:35 PMSam Hulick
04/08/2022, 6:36 PMcertificate
prop it didn’t like, which does belong in cdk
Sam Hulick
04/08/2022, 6:37 PMType 'Record<string, ApiAuthorizer>' is not assignable to type 'Record<string, never>'.
'string' index signatures are incompatible.
Type 'ApiAuthorizer' is not assignable to type 'never'.
Type 'ApiUserPoolAuthorizer' is not assignable to type 'never'.ts(2322)
Sam Hulick
04/08/2022, 6:37 PMauthorizers: {
userPoolAuthorizer: {
type: 'user_pool',
userPool: {
id: props.cognitoAuth.cdk.userPool.userPoolId,
clientIds: [props.cognitoAuth.cdk.userPoolClient.userPoolClientId],
},
},
},
Sam Hulick
04/08/2022, 7:02 PMdefaults.authorizer
, the only values I can choose from are “iam” or “none”. but the docs seem to indicate I can specify my custom authorizerSam Hulick
04/08/2022, 7:08 PMthis.restApi = new sst.Api(…)
and had previously typed this as:
public readonly restApi: sst.Api;
but I had to change that to:
public readonly restApi: sst.Api<{
userPoolAuthorizer: {
type: 'user_pool';
userPool: {
id: any;
clientIds: any[];
};
};
}>;
and then it workedSam Hulick
04/08/2022, 7:27 PMtargets
definition here?
Type '{ function: { functionName: string; handler: string; environment: { GRAPHQL_ENDPOINT_URL: string; STAGING_BUCKET: string; }; permissions: ([GraphqlApi, string] | [Bucket, string])[]; }; }[]' is not assignable to type 'Record<string, Queue | FunctionInlineDefinition | EventBusFunctionTargetProps | EventBusQueueTargetProps>'.
Index signature for type 'string' is missing in type '{ function: { functionName: string; handler: string; environment: { GRAPHQL_ENDPOINT_URL: string; STAGING_BUCKET: string; }; permissions: ([GraphqlApi, string] | [Bucket, string])[]; }; }[]'.ts(2322)
Sam Hulick
04/08/2022, 7:35 PMFrank
Sam Hulick
04/10/2022, 10:13 PM