JSPM

permify-typescript

1.6.9
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4247
  • Score
    100M100P100Q124140F
  • License Apache-2.0

TypeScript client for Permify.

Package Exports

  • permify-typescript

Readme

permify-typescript

TypeScript Client for Permify which is an open source authorization service for creating fine-grained and scalable authorization systems.

This TypeScript package is automatically generated by the OpenAPI Generator project.

Requirements.

  • TypeScript
  • npm

Installation

To include the SDK in your project, install the package from npm:

npm i permify-typescript

Getting Started

import * as permify from "permify-typescript";

const configuration = new permify.Configuration({
    basePath: "http://localhost:3476",
    headers: {
        'Authorization': "Bearer ***"
    }
})

const apiInstance = new permify.TenancyApi(configuration);

let tenantId = "tenant_id_example"; 

apiInstance.tenantsCreate({
    body: {
        id: tenantId,
        name: "Tenant 1"
    }
}).then((data) => {
    console.log('API called successfully. Returned data: ' + data.tenant);
}).catch((error) => console.error(error));

Development

npm install
npm run build
npm test

To run the live REST tests against a local Permify instance started via Docker Compose:

npm run run-instance

Author

hello@permify.co