@reapit-cdk/reapit-product
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@reapit-cdk/reapit-product

npm version npm downloads coverage: 0%25 Integ Tests: X

Creates a product in the organisations service

Package Installation:

yarn add --dev @reapit-cdk/reapit-product
# or
npm install @reapit-cdk/reapit-product --save-dev

Usage

import { CfnOutput, Stack, App } from 'aws-cdk-lib'
import { ReapitProductProvider } from '@reapit-cdk/reapit-product'
import { RestApi } from 'aws-cdk-lib/aws-apigateway'

const app = new App()
const stack = new Stack(app, 'stack-name')

const orgsApiGwId = '' // imported from somewhere or hard coded

const organisationsServiceApiGateway = RestApi.fromRestApiId(stack, 'orgs-api-gw', orgsApiGwId)

const productProvider = new ReapitProductProvider(stack, 'product-provider', {
  organisationsServiceApiGateway,
  stageName: 'api',
})

const product = productProvider.createProduct(stack, 'product', {
  name: 'a product name',
  callbackUrls: [],
  grant: 'authorizationCode',
  isInternalApp: true,
  requiresUserAdmin: false,
  scopes: [],
  signoutUrls: [],
})

new CfnOutput(stack, 'client-id', {
  value: product.externalId,
})

Readme

Keywords

Package Sidebar

Install

npm i @reapit-cdk/reapit-product

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

174 kB

Total Files

12

Last publish

Collaborators

  • joshbalfour