@pague-dev/sdk-node 0.4.0 → 0.5.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 +3 -0
- package/dist/index.d.cts +26 -1
- package/dist/index.d.mts +26 -1
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -80,6 +80,9 @@ var Customers = class extends BaseResource {
|
|
|
80
80
|
//#region src/pix/pix.ts
|
|
81
81
|
var Pix = class extends CreateOnlyResource {
|
|
82
82
|
endpoint = "/pix";
|
|
83
|
+
async createStaticQrCode(options) {
|
|
84
|
+
return this.pdev.post(`${this.endpoint}/qrcode-static`, options);
|
|
85
|
+
}
|
|
83
86
|
};
|
|
84
87
|
|
|
85
88
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -193,9 +193,34 @@ interface CreatePixOptions {
|
|
|
193
193
|
}
|
|
194
194
|
type CreatePixResponse = Response<PixCharge>;
|
|
195
195
|
//#endregion
|
|
196
|
+
//#region src/pix/interfaces/static-qr-code.interface.d.ts
|
|
197
|
+
interface StaticQrCodeTransaction {
|
|
198
|
+
description: string;
|
|
199
|
+
amount: number;
|
|
200
|
+
comment?: string;
|
|
201
|
+
externalReference?: string;
|
|
202
|
+
}
|
|
203
|
+
interface CreateStaticQrCodeOptions {
|
|
204
|
+
transaction: StaticQrCodeTransaction;
|
|
205
|
+
projectId?: string;
|
|
206
|
+
metadata?: Record<string, unknown>;
|
|
207
|
+
}
|
|
208
|
+
interface StaticQrCode {
|
|
209
|
+
id: string;
|
|
210
|
+
status: PixStatus;
|
|
211
|
+
amount: number;
|
|
212
|
+
currency: string;
|
|
213
|
+
pixCopyPaste: string;
|
|
214
|
+
qrCodeBase64?: string;
|
|
215
|
+
externalReference?: string;
|
|
216
|
+
createdAt: string;
|
|
217
|
+
}
|
|
218
|
+
type CreateStaticQrCodeResponse = Response<StaticQrCode>;
|
|
219
|
+
//#endregion
|
|
196
220
|
//#region src/pix/pix.d.ts
|
|
197
221
|
declare class Pix extends CreateOnlyResource<PixCharge, CreatePixOptions> {
|
|
198
222
|
protected readonly endpoint = "/pix";
|
|
223
|
+
createStaticQrCode(options: CreateStaticQrCodeOptions): Promise<Response<StaticQrCode>>;
|
|
199
224
|
}
|
|
200
225
|
//#endregion
|
|
201
226
|
//#region src/projects/interfaces/project.interface.d.ts
|
|
@@ -519,4 +544,4 @@ interface WebhookHeaders {
|
|
|
519
544
|
*/
|
|
520
545
|
declare function parseWebhook(payload: string): WebhookEvent | null;
|
|
521
546
|
//#endregion
|
|
522
|
-
export { Charge, ChargeStatus, CreateChargeOptions, CreateChargeResponse, CreateCustomerOptions, CreateCustomerResponse, CreatePixCustomer, CreatePixOptions, CreatePixResponse, CreateProjectOptions, CreateProjectResponse, CreateWithdrawalOptions, CreateWithdrawalResponse, Customer, DocumentType, type ErrorResponse, GetChargeResponse, GetTransactionResponse, ListChargesOptions, ListChargesResponse, ListCustomersOptions, ListCustomersResponse, ListProjectsOptions, ListProjectsResponse, NotificationType, type PaginatedResponse, type PaginationOptions, PaymentCompletedData, PaymentCompletedEvent, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalStatus, parseWebhook };
|
|
547
|
+
export { Charge, ChargeStatus, 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, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, StaticQrCode, StaticQrCodeTransaction, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalStatus, parseWebhook };
|
package/dist/index.d.mts
CHANGED
|
@@ -193,9 +193,34 @@ interface CreatePixOptions {
|
|
|
193
193
|
}
|
|
194
194
|
type CreatePixResponse = Response<PixCharge>;
|
|
195
195
|
//#endregion
|
|
196
|
+
//#region src/pix/interfaces/static-qr-code.interface.d.ts
|
|
197
|
+
interface StaticQrCodeTransaction {
|
|
198
|
+
description: string;
|
|
199
|
+
amount: number;
|
|
200
|
+
comment?: string;
|
|
201
|
+
externalReference?: string;
|
|
202
|
+
}
|
|
203
|
+
interface CreateStaticQrCodeOptions {
|
|
204
|
+
transaction: StaticQrCodeTransaction;
|
|
205
|
+
projectId?: string;
|
|
206
|
+
metadata?: Record<string, unknown>;
|
|
207
|
+
}
|
|
208
|
+
interface StaticQrCode {
|
|
209
|
+
id: string;
|
|
210
|
+
status: PixStatus;
|
|
211
|
+
amount: number;
|
|
212
|
+
currency: string;
|
|
213
|
+
pixCopyPaste: string;
|
|
214
|
+
qrCodeBase64?: string;
|
|
215
|
+
externalReference?: string;
|
|
216
|
+
createdAt: string;
|
|
217
|
+
}
|
|
218
|
+
type CreateStaticQrCodeResponse = Response<StaticQrCode>;
|
|
219
|
+
//#endregion
|
|
196
220
|
//#region src/pix/pix.d.ts
|
|
197
221
|
declare class Pix extends CreateOnlyResource<PixCharge, CreatePixOptions> {
|
|
198
222
|
protected readonly endpoint = "/pix";
|
|
223
|
+
createStaticQrCode(options: CreateStaticQrCodeOptions): Promise<Response<StaticQrCode>>;
|
|
199
224
|
}
|
|
200
225
|
//#endregion
|
|
201
226
|
//#region src/projects/interfaces/project.interface.d.ts
|
|
@@ -519,4 +544,4 @@ interface WebhookHeaders {
|
|
|
519
544
|
*/
|
|
520
545
|
declare function parseWebhook(payload: string): WebhookEvent | null;
|
|
521
546
|
//#endregion
|
|
522
|
-
export { Charge, ChargeStatus, CreateChargeOptions, CreateChargeResponse, CreateCustomerOptions, CreateCustomerResponse, CreatePixCustomer, CreatePixOptions, CreatePixResponse, CreateProjectOptions, CreateProjectResponse, CreateWithdrawalOptions, CreateWithdrawalResponse, Customer, DocumentType, type ErrorResponse, GetChargeResponse, GetTransactionResponse, ListChargesOptions, ListChargesResponse, ListCustomersOptions, ListCustomersResponse, ListProjectsOptions, ListProjectsResponse, NotificationType, type PaginatedResponse, type PaginationOptions, PaymentCompletedData, PaymentCompletedEvent, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalStatus, parseWebhook };
|
|
547
|
+
export { Charge, ChargeStatus, 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, PaymentMethod, Pdev, PixCharge, PixKeyType, PixStatus, Project, RefundCompletedData, RefundCompletedEvent, type Response, SortBy, SortOrder, StaticQrCode, StaticQrCodeTransaction, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalStatus, parseWebhook };
|
package/dist/index.mjs
CHANGED
|
@@ -79,6 +79,9 @@ var Customers = class extends BaseResource {
|
|
|
79
79
|
//#region src/pix/pix.ts
|
|
80
80
|
var Pix = class extends CreateOnlyResource {
|
|
81
81
|
endpoint = "/pix";
|
|
82
|
+
async createStaticQrCode(options) {
|
|
83
|
+
return this.pdev.post(`${this.endpoint}/qrcode-static`, options);
|
|
84
|
+
}
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
//#endregion
|