1.0.0 • Published 3 years ago
@privatedataservices/metronome v1.0.0
@
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 buildPublishing
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 --saveunPublished (not recommended):
npm install PATH_TO_GENERATED_PACKAGE --saveUsage
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
1.0.0
3 years ago