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

@gramio/types

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gramio/types - npm Package Compare versions

Comparing version 7.3.3 to 7.3.4

15

out/index.d.ts

@@ -0,1 +1,16 @@

/**
* @module
*
* This module re-export another modules (+ export params as TelegramParams/objects as TelegramObjects)
*
* @example import
* ```typescript
* import { TelegramUser, SendMessageParams, APIMethods, APIMethodReturn } from "@gramio/types";
* ```
*
* Based on Bot API v7.3.0 (06.05.2024)
*
* Generated at 10.05.2024, 19:21:08 using [types](https://github.com/gramiojs/types) and [schema](https://ark0f.github.io/tg-bot-api) generators
*/
export type * from "./methods"

@@ -2,0 +17,0 @@ export type * from "./params"

21

out/methods.d.ts
/**
* Based on Bot API v7.3.0 (6.5.2024)
* Generated at 5/7/2024, 6:19:33 PM using [types](https://github.com/gramiojs/types) and [schema](https://ark0f.github.io/tg-bot-api) generators
* @module
*
* This module contains [API methods](https://core.telegram.org/bots/api#available-methods) types (functions map with input/output)
*
* @example import API methods map
* ```typescript
* import { APIMethods } from "@gramio/types/methods";
*
* type SendMessageReturn = Awaited<ReturnType<APIMethods["sendMessage"]>>;
* // ^? type SendMessageReturn = TelegramMessage"
* ```
*
* Based on Bot API v7.3.0 (06.05.2024)
*
* Generated at 10.05.2024, 19:21:08 using [types](https://github.com/gramiojs/types) and [schema](https://ark0f.github.io/tg-bot-api) generators
*/
import type {

@@ -13,2 +27,5 @@ CallAPIWithOptionalParams,

/**
* This object is a map of [API methods](https://core.telegram.org/bots/api#available-methods) types (functions map with input/output)
*/
export interface APIMethods {

@@ -15,0 +32,0 @@ /**

@@ -0,1 +1,21 @@

/**
* @module
*
* This module contains type-utils for convenient work
*
* @example import utils
* ```typescript
* import { APIMethodParams, APIMethodReturn } from "@gramio/types/utils";
*
* type SendMessageReturn = APIMethodReturn<"sendMessage">;
* // ^? type SendMessageReturn = TelegramMessage"
* type SendMessageParams = APIMethodParams<"sendMessage">;
* // ^? type SendMessageParams = SendMessageParams"
* ```
*
* Based on Bot API v7.3.0 (06.05.2024)
*
* Generated at 10.05.2024, 19:21:08 using [types](https://github.com/gramiojs/types) and [schema](https://ark0f.github.io/tg-bot-api) generators
*/
import type { APIMethods } from "./methods"

@@ -7,7 +27,21 @@

/**
* @example
* ```typescript
* type SendMessageParams = APIMethodParams<"sendMessage">;
* // ^? type SendMessageParams = SendMessageParams"
* ```
*/
export type APIMethodParams<APIMethod extends keyof APIMethods> = Parameters<
APIMethods[APIMethod]
>[0]
/**
* @example
* ```typescript
* type SendMessageReturn = APIMethodReturn<"sendMessage">;
* // ^? type SendMessageReturn = TelegramMessage"
* ```
*/
export type APIMethodReturn<APIMethod extends keyof APIMethods> = Awaited<
ReturnType<APIMethods[APIMethod]>
>

3

package.json
{
"name": "@gramio/types",
"version": "7.3.3",
"version": "7.3.4",
"homepage": "https://github.com/gramiojs/types",

@@ -36,2 +36,3 @@ "readme": "https://github.com/gramiojs/types",

"cicd": "bun scripts/cicd.ts",
"jsr": "bun scripts/release-jsr.ts",
"generate": "bun src/index.ts",

@@ -38,0 +39,0 @@ "lint": "bunx @biomejs/biome check ./src",

# Code-generated and Auto-published Telegram Bot API types
<div align="center">
[![Bot API](https://img.shields.io/badge/Bot%20API-7.3-blue?logo=telegram&style=flat&labelColor=000&color=3b82f6)](https://core.telegram.org/bots/api)
[![npm](https://img.shields.io/npm/v/@gramio/types?logo=npm&style=flat&labelColor=000&color=3b82f6)](https://www.npmjs.org/package/@gramio/types)
[![JSR](https://jsr.io/badges/@gramio/types)](https://jsr.io/@gramio/types)
[![JSR Score](https://jsr.io/badges/@gramio/types/score)](https://jsr.io/@gramio/types)
</div>
### Versioning
7.1.x types are for 7.1 Telegram Bot API
7.3.x types are for 7.3 Telegram Bot API

@@ -24,3 +33,3 @@ ## Usage as an [NPM package](https://www.npmjs.com/package/@gramio/types)

This library is updated automatically to the latest version of the Telegram Bot API in case of changes thanks to CI CD!
If the github action failed, there are no changes in the bot api
If the github action failed, there are no changes in the Bot API

@@ -32,3 +41,3 @@ ## Imports (after `@gramio/`)

- `objects` - exports objects with the `Telegram` prefix (for example [Update](https://core.telegram.org/bots/api/#update))
- `params` - exports params that are used in `methods`
- `params` - exports params that are used in `methods` with `Params` postfix

@@ -35,0 +44,0 @@ ### Write you own type-safe Telegram Bot API wrapper

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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