@curiovision/gwao-nodejs
v1.4.0
Published
Node.js TypeScript types library for Google Workspace Add-Ons for Alternate Runtimes.
Downloads
1
Readme
GWAO Node.js Types
This package contains TypeScript types for the Google Workspace Add-ons for Alternate Runtimes API. To my knowledge, there is no official package for the Google Workspace Add-ons for Alternate Runtimes API. This package fills that gap.
There are two main types of exports:
- Cards (see RenderActions)
- Based on google.apps.card.v1
- Events (see EventObject)
TODO: Organize exports to delineate Cards vs Event exports (bonus, also delineate v1 cards in anticipation of a v2 from Google.)
Development
Building
To build, run npm run build
. You can also run npm run build:watch
to automatically rebuild the code whenever changes are made.
Tests
Since this is just a types library, I haven't added a testing framework. Instead, the *.spec.ts
files provide a place to write example assignments using each type. We can then use IDE typechecking/typescript build in order to ensure the given types behave as expected.
In most cases, the assignments in the *.spec.ts
files have been pulled straight from example JSON snippets within the official Google documentation.
Publishing to NPM
This repository is setup with a Github Action to automatically publish to NPM for every tagged release. To use it, run:
npm version [minor|patch]
git push
git push --tags