@getmanza/sdk 0.0.0-stage → 1.0.1

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/LICENSE +21 -0
  3. package/README.md +154 -2
  4. package/dist/client.d.ts +43 -0
  5. package/dist/client.d.ts.map +1 -0
  6. package/dist/env.d.ts +3 -0
  7. package/dist/env.d.ts.map +1 -0
  8. package/dist/errors.d.ts +46 -0
  9. package/dist/errors.d.ts.map +1 -0
  10. package/dist/index.cjs +673 -0
  11. package/dist/index.d.ts +17 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +631 -0
  14. package/dist/page.d.ts +19 -0
  15. package/dist/page.d.ts.map +1 -0
  16. package/dist/resources/accounts.d.ts +19 -0
  17. package/dist/resources/accounts.d.ts.map +1 -0
  18. package/dist/resources/base.d.ts +19 -0
  19. package/dist/resources/base.d.ts.map +1 -0
  20. package/dist/resources/beneficiaries.d.ts +12 -0
  21. package/dist/resources/beneficiaries.d.ts.map +1 -0
  22. package/dist/resources/checkout_sessions.d.ts +7 -0
  23. package/dist/resources/checkout_sessions.d.ts.map +1 -0
  24. package/dist/resources/customers.d.ts +14 -0
  25. package/dist/resources/customers.d.ts.map +1 -0
  26. package/dist/resources/entity.d.ts +6 -0
  27. package/dist/resources/entity.d.ts.map +1 -0
  28. package/dist/resources/invoices.d.ts +20 -0
  29. package/dist/resources/invoices.d.ts.map +1 -0
  30. package/dist/resources/payee_trust_requests.d.ts +9 -0
  31. package/dist/resources/payee_trust_requests.d.ts.map +1 -0
  32. package/dist/resources/payment_links.d.ts +10 -0
  33. package/dist/resources/payment_links.d.ts.map +1 -0
  34. package/dist/resources/transfer_drafts.d.ts +15 -0
  35. package/dist/resources/transfer_drafts.d.ts.map +1 -0
  36. package/dist/resources/webhook_endpoints.d.ts +20 -0
  37. package/dist/resources/webhook_endpoints.d.ts.map +1 -0
  38. package/dist/response.d.ts +10 -0
  39. package/dist/response.d.ts.map +1 -0
  40. package/dist/transfer_authorization.d.ts +27 -0
  41. package/dist/transfer_authorization.d.ts.map +1 -0
  42. package/dist/version.d.ts +2 -0
  43. package/dist/version.d.ts.map +1 -0
  44. package/package.json +70 -4
