0.2.8 • Published 8 months ago

@logi.one/document-client-gcp-secret v0.2.8

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

LogiONE Document Client with GCP Secret

This package add support for storing refresh token of LogiONE Document's API's client

@logi.one/document-client www.logi.one/document

Install

npm install @logi.one/document-client-gcp-secret

Quick start

Store the API key into Google Cloud Platform using Secret Manager

Then use createLogiONEDocumentClientWithGCPSecret to create a client instance.

It will read the API key from the secret. The client will automatically refresh the token when it expires and save it to the same secret.

const { createLogiONEDocumentClientWithGCPSecret } = require('@logi.one/document-client-gcp-secret')

async function run() {    
    const secretName = 'projects/my-project/logione-doc-refreshtoken'
    const client = await createLogiONEDocumentClientWithGCPSecret(secretName)     
    const documents = await client.search('documents', { limit: 10, columnFilters: [{ column: 'extension', value: 'docx', match: true }] })     
    console.table(documents)
}

run()

Need for support

If you need support, please feel free to contact us at info@logi.one. We will be happy to help you.

0.2.8

8 months ago

0.2.7

8 months ago

0.2.6

8 months ago

0.2.5

8 months ago

0.2.4

8 months ago

0.2.3

8 months ago