@zinn-digital/sdk 0.1.2048 → 0.1.2051

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
  };
@@ -198048,6 +198073,11 @@ export interface operations {
198048
198073
  * @example 3f6c1a52-8e0b-4d1e-9b7a-2c5d4e6f7a81
198049
198074
  */
198050
198075
  payment_method_id?: string;
198076
+ /**
198077
+ * @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.
198078
+ * @example true
198079
+ */
198080
+ renew_automatically?: boolean;
198051
198081
  /**
198052
198082
  * @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
198083
  * @example false
@@ -198228,6 +198258,59 @@ export interface operations {
198228
198258
  };
198229
198259
  };
198230
198260
  };
198261
+ openPayPalOrderSubscription: {
198262
+ parameters: {
198263
+ query?: never;
198264
+ header?: never;
198265
+ path: {
198266
+ /** @description The order's id. */
198267
+ orderId: components["parameters"]["OrderId"];
198268
+ };
198269
+ cookie?: never;
198270
+ };
198271
+ requestBody?: never;
198272
+ responses: {
198273
+ /** @description Where to send the buyer to approve. */
198274
+ 200: {
198275
+ headers: {
198276
+ [name: string]: unknown;
198277
+ };
198278
+ content: {
198279
+ "application/json": {
198280
+ /**
198281
+ * Format: uri
198282
+ * @description PayPal's approval page for this agreement.
198283
+ */
198284
+ approve_url: string;
198285
+ /** @description PayPal's agreement id (`I-…`). */
198286
+ paypal_subscription_id: string;
198287
+ };
198288
+ };
198289
+ };
198290
+ 401: components["responses"]["Unauthorized"];
198291
+ 403: components["responses"]["Forbidden"];
198292
+ 404: components["responses"]["NotFound"];
198293
+ /** @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`). */
198294
+ 422: {
198295
+ headers: {
198296
+ [name: string]: unknown;
198297
+ };
198298
+ content: {
198299
+ "application/json": components["schemas"]["Error"];
198300
+ };
198301
+ };
198302
+ 429: components["responses"]["TooManyRequests"];
198303
+ /** @description PayPal is not configured, or an operator has disabled it. */
198304
+ 503: {
198305
+ headers: {
198306
+ [name: string]: unknown;
198307
+ };
198308
+ content: {
198309
+ "application/json": components["schemas"]["Error"];
198310
+ };
198311
+ };
198312
+ };
198313
+ };
198231
198314
  capturePayPalOrder: {
198232
198315
  parameters: {
198233
198316
  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.2051",
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>",