Comparing version 1.0.5 to 1.0.6
@@ -194,4 +194,5 @@ declare enum PayvraInvoiceStatus { | ||
} | ||
declare const WebhookEventType: { | ||
declare const PaymentWebhookEventType: { | ||
readonly PAYMENT_CREATED: "PAYMENT_CREATED"; | ||
readonly PAYMENT_CONFIRMING: "PAYMENT_CONFIRMING"; | ||
readonly PAYMENT_COMPLETED: "PAYMENT_COMPLETED"; | ||
@@ -201,5 +202,5 @@ readonly PAYMENT_EXPIRED: "PAYMENT_EXPIRED"; | ||
}; | ||
type WebhookEventType = (typeof WebhookEventType)[keyof typeof WebhookEventType]; | ||
interface BaseWebhookEvent { | ||
eventType: WebhookEventType; | ||
type PaymentWebhookEventType = (typeof PaymentWebhookEventType)[keyof typeof PaymentWebhookEventType]; | ||
interface BasePaymentWebhookEvent { | ||
eventType: PaymentWebhookEventType; | ||
id: string; | ||
@@ -229,9 +230,9 @@ merchantId: string; | ||
} | ||
interface WebhookEventWithTxHash extends BaseWebhookEvent { | ||
interface PaymentWebhookEventWithTxHash extends BasePaymentWebhookEvent { | ||
txHash: string; | ||
} | ||
type PaymentWebhookEvent = (BaseWebhookEvent & { | ||
eventType: typeof WebhookEventType.PAYMENT_CREATED | typeof WebhookEventType.PAYMENT_EXPIRED | typeof WebhookEventType.PAYMENT_FAILED; | ||
}) | (WebhookEventWithTxHash & { | ||
eventType: typeof WebhookEventType.PAYMENT_COMPLETED; | ||
type PaymentWebhookEvent = (BasePaymentWebhookEvent & { | ||
eventType: typeof PaymentWebhookEventType.PAYMENT_CREATED | typeof PaymentWebhookEventType.PAYMENT_EXPIRED | typeof PaymentWebhookEventType.PAYMENT_FAILED; | ||
}) | (PaymentWebhookEventWithTxHash & { | ||
eventType: typeof PaymentWebhookEventType.PAYMENT_COMPLETED; | ||
}); | ||
@@ -292,2 +293,2 @@ declare const PayoutWebhookEventType: { | ||
export { type CreateExchangeParams, type CreateExchangeResponse, type CreateInvoiceParams, type CreateInvoiceResponse, type CreatePayoutParams, type CreatePayoutResponse, type CreateWhitelabelParams, type CreateWhitelabelResponse, type ExchangePair, type FetchCurrenciesParams, type FetchCurrenciesResponse, type FetchExchangePairsResponse, type FetchInvoiceParams, type FetchInvoiceResponse, type FetchPayoutParams, type FetchPayoutResponse, type PaymentWebhookEvent, type PayoutWebhookEvent, PayoutWebhookEventType, PayvraClient, type PayvraCurrency, PayvraInvoiceStatus, type PayvraNetwork, PayvraPayoutStatus, type WebhookEvent, WebhookEventType, createPayvraClient }; | ||
export { type CreateExchangeParams, type CreateExchangeResponse, type CreateInvoiceParams, type CreateInvoiceResponse, type CreatePayoutParams, type CreatePayoutResponse, type CreateWhitelabelParams, type CreateWhitelabelResponse, type ExchangePair, type FetchCurrenciesParams, type FetchCurrenciesResponse, type FetchExchangePairsResponse, type FetchInvoiceParams, type FetchInvoiceResponse, type FetchPayoutParams, type FetchPayoutResponse, type PaymentWebhookEvent, PaymentWebhookEventType, type PayoutWebhookEvent, PayoutWebhookEventType, PayvraClient, type PayvraCurrency, PayvraInvoiceStatus, type PayvraNetwork, PayvraPayoutStatus, type WebhookEvent, createPayvraClient }; |
@@ -33,2 +33,3 @@ "use strict"; | ||
__export(src_exports, { | ||
PaymentWebhookEventType: () => PaymentWebhookEventType, | ||
PayoutWebhookEventType: () => PayoutWebhookEventType, | ||
@@ -38,3 +39,2 @@ PayvraClient: () => PayvraClient, | ||
PayvraPayoutStatus: () => PayvraPayoutStatus, | ||
WebhookEventType: () => WebhookEventType, | ||
createPayvraClient: () => createPayvraClient | ||
@@ -229,4 +229,5 @@ }); | ||
})(PayvraPayoutStatus || {}); | ||
var WebhookEventType = { | ||
var PaymentWebhookEventType = { | ||
PAYMENT_CREATED: "PAYMENT_CREATED", | ||
PAYMENT_CONFIRMING: "PAYMENT_CONFIRMING", | ||
PAYMENT_COMPLETED: "PAYMENT_COMPLETED", | ||
@@ -244,2 +245,3 @@ PAYMENT_EXPIRED: "PAYMENT_EXPIRED", | ||
0 && (module.exports = { | ||
PaymentWebhookEventType, | ||
PayoutWebhookEventType, | ||
@@ -249,4 +251,3 @@ PayvraClient, | ||
PayvraPayoutStatus, | ||
WebhookEventType, | ||
createPayvraClient | ||
}); |
{ | ||
"name": "payvra-sdk", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Official TypeScript SDK for the Payvra API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35087
740