Privacy Information for Firebase Cloud Functions
npm install @sonicgarden/firebase-pi-countPrivacy Information for Firebase Cloud Functions
``sh`
npm install --save @sonicgarden/firebase-pi-count
// or
yarn add @sonicgarden/firebase-pi-count
`js
import { defineSecret } from 'firebase-functions/params';
import { piCount as _piCount } from '@sonicgarden/firebase-pi-count';
export piCount = functions
.runWith({ secrets: ['KINTONE_API_TOKEN'] })
.region('asia-northeast1')
.pubsub.schedule('0 0 1 ')
.timeZone('Asia/Tokyo')
.onRun(async () => {
const count = await fetch('.....');
// トークンはシークレットマネージャーで管理
const token = defineSecret('KINTONE_API_TOKEN').value();
await _piCount({
kintoneApiToken: token,
data: async () => ({
name: 'your project name',
count,
platform: 'firebase',
isImportantPrivateInfo: true,
paymentSystemName: 'stripe',
}),
});
});
`
| parameter | required | default value | note |
| --------------- | -------- | ------------- | -------------------------- |
| kintoneApiToken | yes | | kintone api access token |
| data | yes | | functions that return data |
`sh`
git tag -a v1.0.0 -m "My first version v1.0.0"
git push origin tags/v1.0.0
npm publish --access=public
`sh``
npm version patch # or minor or magor
git push origin tags/v1.0.1
npm publish --access=public