@@ -0,0 +1,12 @@
1
+ import type { Page } from "../page.js";
2
+ import type { ManzaResponse } from "../response.js";
3
+ import { type ListParams, ResourceBase } from "./base.js";
4
+ export declare class Beneficiaries extends ResourceBase {
5
+ list(params?: ListParams): Promise<Page<unknown>>;
6
+ get(id: string): Promise<ManzaResponse>;
7
+ create(attributes: Record<string, unknown>): Promise<ManzaResponse>;
8
+ listExternalAccounts(beneficiaryId: string, params?: ListParams): Promise<Page<unknown>>;
9
+ getExternalAccount(beneficiaryId: string, id: string): Promise<ManzaResponse>;
10
+ createExternalAccount(beneficiaryId: string, attributes: Record<string, unknown>): Promise<ManzaResponse>;
11
+ }
12
+ //# sourceMappingURL=beneficiaries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beneficiaries.d.ts","sourceRoot":"","sources":["../../src/resources/beneficiaries.ts"],"names":[],"mappings":"AAMA,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,aAAc,SAAQ,YAAY;IAC7C,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAKrD,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQvC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAInE,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAS5F,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAS7E,qBAAqB,CACnB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,CAAC,aAAa,CAAC;CAM1B"}
@@ -0,0 +1,7 @@
1
+ import type { ManzaResponse } from "../response.js";
2
+ import { ResourceBase } from "./base.js";
3
+ export declare class CheckoutSessions extends ResourceBase {
4
+ get(id: string): Promise<ManzaResponse>;
5
+ create(attributes: Record<string, unknown>): Promise<ManzaResponse>;
6
+ }
7
+ //# sourceMappingURL=checkout_sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkout_sessions.d.ts","sourceRoot":"","sources":["../../src/resources/checkout_sessions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,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;CAGpE"}
@@ -0,0 +1,14 @@
1
+ import type { Page } from "../page.js";
2
+ import type { ManzaResponse } from "../response.js";
3
+ import { type ListParams, ResourceBase } from "./base.js";
4
+ export interface CustomerListParams extends ListParams {
5
+ q?: string;
6
+ }
7
+ export declare class Customers extends ResourceBase {
8
+ list(params?: CustomerListParams): Promise<Page<unknown>>;
9
+ get(id: string): Promise<ManzaResponse>;
10
+ create(attributes: Record<string, unknown>): Promise<ManzaResponse>;
11
+ update(id: string, attributes: Record<string, unknown>): Promise<ManzaResponse>;
12
+ delete(id: string): Promise<ManzaResponse>;
13
+ }
14
+ //# sourceMappingURL=customers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../src/resources/customers.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,kBAAmB,SAAQ,UAAU;IACpD,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,qBAAa,SAAU,SAAQ,YAAY;IACzC,IAAI,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAK7D,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;CAG3C"}
@@ -0,0 +1,6 @@
1
+ import type { ManzaResponse } from "../response.js";
2
+ import { ResourceBase } from "./base.js";
3
+ export declare class Entity extends ResourceBase {
4
+ get(): Promise<ManzaResponse>;
5
+ }
6
+ //# sourceMappingURL=entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/resources/entity.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,MAAO,SAAQ,YAAY;IACtC,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC;CAG9B"}
@@ -0,0 +1,20 @@
1
+ import type { Page } from "../page.js";
2
+ import type { ManzaResponse } from "../response.js";
3
+ import { type ListParams, ResourceBase } from "./base.js";
4
+ export interface InvoiceListParams extends ListParams {
5
+ status?: string;
6
+ customer_id?: string;
7
+ }
8
+ export declare class Invoices extends ResourceBase {
9
+ list(params?: InvoiceListParams): Promise<Page<unknown>>;
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
+ }
20
+ //# sourceMappingURL=invoices.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,9 @@
1
+ import type { ManzaResponse } from "../response.js";
2
+ import { ResourceBase } from "./base.js";
3
+ export declare class PayeeTrustRequests extends ResourceBase {
4
+ create(params: {
5
+ external_account_ids: string[];
6
+ }): Promise<ManzaResponse>;
7
+ get(id: string): Promise<ManzaResponse>;
8
+ }
9
+ //# sourceMappingURL=payee_trust_requests.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
1
+ import type { Page } from "../page.js";
2
+ import type { ManzaResponse } from "../response.js";
3
+ import { type ListParams, ResourceBase } from "./base.js";
4
+ export declare class PaymentLinks extends ResourceBase {
5
+ list(params?: ListParams): Promise<Page<unknown>>;
6
+ get(id: string): Promise<ManzaResponse>;
7
+ create(attributes: Record<string, unknown>): Promise<ManzaResponse>;
8
+ cancel(id: string): Promise<ManzaResponse>;
9
+ }
10
+ //# sourceMappingURL=payment_links.d.ts.map
@@ -0,0 +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,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 TransferDrafts 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=transfer_drafts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer_drafts.d.ts","sourceRoot":"","sources":["../../src/resources/transfer_drafts.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,cAAe,SAAQ,YAAY;IAO9C,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAInE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAUvC,SAAS,CACP,EAAE,EAAE,MAAM,EACV,MAAM,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GACtD,OAAO,CAAC,aAAa,CAAC;IAYzB,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,20 @@
1
+ import type { Page } from "../page.js";
2
+ import type { ManzaResponse } from "../response.js";
3
+ import { type ListParams, ResourceBase } from "./base.js";
4
+ export interface WebhookEndpointCreateParams {
5
+ url: string;
6
+ events: string[];
7
+ description?: string;
8
+ }
9
+ export declare class WebhookEndpoints extends ResourceBase {
10
+ list(params?: ListParams): Promise<Page<unknown>>;
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
+ }
20
+ //# sourceMappingURL=webhook_endpoints.d.ts.map
@@ -0,0 +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,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"}
@@ -0,0 +1,10 @@
1
+ export declare class ManzaResponse<TBody = unknown> {
2
+ readonly status: number;
3
+ readonly headers: Headers;
4
+ readonly body: TBody;
5
+ readonly raw: Response;
6
+ constructor(raw: Response, body: TBody);
7
+ get success(): boolean;
8
+ get requestId(): string | null;
9
+ }
10
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,27 @@
1
+ export declare const SIGNATURE_VERSION = "manza.transfer-authorization.v1";
2
+ export interface SignatureInputFields {
3
+ payment_id: string;
4
+ nonce: string;
5
+ amount: string;
6
+ currency_code: string;
7
+ account_id: string;
8
+ payee: string;
9
+ client_reference?: string | null | undefined;
10
+ }
11
+ export interface PayeeForParams {
12
+ external_account_id?: string | null | undefined;
13
+ destination_account_id?: string | null | undefined;
14
+ }
15
+ export declare function signatureInput(fields: SignatureInputFields): string;
16
+ export declare function sign(params: {
17
+ secret: string;
18
+ signature_input: string;
19
+ }): Promise<string>;
20
+ export declare function payeeFor(params: PayeeForParams): string;
21
+ export declare const TransferAuthorization: {
22
+ readonly SIGNATURE_VERSION: "manza.transfer-authorization.v1";
23
+ readonly signatureInput: typeof signatureInput;
24
+ readonly sign: typeof sign;
25
+ readonly payeeFor: typeof payeeFor;
26
+ };
27
+ //# sourceMappingURL=transfer_authorization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer_authorization.d.ts","sourceRoot":"","sources":["../src/transfer_authorization.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,iBAAiB,oCAAoC,CAAC;AAEnE,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC9C;AAED,MAAM,WAAW,cAAc;IAC7B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAgBnE;AAKD,wBAAsB,IAAI,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAW/F;AAED,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CASvD;AAED,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const VERSION = "1.0.1";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "@getmanza/sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "description": "TypeScript SDK for the Manza API. Runtime-agnostic (Node, Bun, Deno, browsers, Cloudflare Workers).",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md",
19
+ "CHANGELOG.md",
20
+ "LICENSE"
21
+ ],
22
+ "scripts": {
23
+ "build": "rm -rf dist && bun run build:esm && bun run build:cjs && bun run build:dts",
24
+ "build:esm": "bun build src/index.ts --outfile dist/index.js --target browser --format esm",
25
+ "build:cjs": "bun build src/index.ts --outfile dist/index.cjs --target node --format cjs",
26
+ "build:dts": "tsc -p tsconfig.build.json --emitDeclarationOnly --declaration --outDir dist",
27
+ "typecheck": "tsc --noEmit",
28
+ "test": "bun test",
29
+ "lint": "biome check --error-on-warnings .",
30
+ "lint:fix": "biome check --write .",
31
+ "format": "biome format --write .",
32
+ "format:check": "biome format .",
33
+ "check:all": "bun run typecheck && bun run lint && bun test",
34
+ "fetch:cassettes": "bun scripts/fetch-cassettes.ts",
35
+ "release": "bin/release"
36
+ },
37
+ "keywords": [
38
+ "manza",
39
+ "sdk",
40
+ "api",
41
+ "payments",
42
+ "morocco",
43
+ "fintech"
44
+ ],
45
+ "author": "Manza <hello@get-manza.com>",
46
+ "license": "MIT",
47
+ "homepage": "https://github.com/getmanza/manza-ts",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git+https://github.com/getmanza/manza-ts.git"
51
+ },
52
+ "bugs": {
53
+ "url": "https://github.com/getmanza/manza-ts/issues"
54
+ },
55
+ "engines": {
56
+ "node": ">=20.0.0"
57
+ },
58
+ "publishConfig": {
59
+ "access": "public",
60
+ "provenance": true,
61
+ "registry": "https://registry.npmjs.org/"
62
+ },
63
+ "devDependencies": {
64
+ "@biomejs/biome": "^2.4.14",
65
+ "@types/bun": "latest",
66
+ "@types/js-yaml": "^4.0.9",
67
+ "js-yaml": "^4.1.0",
68
+ "msw": "^2.6.0",
69
+ "tar": "^7.4.3",
70
+ "typescript": "^5.6.0"
71
+ }
72
+ }