@getmanza/sdk 1.1.0 → 2.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/CHANGELOG.md +107 -0
- package/README.md +18 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.cjs +28 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -6
- package/dist/resources/invoices.d.ts +0 -1
- package/dist/resources/invoices.d.ts.map +1 -1
- package/dist/resources/payments.d.ts.map +1 -1
- package/dist/resources/transfer_authorizer.d.ts.map +1 -1
- package/dist/transfer_authorization.d.ts +3 -2
- package/dist/transfer_authorization.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,113 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.0.0] - 2026-11-14
|
|
11
|
+
|
|
12
|
+
Mirrors manza-ruby 2.0.0 and replays `cassettes-v2.0.0`: synced to the
|
|
13
|
+
Manza API at getmanza/app `906ec486e5` (API version `2026-11-13`). A major
|
|
14
|
+
release: see Migrating from 1.x below.
|
|
15
|
+
|
|
16
|
+
### Removed
|
|
17
|
+
|
|
18
|
+
- **Breaking:** `manza.invoices.createPaymentLink` (`POST
|
|
19
|
+
/api/invoices/:id/payment_link`). The API retired the endpoint: ask for
|
|
20
|
+
the link with `generate_payment_link: true` on `invoices.create` or
|
|
21
|
+
`invoices.update` instead.
|
|
22
|
+
- **Breaking:** the v1 transfer-authorization signer.
|
|
23
|
+
`TransferAuthorization` builds only the v2 input (below).
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **Breaking:** `TransferAuthorization.SIGNATURE_VERSION` is
|
|
28
|
+
`manza.transfer-authorization.v2`, and `signatureInput` takes a required
|
|
29
|
+
`transfer_method` (`string | null`), appended after `client_reference`
|
|
30
|
+
(`""` when `null`):
|
|
31
|
+
`manza.transfer-authorization.v2|payment_id|nonce|amount|currency_code|account_id|payee|client_reference|transfer_method`.
|
|
32
|
+
Leaving it out fails to compile, and throws `ManzaArgumentError` from
|
|
33
|
+
plain JavaScript, before anything is sent. The API verifies v2 for
|
|
34
|
+
every request that is unpinned or sends `Manza-Version: 2026-11-13` or
|
|
35
|
+
later; only `2026-03-27` still verifies v1. Pass the payment's
|
|
36
|
+
`transfer_method` as the API returned it.
|
|
37
|
+
- The example authorizer (`examples/transfer_authorizer`) records the
|
|
38
|
+
create response's `transfer_method` in its ledger, checks it against the
|
|
39
|
+
webhook's `payment.transfer_method`, signs v2, and compares its input
|
|
40
|
+
with the webhook's `signature_input_v2`. `LedgerEntry` has a required
|
|
41
|
+
`transfer_method`; an entry without one reads as `null`.
|
|
42
|
+
- Invoice docs: `account_id` is required on `invoices.create` (without
|
|
43
|
+
one the API answers 422 `state_error`; an account that is not the
|
|
44
|
+
entity's, 422 with `param` `account_id`), and `invoices.update` takes it
|
|
45
|
+
too. An invoice's `status` may be `declined`, and `invoices.delete` also
|
|
46
|
+
takes a `declined` invoice that has no number.
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- `ManzaPlanLimitReachedError`, a `ManzaValidationError` thrown for a 422
|
|
51
|
+
whose `type` is `plan_limit_reached` (a plan cap, which the API used to
|
|
52
|
+
answer with a 500). `kind`, `current` and `max` read the cap from the
|
|
53
|
+
error body.
|
|
54
|
+
- `generate_payment_link` on `invoices.create` and `invoices.update`
|
|
55
|
+
(needs the `payment_links:write` scope; taken only while payment links
|
|
56
|
+
are enabled for the entity). Invoice responses carry
|
|
57
|
+
`generate_payment_link` and the embedded `account`.
|
|
58
|
+
- `transfer_method` on `payments.create`: `eft` or `rtc` in South Africa,
|
|
59
|
+
`standard` or `instant` in Morocco; one the market does not offer
|
|
60
|
+
rejects with `ManzaValidationError` with `param` `transfer_method`.
|
|
61
|
+
Payment responses carry `transfer_method` (the rail sent, the provider's
|
|
62
|
+
default when left out, `null` where the market offers no choice).
|
|
63
|
+
- Documented: the authorization `refusal_reason` `rail_limit_exceeded`
|
|
64
|
+
(status `superseded`): an authorized transfer over its rail's limit at
|
|
65
|
+
execution, sent to the approvers; the authorize call rejects with a 422
|
|
66
|
+
`ManzaValidationError` (`state_error`). A non-boolean
|
|
67
|
+
`generate_payment_link` rejects with `ManzaValidationError` (400).
|
|
68
|
+
- Documented: the `payment.authorization_requested` webhook's
|
|
69
|
+
`signature_input_v2` and `payment.transfer_method`, and
|
|
70
|
+
`transferAuthorizer.get()`'s `trust_new_payees` and `new_payee_limit`.
|
|
71
|
+
|
|
72
|
+
### Fixed (API side, no wire change)
|
|
73
|
+
|
|
74
|
+
- `accounts.listTransactions` and `accounts.getTransaction` return posted
|
|
75
|
+
movements only (getmanza/app 818432457a); the SDK is unchanged.
|
|
76
|
+
|
|
77
|
+
### Changed (cassettes)
|
|
78
|
+
|
|
79
|
+
- The replay tests pin `cassettes-v2.0.0` (was `v1.3.0`). Every cassette
|
|
80
|
+
was re-recorded against staging; the changed or new requests are
|
|
81
|
+
`invoices/create` (with `account_id`, `generate_payment_link: true` and
|
|
82
|
+
new dates), `invoices/create_invalid_generate_payment_link` (new, 400),
|
|
83
|
+
`invoices/create_without_account` (new, 422 `state_error`),
|
|
84
|
+
`invoices/update` (with `account_id` and `generate_payment_link: true`),
|
|
85
|
+
`payments/create` (with `transfer_method: "standard"`) and
|
|
86
|
+
`payments/create_invalid_transfer_method` (new, 422 on
|
|
87
|
+
`transfer_method`). See manza-ruby's CHANGELOG at 2.0.0.
|
|
88
|
+
|
|
89
|
+
### Migrating from 1.x
|
|
90
|
+
|
|
91
|
+
- **`createPaymentLink` is gone.** Replace
|
|
92
|
+
`manza.invoices.createPaymentLink(id, { account_id })` with
|
|
93
|
+
`manza.invoices.update(id, { account_id, generate_payment_link: true })`,
|
|
94
|
+
or pass `generate_payment_link: true` on create. `update` resolves to
|
|
95
|
+
the invoice, not a link: the link is made from the invoice's account
|
|
96
|
+
when the invoice is approved, and appears in the invoice's
|
|
97
|
+
`payment_link`. `update` takes only an invoice that is still `draft`,
|
|
98
|
+
`pending_approval` or `declined` (any other rejects with
|
|
99
|
+
`ManzaValidationError`, `state_error`); for an invoice already approved
|
|
100
|
+
or sent, there is no API path to attach a link to it:
|
|
101
|
+
`manza.paymentLinks.create({ account_id, amount, ... })` makes a
|
|
102
|
+
standalone link instead.
|
|
103
|
+
- **`account_id` is required on invoice create.** Pass the account the
|
|
104
|
+
invoice is paid into (`manza.accounts.list()`); 1.x calls without it now
|
|
105
|
+
reject with `ManzaValidationError`.
|
|
106
|
+
- **v2 signatures only.** Add `transfer_method: payment.transfer_method`
|
|
107
|
+
to every `TransferAuthorization.signatureInput` call, and compare with
|
|
108
|
+
the webhook's `signature_input_v2` instead of `signature_input`. A
|
|
109
|
+
client pinned to `Manza-Version: 2026-03-27` (`apiVersion` or
|
|
110
|
+
`MANZA_API_VERSION`) is verified v1 and must stay on `@getmanza/sdk`
|
|
111
|
+
1.x; unpin it, or pin `2026-11-13`, to move to 2.0.
|
|
112
|
+
- **Plan caps.** A `catch` that tests `instanceof ManzaServerError` around
|
|
113
|
+
creates that may hit a plan cap no longer catches it: test
|
|
114
|
+
`instanceof ManzaPlanLimitReachedError` (or its parent
|
|
115
|
+
`ManzaValidationError`), and do not retry it.
|
|
116
|
+
|
|
10
117
|
## [1.1.0]
|
|
11
118
|
|
|
12
119
|
Mirrors manza-ruby 1.3.0 (with 1.2.0) and replays `cassettes-v1.3.0`.
|
package/README.md
CHANGED
|
@@ -44,7 +44,15 @@ manza.customers.update(id, { ... });
|
|
|
44
44
|
manza.customers.delete(id);
|
|
45
45
|
|
|
46
46
|
manza.invoices.list();
|
|
47
|
-
manza.invoices.create({
|
|
47
|
+
manza.invoices.create({
|
|
48
|
+
customer_id,
|
|
49
|
+
account_id, // required: the account the invoice is paid into
|
|
50
|
+
issue_date: "2026-11-14",
|
|
51
|
+
due_date: "2026-12-14",
|
|
52
|
+
generate_payment_link: true, // a card payment link, made when approved (payment_links:write; payment links enabled for the entity)
|
|
53
|
+
items: [{ description: "Consulting", quantity: 10, unit_price: "150.00" }],
|
|
54
|
+
});
|
|
55
|
+
manza.invoices.update(id, { account_id, generate_payment_link: false });
|
|
48
56
|
// state-transition methods exist but the underlying public API is
|
|
49
57
|
// not yet wired up — see getmanza/app issue #2174.
|
|
50
58
|
|
|
@@ -72,14 +80,16 @@ manza.beneficiaries.createExternalAccount(beneficiaryId, { account_number });
|
|
|
72
80
|
manza.payeeTrustRequests.create({ external_account_ids: [id] });
|
|
73
81
|
manza.payeeTrustRequests.get(id);
|
|
74
82
|
|
|
75
|
-
manza.payments.create({ account_id, beneficiary_id, amount: "2500.00", client_reference });
|
|
83
|
+
manza.payments.create({ account_id, beneficiary_id, amount: "2500.00", client_reference, transfer_method: "standard" });
|
|
76
84
|
// client_reference is unique per entity; a duplicate raises ManzaConflictError
|
|
85
|
+
// transfer_method is the optional rail: eft/rtc (ZA), standard/instant (MA); omitted → the default
|
|
77
86
|
manza.payments.get(id); // authorization: status, refusal_reason
|
|
78
87
|
manza.payments.authorize(id, { authorization_id, signature });
|
|
79
88
|
manza.payments.decline(id, { authorization_id, reason });
|
|
80
89
|
// manza.transferDrafts is a deprecated alias of manza.payments (same object, /api/payments)
|
|
81
90
|
|
|
82
|
-
manza.transferAuthorizer.get(); // status, suspension_reason, limits, daily_authorized_total
|
|
91
|
+
manza.transferAuthorizer.get(); // status, suspension_reason, limits, daily_authorized_total, trust_new_payees,
|
|
92
|
+
// new_payee_limit; ManzaNotFoundError: none enrolled
|
|
83
93
|
```
|
|
84
94
|
|
|
85
95
|
## Machine-authorized transfers
|
|
@@ -104,9 +114,9 @@ A draft inside your entity's authorization envelope (trusted payee, or a new one
|
|
|
104
114
|
await manza.payeeTrustRequests.create({ external_account_ids: ["01a1..."] });
|
|
105
115
|
```
|
|
106
116
|
|
|
107
|
-
`trusted` on `manza.beneficiaries.getExternalAccount` says which it is.
|
|
117
|
+
`trusted` on `manza.beneficiaries.getExternalAccount` says which it is. `trust_new_payees` on `manza.transferAuthorizer.get()` says whether the option is on, and `new_payee_limit` its limit.
|
|
108
118
|
7. **Run the preflight, then the example** (from `examples/transfer_authorizer/`, after `bun install` at the repository root and filling in `.env`): `bun preflight.ts` checks what the API shows of steps 1–6 and prints a fix for each that fails. What it cannot see, check by hand: that key B is bound to an IP allowlist, and, for a payee not trusted yet, that *Approve transfers to new payees* is on and key A is bound to an IP allowlist too (it warns, it does not fail). Then `bun server.ts` in one terminal, `bun create_transfer.ts` in another (on Node, `npx tsx` in place of `bun`).
|
|
109
|
-
8. **Troubleshooting**: a draft that goes to your approvers instead has an `authorization` with a `refusal_reason`: status `refused` when it did not qualify (`create_transfer.ts` prints the reason in words), or `expired` (`expired`), `superseded` (`stale`; or an approver finalized the draft while its challenge was open, and it executes) or `failed` (`signature_failed`, five invalid signatures) when a challenge was sent and closed without an authorize; `manza.transferAuthorizer.get()` shows a suspension and its `suspension_reason`. An authorize answered 409 `authorization_busy` (a bank-detail edit, trust or trust revocation on the same payee was in flight) is safe to retry. The reasons, and an API error's `type`, are in the [transfer authorization docs](https://ma.manza.finance/docs/api/transfer-authorization).
|
|
119
|
+
8. **Troubleshooting**: a draft that goes to your approvers instead has an `authorization` with a `refusal_reason`: status `refused` when it did not qualify (`create_transfer.ts` prints the reason in words), or `expired` (`expired`), `superseded` (`stale`; or an approver finalized the draft while its challenge was open, and it executes) or `failed` (`signature_failed`, five invalid signatures) when a challenge was sent and closed without an authorize, and `superseded` (`rail_limit_exceeded`) when an authorized transfer was over its rail's limit at execution, so nothing moved; `manza.transferAuthorizer.get()` shows a suspension and its `suspension_reason`. An authorize answered 409 `authorization_busy` (a bank-detail edit, trust or trust revocation on the same payee was in flight) is safe to retry. The reasons, and an API error's `type`, are in the [transfer authorization docs](https://ma.manza.finance/docs/api/transfer-authorization).
|
|
110
120
|
|
|
111
121
|
### Verifying the webhook
|
|
112
122
|
|
|
@@ -128,7 +138,7 @@ try {
|
|
|
128
138
|
|
|
129
139
|
### Signing the challenge
|
|
130
140
|
|
|
131
|
-
Sign the draft from **your own record** of it (
|
|
141
|
+
Sign the draft from **your own record** of it with the endpoint's signing secret. The SDK builds the v2 input (`manza.transfer-authorization.v2`), which ends with the payment's `transfer_method` (an empty segment when it is `null`); compare it with the webhook's `signature_input_v2`, which is there only to compare against. The webhook's `signature_input` is the v1 string, verified only for clients pinned to `Manza-Version: 2026-03-27`: those stay on `@getmanza/sdk` 1.x. Unpinned, or pinned to `2026-11-13` or later, the API verifies v2.
|
|
132
142
|
|
|
133
143
|
```ts
|
|
134
144
|
import { Manza, TransferAuthorization } from "@getmanza/sdk";
|
|
@@ -141,6 +151,7 @@ const input = TransferAuthorization.signatureInput({
|
|
|
141
151
|
account_id: draft.account_id,
|
|
142
152
|
payee: TransferAuthorization.payeeFor({ external_account_id: draft.external_account_id }),
|
|
143
153
|
client_reference: draft.client_reference,
|
|
154
|
+
transfer_method: draft.transfer_method, // required; null signs as ""
|
|
144
155
|
});
|
|
145
156
|
|
|
146
157
|
const signature = await TransferAuthorization.sign({
|
|
@@ -159,7 +170,7 @@ await authorizer.payments.authorize(draft.id, {
|
|
|
159
170
|
|
|
160
171
|
## Errors
|
|
161
172
|
|
|
162
|
-
|
|
173
|
+
Eleven concrete subclasses; discriminate with `instanceof`. A 422 is a `ManzaValidationError`; one whose `type` is `plan_limit_reached` is its subclass `ManzaPlanLimitReachedError`, carrying `kind`, `current` and `max` (a plan cap: retrying does not help).
|
|
163
174
|
|
|
164
175
|
```ts
|
|
165
176
|
import { ManzaValidationError, ManzaRateLimitError, ManzaNotFoundError } from "@getmanza/sdk";
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","s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AS,CAAC;CAC9C;AAOD,qBAAa,KAAK;;IAChB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAG3B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;gBAEhC,OAAO,GAAE,kBAAuB;IAyBtC,OAAO,CAAC,CAAC,GAAG,OAAO,EACvB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAqD7B"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -27,6 +27,16 @@ export declare class ManzaNotFoundError extends ManzaError {
|
|
|
27
27
|
}
|
|
28
28
|
export declare class ManzaValidationError extends ManzaError {
|
|
29
29
|
}
|
|
30
|
+
export declare class ManzaPlanLimitReachedError extends ManzaValidationError {
|
|
31
|
+
readonly kind: string | null;
|
|
32
|
+
readonly current: number | null;
|
|
33
|
+
readonly max: number | null;
|
|
34
|
+
constructor(message: string, options?: ManzaErrorOptions & {
|
|
35
|
+
kind?: string | null;
|
|
36
|
+
current?: number | null;
|
|
37
|
+
max?: number | null;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
30
40
|
export declare class ManzaRateLimitError extends ManzaError {
|
|
31
41
|
readonly retryAfter: number | null;
|
|
32
42
|
constructor(message: string, options?: ManzaErrorOptions & {
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IAIf,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED,qBAAa,UAAW,SAAQ,KAAK;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB;CAU7D;AAED,qBAAa,uBAAwB,SAAQ,UAAU;CAAG;AAC1D,qBAAa,oBAAqB,SAAQ,UAAU;CAAG;AACvD,qBAAa,wBAAyB,SAAQ,UAAU;CAAG;AAC3D,q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IAAI,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;gBAG1B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,iBAAiB,GAAG;QAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAChB;CAOT;AACD,qBAAa,mBAAoB,SAAQ,UAAU;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEvB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAiB,GAAG;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAO;CAI9F;AACD,qBAAa,gBAAiB,SAAQ,UAAU;CAAG;AACnD,qBAAa,kBAAmB,SAAQ,UAAU;CAAG;AAIrD,qBAAa,kBAAmB,SAAQ,UAAU;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEtB,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAiB,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAO;CAI7F"}
|
package/dist/index.cjs
CHANGED
|
@@ -55,6 +55,7 @@ __export(exports_src, {
|
|
|
55
55
|
ManzaError: () => ManzaError,
|
|
56
56
|
ManzaForbiddenError: () => ManzaForbiddenError,
|
|
57
57
|
ManzaNotFoundError: () => ManzaNotFoundError,
|
|
58
|
+
ManzaPlanLimitReachedError: () => ManzaPlanLimitReachedError,
|
|
58
59
|
ManzaRateLimitError: () => ManzaRateLimitError,
|
|
59
60
|
ManzaResponse: () => ManzaResponse,
|
|
60
61
|
ManzaServerError: () => ManzaServerError,
|
|
@@ -133,6 +134,18 @@ class ManzaNotFoundError extends ManzaError {
|
|
|
133
134
|
class ManzaValidationError extends ManzaError {
|
|
134
135
|
}
|
|
135
136
|
|
|
137
|
+
class ManzaPlanLimitReachedError extends ManzaValidationError {
|
|
138
|
+
kind;
|
|
139
|
+
current;
|
|
140
|
+
max;
|
|
141
|
+
constructor(message, options = {}) {
|
|
142
|
+
super(message, options);
|
|
143
|
+
this.kind = options.kind ?? null;
|
|
144
|
+
this.current = options.current ?? null;
|
|
145
|
+
this.max = options.max ?? null;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
136
149
|
class ManzaRateLimitError extends ManzaError {
|
|
137
150
|
retryAfter;
|
|
138
151
|
constructor(message, options = {}) {
|
|
@@ -369,9 +382,6 @@ class Invoices extends ResourceBase {
|
|
|
369
382
|
creditNote(id, attributes = {}) {
|
|
370
383
|
return this.httpPost(this.encodePath("api/invoices", id, "credit_note"), attributes);
|
|
371
384
|
}
|
|
372
|
-
createPaymentLink(id, attributes = {}) {
|
|
373
|
-
return this.httpPost(this.encodePath("api/invoices", id, "payment_link"), attributes);
|
|
374
|
-
}
|
|
375
385
|
}
|
|
376
386
|
|
|
377
387
|
// src/resources/payee_trust_requests.ts
|
|
@@ -488,7 +498,7 @@ class ManzaResponse {
|
|
|
488
498
|
}
|
|
489
499
|
|
|
490
500
|
// src/version.ts
|
|
491
|
-
var VERSION = "
|
|
501
|
+
var VERSION = "2.0.0";
|
|
492
502
|
|
|
493
503
|
// src/client.ts
|
|
494
504
|
var DEFAULT_BASE_URL = "https://ma.manza.finance";
|
|
@@ -619,6 +629,14 @@ function buildError(response) {
|
|
|
619
629
|
body: response.body,
|
|
620
630
|
headers: response.headers
|
|
621
631
|
};
|
|
632
|
+
if (response.status === 422 && payload.type === "plan_limit_reached") {
|
|
633
|
+
return new ManzaPlanLimitReachedError(message ?? "Plan limit reached", {
|
|
634
|
+
...opts,
|
|
635
|
+
kind: payload.kind ?? null,
|
|
636
|
+
current: payload.current ?? null,
|
|
637
|
+
max: payload.max ?? null
|
|
638
|
+
});
|
|
639
|
+
}
|
|
622
640
|
switch (response.status) {
|
|
623
641
|
case 400:
|
|
624
642
|
return new ManzaValidationError(message ?? "Bad request", opts);
|
|
@@ -651,11 +669,14 @@ function buildError(response) {
|
|
|
651
669
|
// src/resources/transfer_drafts.ts
|
|
652
670
|
var TransferDrafts = Payments;
|
|
653
671
|
// src/transfer_authorization.ts
|
|
654
|
-
var SIGNATURE_VERSION = "manza.transfer-authorization.
|
|
672
|
+
var SIGNATURE_VERSION = "manza.transfer-authorization.v2";
|
|
655
673
|
function signatureInput(fields) {
|
|
656
674
|
if (typeof fields.amount !== "string") {
|
|
657
675
|
throw new ManzaArgumentError(`amount must be the API's decimal string (got ${JSON.stringify(fields.amount)})`);
|
|
658
676
|
}
|
|
677
|
+
if (fields.transfer_method === undefined) {
|
|
678
|
+
throw new ManzaArgumentError("transfer_method is required (null where the market offers no choice)");
|
|
679
|
+
}
|
|
659
680
|
return [
|
|
660
681
|
SIGNATURE_VERSION,
|
|
661
682
|
fields.payment_id,
|
|
@@ -664,7 +685,8 @@ function signatureInput(fields) {
|
|
|
664
685
|
fields.currency_code,
|
|
665
686
|
fields.account_id,
|
|
666
687
|
fields.payee,
|
|
667
|
-
fields.client_reference ?? ""
|
|
688
|
+
fields.client_reference ?? "",
|
|
689
|
+
fields.transfer_method ?? ""
|
|
668
690
|
].join("|");
|
|
669
691
|
}
|
|
670
692
|
async function sign(params) {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Manza, type ManzaClientOptions, type RequestOptions } from "./client.js";
|
|
2
|
-
export { ManzaArgumentError, ManzaAuthenticationError, ManzaConfigurationError, ManzaConflictError, ManzaConnectionError, ManzaError, type ManzaErrorOptions, ManzaForbiddenError, ManzaNotFoundError, ManzaRateLimitError, ManzaServerError, ManzaValidationError, } from "./errors.js";
|
|
2
|
+
export { ManzaArgumentError, ManzaAuthenticationError, ManzaConfigurationError, ManzaConflictError, ManzaConnectionError, ManzaError, type ManzaErrorOptions, ManzaForbiddenError, ManzaNotFoundError, ManzaPlanLimitReachedError, ManzaRateLimitError, ManzaServerError, ManzaValidationError, } from "./errors.js";
|
|
3
3
|
export { MAX_PER_PAGE, Page, type PageBody, type PageFetcher } from "./page.js";
|
|
4
4
|
export { Accounts } from "./resources/accounts.js";
|
|
5
5
|
export { Beneficiaries } from "./resources/beneficiaries.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,KAAK,iBAAiB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAGhF,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OA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AAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EACL,OAAO,EACP,KAAK,2BAA2B,EAChC,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,18 @@ class ManzaNotFoundError extends ManzaError {
|
|
|
59
59
|
class ManzaValidationError extends ManzaError {
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
class ManzaPlanLimitReachedError extends ManzaValidationError {
|
|
63
|
+
kind;
|
|
64
|
+
current;
|
|
65
|
+
max;
|
|
66
|
+
constructor(message, options = {}) {
|
|
67
|
+
super(message, options);
|
|
68
|
+
this.kind = options.kind ?? null;
|
|
69
|
+
this.current = options.current ?? null;
|
|
70
|
+
this.max = options.max ?? null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
62
74
|
class ManzaRateLimitError extends ManzaError {
|
|
63
75
|
retryAfter;
|
|
64
76
|
constructor(message, options = {}) {
|
|
@@ -295,9 +307,6 @@ class Invoices extends ResourceBase {
|
|
|
295
307
|
creditNote(id, attributes = {}) {
|
|
296
308
|
return this.httpPost(this.encodePath("api/invoices", id, "credit_note"), attributes);
|
|
297
309
|
}
|
|
298
|
-
createPaymentLink(id, attributes = {}) {
|
|
299
|
-
return this.httpPost(this.encodePath("api/invoices", id, "payment_link"), attributes);
|
|
300
|
-
}
|
|
301
310
|
}
|
|
302
311
|
|
|
303
312
|
// src/resources/payee_trust_requests.ts
|
|
@@ -414,7 +423,7 @@ class ManzaResponse {
|
|
|
414
423
|
}
|
|
415
424
|
|
|
416
425
|
// src/version.ts
|
|
417
|
-
var VERSION = "
|
|
426
|
+
var VERSION = "2.0.0";
|
|
418
427
|
|
|
419
428
|
// src/client.ts
|
|
420
429
|
var DEFAULT_BASE_URL = "https://ma.manza.finance";
|
|
@@ -545,6 +554,14 @@ function buildError(response) {
|
|
|
545
554
|
body: response.body,
|
|
546
555
|
headers: response.headers
|
|
547
556
|
};
|
|
557
|
+
if (response.status === 422 && payload.type === "plan_limit_reached") {
|
|
558
|
+
return new ManzaPlanLimitReachedError(message ?? "Plan limit reached", {
|
|
559
|
+
...opts,
|
|
560
|
+
kind: payload.kind ?? null,
|
|
561
|
+
current: payload.current ?? null,
|
|
562
|
+
max: payload.max ?? null
|
|
563
|
+
});
|
|
564
|
+
}
|
|
548
565
|
switch (response.status) {
|
|
549
566
|
case 400:
|
|
550
567
|
return new ManzaValidationError(message ?? "Bad request", opts);
|
|
@@ -577,11 +594,14 @@ function buildError(response) {
|
|
|
577
594
|
// src/resources/transfer_drafts.ts
|
|
578
595
|
var TransferDrafts = Payments;
|
|
579
596
|
// src/transfer_authorization.ts
|
|
580
|
-
var SIGNATURE_VERSION = "manza.transfer-authorization.
|
|
597
|
+
var SIGNATURE_VERSION = "manza.transfer-authorization.v2";
|
|
581
598
|
function signatureInput(fields) {
|
|
582
599
|
if (typeof fields.amount !== "string") {
|
|
583
600
|
throw new ManzaArgumentError(`amount must be the API's decimal string (got ${JSON.stringify(fields.amount)})`);
|
|
584
601
|
}
|
|
602
|
+
if (fields.transfer_method === undefined) {
|
|
603
|
+
throw new ManzaArgumentError("transfer_method is required (null where the market offers no choice)");
|
|
604
|
+
}
|
|
585
605
|
return [
|
|
586
606
|
SIGNATURE_VERSION,
|
|
587
607
|
fields.payment_id,
|
|
@@ -590,7 +610,8 @@ function signatureInput(fields) {
|
|
|
590
610
|
fields.currency_code,
|
|
591
611
|
fields.account_id,
|
|
592
612
|
fields.payee,
|
|
593
|
-
fields.client_reference ?? ""
|
|
613
|
+
fields.client_reference ?? "",
|
|
614
|
+
fields.transfer_method ?? ""
|
|
594
615
|
].join("|");
|
|
595
616
|
}
|
|
596
617
|
async function sign(params) {
|
|
@@ -733,6 +754,7 @@ export {
|
|
|
733
754
|
ManzaError,
|
|
734
755
|
ManzaForbiddenError,
|
|
735
756
|
ManzaNotFoundError,
|
|
757
|
+
ManzaPlanLimitReachedError,
|
|
736
758
|
ManzaRateLimitError,
|
|
737
759
|
ManzaResponse,
|
|
738
760
|
ManzaServerError,
|
|
@@ -15,6 +15,5 @@ export declare class Invoices extends ResourceBase {
|
|
|
15
15
|
markAsPaid(id: string, attributes?: Record<string, unknown>): Promise<ManzaResponse>;
|
|
16
16
|
cancel(id: string): Promise<ManzaResponse>;
|
|
17
17
|
creditNote(id: string, attributes?: Record<string, unknown>): Promise<ManzaResponse>;
|
|
18
|
-
createPaymentLink(id: string, attributes?: Record<string, unknown>): Promise<ManzaResponse>;
|
|
19
18
|
}
|
|
20
19
|
//# 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,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,KAAK,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE1D,MAAM,WAAW,iBAAkB,SAAQ,UAAU;
|
|
1
|
+
{"version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1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../src/resources/payments.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../../src/resources/payments.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,qBAAa,QAAS,SAAQ,YAAY;IAiBxC,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;IAsBvC,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"}
|
|
@@ -1 +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;
|
|
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;IAalD,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC;CAG9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SIGNATURE_VERSION = "manza.transfer-authorization.
|
|
1
|
+
export declare const SIGNATURE_VERSION = "manza.transfer-authorization.v2";
|
|
2
2
|
export interface SignatureInputFields {
|
|
3
3
|
payment_id: string;
|
|
4
4
|
nonce: string;
|
|
@@ -7,6 +7,7 @@ export interface SignatureInputFields {
|
|
|
7
7
|
account_id: string;
|
|
8
8
|
payee: string;
|
|
9
9
|
client_reference?: string | null | undefined;
|
|
10
|
+
transfer_method: string | null;
|
|
10
11
|
}
|
|
11
12
|
export interface PayeeForParams {
|
|
12
13
|
external_account_id?: string | null | undefined;
|
|
@@ -19,7 +20,7 @@ export declare function sign(params: {
|
|
|
19
20
|
}): Promise<string>;
|
|
20
21
|
export declare function payeeFor(params: PayeeForParams): string;
|
|
21
22
|
export declare const TransferAuthorization: {
|
|
22
|
-
readonly SIGNATURE_VERSION: "manza.transfer-authorization.
|
|
23
|
+
readonly SIGNATURE_VERSION: "manza.transfer-authorization.v2";
|
|
23
24
|
readonly signatureInput: typeof signatureInput;
|
|
24
25
|
readonly sign: typeof sign;
|
|
25
26
|
readonly payeeFor: typeof payeeFor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer_authorization.d.ts","sourceRoot":"","sources":["../src/transfer_authorization.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transfer_authorization.d.ts","sourceRoot":"","sources":["../src/transfer_authorization.ts"],"names":[],"mappings":"AAgBA,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;IAI7C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;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,CAwBnE;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"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "
|
|
1
|
+
export declare const VERSION = "2.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED