npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

acme-typescript-sdk

v1.0.8

Published

Client for OpenAPI Petstore

Downloads

3

Readme

Visit Acme

Acme

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.

npm

Table of Contents

Installation

npm i acme-typescript-sdk
pnpm i acme-typescript-sdk
yarn add acme-typescript-sdk

Getting Started

import { Acme } from "acme-typescript-sdk";

const acme = new Acme({
  // Defining the base path is optional and defaults to https://petstore.swagger.io/v2
  // basePath: "https://petstore.swagger.io/v2",
  apiKey: "API_KEY",
  accessToken: "ACCESS_TOKEN",
});

const paginateResponse = await acme.miscellaneous.paginate({});

console.log(paginateResponse);

Reference

acme.miscellaneous.paginate

Iterate through a bunch of items

🛠️ Usage

const paginateResponse = await acme.miscellaneous.paginate({});

⚙️ Parameters

first: number
after: string

🔄 Return

PaginateResponse

🌐 Endpoint

/pagination GET

🔙 Back to Table of Contents


acme.pet.add

🛠️ Usage

const addResponse = await acme.pet.add({
  name: "doggie",
  photoUrls: ["photoUrls_example"],
  status: "available",
});

⚙️ Parameters

name: string
photoUrls: string[]
tags: Tag[]
id: number
category: Category
status: string

pet status in the store

🔄 Return

Pet

🌐 Endpoint

/pet POST

🔙 Back to Table of Contents


acme.pet.delete

🛠️ Usage

const deleteResponse = await acme.pet.delete({
  petId: 1,
});

⚙️ Parameters

petId: number

Pet id to delete

🌐 Endpoint

/pet/{petId} DELETE

🔙 Back to Table of Contents


acme.pet.findByStatus

Multiple status values can be provided with comma separated strings

🛠️ Usage

const findByStatusResponse = await acme.pet.findByStatus({
  status: ["available"],
});

⚙️ Parameters

status: string[]

Status values that need to be considered for filter

🔄 Return

Pet

🌐 Endpoint

/pet/findByStatus GET

🔙 Back to Table of Contents


acme.pet.findByTags

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

🛠️ Usage

const findByTagsResponse = await acme.pet.findByTags({
  tags: ["tags_example"],
});

⚙️ Parameters

tags: string[]

Tags to filter by

🔄 Return

Pet

🌐 Endpoint

/pet/findByTags GET

🔙 Back to Table of Contents


acme.pet.getById

Returns a single pet

🛠️ Usage

const getByIdResponse = await acme.pet.getById({
  petId: 1,
});

⚙️ Parameters

petId: number

ID of pet to return

🔄 Return

Pet

🌐 Endpoint

/pet/{petId} GET

🔙 Back to Table of Contents


acme.pet.update

🛠️ Usage

const updateResponse = await acme.pet.update({
  name: "doggie",
  photoUrls: ["photoUrls_example"],
  status: "available",
});

⚙️ Parameters

name: string
photoUrls: string[]
tags: Tag[]
id: number
category: Category
status: string

pet status in the store

🔄 Return

Pet

🌐 Endpoint

/pet PUT

🔙 Back to Table of Contents


acme.pet.updateWithForm

🛠️ Usage

const updateWithFormResponse = await acme.pet.updateWithForm({
  petId: 1,
});

⚙️ Parameters

petId: number

ID of pet that needs to be updated

name: string

Updated name of the pet

status: string

Updated status of the pet

🌐 Endpoint

/pet/{petId} POST

🔙 Back to Table of Contents


acme.pet.uploadImage

🛠️ Usage

const uploadImageResponse = await acme.pet.uploadImage({
  petId: 1,
});

⚙️ Parameters

petId: number

ID of pet to update

additionalMetadata: string

Additional data to pass to server

file: Uint8Array | File | buffer.File

file to upload

🔄 Return

ApiResponse

🌐 Endpoint

/pet/{petId}/uploadImage POST

🔙 Back to Table of Contents


acme.store.deleteOrder

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

🛠️ Usage

const deleteOrderResponse = await acme.store.deleteOrder({
  orderId: "orderId_example",
});

⚙️ Parameters

orderId: string

ID of the order that needs to be deleted

🌐 Endpoint

/store/order/{orderId} DELETE

🔙 Back to Table of Contents


acme.store.getInventory

Returns a map of status codes to quantities

🛠️ Usage

const getInventoryResponse = await acme.store.getInventory();

🌐 Endpoint

/store/inventory GET

🔙 Back to Table of Contents


acme.store.getOrderById

For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions

🛠️ Usage

const getOrderByIdResponse = await acme.store.getOrderById({
  orderId: 1,
});

⚙️ Parameters

orderId: number

ID of pet that needs to be fetched

🔄 Return

Order

🌐 Endpoint

/store/order/{orderId} GET

🔙 Back to Table of Contents


acme.store.placeOrder

🛠️ Usage

const placeOrderResponse = await acme.store.placeOrder({
  status: "placed",
  complete: false,
});

⚙️ Parameters

id: number
petId: number
quantity: number
shipDate: string
status: string

Order Status

complete: boolean

🔄 Return

Order

🌐 Endpoint

/store/order POST

🔙 Back to Table of Contents


acme.user.create

This can only be done by the logged in user.

🛠️ Usage

const createResponse = await acme.user.create({});

⚙️ Parameters

id: number
username: string
firstName: string
lastName: string
email: string
password: string
phone: string
userStatus: number

User Status

🌐 Endpoint

/user POST

🔙 Back to Table of Contents


acme.user.createWithArray

🛠️ Usage

const createWithArrayResponse = await acme.user.createWithArray([{}]);

⚙️ Request Body

User[]

List of user object

🌐 Endpoint

/user/createWithArray POST

🔙 Back to Table of Contents


acme.user.createWithList

🛠️ Usage

const createWithListResponse = await acme.user.createWithList([{}]);

⚙️ Request Body

User[]

List of user object

🌐 Endpoint

/user/createWithList POST

🔙 Back to Table of Contents


acme.user.delete

This can only be done by the logged in user.

🛠️ Usage

const deleteResponse = await acme.user.delete({
  username: "username_example",
});

⚙️ Parameters

username: string

The name that needs to be deleted

🌐 Endpoint

/user/{username} DELETE

🔙 Back to Table of Contents


acme.user.getByName

🛠️ Usage

const getByNameResponse = await acme.user.getByName({
  username: "username_example",
});

⚙️ Parameters

username: string

The name that needs to be fetched. Use user1 for testing.

🔄 Return

User

🌐 Endpoint

/user/{username} GET

🔙 Back to Table of Contents


acme.user.login

🛠️ Usage

const loginResponse = await acme.user.login({
  username:
    "CbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5awLMdeXylwK0lMGUSM4jsrh4dstlnQUN5vVdMLPA",
  password: "password_example",
});

⚙️ Parameters

username: string

The user name for login

password: string

The password for login in clear text

🌐 Endpoint

/user/login GET

🔙 Back to Table of Contents


acme.user.logout

🛠️ Usage

const logoutResponse = await acme.user.logout();

🌐 Endpoint

/user/logout GET

🔙 Back to Table of Contents


acme.user.update

This can only be done by the logged in user.

🛠️ Usage

const updateResponse = await acme.user.update({
  username: "username_example",
});

⚙️ Parameters

username: string

name that need to be deleted

id: number
firstName: string
lastName: string
email: string
password: string
phone: string
userStatus: number

User Status

🌐 Endpoint

/user/{username} PUT

🔙 Back to Table of Contents


Author

This TypeScript package is automatically generated by Konfig