@getmanza/sdk 2.0.0 → 2.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 CHANGED
@@ -7,6 +7,112 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.1.0] - 2026-12-01
11
+
12
+ Mirrors manza-ruby 2.1.0 (getmanza/manza-ruby#31) and replays
13
+ `cassettes-v2.1.0`: synced to the Manza API at getmanza/app `f9c74dc9df`
14
+ (API version still `2026-11-13`, no request migrations). Additive: no SDK
15
+ signature changed.
16
+
17
+ ### Added
18
+
19
+ - `manza.webhookDeliveries`: `list(endpointId, { status, limit, cursor })`
20
+ (`GET /api/webhook_endpoints/:id/deliveries`; `status` failed, pending or
21
+ succeeded, any other a 400 `ManzaValidationError` with `param` `status`),
22
+ `get(id)` (adds `payload` and `response_body`) and `retry(id)` (202
23
+ `{delivery_id, status: "queued"}`; a delivery that has not failed, a
24
+ disabled endpoint or a closed transfer challenge rejects with a 422
25
+ `ManzaValidationError`, `type` `state_error`). Method names follow
26
+ manza-go's `WebhookDeliveries`.
27
+ - `manza.webhookEndpoints.retryFailed(id)`: queues the endpoint's failed
28
+ deliveries of the last 7 days (at most 500), 202 `{status: "queued", count}`.
29
+ - **Beta:** listen sessions. `manza.webhookListeners.create({ events,
30
+ authorizer })` (201 `{id, events, authorizer, expires_at, stream_url,
31
+ signing_secret}`; both default to `[]` and `false`), `close(id)`
32
+ (`DELETE`), and `stream(listener, { lastEventId, signal })`, an async
33
+ iterable over the session's server-sent event stream read with `fetch`
34
+ (no new dependency). It yields a `ListenerEvent` (`id`, `eventType`,
35
+ `eventId`, `body` as the exact JSON text, `streamId`) per `webhook` frame,
36
+ then a `ListenerClosed` (`id`, `reason`) that ends the stream; both carry
37
+ a `type` discriminant (`"webhook"`, `"listener_closed"`). `listener` is
38
+ the create response, its body or the `stream_url`. A dropped connection
39
+ is reopened with `Last-Event-ID` (backoff 0.5s to 10s, at least a 429's
40
+ `Retry-After`); a refused connect, a first connect that fails, a
41
+ non-event-stream answer or a malformed frame (a `webhook` frame missing a
42
+ non-empty `id`, `event_type`, `event_id` or `body`, or a
43
+ `listener_closed` frame whose data is not JSON) rejects. The stream is
44
+ read on the client's base URL: an absolute `stream_url` gives only its
45
+ path and query, and a redirect is never followed, so the API key never
46
+ leaves the API host. Breaking out of the loop, or aborting `signal`,
47
+ closes the connection. Needs the new API key scope
48
+ `webhook_listeners:write` (`WebhookListeners.SCOPE`). Mirrors manza-ruby's
49
+ `WebhookListeners#stream`; where Ruby yields to a block and returns the
50
+ `ListenerClosed`, TypeScript yields it as the last item.
51
+ - `ManzaEntityRestrictedError`, a `ManzaForbiddenError` raised for a 403
52
+ whose `type` is `entity_restricted`: staff keep the entity read-only and
53
+ every endpoint refuses until they lift it.
54
+ - `WebhookEvents` constants for the reversal events:
55
+ `payment_link.refunded`, `payment_link.charged_back`,
56
+ `payment_link.dispute_opened`, `checkout_session.refunded`,
57
+ `checkout_session.charged_back` and `checkout_session.dispute_opened`
58
+ (`dispute_opened` South Africa only; each is sent only to an endpoint
59
+ subscribed to it by name). `Reversal` names the known `kind` (`refund`,
60
+ `chargeback`), `status` (`pending`, `completed`, `cancelled`) and
61
+ `resolution` (`won`) values; all three stay open strings.
62
+ - Documented: `reversed_amount` (a decimal string) on payment links and
63
+ checkout sessions, and `transaction.reversals` on checkout sessions; the
64
+ SDK passes them through unchanged.
65
+
66
+ ### Server behaviour
67
+
68
+ The API changed these without a wire-shape change; the SDK is unchanged.
69
+
70
+ - `invoices.send` on an invoice without a usable `send_to_email` rejects
71
+ with a 422 `ManzaValidationError` with `param` `send_to_email` and leaves
72
+ the invoice as it was (it used to be marked `sent`). An `overdue` invoice
73
+ can be sent: it stays `overdue` and gets `sent_at`.
74
+ - `invoices.create` (and `creditNote`) with a key holding
75
+ `invoices:auto_approve` and no `send_to_email` answers `status: approved`
76
+ with `sent_at: null` (it used to answer `sent`).
77
+ - `invoices.markAsPaid` takes an unsent `approved` invoice.
78
+ - Credit notes: `due_date` is always null (an update that sets one is a
79
+ 422), `status` is one of draft, pending_approval, declined, approved,
80
+ sent or cancelled, `markAsPaid` rejects with a 422 `state_error`, and
81
+ cancelling one in `pending_approval` rejects with a 422 `state_error`.
82
+ - An invoice `reference` over 64 characters rejects with a 422
83
+ `ManzaValidationError` with `param` `reference`.
84
+ - A South African sole trader without a CIPC number can invoice.
85
+ - Transactions: `source_type` may be `bill_payment` (Morocco), and
86
+ `transaction_type` may be `Bill Payment`, `Mobile Top-up`, `Card Payment
87
+ Refund`, `Card Payment Reversed` or `Card Payment Reversal Undone`.
88
+ - The 403s "API access not enabled" and "Feature not enabled" for the API,
89
+ webhooks, payment links and invoicing are gone, as is the flag that gated
90
+ `transfer_method` `instant` in Morocco: `instant` is now always accepted
91
+ there (`standard` still is too). The `ip_not_allowed` 403 has a new
92
+ message.
93
+
94
+ ### Changed (cassettes)
95
+
96
+ The replay pin moves to `cassettes-v2.1.0` (`scripts/fetch-cassettes.ts`).
97
+ Every cassette is re-recorded against staging; the new ones, and the
98
+ changed requests this SDK sends:
99
+
100
+ | Cassette | Request |
101
+ |---|---|
102
+ | `invoices/create` | `POST https://ma.manza.dev/api/invoices` with new dates (`issue_date` `2026-12-01`, `due_date` `2026-12-31`) |
103
+ | `invoices/create_long_reference` | `POST https://ma.manza.dev/api/invoices` with a 65-character `reference`: 422, `param` `reference` |
104
+ | `webhook_deliveries/list` | `GET https://ma.manza.dev/api/webhook_endpoints/fixture-webhook-id/deliveries?limit=10` |
105
+ | `webhook_deliveries/list_invalid_status` | `GET https://ma.manza.dev/api/webhook_endpoints/fixture-webhook-id/deliveries?limit=100&status=bounced`: 400, `param` `status` |
106
+ | `webhook_deliveries/get` | `GET https://ma.manza.dev/api/webhook_deliveries/fixture-webhook-delivery-id` |
107
+ | `webhook_deliveries/retry_not_failed` | `POST https://ma.manza.dev/api/webhook_deliveries/fixture-webhook-delivery-id/retry`: 422 `state_error` |
108
+ | `webhook_endpoints/retry_failed` | `POST https://ma.manza.dev/api/webhook_endpoints/fixture-webhook-id/retry_failed`: 202 |
109
+ | `webhook_endpoints/retry_failed_disabled` | `POST https://ma.manza.dev/api/webhook_endpoints/fixture-disabled-webhook-id/retry_failed`: 422 `state_error` |
110
+ | `webhook_listeners/create` | `POST https://ma.manza.dev/api/webhook_listeners` `{"events":["payment_link.paid"],"authorizer":false}`: 201, then the `DELETE` closing it |
111
+ | `webhook_listeners/close` | `POST https://ma.manza.dev/api/webhook_listeners` `{"events":[],"authorizer":false}`, then `DELETE https://ma.manza.dev/api/webhook_listeners/<id>`: 204 |
112
+
113
+ The stream itself has no cassette: `test/webhook_listener_stream.test.ts`
114
+ tests it against a local socket (`test/sse-stub-server.ts`).
115
+
10
116
  ## [2.0.0] - 2026-11-14
11
117
 
12
118
  Mirrors manza-ruby 2.0.0 and replays `cassettes-v2.0.0`: synced to the
package/README.md CHANGED
@@ -53,8 +53,10 @@ manza.invoices.create({
53
53
  items: [{ description: "Consulting", quantity: 10, unit_price: "150.00" }],
54
54
  });
55
55
  manza.invoices.update(id, { account_id, generate_payment_link: false });
56
- // state-transition methods exist but the underlying public API is
57
- // not yet wired up — see getmanza/app issue #2174.
56
+ manza.invoices.send(id); // approved or overdue; no usable send_to_email → ManzaValidationError (param send_to_email)
57
+ manza.invoices.markAsPaid(id); // sent, overdue or unsent approved
58
+ manza.invoices.cancel(id);
59
+ manza.invoices.creditNote(id); // a credit note's due_date is always null
58
60
 
59
61
  manza.paymentLinks.list();
60
62
  manza.paymentLinks.create({ ... });
@@ -66,6 +68,11 @@ manza.webhookEndpoints.test(id);
66
68
  manza.webhookEndpoints.regenerateSecret(id);
67
69
  manza.webhookEndpoints.enable(id);
68
70
  manza.webhookEndpoints.disable(id);
71
+ manza.webhookEndpoints.retryFailed(id); // 202 {status: "queued", count}: failed deliveries of the last 7 days
72
+
73
+ manza.webhookDeliveries.list(endpointId, { status: "failed" }); // an endpoint's deliveries
74
+ manza.webhookDeliveries.get(id); // adds payload and response_body
75
+ manza.webhookDeliveries.retry(id); // 202; a delivery that has not failed → ManzaValidationError (state_error)
69
76
 
70
77
  manza.checkoutSessions.create({ account_id, amount, success_url, cancel_url });
71
78
  manza.checkoutSessions.get(id);
@@ -92,6 +99,37 @@ manza.transferAuthorizer.get(); // status, suspension_reason, limits, daily_auth
92
99
  // new_payee_limit; ManzaNotFoundError: none enrolled
93
100
  ```
94
101
 
102
+ `event_type` is an open string. `WebhookEvents` names the reversal events (`PAYMENT_LINK_REFUNDED`, `CHECKOUT_SESSION_CHARGED_BACK`, …; the `*_DISPUTE_OPENED` ones are South Africa only, and every one is sent only to an endpoint that subscribes to it by name). Their `data.reversal`, and each entry of a checkout session's `transaction.reversals` (once paid; an unpaid session's `transaction` is null), carries open-string `kind`, `status` and `resolution`, with the values known today in `Reversal`. Payment links and checkout sessions carry `reversed_amount`.
103
+
104
+ ## Listen sessions (beta)
105
+
106
+ A copy of the entity's webhook events streamed to a local tool, with no public endpoint (what `manza listen` uses). Needs the `webhook_listeners:write` scope (`WebhookListeners.SCOPE`); `authorizer: true` also mirrors transfer-authorization challenges and needs `transfers:authorize`. Beta: this surface may change in a minor release.
107
+
108
+ ```ts
109
+ import { ListenerClosed, ListenerEvent, Webhook } from "@getmanza/sdk";
110
+
111
+ const listener = (await manza.webhookListeners.create({ events: ["payment_link.paid"] })).body as {
112
+ id: string;
113
+ stream_url: string;
114
+ signing_secret: string;
115
+ }; // events: [] = every subscribable event (challenges only with authorizer: true); 12h session
116
+
117
+ for await (const item of manza.webhookListeners.stream(listener)) {
118
+ if (item instanceof ListenerEvent) {
119
+ // id (delivery), eventType, eventId, body (the exact JSON text), streamId
120
+ const timestamp = Math.floor(Date.now() / 1000);
121
+ const signature = await Webhook.sign({ payload: item.body, timestamp, secret: listener.signing_secret });
122
+ // POST item.body to the local server with X-Manza-Signature / X-Manza-Timestamp
123
+ } else if (item instanceof ListenerClosed) {
124
+ console.warn(`listen session ${item.reason}`); // closed, revoked or key_changed; the stream ends here
125
+ }
126
+ }
127
+
128
+ await manza.webhookListeners.close(listener.id);
129
+ ```
130
+
131
+ The stream reconnects a dropped connection with `Last-Event-ID` (0.5s to 10s backoff, honouring a 429's `Retry-After`), so a reconnect neither loses nor repeats a frame the server still keeps (about 5 minutes); pass `{ lastEventId }` to resume after a `streamId` from an earlier run, and `{ signal }` to stop it (breaking out of the loop closes the connection too). A frame counts as seen once the loop asks for the next one, so iterating the same stream again after a `break` resumes with the frame the loop stopped on. It rejects, ending the stream, on a refused connect with the class for its status (`ManzaForbiddenError` for the API's 403, which also answers a reconnect to an expired session, `ManzaAuthenticationError` for a 401, and on the first connect `ManzaRateLimitError` or `ManzaServerError` too), on a first connect that fails (`ManzaConnectionError`), and on a malformed frame. The stream is read on the client's base URL (an absolute `stream_url` gives only its path and query, both sent to the API host) and never follows a redirect, so the key never leaves the API host.
132
+
95
133
  ## Machine-authorized transfers
96
134
 
97
135
  A draft inside your entity's authorization envelope (trusted payee, or a new one when you allow it, within limits) is sent to your enrolled authorizer endpoint as a `payment.authorization_requested` webhook carrying an `authorization.id` and a one-time `nonce`. Your system checks it against its own ledger, signs it and authorizes it with a **different API key** from the one that created it. [`examples/transfer_authorizer/`](examples/transfer_authorizer/) runs the whole flow. The [transfer authorization docs](https://ma.manza.finance/docs/api/transfer-authorization) have the full reference.
@@ -170,7 +208,7 @@ await authorizer.payments.authorize(draft.id, {
170
208
 
171
209
  ## Errors
172
210
 
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).
211
+ Twelve 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). A 403 is a `ManzaForbiddenError`; one whose `type` is `entity_restricted` is its subclass `ManzaEntityRestrictedError`, while staff keep the entity read-only (every endpoint refuses until they lift it).
174
212
 
175
213
  ```ts
176
214
  import { ManzaValidationError, ManzaRateLimitError, ManzaNotFoundError } from "@getmanza/sdk";
package/dist/client.d.ts CHANGED
@@ -9,7 +9,9 @@ import { PaymentLinks } from "./resources/payment_links.js";
9
9
  import { Payments } from "./resources/payments.js";
10
10
  import { TransferAuthorizer } from "./resources/transfer_authorizer.js";
11
11
  import type { TransferDrafts } from "./resources/transfer_drafts.js";
12
+ import { WebhookDeliveries } from "./resources/webhook_deliveries.js";
12
13
  import { WebhookEndpoints } from "./resources/webhook_endpoints.js";
14
+ import { WebhookListeners } from "./resources/webhook_listeners.js";
13
15
  import { ManzaResponse } from "./response.js";
14
16
  export interface ManzaClientOptions {
15
17
  apiKey?: string | undefined;
@@ -44,8 +46,20 @@ export declare class Manza {
44
46
  * same resource, which calls `/api/payments`.
45
47
  */
46
48
  readonly transferDrafts: TransferDrafts;
49
+ readonly webhookDeliveries: WebhookDeliveries;
47
50
  readonly webhookEndpoints: WebhookEndpoints;
51
+ /** Listen sessions (beta). */
52
+ readonly webhookListeners: WebhookListeners;
48
53
  constructor(options?: ManzaClientOptions);
49
54
  request<T = unknown>(method: string, path: string, options?: RequestOptions): Promise<ManzaResponse<T>>;
55
+ /**
56
+ * @internal Opens a streaming GET on the client's base URL (the listen
57
+ * stream). `path` (with any query) is always joined to `baseUrl`, so the
58
+ * API key never leaves the API host, and a redirect is never followed:
59
+ * a 3xx, like any non-2xx, rejects with the error for its status. A
60
+ * transport failure rejects with ManzaConnectionError. Resolves to the
61
+ * raw Response, whose body the caller reads.
62
+ */
63
+ openStream(path: string, headers: Record<string, string>, signal: AbortSignal): Promise<Response>;
50
64
  }
51
65
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAkB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AQ,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,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,8BAA8B;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;gBAEhC,OAAO,GAAE,kBAAuB;IA2BtC,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;IA0C5B;;;;;;;OAOG;IACG,UAAU,CACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,QAAQ,CAAC;CAqDrB"}
package/dist/errors.d.ts CHANGED
@@ -23,6 +23,8 @@ export declare class ManzaAuthenticationError extends ManzaError {
23
23
  }
24
24
  export declare class ManzaForbiddenError extends ManzaError {
25
25
  }
26
+ export declare class ManzaEntityRestrictedError extends ManzaForbiddenError {
27
+ }
26
28
  export declare class ManzaNotFoundError extends ManzaError {
27
29
  }
28
30
  export declare class ManzaValidationError extends ManzaError {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