Skip to content

A JavaScript / TypeScript SDK for interacting with the Firmhouse GraphQL API in a structured and type-safe way.

License

Notifications You must be signed in to change notification settings

firmhouse/firmhouse-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firmhouse SDK

SDK

You can find the SDK project here.

Example Apps

Next.js

App Router

  • Example using the App Router can be found here.

  • It needs a project access token with Storefront Access type of a project with Product as a Service subscription. You can configure that through NEXT_PUBLIC_PLAN_BASED_FIRMHOUSE_STOREFRONT_ACCESS_TOKEN environment variable. You can create .env.local file in the root of the project and set the variable there. See example.env.local for an example.

  • You can start the example app by running:

    nx run nextjs-storefront-app-router:serve
  • You can check the example at https://firmhouse-sdk-nextjs-app-router.vercel.app/

Pages Router

  • Example using the Pages Router can be found here.

  • It needs a project access token with Storefront Access type of a project with Smart Order-based subscription. You can configure that through NEXT_PUBLIC_ORDER_BASED_FIRMHOUSE_STOREFRONT_ACCESS_TOKEN environment variable. You can create .env.local file in the root of the project and set the variable there. See example.env.local for an example.

  • You can start the example app by running:

    nx run nextjs-storefront-pages-router:serve
  • You can check the example at https://firmhouse-sdk-nextjs-pages-router.vercel.app/

Self Service Center App

  • A custom self service center example can be found here.

  • It can be used with both plan based and order based projects. It needs write access token for both those project types.

  • The following environment variables should be configured:

NEXT_ORDER_BASED_FIRMHOUSE_WRITE_ACCESS_TOKEN: Write access token for smart order based example

NEXT_PLAN_BASED_FIRMHOUSE_WRITE_ACCESS_TOKEN: Write access token for product as a service example

NEXT_SSC_JWT_SIGNING_KEY: JWT signing secret for the Self service center login tokens.

NEXT_PUBLIC_SITE_URL: Base URL for the self service center. It will be used for the email link.

About

A JavaScript / TypeScript SDK for interacting with the Firmhouse GraphQL API in a structured and type-safe way.

Topics

Resources

License

Stars

Watchers

Forks

Languages