Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@squarecloud/api-types

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squarecloud/api-types

Typings for Square Cloud API

  • 0.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
256
decreased by-26.44%
Maintainers
0
Weekly downloads
 
Created
Source

Square Cloud API Types

Simple type definitions for the Square Cloud API.

GitHub npm

Installation

Install with npm / yarn / pnpm:

npm install @squarecloud/api-types
yarn add @squarecloud/api-types
pnpm add @squarecloud/api-types

Getting Started

Using these type definitions is straightforward. You just need to specify the desired API version by appending /v* to the import path, where * represents your chosen API version. Here are some usage examples:

// Importing the API definitions for version 2
import { APIApplication } from '@squarecloud/api-types/v2';

You can also opt to import only the specific parts of the module that you need. Your choices include common, utils, payloads/v*, rest/v*. Here are examples:

// Importing a specific REST endpoint for version 2
import { RESTPostAPIApplicationCommitQuery } from '@squarecloud/api-types/rest/v2';

Note: The v* exports (@squarecloud/api-types/v*) include the relevant version of payloads and rest, alongside the common and utils exports.

Project Structure

The exported types for each API version are organized into two main categories:

  • Types with an API prefix represent payloads you may receive from the REST API.
  • Types with a REST prefix represent data that is sent to and received from the REST API.

For endpoint options in the REST category, they follow a specific structure: REST<HTTP Method><Type><Query|(JSON|FormData)Body|Result|ResultPayload>, where the type indicates the expected return data. For example, RESTPostAPIApplicationCommitQuery or RESTPostAPIApplicationUploadResult.

  • If a type name ends with Result, it represents the expected result when calling its corresponding route.
  • If a type name ends with ResultPayload, it represents the raw result you can expect when calling its corresponding route.

Keywords

FAQs

Package last updated on 04 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc