@zinn-digital/sdk 0.1.2123 → 0.1.2126

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.
@@ -50143,6 +50143,30 @@ export interface paths {
50143
50143
  patch: operations["setResellerCurrencies"];
50144
50144
  trace?: never;
50145
50145
  };
50146
+ "/v1/reseller/default-package": {
50147
+ parameters: {
50148
+ query?: never;
50149
+ header?: never;
50150
+ path?: never;
50151
+ cookie?: never;
50152
+ };
50153
+ /**
50154
+ * The package a client with no plan of their own is given.
50155
+ * @description `plan_version_id` is your default client package, or `null` when you have not set one. A client of yours with no package is given this one automatically: it is never charged to the client, and you pay for it at wholesale on your statement like any client package. With no default, the client is told their provider is still setting their account up, and you are notified once per client. `choices` lists every client plan your panel offers that has a monthly price in `currency` (what you are settled in). Your own reseller plan is never a choice. Requires `reseller.view`.
50156
+ */
50157
+ get: operations["getResellerDefaultPackage"];
50158
+ put?: never;
50159
+ post?: never;
50160
+ delete?: never;
50161
+ options?: never;
50162
+ head?: never;
50163
+ /**
50164
+ * Choose or clear your default client package.
50165
+ * @description Send one of the `choices` from the GET as `plan_version_id`, or `null` to clear it. A reseller plan, a plan with no monthly price in the currency you are settled in, or a plan your panel does not offer is refused with a reason. Requires `reseller.manage`.
50166
+ */
50167
+ patch: operations["setResellerDefaultPackage"];
50168
+ trace?: never;
50169
+ };
50146
50170
  "/v1/reseller/dunning": {
50147
50171
  parameters: {
50148
50172
  query?: never;
@@ -83493,7 +83517,25 @@ export interface components {
83493
83517
  plan_version: number;
83494
83518
  /** @description The **purchasable identifier**: the id of the plan's current sellable version, which is what a `hosting_plan` cart line pins in `plan_version_id`. This is NOT `id` — `id` is the plan's stable identity, while a price change mints a new version rather than mutating the sold one, so this value changes and `id` does not. Use it to buy: `POST /v1/carts` → `POST /v1/carts/{cartId}/lines` with `{kind: hosting_plan, plan_version_id}` → `POST /v1/carts/{cartId}/checkout`. */
83495
83519
  plan_version_id: components["schemas"]["Uuid"];
83496
- /** @description The plan's list prices, one per (interval, currency). */
83520
+ /**
83521
+ * @description Present only with `?price_format=map`: the same prices as `prices` would carry, keyed `interval -> ISO currency -> amount_minor` (integer minor units, CLAUDE.md §2.8). Lossless: one (interval, currency) pair is one entry.
83522
+ * @example {
83523
+ * "monthly": {
83524
+ * "USD": 3000,
83525
+ * "EUR": 2799
83526
+ * },
83527
+ * "annual": {
83528
+ * "USD": 30000,
83529
+ * "EUR": 27990
83530
+ * }
83531
+ * }
83532
+ */
83533
+ price_map?: {
83534
+ [key: string]: {
83535
+ [key: string]: number;
83536
+ };
83537
+ };
83538
+ /** @description The plan's list prices, one per (interval, currency). Empty when the caller asked for `price_format=map`; the same figures are then in `price_map`. */
83497
83539
  prices: components["schemas"]["CatalogPrice"][];
83498
83540
  /**
83499
83541
  * @description The `code` of the owning product line.
@@ -108355,6 +108397,35 @@ export interface components {
108355
108397
  /** @description Whether the currency control renders in your clients' panel. */
108356
108398
  switcher?: boolean;
108357
108399
  };
108400
+ ResellerDefaultPackage: {
108401
+ choices: components["schemas"]["ResellerDefaultPackageChoice"][];
108402
+ /** @description The currency you are settled in; choices are priced in it. */
108403
+ currency: string;
108404
+ /** @description Your clients that have no package while you have no default set, oldest first. You are e-mailed once per client; a client leaves this list as soon as it holds a package. */
108405
+ pending_clients: components["schemas"]["ResellerPendingClient"][];
108406
+ /**
108407
+ * Format: uuid
108408
+ * @description Your default client package, or null when none is set.
108409
+ */
108410
+ plan_version_id: string | null;
108411
+ };
108412
+ ResellerDefaultPackageChoice: {
108413
+ currency: string;
108414
+ /** @description The monthly list price in minor units of `currency`. */
108415
+ monthly_minor: number;
108416
+ name: string;
108417
+ plan_code: string;
108418
+ /** Format: uuid */
108419
+ plan_version_id: string;
108420
+ product_line: string;
108421
+ };
108422
+ ResellerDefaultPackageWrite: {
108423
+ /**
108424
+ * Format: uuid
108425
+ * @description One of the GET's `choices`, or null to clear the default.
108426
+ */
108427
+ plan_version_id: string | null;
108428
+ };
108358
108429
  /** @description A reseller's own dunning ladder, or the platform default they fall back to. */
108359
108430
  ResellerDunning: {
108360
108431
  /** @description The ladder in force. On the platform-default view this is synthesised rather than read from a row, so `id` is null and `version` is 0. */
@@ -108714,6 +108785,13 @@ export interface components {
108714
108785
  gap: boolean;
108715
108786
  manage_route: string;
108716
108787
  };
108788
+ ResellerPendingClient: {
108789
+ client_name: string;
108790
+ /** Format: uuid */
108791
+ client_org_id: string;
108792
+ /** Format: date-time */
108793
+ since: string;
108794
+ };
108717
108795
  ResellerPluginAffiliateProgramme: {
108718
108796
  /**
108719
108797
  * Format: uri
@@ -121273,7 +121351,7 @@ export interface components {
121273
121351
  * @enum {string}
121274
121352
  */
121275
121353
  display_mode: "gross" | "net";
121276
- /** @description The figures ran on weak evidence (a geo hint, no billing address) and are indicative. The charge is rated again at checkout against full place-of-supply evidence, and **that** is the number on the invoice. */
121354
+ /** @description The figures ran on weak evidence (a geo hint, no billing address) and are indicative. The charge is rated again at checkout against full place-of-supply evidence, and **that** is the number on the invoice. On the authenticated route a body `country` equal to the buyer's saved billing country is not a guess and answers `false`; only a country that differs from the saved one (or no saved country at all) answers `true`. */
121277
121355
  estimated: boolean;
121278
121356
  /** @description ⛔ Equal to net in the `indeterminate` fallback, **never 0** — a caller rendering this field unconditionally must show the price rather than a free product. */
121279
121357
  gross_total_minor: number;
@@ -176020,6 +176098,12 @@ export interface operations {
176020
176098
  * An unknown or malformed code yields an **empty** `prices` array per plan rather than a `404` or a silent fall back to every currency — empty is the honest answer to "what does this cost in XYZ", and falling back would return the 900 KB the caller asked to avoid.
176021
176099
  */
176022
176100
  currency?: string;
176101
+ /**
176102
+ * @description `map` carries each plan's prices as `price_map` (`interval -> currency -> amount_minor`) and leaves `prices` empty. **Optional and additive**: absent, `rows` or any other value is the `prices` array exactly as before. Composes with `currency`.
176103
+ *
176104
+ * **Why it exists.** Measured on production 2026-11-26: 308 plans, 2,398,646 bytes, of which 2,175,599 are `prices` rows, over the public site's 2 MB render-cache item limit; a site whose visitor picks the currency needs every one of them. The map is ~710 KB for the same figures.
176105
+ */
176106
+ price_format?: "rows" | "map";
176023
176107
  /** @description Restrict to one product line by its code (e.g. `footprint_free`). Unknown code → empty list. */
176024
176108
  product_line?: string;
176025
176109
  };
@@ -210183,6 +210267,66 @@ export interface operations {
210183
210267
  429: components["responses"]["TooManyRequests"];
210184
210268
  };
210185
210269
  };
210270
+ getResellerDefaultPackage: {
210271
+ parameters: {
210272
+ query?: {
210273
+ /** @description Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 rather than a 403, so this can never widen scope. */
210274
+ org_id?: components["schemas"]["Uuid"];
210275
+ };
210276
+ header?: never;
210277
+ path?: never;
210278
+ cookie?: never;
210279
+ };
210280
+ requestBody?: never;
210281
+ responses: {
210282
+ /** @description Your default client package and the plans you may choose from. */
210283
+ 200: {
210284
+ headers: {
210285
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
210286
+ [name: string]: unknown;
210287
+ };
210288
+ content: {
210289
+ "application/json": components["schemas"]["ResellerDefaultPackage"];
210290
+ };
210291
+ };
210292
+ 401: components["responses"]["Unauthorized"];
210293
+ 403: components["responses"]["Forbidden"];
210294
+ 404: components["responses"]["NotFound"];
210295
+ 429: components["responses"]["TooManyRequests"];
210296
+ };
210297
+ };
210298
+ setResellerDefaultPackage: {
210299
+ parameters: {
210300
+ query?: {
210301
+ /** @description Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 rather than a 403, so this can never widen scope. */
210302
+ org_id?: components["schemas"]["Uuid"];
210303
+ };
210304
+ header?: never;
210305
+ path?: never;
210306
+ cookie?: never;
210307
+ };
210308
+ requestBody: {
210309
+ content: {
210310
+ "application/json": components["schemas"]["ResellerDefaultPackageWrite"];
210311
+ };
210312
+ };
210313
+ responses: {
210314
+ /** @description Your default client package, as stored. */
210315
+ 200: {
210316
+ headers: {
210317
+ [name: string]: unknown;
210318
+ };
210319
+ content: {
210320
+ "application/json": components["schemas"]["ResellerDefaultPackage"];
210321
+ };
210322
+ };
210323
+ 401: components["responses"]["Unauthorized"];
210324
+ 403: components["responses"]["Forbidden"];
210325
+ 404: components["responses"]["NotFound"];
210326
+ 422: components["responses"]["UnprocessableEntity"];
210327
+ 429: components["responses"]["TooManyRequests"];
210328
+ };
210329
+ };
210186
210330
  getResellerDunning: {
210187
210331
  parameters: {
210188
210332
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.2123",
3
+ "version": "0.1.2126",
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>",