@zinn-digital/sdk 0.1.1806 → 0.1.1807

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.
@@ -43593,6 +43593,26 @@ export interface paths {
43593
43593
  patch: operations["updatePaymentMethod"];
43594
43594
  trace?: never;
43595
43595
  };
43596
+ "/v1/payment-methods/form-closures": {
43597
+ parameters: {
43598
+ query?: never;
43599
+ header?: never;
43600
+ path?: never;
43601
+ cookie?: never;
43602
+ };
43603
+ get?: never;
43604
+ put?: never;
43605
+ /**
43606
+ * Report that the customer closed the add-a-payment-method form.
43607
+ * @description The customer closed the payment form, and whether they ever pressed Save. A form closed with nothing submitted leaves the gateway's setup in the same state as a form that silently broke, so only the browser can tell the two apart. When a card-required trial funnel is open for the organization it is told, and a close with nothing submitted is recorded as the outcome `closed_card_form` instead of alerting the operator with "card stuck". A form that broke in the browser is reported separately (`reportPaymentFormFailure`). Requires `billing.payment.manage` in the target organization. Nothing is charged or stored.
43608
+ */
43609
+ post: operations["reportPaymentFormClosed"];
43610
+ delete?: never;
43611
+ options?: never;
43612
+ head?: never;
43613
+ patch?: never;
43614
+ trace?: never;
43615
+ };
43596
43616
  "/v1/payment-methods/form-failures": {
43597
43617
  parameters: {
43598
43618
  query?: never;
@@ -99252,6 +99272,22 @@ export interface components {
99252
99272
  /** @description The payment rail of the failed attempt (`stripe`, `paypal`, `nowpayments`, …). */
99253
99273
  rail: string;
99254
99274
  };
99275
+ /** @description The customer closed the add-a-payment-method form. */
99276
+ PaymentFormClosed: {
99277
+ /**
99278
+ * Format: uuid
99279
+ * @description Organization the form was adding a method to. Defaults to the caller's own; the caller must hold `billing.payment.manage` there.
99280
+ */
99281
+ org_id?: string;
99282
+ /** @description Whether the customer pressed Save (or started a PayPal approval) at least once before closing the form. */
99283
+ submitted: boolean;
99284
+ };
99285
+ PaymentFormClosedRecorded: {
99286
+ /** @description Whether a card-required trial funnel was open for this organization and was told. */
99287
+ funnel_signalled: boolean;
99288
+ /** @description Always true — the close was logged. */
99289
+ recorded: boolean;
99290
+ };
99255
99291
  /** @description What broke in the customer's browser on the add-a-payment-method form. `reason` is the SDK's own short message (for example `Failed to load Stripe.js`), never card data. */
99256
99292
  PaymentFormFailure: {
99257
99293
  /**
@@ -194543,6 +194579,35 @@ export interface operations {
194543
194579
  422: components["responses"]["UnprocessableEntity"];
194544
194580
  };
194545
194581
  };
194582
+ reportPaymentFormClosed: {
194583
+ parameters: {
194584
+ query?: never;
194585
+ header?: never;
194586
+ path?: never;
194587
+ cookie?: never;
194588
+ };
194589
+ requestBody: {
194590
+ content: {
194591
+ "application/json": components["schemas"]["PaymentFormClosed"];
194592
+ };
194593
+ };
194594
+ responses: {
194595
+ /** @description The close was recorded. */
194596
+ 202: {
194597
+ headers: {
194598
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
194599
+ [name: string]: unknown;
194600
+ };
194601
+ content: {
194602
+ "application/json": components["schemas"]["PaymentFormClosedRecorded"];
194603
+ };
194604
+ };
194605
+ 401: components["responses"]["Unauthorized"];
194606
+ 403: components["responses"]["Forbidden"];
194607
+ 422: components["responses"]["UnprocessableEntity"];
194608
+ 429: components["responses"]["TooManyRequests"];
194609
+ };
194610
+ };
194546
194611
  reportPaymentFormFailure: {
194547
194612
  parameters: {
194548
194613
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1806",
3
+ "version": "0.1.1807",
4
4
  "description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",