@pague-dev/sdk-node 0.4.1 → 1.0.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 +22 -1
- package/dist/index.d.mts +22 -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,30 @@ 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 CreateStaticQrCodeOptions {
|
|
198
|
+
amount: number;
|
|
199
|
+
description: string;
|
|
200
|
+
projectId?: string;
|
|
201
|
+
externalReference?: string;
|
|
202
|
+
metadata?: Record<string, unknown>;
|
|
203
|
+
}
|
|
204
|
+
interface StaticQrCode {
|
|
205
|
+
id: string;
|
|
206
|
+
status: PixStatus;
|
|
207
|
+
amount: number;
|
|
208
|
+
currency: string;
|
|
209
|
+
pixCopyPaste: string;
|
|
210
|
+
qrCodeBase64?: string;
|
|
211
|
+
externalReference?: string;
|
|
212
|
+
createdAt: string;
|
|
213
|
+
}
|
|
214
|
+
type CreateStaticQrCodeResponse = Response<StaticQrCode>;
|
|
215
|
+
//#endregion
|
|
196
216
|
//#region src/pix/pix.d.ts
|
|
197
217
|
declare class Pix extends CreateOnlyResource<PixCharge, CreatePixOptions> {
|
|
198
218
|
protected readonly endpoint = "/pix";
|
|
219
|
+
createStaticQrCode(options: CreateStaticQrCodeOptions): Promise<Response<StaticQrCode>>;
|
|
199
220
|
}
|
|
200
221
|
//#endregion
|
|
201
222
|
//#region src/projects/interfaces/project.interface.d.ts
|
|
@@ -519,4 +540,4 @@ interface WebhookHeaders {
|
|
|
519
540
|
*/
|
|
520
541
|
declare function parseWebhook(payload: string): WebhookEvent | null;
|
|
521
542
|
//#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 };
|
|
543
|
+
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, Transaction, TransactionPaymentMethod, TransactionStatus, TransactionType, WebhookEvent, WebhookEventType, WebhookHeaders, WebhookPayload, Withdrawal, WithdrawalCompletedData, WithdrawalCompletedEvent, WithdrawalFailedData, WithdrawalFailedEvent, WithdrawalStatus, parseWebhook };
|
package/dist/index.d.mts
CHANGED
|
@@ -193,9 +193,30 @@ 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 CreateStaticQrCodeOptions {
|
|
198
|
+
amount: number;
|
|
199
|
+
description: string;
|
|
200
|
+
projectId?: string;
|
|
201
|
+
externalReference?: string;
|
|
202
|
+
metadata?: Record<string, unknown>;
|
|
203
|
+
}
|
|
204
|
+
interface StaticQrCode {
|
|
205
|
+
id: string;
|
|
206
|
+
status: PixStatus;
|
|
207
|
+
amount: number;
|
|
208
|
+
currency: string;
|
|
209
|
+
pixCopyPaste: string;
|
|
210
|
+
qrCodeBase64?: string;
|
|
211
|
+
externalReference?: string;
|
|
212
|
+
createdAt: string;
|
|
213
|
+
}
|
|
214
|
+
type CreateStaticQrCodeResponse = Response<StaticQrCode>;
|
|
215
|
+
//#endregion
|
|
196
216
|
//#region src/pix/pix.d.ts
|
|
197
217
|
declare class Pix extends CreateOnlyResource<PixCharge, CreatePixOptions> {
|
|
198
218
|
protected readonly endpoint = "/pix";
|
|
219
|
+
createStaticQrCode(options: CreateStaticQrCodeOptions): Promise<Response<StaticQrCode>>;
|
|
199
220
|
}
|
|
200
221
|
//#endregion
|
|
201
222
|
//#region src/projects/interfaces/project.interface.d.ts
|
|
@@ -519,4 +540,4 @@ interface WebhookHeaders {
|
|
|
519
540
|
*/
|
|
520
541
|
declare function parseWebhook(payload: string): WebhookEvent | null;
|
|
521
542
|
//#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 };
|
|
543
|
+
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, 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
|