@pague-dev/sdk-node 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +32 -3
- package/dist/index.d.mts +32 -3
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -385,7 +385,7 @@ declare class Pdev {
|
|
|
385
385
|
/**
|
|
386
386
|
* Available webhook event types
|
|
387
387
|
*/
|
|
388
|
-
type WebhookEventType = 'payment_completed' | 'payment_expired' | 'refund_completed' | 'withdrawal_completed' | 'withdrawal_failed' | 'withdrawal_reversed';
|
|
388
|
+
type WebhookEventType = 'payment_completed' | 'payment_expired' | 'refund_completed' | 'withdrawal_completed' | 'withdrawal_failed' | 'withdrawal_reversed' | 'balance_block_created';
|
|
389
389
|
/**
|
|
390
390
|
* Base webhook payload structure
|
|
391
391
|
*/
|
|
@@ -583,10 +583,39 @@ type WithdrawalFailedEvent = WebhookPayload<'withdrawal_failed', WithdrawalFaile
|
|
|
583
583
|
* Withdrawal reversed webhook event
|
|
584
584
|
*/
|
|
585
585
|
type WithdrawalReversedEvent = WebhookPayload<'withdrawal_reversed', WithdrawalReversedData>;
|
|
586
|
+
/**
|
|
587
|
+
* Data payload for balance_block_created event
|
|
588
|
+
*/
|
|
589
|
+
interface BalanceBlockCreatedData {
|
|
590
|
+
/** Balance block identifier */
|
|
591
|
+
blockId: string;
|
|
592
|
+
/** Transaction ID of the blocked transaction */
|
|
593
|
+
transactionId: string;
|
|
594
|
+
/** Environment where the block was created */
|
|
595
|
+
environment: 'production' | 'sandbox';
|
|
596
|
+
/** Blocked amount in BRL */
|
|
597
|
+
amount: number;
|
|
598
|
+
/** Currency code (e.g., "BRL") */
|
|
599
|
+
currency: string;
|
|
600
|
+
/** Type of block (med, judicial, administrative) */
|
|
601
|
+
blockType: 'med' | 'judicial' | 'administrative';
|
|
602
|
+
/** Block reference number */
|
|
603
|
+
referenceNumber: string;
|
|
604
|
+
/** Reason for the block */
|
|
605
|
+
reason: string;
|
|
606
|
+
/** Block status */
|
|
607
|
+
status: 'awaiting_response';
|
|
608
|
+
/** ISO 8601 timestamp of when block was created */
|
|
609
|
+
createdAt: string;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Balance block created webhook event
|
|
613
|
+
*/
|
|
614
|
+
type BalanceBlockCreatedEvent = WebhookPayload<'balance_block_created', BalanceBlockCreatedData>;
|
|
586
615
|
/**
|
|
587
616
|
* Union type of all possible webhook events
|
|
588
617
|
*/
|
|
589
|
-
type WebhookEvent = PaymentCompletedEvent | PaymentExpiredEvent | RefundCompletedEvent | WithdrawalCompletedEvent | WithdrawalFailedEvent | WithdrawalReversedEvent;
|
|
618
|
+
type WebhookEvent = PaymentCompletedEvent | PaymentExpiredEvent | RefundCompletedEvent | WithdrawalCompletedEvent | WithdrawalFailedEvent | WithdrawalReversedEvent | BalanceBlockCreatedEvent;
|
|
590
619
|
/**
|
|
591
620
|
* Webhook headers sent with each request
|
|
592
621
|
*/
|
|
@@ -676,4 +705,4 @@ interface WebhookHeaders {
|
|
|
676
705
|
declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
|
|
677
706
|
declare function parseWebhook(payload: string): WebhookEvent | null;
|
|
678
707
|
//#endregion
|
|
679
|
-
export { AccountDetail, AccountInfo, AccountStatus, BalanceAmount, BalanceDetail, Charge, ChargeStatus, CompanyDetail, CompanyStatus, CreateChargeOptions, CreateChargeResponse, CreateCustomerOptions, CreateCustomerResponse, CreatePixCustomer, CreatePixOptions, CreatePixResponse, CreateProjectOptions, CreateProjectResponse, CreateStaticQrCodeOptions, CreateStaticQrCodeResponse, CreateWithdrawalOptions, CreateWithdrawalResponse, Customer, DocumentType, type ErrorResponse, GetChargeResponse, GetTransactionResponse, ListChargesOptions, ListChargesResponse, ListCustomersOptions, ListCustomersResponse, ListProjectsOptions, ListProjectsResponse, NotificationType, type PaginatedResponse, type PaginationOptions, PaymentCompletedData, PaymentCompletedEvent, PaymentExpiredData, PaymentExpiredEvent, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, StaticQrCode, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalReversedData, WithdrawalReversedEvent, WithdrawalStatus, parseWebhook, verifyWebhookSignature };
|
|
708
|
+
export { AccountDetail, AccountInfo, AccountStatus, BalanceAmount, BalanceBlockCreatedData, BalanceBlockCreatedEvent, BalanceDetail, Charge, ChargeStatus, CompanyDetail, CompanyStatus, CreateChargeOptions, CreateChargeResponse, CreateCustomerOptions, CreateCustomerResponse, CreatePixCustomer, CreatePixOptions, CreatePixResponse, CreateProjectOptions, CreateProjectResponse, CreateStaticQrCodeOptions, CreateStaticQrCodeResponse, CreateWithdrawalOptions, CreateWithdrawalResponse, Customer, DocumentType, type ErrorResponse, GetChargeResponse, GetTransactionResponse, ListChargesOptions, ListChargesResponse, ListCustomersOptions, ListCustomersResponse, ListProjectsOptions, ListProjectsResponse, NotificationType, type PaginatedResponse, type PaginationOptions, PaymentCompletedData, PaymentCompletedEvent, PaymentExpiredData, PaymentExpiredEvent, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, StaticQrCode, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalReversedData, WithdrawalReversedEvent, WithdrawalStatus, parseWebhook, verifyWebhookSignature };
|
package/dist/index.d.mts
CHANGED
|
@@ -385,7 +385,7 @@ declare class Pdev {
|
|
|
385
385
|
/**
|
|
386
386
|
* Available webhook event types
|
|
387
387
|
*/
|
|
388
|
-
type WebhookEventType = 'payment_completed' | 'payment_expired' | 'refund_completed' | 'withdrawal_completed' | 'withdrawal_failed' | 'withdrawal_reversed';
|
|
388
|
+
type WebhookEventType = 'payment_completed' | 'payment_expired' | 'refund_completed' | 'withdrawal_completed' | 'withdrawal_failed' | 'withdrawal_reversed' | 'balance_block_created';
|
|
389
389
|
/**
|
|
390
390
|
* Base webhook payload structure
|
|
391
391
|
*/
|
|
@@ -583,10 +583,39 @@ type WithdrawalFailedEvent = WebhookPayload<'withdrawal_failed', WithdrawalFaile
|
|
|
583
583
|
* Withdrawal reversed webhook event
|
|
584
584
|
*/
|
|
585
585
|
type WithdrawalReversedEvent = WebhookPayload<'withdrawal_reversed', WithdrawalReversedData>;
|
|
586
|
+
/**
|
|
587
|
+
* Data payload for balance_block_created event
|
|
588
|
+
*/
|
|
589
|
+
interface BalanceBlockCreatedData {
|
|
590
|
+
/** Balance block identifier */
|
|
591
|
+
blockId: string;
|
|
592
|
+
/** Transaction ID of the blocked transaction */
|
|
593
|
+
transactionId: string;
|
|
594
|
+
/** Environment where the block was created */
|
|
595
|
+
environment: 'production' | 'sandbox';
|
|
596
|
+
/** Blocked amount in BRL */
|
|
597
|
+
amount: number;
|
|
598
|
+
/** Currency code (e.g., "BRL") */
|
|
599
|
+
currency: string;
|
|
600
|
+
/** Type of block (med, judicial, administrative) */
|
|
601
|
+
blockType: 'med' | 'judicial' | 'administrative';
|
|
602
|
+
/** Block reference number */
|
|
603
|
+
referenceNumber: string;
|
|
604
|
+
/** Reason for the block */
|
|
605
|
+
reason: string;
|
|
606
|
+
/** Block status */
|
|
607
|
+
status: 'awaiting_response';
|
|
608
|
+
/** ISO 8601 timestamp of when block was created */
|
|
609
|
+
createdAt: string;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Balance block created webhook event
|
|
613
|
+
*/
|
|
614
|
+
type BalanceBlockCreatedEvent = WebhookPayload<'balance_block_created', BalanceBlockCreatedData>;
|
|
586
615
|
/**
|
|
587
616
|
* Union type of all possible webhook events
|
|
588
617
|
*/
|
|
589
|
-
type WebhookEvent = PaymentCompletedEvent | PaymentExpiredEvent | RefundCompletedEvent | WithdrawalCompletedEvent | WithdrawalFailedEvent | WithdrawalReversedEvent;
|
|
618
|
+
type WebhookEvent = PaymentCompletedEvent | PaymentExpiredEvent | RefundCompletedEvent | WithdrawalCompletedEvent | WithdrawalFailedEvent | WithdrawalReversedEvent | BalanceBlockCreatedEvent;
|
|
590
619
|
/**
|
|
591
620
|
* Webhook headers sent with each request
|
|
592
621
|
*/
|
|
@@ -676,4 +705,4 @@ interface WebhookHeaders {
|
|
|
676
705
|
declare function verifyWebhookSignature(payload: string, signature: string, secret: string): boolean;
|
|
677
706
|
declare function parseWebhook(payload: string): WebhookEvent | null;
|
|
678
707
|
//#endregion
|
|
679
|
-
export { AccountDetail, AccountInfo, AccountStatus, BalanceAmount, BalanceDetail, Charge, ChargeStatus, CompanyDetail, CompanyStatus, CreateChargeOptions, CreateChargeResponse, CreateCustomerOptions, CreateCustomerResponse, CreatePixCustomer, CreatePixOptions, CreatePixResponse, CreateProjectOptions, CreateProjectResponse, CreateStaticQrCodeOptions, CreateStaticQrCodeResponse, CreateWithdrawalOptions, CreateWithdrawalResponse, Customer, DocumentType, type ErrorResponse, GetChargeResponse, GetTransactionResponse, ListChargesOptions, ListChargesResponse, ListCustomersOptions, ListCustomersResponse, ListProjectsOptions, ListProjectsResponse, NotificationType, type PaginatedResponse, type PaginationOptions, PaymentCompletedData, PaymentCompletedEvent, PaymentExpiredData, PaymentExpiredEvent, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, StaticQrCode, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalReversedData, WithdrawalReversedEvent, WithdrawalStatus, parseWebhook, verifyWebhookSignature };
|
|
708
|
+
export { AccountDetail, AccountInfo, AccountStatus, BalanceAmount, BalanceBlockCreatedData, BalanceBlockCreatedEvent, BalanceDetail, Charge, ChargeStatus, CompanyDetail, CompanyStatus, CreateChargeOptions, CreateChargeResponse, CreateCustomerOptions, CreateCustomerResponse, CreatePixCustomer, CreatePixOptions, CreatePixResponse, CreateProjectOptions, CreateProjectResponse, CreateStaticQrCodeOptions, CreateStaticQrCodeResponse, CreateWithdrawalOptions, CreateWithdrawalResponse, Customer, DocumentType, type ErrorResponse, GetChargeResponse, GetTransactionResponse, ListChargesOptions, ListChargesResponse, ListCustomersOptions, ListCustomersResponse, ListProjectsOptions, ListProjectsResponse, NotificationType, type PaginatedResponse, type PaginationOptions, PaymentCompletedData, PaymentCompletedEvent, PaymentExpiredData, PaymentExpiredEvent, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, StaticQrCode, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalReversedData, WithdrawalReversedEvent, WithdrawalStatus, parseWebhook, verifyWebhookSignature };
|
package/dist/index.mjs
CHANGED