@zinn-digital/sdk 0.1.2048 → 0.1.2052

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.
@@ -43142,6 +43142,29 @@ export interface paths {
43142
43142
  patch?: never;
43143
43143
  trace?: never;
43144
43144
  };
43145
+ "/v1/orders/{orderId}/paypal-subscription": {
43146
+ parameters: {
43147
+ query?: never;
43148
+ header?: never;
43149
+ path: {
43150
+ /** @description The order's id. */
43151
+ orderId: components["parameters"]["OrderId"];
43152
+ };
43153
+ cookie?: never;
43154
+ };
43155
+ get?: never;
43156
+ put?: never;
43157
+ /**
43158
+ * Pay an order with ONE PayPal approval that also renews its subscriptions.
43159
+ * @description The one-approval checkout (V1 parity). Opens one PayPal subscription agreement for an order with exactly one recurring line: the one-off part of the order is the agreement's setup fee and the recurring part is cycle 1, so the buyer approves once and PayPal collects the whole order at activation and renews the recurring part after. The order is settled by the `BILLING.SUBSCRIPTION.ACTIVATED` webhook (once, however often PayPal redelivers it) and its subscriptions are created on the PayPal rail, so the engine never bills them a second time. Idempotent per order: a reload returns the same approval link. Account credit is not applied on this path, and nothing is charged by this call.
43160
+ */
43161
+ post: operations["openPayPalOrderSubscription"];
43162
+ delete?: never;
43163
+ options?: never;
43164
+ head?: never;
43165
+ patch?: never;
43166
+ trace?: never;
43167
+ };
43145
43168
  "/v1/orders/{orderId}/paypal/capture": {
43146
43169
  parameters: {
43147
43170
  query?: never;
@@ -83814,6 +83837,8 @@ export interface components {
83814
83837
  registry_data?: {
83815
83838
  [key: string]: components["schemas"]["RegistryData"];
83816
83839
  };
83840
+ /** @description Crypto's "renew automatically" choice (D4b, as V1). On the `nowpayments` rail, `true` or omitted (the checkbox starts ticked) is stored on the crypto payment and turns crypto auto-renew on for each subscription the order creates once it is paid; `false` leaves it off. Ignored on every other rail. ⛔ No schema `default` (a defaulted property becomes REQUIRED in the generated TypeScript). */
83841
+ renew_automatically?: boolean;
83817
83842
  /** @description Whether the organisation's **account credit pays first** (row 1106#49). Omitted or `true`: credit is debited before the chosen rail and the rail is charged only the remainder (card and crypto through the charge itself; PayPal opens its order for the remainder and the credit is debited just before capture, given back if the capture fails or the approval is abandoned). Credit that covers the whole total settles the order with no gateway. `false`: the balance is left untouched and the rail is charged the whole total. Either way the order is `paid` only when the whole total is settled, and the payment records the credit part in `wallet_applied_minor`. */
83818
83843
  use_credit?: boolean;
83819
83844
  };
@@ -102665,6 +102690,11 @@ export interface components {
102665
102690
  * @description The mandate charged first, or `null` if none is nominated or usable.
102666
102691
  */
102667
102692
  primary_payment_method_id: string | null;
102693
+ /**
102694
+ * @description Whether this account can store a card or PayPal method. `false` for an account billed through a reseller: `POST /v1/payment-methods` answers `409`, the provider handles payment, and each order is paid individually.
102695
+ * @example true
102696
+ */
102697
+ saved_methods_available: boolean;
102668
102698
  };
102669
102699
  PaymentPreferencesUpdate: {
102670
102700
  /** @description Store the account's preference; `null` clears it. Audited. Stored only: no card payment reads it yet. */
@@ -198048,6 +198078,11 @@ export interface operations {
198048
198078
  * @example 3f6c1a52-8e0b-4d1e-9b7a-2c5d4e6f7a81
198049
198079
  */
198050
198080
  payment_method_id?: string;
198081
+ /**
198082
+ * @description Crypto's "renew automatically" choice (D4b, as V1). When `gateway` is `nowpayments`, `true` or omitted (the checkbox starts ticked) is stored on the crypto payment and, once it settles and fulfilment creates the subscription, crypto auto-renew is turned on for it (a NOWPayments link is e-mailed to the billing address before each renewal; see `setSubscriptionCryptoAutoRenew`). `false` leaves it off. Ignored on every other rail. Anything that is not a JSON boolean counts as omitted.
198083
+ * @example true
198084
+ */
198085
+ renew_automatically?: boolean;
198051
198086
  /**
198052
198087
  * @description Whether account credit pays first (BILLPARITY F1, owner 2026-11-22). Omit, or send `true`, for the default: the balance pays first and only the rest reaches `gateway`. Send `false` when the customer's balance covers the order but they chose to pay by card, PayPal or crypto instead: the balance is not drawn and the chosen rail is charged for the whole order. Anything that is not a JSON boolean is `422` with `details[0].field = use_balance`; `false` together with `credit_only: true` is a contradiction and also `422` on `use_balance`. Nothing is drawn or charged on either refusal.
198053
198088
  * @example false
@@ -198228,6 +198263,59 @@ export interface operations {
198228
198263
  };
198229
198264
  };
198230
198265
  };
198266
+ openPayPalOrderSubscription: {
198267
+ parameters: {
198268
+ query?: never;
198269
+ header?: never;
198270
+ path: {
198271
+ /** @description The order's id. */
198272
+ orderId: components["parameters"]["OrderId"];
198273
+ };
198274
+ cookie?: never;
198275
+ };
198276
+ requestBody?: never;
198277
+ responses: {
198278
+ /** @description Where to send the buyer to approve. */
198279
+ 200: {
198280
+ headers: {
198281
+ [name: string]: unknown;
198282
+ };
198283
+ content: {
198284
+ "application/json": {
198285
+ /**
198286
+ * Format: uri
198287
+ * @description PayPal's approval page for this agreement.
198288
+ */
198289
+ approve_url: string;
198290
+ /** @description PayPal's agreement id (`I-…`). */
198291
+ paypal_subscription_id: string;
198292
+ };
198293
+ };
198294
+ };
198295
+ 401: components["responses"]["Unauthorized"];
198296
+ 403: components["responses"]["Forbidden"];
198297
+ 404: components["responses"]["NotFound"];
198298
+ /** @description The order is already paid, cannot be paid, has no recurring line, its recurring lines do not share one interval and currency, a recurring line is discounted or a prepaid multi-period term, or it is already bound to another agreement (pay it with `openPayPalOrder`). */
198299
+ 422: {
198300
+ headers: {
198301
+ [name: string]: unknown;
198302
+ };
198303
+ content: {
198304
+ "application/json": components["schemas"]["Error"];
198305
+ };
198306
+ };
198307
+ 429: components["responses"]["TooManyRequests"];
198308
+ /** @description PayPal is not configured, or an operator has disabled it. */
198309
+ 503: {
198310
+ headers: {
198311
+ [name: string]: unknown;
198312
+ };
198313
+ content: {
198314
+ "application/json": components["schemas"]["Error"];
198315
+ };
198316
+ };
198317
+ };
198318
+ };
198231
198319
  capturePayPalOrder: {
198232
198320
  parameters: {
198233
198321
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.2048",
3
+ "version": "0.1.2052",
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>",