ch-integratedservicesfunctionsapp-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Azure Functions App Client

Overview

Client libaray for CloudHospital.IntegratedServicesFunctionsApp Azure Functions App.

Usages

Install

$ npm i --save @cloudhospital/integratedservicesfunctionsapp.client

Example

import { CreateGitHubIssueClient } from '@cloudhospital/integratedservicesfunctionsapp.client';
import { type GitHubIssueRequestModel } from '@cloudhospital/integratedservicesfunctionsapp.client';

// ...

const createGitHubIssueClient = new CreateGitHubIssueClient({
    apiKey: '<api-key>',
    baseUrl: '<Base url of Azure Functions App>',
});

let model: GitHubIssueRequestModel;

try {
    throw new Error('Test error');
} catch (err) {
    if (err instanceof Error) {
        model = {
            owner: process.env.OWNER ?? '',
            repo: process.env.REPO ?? '',
            stage: process.env.STAGE ?? '',
            error: {
                message: err.message,
                stack: err.stack,
            },
        };

        await createGitHubIssueClient.requestAsync(model);
    }
}

Package Sidebar

Install

npm i ch-integratedservicesfunctionsapp-client

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

33.9 kB

Total Files

20

Last publish

Collaborators

  • cloudhospital