@getmanza/sdk 1.0.0 → 1.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/CHANGELOG.md +57 -0
- package/README.md +74 -18
- package/dist/client.d.ts +14 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/env.d.ts +3 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/errors.d.ts +15 -15
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.cjs +203 -66
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +203 -66
- package/dist/page.d.ts +3 -3
- package/dist/page.d.ts.map +1 -1
- package/dist/resources/accounts.d.ts +3 -3
- package/dist/resources/accounts.d.ts.map +1 -1
- package/dist/resources/base.d.ts +8 -8
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/resources/beneficiaries.d.ts +5 -5
- package/dist/resources/beneficiaries.d.ts.map +1 -1
- package/dist/resources/checkout_sessions.d.ts +3 -3
- package/dist/resources/checkout_sessions.d.ts.map +1 -1
- package/dist/resources/customers.d.ts +5 -5
- package/dist/resources/customers.d.ts.map +1 -1
- package/dist/resources/entity.d.ts +2 -2
- package/dist/resources/entity.d.ts.map +1 -1
- package/dist/resources/invoices.d.ts +10 -10
- package/dist/resources/invoices.d.ts.map +1 -1
- package/dist/resources/payee_trust_requests.d.ts +3 -3
- package/dist/resources/payee_trust_requests.d.ts.map +1 -1
- package/dist/resources/payment_links.d.ts +4 -4
- package/dist/resources/payment_links.d.ts.map +1 -1
- package/dist/resources/payments.d.ts +15 -0
- package/dist/resources/payments.d.ts.map +1 -0
- package/dist/resources/transfer_authorizer.d.ts +6 -0
- package/dist/resources/transfer_authorizer.d.ts.map +1 -0
- package/dist/resources/transfer_drafts.d.ts +8 -14
- package/dist/resources/transfer_drafts.d.ts.map +1 -1
- package/dist/resources/webhook_endpoints.d.ts +9 -9
- package/dist/resources/webhook_endpoints.d.ts.map +1 -1
- package/dist/response.d.ts +1 -1
- package/dist/response.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/webhook.d.ts +32 -0
- package/dist/webhook.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Page } from "../page.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ManzaResponse } from "../response.js";
|
|
3
3
|
import { type ListParams, ResourceBase } from "./base.js";
|
|
4
4
|
export interface InvoiceListParams extends ListParams {
|
|
5
5
|
status?: string;
|
|
@@ -7,14 +7,14 @@ export interface InvoiceListParams extends ListParams {
|
|
|
7
7
|
}
|
|
8
8
|
export declare class Invoices extends ResourceBase {
|
|
9
9
|
list(params?: InvoiceListParams): Promise<Page<unknown>>;
|
|
10
|
-
get(id: string): Promise<
|
|
11
|
-
create(attributes: Record<string, unknown>): Promise<
|
|
12
|
-
update(id: string, attributes: Record<string, unknown>): Promise<
|
|
13
|
-
delete(id: string): Promise<
|
|
14
|
-
send(id: string): Promise<
|
|
15
|
-
markAsPaid(id: string, attributes?: Record<string, unknown>): Promise<
|
|
16
|
-
cancel(id: string): Promise<
|
|
17
|
-
creditNote(id: string, attributes?: Record<string, unknown>): Promise<
|
|
18
|
-
createPaymentLink(id: string, attributes?: Record<string, unknown>): Promise<
|
|
10
|
+
get(id: string): Promise<ManzaResponse>;
|
|
11
|
+
create(attributes: Record<string, unknown>): Promise<ManzaResponse>;
|
|
12
|
+
update(id: string, attributes: Record<string, unknown>): Promise<ManzaResponse>;
|
|
13
|
+
delete(id: string): Promise<ManzaResponse>;
|
|
14
|
+
send(id: string): Promise<ManzaResponse>;
|
|
15
|
+
markAsPaid(id: string, attributes?: Record<string, unknown>): Promise<ManzaResponse>;
|
|
16
|
+
cancel(id: string): Promise<ManzaResponse>;
|
|
17
|
+
creditNote(id: string, attributes?: Record<string, unknown>): Promise<ManzaResponse>;
|
|
18
|
+
createPaymentLink(id: string, attributes?: Record<string, unknown>): Promise<ManzaResponse>;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=invoices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../src/resources/invoices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../src/resources/invoices.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE1D,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,QAAS,SAAQ,YAAY;IACxC,IAAI,CAAC,MAAM,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAK5D,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIvC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAInE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAI/E,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAO1C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIxC,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIxF,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI1C,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIxF,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGhG"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ManzaResponse } from "../response.js";
|
|
2
2
|
import { ResourceBase } from "./base.js";
|
|
3
3
|
export declare class PayeeTrustRequests extends ResourceBase {
|
|
4
4
|
create(params: {
|
|
5
5
|
external_account_ids: string[];
|
|
6
|
-
}): Promise<
|
|
7
|
-
get(id: string): Promise<
|
|
6
|
+
}): Promise<ManzaResponse>;
|
|
7
|
+
get(id: string): Promise<ManzaResponse>;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=payee_trust_requests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payee_trust_requests.d.ts","sourceRoot":"","sources":["../../src/resources/payee_trust_requests.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"payee_trust_requests.d.ts","sourceRoot":"","sources":["../../src/resources/payee_trust_requests.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,kBAAmB,SAAQ,YAAY;IAElD,MAAM,CAAC,MAAM,EAAE;QAAE,oBAAoB,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAM1E,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGxC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Page } from "../page.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ManzaResponse } from "../response.js";
|
|
3
3
|
import { type ListParams, ResourceBase } from "./base.js";
|
|
4
4
|
export declare class PaymentLinks extends ResourceBase {
|
|
5
5
|
list(params?: ListParams): Promise<Page<unknown>>;
|
|
6
|
-
get(id: string): Promise<
|
|
7
|
-
create(attributes: Record<string, unknown>): Promise<
|
|
8
|
-
cancel(id: string): Promise<
|
|
6
|
+
get(id: string): Promise<ManzaResponse>;
|
|
7
|
+
create(attributes: Record<string, unknown>): Promise<ManzaResponse>;
|
|
8
|
+
cancel(id: string): Promise<ManzaResponse>;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=payment_links.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment_links.d.ts","sourceRoot":"","sources":["../../src/resources/payment_links.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"payment_links.d.ts","sourceRoot":"","sources":["../../src/resources/payment_links.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE1D,qBAAa,YAAa,SAAQ,YAAY;IAC5C,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAKrD,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIvC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAInE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAG3C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ManzaResponse } from "../response.js";
|
|
2
|
+
import { ResourceBase } from "./base.js";
|
|
3
|
+
export declare class Payments extends ResourceBase {
|
|
4
|
+
create(attributes: Record<string, unknown>): Promise<ManzaResponse>;
|
|
5
|
+
get(id: string): Promise<ManzaResponse>;
|
|
6
|
+
authorize(id: string, params: {
|
|
7
|
+
authorization_id: string;
|
|
8
|
+
signature: string;
|
|
9
|
+
}): Promise<ManzaResponse>;
|
|
10
|
+
decline(id: string, params: {
|
|
11
|
+
authorization_id: string;
|
|
12
|
+
reason?: string | null | undefined;
|
|
13
|
+
}): Promise<ManzaResponse>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=payments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../src/resources/payments.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,QAAS,SAAQ,YAAY;IASxC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAKnE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAgBvC,SAAS,CACP,EAAE,EAAE,MAAM,EACV,MAAM,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GACtD,OAAO,CAAC,aAAa,CAAC;IAezB,OAAO,CACL,EAAE,EAAE,MAAM,EACV,MAAM,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;KAAE,GACvE,OAAO,CAAC,aAAa,CAAC;CAK1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer_authorizer.d.ts","sourceRoot":"","sources":["../../src/resources/transfer_authorizer.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,kBAAmB,SAAQ,YAAY;IAWlD,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC;CAG9B"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}): Promise<ZazuResponse>;
|
|
10
|
-
decline(id: string, params: {
|
|
11
|
-
authorization_id: string;
|
|
12
|
-
reason?: string | null | undefined;
|
|
13
|
-
}): Promise<ZazuResponse>;
|
|
14
|
-
}
|
|
1
|
+
import { Payments } from "./payments.js";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use {@link Payments} (`manza.payments`). Kept for all of 1.x:
|
|
4
|
+
* it is the same class, and it calls `/api/payments`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TransferDrafts: typeof Payments;
|
|
7
|
+
/** @deprecated Use {@link Payments}. */
|
|
8
|
+
export type TransferDrafts = Payments;
|
|
15
9
|
//# sourceMappingURL=transfer_drafts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer_drafts.d.ts","sourceRoot":"","sources":["../../src/resources/transfer_drafts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transfer_drafts.d.ts","sourceRoot":"","sources":["../../src/resources/transfer_drafts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,cAAc,iBAAW,CAAC;AACvC,wCAAwC;AACxC,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Page } from "../page.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ManzaResponse } from "../response.js";
|
|
3
3
|
import { type ListParams, ResourceBase } from "./base.js";
|
|
4
4
|
export interface WebhookEndpointCreateParams {
|
|
5
5
|
url: string;
|
|
@@ -8,13 +8,13 @@ export interface WebhookEndpointCreateParams {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class WebhookEndpoints extends ResourceBase {
|
|
10
10
|
list(params?: ListParams): Promise<Page<unknown>>;
|
|
11
|
-
get(id: string): Promise<
|
|
12
|
-
create(params: WebhookEndpointCreateParams): Promise<
|
|
13
|
-
update(id: string, attributes: Record<string, unknown>): Promise<
|
|
14
|
-
delete(id: string): Promise<
|
|
15
|
-
test(id: string): Promise<
|
|
16
|
-
regenerateSecret(id: string): Promise<
|
|
17
|
-
enable(id: string): Promise<
|
|
18
|
-
disable(id: string): Promise<
|
|
11
|
+
get(id: string): Promise<ManzaResponse>;
|
|
12
|
+
create(params: WebhookEndpointCreateParams): Promise<ManzaResponse>;
|
|
13
|
+
update(id: string, attributes: Record<string, unknown>): Promise<ManzaResponse>;
|
|
14
|
+
delete(id: string): Promise<ManzaResponse>;
|
|
15
|
+
test(id: string): Promise<ManzaResponse>;
|
|
16
|
+
regenerateSecret(id: string): Promise<ManzaResponse>;
|
|
17
|
+
enable(id: string): Promise<ManzaResponse>;
|
|
18
|
+
disable(id: string): Promise<ManzaResponse>;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=webhook_endpoints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook_endpoints.d.ts","sourceRoot":"","sources":["../../src/resources/webhook_endpoints.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"webhook_endpoints.d.ts","sourceRoot":"","sources":["../../src/resources/webhook_endpoints.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE1D,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAKrD,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIvC,MAAM,CAAC,MAAM,EAAE,2BAA2B,GAAG,OAAO,CAAC,aAAa,CAAC;IAInE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAI/E,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI1C,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIxC,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIpD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI1C,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAG5C"}
|
package/dist/response.d.ts
CHANGED
package/dist/response.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAGA,qBAAa,
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"AAGA,qBAAa,aAAa,CAAC,KAAK,GAAG,OAAO;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;gBAEX,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK;IAOtC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,SAAS,IAAI,MAAM,GAAG,IAAI,CAE7B;CACF"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "
|
|
1
|
+
export declare const VERSION = "1.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const DEFAULT_TOLERANCE = 300;
|
|
2
|
+
export type WebhookHeaders = Headers | Record<string, string | number | readonly string[] | null | undefined>;
|
|
3
|
+
export interface WebhookSignParams {
|
|
4
|
+
payload: string;
|
|
5
|
+
timestamp: string | number;
|
|
6
|
+
secret: string;
|
|
7
|
+
}
|
|
8
|
+
export interface WebhookVerifyParams {
|
|
9
|
+
payload: string;
|
|
10
|
+
signature: string;
|
|
11
|
+
timestamp: string | number;
|
|
12
|
+
secret: string;
|
|
13
|
+
tolerance?: number | null | undefined;
|
|
14
|
+
now?: Date | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface WebhookConstructEventParams {
|
|
17
|
+
payload: string;
|
|
18
|
+
headers: WebhookHeaders;
|
|
19
|
+
secret: string;
|
|
20
|
+
tolerance?: number | null | undefined;
|
|
21
|
+
now?: Date | undefined;
|
|
22
|
+
}
|
|
23
|
+
export declare function sign(params: WebhookSignParams): Promise<string>;
|
|
24
|
+
export declare function verify(params: WebhookVerifyParams): Promise<boolean>;
|
|
25
|
+
export declare function constructEvent(params: WebhookConstructEventParams): Promise<Record<string, unknown>>;
|
|
26
|
+
export declare const Webhook: {
|
|
27
|
+
readonly DEFAULT_TOLERANCE: 300;
|
|
28
|
+
readonly sign: typeof sign;
|
|
29
|
+
readonly verify: typeof verify;
|
|
30
|
+
readonly constructEvent: typeof constructEvent;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=webhook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/webhook.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAIrC,MAAM,MAAM,cAAc,GACtB,OAAO,GACP,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;AAE3E,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IAIf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,GAAG,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,GAAG,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACxB;AAGD,wBAAgB,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ/D;AAKD,wBAAsB,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAK1E;AAQD,wBAAsB,cAAc,CAClC,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAsBlC;AA8ED,eAAO,MAAM,OAAO;;;;;CAKV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getmanza/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "TypeScript SDK for the Manza API. Runtime-agnostic (Node, Bun, Deno, browsers, Cloudflare Workers).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@biomejs/biome": "^2.4.14",
|
|
65
|
-
"@types/bun": "
|
|
65
|
+
"@types/bun": "^1.4.2",
|
|
66
66
|
"@types/js-yaml": "^4.0.9",
|
|
67
67
|
"js-yaml": "^4.1.0",
|
|
68
68
|
"msw": "^2.6.0",
|