@zinn-digital/sdk 0.1.1921 → 0.1.1924

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.
@@ -40586,6 +40586,28 @@ export interface paths {
40586
40586
  patch?: never;
40587
40587
  trace?: never;
40588
40588
  };
40589
+ "/v1/media-offload/deletions": {
40590
+ parameters: {
40591
+ query?: never;
40592
+ header?: never;
40593
+ path?: never;
40594
+ cookie?: never;
40595
+ };
40596
+ get?: never;
40597
+ put?: never;
40598
+ /**
40599
+ * Delete this site's own offloaded files (the customer deleted them in WordPress).
40600
+ * @description Called by the Zinn® Media Offload plugin with a bearer plugin token when the customer deletes a media file in WordPress, naming that attachment's object keys (the original and every generated size). This is how a customer frees space; nothing is deleted on Zinn®'s own initiative.
40601
+ *
40602
+ * Every key is the FULL object key, as the upload ticket named it, and must sit under this site's own storage folder (`<prefix>/...`). A key anywhere else (another site's or organisation's folder, the bucket root, the folder itself) refuses the whole request with `403` `KEY_OUTSIDE_SITE`, writes an audit row, and deletes nothing; it is never re-rooted. An empty key, a `.`/`..` segment, a leading `/`, a backslash, `%`, `*` or any other character outside the key alphabet is refused with `422` `INVALID_KEY` and nothing is deleted. There is no wildcard, listing or empty-the-bucket form. At most 100 keys per request (`422` `TOO_MANY_KEYS` with `max_keys`; the plugin sends smaller batches). Deleting a key that no longer exists succeeds, so a retry is safe. Works while uploads are refused at the storage cap, while offload is paused and while the account is not in good standing. Every call writes one audit row with the count and the site, never the file names. Usage, and so the cap, follows at the next measurement (within 24 hours).
40603
+ */
40604
+ post: operations["deleteMediaOffloadObjects"];
40605
+ delete?: never;
40606
+ options?: never;
40607
+ head?: never;
40608
+ patch?: never;
40609
+ trace?: never;
40610
+ };
40589
40611
  "/v1/media-offload/report": {
40590
40612
  parameters: {
40591
40613
  query?: never;
@@ -40626,6 +40648,8 @@ export interface paths {
40626
40648
  * Every key is joined onto the site's own prefix and validated. A key that tries to climb out of that prefix is refused with `422`, never normalised into something plausible.
40627
40649
  *
40628
40650
  * An offload writing to **our** storage answers `422` with `code: FEATURE_NOT_INCLUDED` and no URLs once the organisation no longer holds a plan that includes object storage — checked on every request, because a plugin token outlives the plan that paid for it (D26223). An offload writing to the customer's own bucket is unaffected.
40651
+ *
40652
+ * **Hard cap.** When the plan states `object_storage_overage_cap_gb` and the latest complete measurement of the organisation's storage on our buckets has reached the allowance plus that cap, this answers `422` with `code: STORAGE_CAP_REACHED`, no URLs, and `refusal: {key: refusal.objectstorage.storageCapReached, params: {limitGb}}`. Nothing stored is touched: reads and deletes continue. An upgrade lifts it at once.
40629
40653
  */
40630
40654
  post: operations["createMediaOffloadUploads"];
40631
40655
  delete?: never;
@@ -116137,6 +116161,15 @@ export interface components {
116137
116161
  * @description Bytes across the buckets **we own**. A bucket of the customer's own costs us nothing and is deliberately excluded — counting it would charge them twice for storage we never provided.
116138
116162
  */
116139
116163
  bytes_stored: number;
116164
+ /** @description The hard cap, or `null` when the plan states none (then there is no limit beyond the overage price and no cap wording is shown). At the cap new uploads are refused with `422` `code: STORAGE_CAP_REACHED`; stored files can still be read and deleted. The figure is the latest COMPLETE measurement, so an incomplete reading never engages it. An upgrade lifts it at once. */
116165
+ cap?: {
116166
+ /** @description The allowance plus the plan's `object_storage_overage_cap_gb`. */
116167
+ limit_gb: number;
116168
+ /** @description GB past the allowance (billed as overage) before uploads stop. */
116169
+ overage_cap_gb: number;
116170
+ /** @description Whether new uploads are refused now. */
116171
+ reached: boolean;
116172
+ } | null;
116140
116173
  /** @description Whether these figures are an observation. `false` means no bucket has been measured yet, so `bytes_stored` is a default and **must not** be drawn as "using none of your allowance" — an org with no buckets, an org whose buckets are empty and an org nobody has measured all report zero bytes, and only the last is a fault. */
116141
116174
  measured: boolean;
116142
116175
  /** Format: date-time */
@@ -191024,6 +191057,40 @@ export interface operations {
191024
191057
  429: components["responses"]["TooManyRequests"];
191025
191058
  };
191026
191059
  };
191060
+ deleteMediaOffloadObjects: {
191061
+ parameters: {
191062
+ query?: never;
191063
+ header?: never;
191064
+ path?: never;
191065
+ cookie?: never;
191066
+ };
191067
+ requestBody: {
191068
+ content: {
191069
+ "application/json": {
191070
+ keys: string[];
191071
+ plugin_version?: string;
191072
+ };
191073
+ };
191074
+ };
191075
+ responses: {
191076
+ /** @description The keys were deleted (or were already gone). */
191077
+ 200: {
191078
+ headers: {
191079
+ [name: string]: unknown;
191080
+ };
191081
+ content: {
191082
+ "application/json": {
191083
+ deleted: number;
191084
+ };
191085
+ };
191086
+ };
191087
+ 401: components["responses"]["Unauthorized"];
191088
+ 403: components["responses"]["Forbidden"];
191089
+ 422: components["responses"]["UnprocessableEntity"];
191090
+ 429: components["responses"]["TooManyRequests"];
191091
+ 503: components["responses"]["ProviderNotConfigured"];
191092
+ };
191093
+ };
191027
191094
  reportMediaOffloadProgress: {
191028
191095
  parameters: {
191029
191096
  query?: never;
@@ -221476,6 +221543,8 @@ export interface operations {
221476
221543
  parameters: {
221477
221544
  query?: {
221478
221545
  org_id?: string;
221546
+ /** @description s1014 TRIALBUY (DAY-0334): that product line's live trial (running or ended, not converted). An org may hold a trial on several lines; without this the newest is answered, so an older ended trial had no pay button. */
221547
+ product_line?: string;
221479
221548
  };
221480
221549
  header?: never;
221481
221550
  path?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1921",
3
+ "version": "0.1.1924",
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>",