@privatedataservices/metronome
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@

This generator creates TypeScript/JavaScript client that utilizes fetch-api.

Patches

Code has been manually patched in models/ObjectSerializer.ts, models/GetManyApiKeys200Response.ts and models/GetManyPolicies200Response.ts to work around generator bugs that exist as of May 2023.

Building

To build and compile the typescript sources to javascript use:

npm install
npm run build

Publishing

First build the package then run npm publish

Consuming

Navigate to the folder of your consuming project and run one of the following commands.

published:

npm install @privatedataservices/metronome --save

unPublished (not recommended):

npm install PATH_TO_GENERATED_PACKAGE --save

Usage

Below code snippet shows exemplary usage of the configuration and the API.

import { AccessManagementApi, ServerConfiguration, createConfiguration } from "metronome-ts-client";

// Configure an API client.
const clientConfig = createConfiguration( {
    baseServer: new ServerConfiguration("YOUR-CUSTOMER-ID", "eu-north-1", {}, true),
    authMethods: { ApiKeyAuth: "YOUR_API_KEY" }
});
const amApiClient = new AccessManagementApi(clientConfig);

// Use the access management client
const response = await amApiClient.putApiKey("create", {name: "dpo-team-policy-manager", description: "Data Protection Office policy management key", permissions: ["policy-read", "policy-write"]});

Extensive examples can be found in the GitHub repository

Package Sidebar

Install

npm i @privatedataservices/metronome

Weekly Downloads

1

Version

1.0.0

License

Microsoft Public License https://opensource.org/license/ms-pl-html/

Unpacked Size

450 kB

Total Files

170

Last publish

Collaborators

  • privatedataservices