1.10.0 • Published 6 months ago

solar-configurator-microsite-offset-service v1.10.0

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Offset Service (BFF - Backend for Frontend)

This service handles any Salesforce interactions for the solar configurator front-end, including getting offset information, access token.

This app was created with a cdk init --language=typescript and modified from there.

Please see the companion Postman collection for demonstration on use.

Useful commands

These commands from the CDK init boilerplate

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

Deploying

This package runs within the Lerna-controlled monorepo, and is deployed by using GitHub Actions from the root directory of the repository (../.github/workflows).

Service Endpoint details

Get Offset

This endpoint returns the offset data from SFDC and an access token that can be used for other endpoints that need authorization.

Request

POST /ecomm-offset/offset
type body = {
  address: string;
  state: string;
  utility: string;
};

Response

type response = {
  access_token: string; // JWT
  maxBatteriesAllowed: number;
  maxProductionOffset: number;
  statesAllowed: Array<string>;
};

AWS Resources

Dashboard

EnvironmentURL
Productionprd-Quote-Dashboard
Stagingmajstg-Quote-Dashboard
Developmentdevmaj-Quote-Dashboard

Lambdas

Get JWT Function

EnvironmentURL
Productionprd-GetJWT
Stagingmajstg-GetJWT
Developmentdevmaj-GetJWT

Offset Rules Function

EnvironmentURL
Productionprd-OffsetRules
Stagingmajstg-OffsetRules
Developmentdevmaj-OffsetRules

Disaster Recovery

Please read the disaster recovery plan.

1.10.0

6 months ago

1.9.1

1 year ago

1.9.0

1 year ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.0.0

2 years ago