jsonhub-sdk
v1.0.0
Published
OpenAPI client for jsonhub-sdk
Downloads
16
Maintainers
Readme
[email protected]
A TypeScript SDK client for the localhost API.
Usage
First, install the SDK from npm.
npm install jsonhub-sdk --saveNext, try it out.
import {
Configuration,
DefinitionApi,
} from 'jsonhub-sdk';
import type { ApiDefinitionsGetCollectionRequest } from 'jsonhub-sdk';
async function example() {
console.log("🚀 Testing jsonhub-sdk SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: access_token
accessToken: "YOUR BEARER TOKEN",
});
const api = new DefinitionApi(config);
const body = {
// string | Filter by slug/id (partial match) (optional)
qid: qid_example,
// boolean | Show only definitions owned by the current user (optional)
owned: true,
// boolean | Show only Root Definitions (definitions without a Parent Entity) (optional)
root: true,
// number | The collection page number (optional)
page: 56,
// number | The number of items per page (optional)
limit: 56,
// Array<string> | Allows you to reduce the response to contain only the properties you need. If your desired property is nested, you can address it using nested arrays. Example: properties[]={propertyName}&properties[]={anotherPropertyName}&properties[{nestedPropertyParent}][]={nestedProperty} (optional)
properties: ...,
// string | Filter by parentEntity (uuid) (optional)
parentEntity: parentEntity_example,
} satisfies ApiDefinitionsGetCollectionRequest;
try {
const data = await api.apiDefinitionsGetCollection(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- DefinitionApi | apiDefinitionsGetCollection | GET /api/definitions | Retrieves the collection of definition resources. DefinitionApi | apiDefinitionsIdDelete | DELETE /api/definitions/{id} | Removes the definition resource. DefinitionApi | apiDefinitionsIdGet | GET /api/definitions/{id} | Retrieves a definition resource. DefinitionApi | apiDefinitionsIdPatch | PATCH /api/definitions/{id} | Updates the definition resource. DefinitionApi | apiDefinitionsPost | POST /api/definitions | Creates a definition resource. EntityApi | apiEntitiesGetCollection | GET /api/entities | Retrieves the collection of entity resources. EntityApi | apiEntitiesIdDelete | DELETE /api/entities/{id} | Removes the entity resource. EntityApi | apiEntitiesIdGet | GET /api/entities/{id} | Retrieves a entity resource. EntityApi | apiEntitiesIdPatch | PATCH /api/entities/{id} | Updates the entity resource. EntityApi | apiEntitiesPost | POST /api/entities | Creates a entity resource. Oauth2Api | oauth2Authorize | GET /oauth2/authorize | Start OAuth authorization Oauth2Api | oauth2Jwks | GET /oauth2/jwks | Get OAuth signing keys Oauth2Api | oauth2Metadata | GET /.well-known/oauth-authorization-server | OAuth2 authorization server metadata Oauth2Api | oauth2Register | POST /oauth2/register | Register OAuth client Oauth2Api | oauth2Revoke | POST /oauth2/revoke | Revoke OAuth consent Oauth2Api | oauth2Token | POST /oauth2/token | Exchange authorization code Oauth2Api | oauth2TokenExchange | POST /oauth2/token-exchange | Exchange MCP token for JsonHub API token PersonalAccessTokenApi | apiMeapiTokensGetCollection | GET /api/me/api-tokens | Retrieves the collection of personal access token resources. PersonalAccessTokenApi | apiMeapiTokensIdDelete | DELETE /api/me/api-tokens/{id} | Removes the personal access token resource. PersonalAccessTokenApi | apiMeapiTokensIdPatch | PATCH /api/me/api-tokens/{id} | Updates the personal access token resource. PersonalAccessTokenApi | apiMeapiTokensPost | POST /api/me/api-tokens | Creates a personal access token resource. UserApi | apiUsersIdDelete | DELETE /api/users/{id} | Removes the user resource. UserApi | apiUsersIdPatch | PATCH /api/users/{id} | Updates the user resource. UserApi | apiUsersPost | POST /api/users | Creates a user resource. UserApi | apiUsersmeGet | GET /api/users/me | Get current user information UserApi | apiUsersresendActivationPost | POST /api/users/resend-activation | Resend activation email UserApi | apiUsersresetPasswordPost | POST /api/users/reset-password | Reset password (with token) UserApi | apiUserssendResetPasswordPost | POST /api/users/send-reset-password | Send reset password email
Models
- ApiDefinitionsGetCollection200Response
- ApiEntitiesGetCollection200Response
- ApiMeapiTokensGetCollection200Response
- ApiUsersmeGet200Response
- ConstraintViolation
- ConstraintViolationViolationsInner
- CurrentUserLimitUsage
- CurrentUserLimits
- DefinitionDefinitionRead
- DefinitionDefinitionWrite
- DefinitionDefinitionWriteJsonMergePatch
- DefinitionEntityReadEntityReadParent
- DefinitionJsonhalDefinitionRead
- EntityDefinitionRead
- EntityEntityCreate
- EntityEntityReadEntityReadParent
- EntityEntityUpdateJsonMergePatch
- EntityJsonhalEntityReadEntityReadParent
- HalCollectionBaseSchema
- HalCollectionBaseSchemaAllOfLinks
- HalCollectionBaseSchemaAllOfLinksFirst
- HalCollectionBaseSchemaNoPagination
- HalCollectionBaseSchemaNoPaginationEmbedded
- HalCollectionBaseSchemaNoPaginationEmbeddedAnyOf
- HalCollectionBaseSchemaNoPaginationLinks
- ModelError
- Oauth2Jwks200Response
- Oauth2Jwks200ResponseKeysInner
- Oauth2Metadata200Response
- Oauth2Register201Response
- Oauth2Register400Response
- Oauth2RegisterRequest
- Oauth2Token200Response
- Oauth2TokenExchange200Response
- PersonalAccessTokenJsonhalPersonalAccessTokenRead
- PersonalAccessTokenJsonhalPersonalAccessTokenReadPersonalAccessTokenCreateRead
- PersonalAccessTokenPersonalAccessTokenRead
- PersonalAccessTokenPersonalAccessTokenReadPersonalAccessTokenCreateRead
- PersonalAccessTokenPersonalAccessTokenWrite
- PersonalAccessTokenPersonalAccessTokenWriteJsonMergePatch
- User
- UserJsonhal
- UserJsonhalUserEmpty
- UserJsonhalUserRead
- UserUserCreate
- UserUserRead
- UserUserResendActivation
- UserUserResetPassword
- UserUserSendResetPassword
- UserUserUpdateJsonMergePatch
Authorization
Authentication schemes defined for the API:
access_token
- Type: HTTP Bearer Token authentication
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
0.11.0 - Package version:
0.11.0 - Generator version:
7.21.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish