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

@bitgo/public-types

Package Overview
Dependencies
Maintainers
15
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitgo/public-types - npm Package Compare versions

Comparing version 2.27.0 to 2.28.0

6

dist/src/schema/webhook/webhookNotification.d.ts
import * as t from "io-ts";
export declare const WebhookNotificationState: t.UnionC<[t.LiteralC<"unconfirmed">, t.LiteralC<"new">, t.LiteralC<"pending">, t.LiteralC<"processed">, t.LiteralC<"failed">]>;
export type WebhookNotificationState = t.TypeOf<typeof WebhookNotificationState>;
export declare const WebhookNotification: t.IntersectionC<[t.TypeC<{
id: t.StringC;
}>, t.PartialC<{
type: t.StringC;
type: t.KeyofC<typeof import("./webhookType").WebhookTypeEnum>;
wallet: t.StringC;

@@ -12,3 +14,3 @@ url: t.StringC;

transfer: t.StringC;
state: t.StringC;
state: t.UnionC<[t.LiteralC<"unconfirmed">, t.LiteralC<"new">, t.LiteralC<"pending">, t.LiteralC<"processed">, t.LiteralC<"failed">]>;
simulation: t.BooleanC;

@@ -15,0 +17,0 @@ retries: t.NumberC;

@@ -26,5 +26,13 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.WebhookNotification = void 0;
exports.WebhookNotification = exports.WebhookNotificationState = void 0;
const t = __importStar(require("io-ts"));
const io_ts_types_1 = require("io-ts-types");
const webhookType_1 = require("./webhookType");
exports.WebhookNotificationState = t.union([
t.literal("unconfirmed"),
t.literal("new"),
t.literal("pending"),
t.literal("processed"),
t.literal("failed"),
]);
exports.WebhookNotification = t.intersection([

@@ -35,3 +43,3 @@ t.type({

t.partial({
type: t.string,
type: webhookType_1.WebhookType,
wallet: t.string,

@@ -43,3 +51,3 @@ url: t.string,

transfer: t.string,
state: t.string,
state: exports.WebhookNotificationState,
simulation: t.boolean,

@@ -46,0 +54,0 @@ retries: t.number,

{
"name": "@bitgo/public-types",
"version": "2.27.0",
"version": "2.28.0",
"description": "Collection of types exposed externally as part of the BitGo public API",

@@ -5,0 +5,0 @@ "license": "UNLICENSED",

@@ -11,9 +11,32 @@ import * as t from "io-ts";

t.type({
/**
* @example "59cd72485007a239fb00282ed480da1f"
* @pattern ^[0-9a-f]{32}$
*/
id: t.string,
/**
* @format date-time
* @example "2021-01-01T00:00:00Z"
*/
created: DateFromISOString,
/**
* A cryptocurrency or token ticker symbol.
* @example btc
*/
coin: t.string,
/**
* @format uri
* @example "https://your.server.com/webhook"
*/
url: t.string,
/**
* 2 for coins running on API v2.
* @example 2
*/
version: t.number,
scope: WebhookScope,
state: WebhookState,
/**
* @example 0
*/
successiveFailedAttempts: t.number,

@@ -26,12 +49,36 @@ listenToFailureStates: t.boolean,

enterpriseId: t.string,
/**
* @example "59cd72485007a239fb00282ed480da1f"
* @pattern ^[0-9a-f]{32}$
*/
organizationId: t.string,
userId: t.string,
/**
* Event type to listen to.
*/
type: WebhookType,
/**
* @example 6
*/
numConfirmations: t.number,
/**
* @format date-time
* @example "2021-01-01T00:00:00Z"
*/
lastAttempt: DateFromISOString,
/**
* @format date-time
* @example "2021-01-01T00:00:00Z"
*/
failingSince: DateFromISOString,
allToken: t.boolean,
/**
* If present, only transaction request state changes from the list will trigger notifications. If not present, all transaction request state changes will trigger notifications.
*/
txRequestStates: t.array(TransactionRequestState),
/**
* If present, only transaction request transaction state changes from the list will trigger notifications. If not present, all transaction request transaction state changes will trigger notifications.
*/
txRequestTransactionStates: t.array(TransactionState),
}),
]);
import * as t from "io-ts";
import { DateFromISOString } from "io-ts-types";
import { WebhookType } from "./webhookType";
export const WebhookNotificationState = t.union([
t.literal("unconfirmed"),
t.literal("new"),
t.literal("pending"),
t.literal("processed"),
t.literal("failed"),
]);
export type WebhookNotificationState = t.TypeOf<
typeof WebhookNotificationState
>;
export const WebhookNotification = t.intersection([
t.type({
/**
* @example "59cd72485007a239fb00282ed480da1f"
* @pattern ^[0-9a-f]{32}$
*/
id: t.string,
}),
t.partial({
type: t.string,
/**
* Event type to listen to.
*/
type: WebhookType,
/**
* @example cold
*/
wallet: t.string,
url: t.string,
hash: t.string,
/**
* A cryptocurrency or token ticker symbol.
* @example btc
*/
coin: t.string,
coinChain: t.string,
/**
* @example receive
*/
transfer: t.string,
state: t.string,
/**
* If "failed", webhook notification failed to connect with the target URL. If "new", webhook notification was newly generated, in response to an event. If "pending", webhook notification is awaiting processing by the webhook worker. If "processed", webhook notification successfully sent to target URL. If "unconfirmed", webhook notification is awaiting confirmation on the blockchain.
*
*/
state: WebhookNotificationState,
simulation: t.boolean,
retries: t.number,
webhook: t.string,
/**
* @example "2021-01-01T00:00:00Z"
*/
updatedAt: DateFromISOString,
/**
* @example "2021-01-01T00:00:00Z"
*/
nextAttempt: DateFromISOString,
/**
* @example 2
*/
version: t.number,

@@ -23,0 +66,0 @@ allowBlockedHosts: t.boolean,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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