@zinn-digital/sdk 0.1.1520 → 0.1.1521

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.
@@ -53306,7 +53306,7 @@ export interface paths {
53306
53306
  get: operations["getSiteLoginCheck"];
53307
53307
  /**
53308
53308
  * Switch the Turnstile login check on or off for a site.
53309
- * @description Answers `202`: the request is saved and the change runs as a background job (it creates or deletes the site's widget and writes the site, which takes seconds). Poll the `GET` while `busy`. `409` while an earlier change is still running, or when the site cannot carry the check. Audit-logged. Requires `sites.view` and `sites.panel_access`.
53309
+ * @description Answers `202`: the request is saved and the change runs as a background job (it creates or deletes the site's widget and writes the site, which takes seconds). Poll the `GET` while `busy`. `places` chooses the forms the check protects (V1's `forms`; `all_places` on the `GET` lists them). `409` while an earlier change is still running, or when the site cannot carry the check. Audit-logged. Requires `sites.view` and `sites.panel_access`.
53310
53310
  */
53311
53311
  put: operations["updateSiteLoginCheck"];
53312
53312
  post?: never;
@@ -53316,6 +53316,56 @@ export interface paths {
53316
53316
  patch?: never;
53317
53317
  trace?: never;
53318
53318
  };
53319
+ "/v1/sites/{siteId}/turnstile/keys": {
53320
+ parameters: {
53321
+ query?: never;
53322
+ header?: never;
53323
+ path: {
53324
+ /** @description Site ID (UUIDv7). */
53325
+ siteId: components["parameters"]["SiteId"];
53326
+ };
53327
+ cookie?: never;
53328
+ };
53329
+ get?: never;
53330
+ /**
53331
+ * Use your own Cloudflare Turnstile keys for a site's login check.
53332
+ * @description Owner 1105#26. Paste the sitekey and secret of a Turnstile widget in YOUR Cloudflare account (its hostnames must include the site's domain). The secret is checked with one Cloudflare siteverify call, kept in Vault and never returned. `422` for keys that are malformed, Cloudflare's test keys, or a secret Cloudflare rejects. When the check is on, the site is switched to your keys by the background job (`202`; poll the `GET`) and the platform widget is deleted; when it is off, the keys are saved for when it is switched on (`200`). `409` while a change is running or for a site that cannot carry the check. Audit-logged. Requires `sites.view` and `sites.panel_access`.
53333
+ */
53334
+ put: operations["setSiteLoginCheckOwnKeys"];
53335
+ post?: never;
53336
+ /**
53337
+ * Stop using your own Turnstile keys; go back to the platform widget.
53338
+ * @description Forgets your keys. When the check is on, the background job creates a platform widget and writes it to the site (`202`), and your secret is deleted from Vault once it is replaced; otherwise `200`. `409` while a change is running. Audit-logged. Requires `sites.view` and `sites.panel_access`.
53339
+ */
53340
+ delete: operations["removeSiteLoginCheckOwnKeys"];
53341
+ options?: never;
53342
+ head?: never;
53343
+ patch?: never;
53344
+ trace?: never;
53345
+ };
53346
+ "/v1/sites/{siteId}/turnstile/rotate": {
53347
+ parameters: {
53348
+ query?: never;
53349
+ header?: never;
53350
+ path: {
53351
+ /** @description Site ID (UUIDv7). */
53352
+ siteId: components["parameters"]["SiteId"];
53353
+ };
53354
+ cookie?: never;
53355
+ };
53356
+ get?: never;
53357
+ put?: never;
53358
+ /**
53359
+ * Give a site's platform Turnstile widget a new secret key.
53360
+ * @description V1's `turnstile_rotate`. The background job asks Cloudflare for a new secret (the old one stays valid for two hours, so a visitor mid-login is not refused), writes it to the site and reads it back (`202`; poll the `GET`). `409` for a site on your own keys (rotate those in your Cloudflare account), with no widget yet, or while a change is running. Audit-logged. Requires `sites.view` and `sites.panel_access`.
53361
+ */
53362
+ post: operations["rotateSiteLoginCheckSecret"];
53363
+ delete?: never;
53364
+ options?: never;
53365
+ head?: never;
53366
+ patch?: never;
53367
+ trace?: never;
53368
+ };
53319
53369
  "/v1/sites/{siteId}/upgrade-to-php": {
53320
53370
  parameters: {
53321
53371
  query?: never;
@@ -103694,14 +103744,31 @@ export interface components {
103694
103744
  site: string;
103695
103745
  };
103696
103746
  SiteLoginCheck: {
103747
+ /** @description Every form the check can protect (the picker's choices). */
103748
+ all_places: string[];
103697
103749
  available: boolean;
103698
103750
  busy: boolean;
103751
+ /** @description `true` for a platform widget that exists (POST /rotate). */
103752
+ can_rotate: boolean;
103699
103753
  /** @description What was last asked for. */
103700
103754
  enabled: boolean;
103701
103755
  /** @enum {string} */
103702
- error_code: "" | "readonly" | "no_widget" | "not_supported" | "failed";
103756
+ error_code: "" | "readonly" | "no_widget" | "not_supported" | "own_keys_missing" | "failed";
103757
+ /**
103758
+ * @description `platform`: a widget we create. `own`: the customer's own keys (PUT /keys).
103759
+ * @enum {string}
103760
+ */
103761
+ key_source: "platform" | "own";
103762
+ /** @description The customer's own PUBLIC sitekey, when set. The secret is never returned. */
103763
+ own_sitekey: string | null;
103764
+ /** @description The forms the check protects. */
103765
+ places: ("login" | "register" | "lostpassword" | "comments" | "cf7" | "wpforms" | "elementor" | "everest" | "fluent" | "formidable" | "forminator" | "happyforms" | "kadence" | "mc4wp" | "metform" | "ninja" | "otter" | "spectra")[];
103703
103766
  /** Format: date-time */
103704
103767
  requested_at: string | null;
103768
+ /** Format: date-time */
103769
+ rotated_at: string | null;
103770
+ /** @description The PUBLIC sitekey the site uses now. Never the secret. */
103771
+ sitekey: string | null;
103705
103772
  stale: boolean;
103706
103773
  /** @enum {string} */
103707
103774
  status: "off" | "pending" | "active" | "failed";
@@ -103710,8 +103777,16 @@ export interface components {
103710
103777
  /** Format: date-time */
103711
103778
  verified_at: string | null;
103712
103779
  };
103780
+ SiteLoginCheckKeys: {
103781
+ /** @description Your widget's secret key. Checked with Cloudflare, kept in Vault, never returned. */
103782
+ secret: string;
103783
+ /** @description Your widget's sitekey (0x…). */
103784
+ sitekey: string;
103785
+ };
103713
103786
  SiteLoginCheckUpdate: {
103714
103787
  enabled: boolean;
103788
+ /** @description Which forms to protect (V1's `forms`). Omitted keeps the current choice. */
103789
+ places?: ("login" | "register" | "lostpassword" | "comments" | "cf7" | "wpforms" | "elementor" | "everest" | "fluent" | "formidable" | "forminator" | "happyforms" | "kadence" | "mc4wp" | "metform" | "ninja" | "otter" | "spectra")[];
103715
103790
  };
103716
103791
  /** @description The site's CloudLinux LVE resource tier — `docs/204` §7b. ⭐ `ep` is the limit that emits `508 Resource Limit Is Reached`, which is why this is on a customer screen at all: it converts "your server is broken" into "you hit your plan's limit, here is the upgrade". */
103717
103792
  SiteLveState: {
@@ -107016,6 +107091,11 @@ export interface components {
107016
107091
  changed_by?: string;
107017
107092
  /** @description What was last asked for. */
107018
107093
  enabled?: boolean;
107094
+ /**
107095
+ * @description `own`: the customer's own Turnstile widget keys (1105#26); `sitekey` is theirs and `cf_account_id` empty.
107096
+ * @enum {string}
107097
+ */
107098
+ key_source?: "platform" | "own";
107019
107099
  last_error: string;
107020
107100
  places: string[];
107021
107101
  /** @description `check` only: what the site answered. */
@@ -107025,6 +107105,11 @@ export interface components {
107025
107105
  };
107026
107106
  /** Format: date-time */
107027
107107
  requested_at?: string | null;
107108
+ /**
107109
+ * Format: date-time
107110
+ * @description When the platform widget's secret was last rotated.
107111
+ */
107112
+ rotated_at?: string | null;
107028
107113
  /** @description PUBLIC (it is in the page HTML). */
107029
107114
  sitekey: string;
107030
107115
  stale?: boolean;
@@ -201879,6 +201964,118 @@ export interface operations {
201879
201964
  429: components["responses"]["TooManyRequests"];
201880
201965
  };
201881
201966
  };
201967
+ setSiteLoginCheckOwnKeys: {
201968
+ parameters: {
201969
+ query?: never;
201970
+ header?: never;
201971
+ path: {
201972
+ /** @description Site ID (UUIDv7). */
201973
+ siteId: components["parameters"]["SiteId"];
201974
+ };
201975
+ cookie?: never;
201976
+ };
201977
+ requestBody: {
201978
+ content: {
201979
+ "application/json": components["schemas"]["SiteLoginCheckKeys"];
201980
+ };
201981
+ };
201982
+ responses: {
201983
+ /** @description Saved; the check is off, so nothing ran. */
201984
+ 200: {
201985
+ headers: {
201986
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
201987
+ [name: string]: unknown;
201988
+ };
201989
+ content: {
201990
+ "application/json": components["schemas"]["SiteLoginCheck"];
201991
+ };
201992
+ };
201993
+ /** @description Saved; the site is being switched to your keys. */
201994
+ 202: {
201995
+ headers: {
201996
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
201997
+ [name: string]: unknown;
201998
+ };
201999
+ content: {
202000
+ "application/json": components["schemas"]["SiteLoginCheck"];
202001
+ };
202002
+ };
202003
+ 401: components["responses"]["Unauthorized"];
202004
+ 403: components["responses"]["Forbidden"];
202005
+ 404: components["responses"]["NotFound"];
202006
+ 409: components["responses"]["Conflict"];
202007
+ 422: components["responses"]["UnprocessableEntity"];
202008
+ 429: components["responses"]["TooManyRequests"];
202009
+ };
202010
+ };
202011
+ removeSiteLoginCheckOwnKeys: {
202012
+ parameters: {
202013
+ query?: never;
202014
+ header?: never;
202015
+ path: {
202016
+ /** @description Site ID (UUIDv7). */
202017
+ siteId: components["parameters"]["SiteId"];
202018
+ };
202019
+ cookie?: never;
202020
+ };
202021
+ requestBody?: never;
202022
+ responses: {
202023
+ /** @description Done; the check is off. */
202024
+ 200: {
202025
+ headers: {
202026
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
202027
+ [name: string]: unknown;
202028
+ };
202029
+ content: {
202030
+ "application/json": components["schemas"]["SiteLoginCheck"];
202031
+ };
202032
+ };
202033
+ /** @description The site is being switched to the platform widget. */
202034
+ 202: {
202035
+ headers: {
202036
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
202037
+ [name: string]: unknown;
202038
+ };
202039
+ content: {
202040
+ "application/json": components["schemas"]["SiteLoginCheck"];
202041
+ };
202042
+ };
202043
+ 401: components["responses"]["Unauthorized"];
202044
+ 403: components["responses"]["Forbidden"];
202045
+ 404: components["responses"]["NotFound"];
202046
+ 409: components["responses"]["Conflict"];
202047
+ 429: components["responses"]["TooManyRequests"];
202048
+ };
202049
+ };
202050
+ rotateSiteLoginCheckSecret: {
202051
+ parameters: {
202052
+ query?: never;
202053
+ header?: never;
202054
+ path: {
202055
+ /** @description Site ID (UUIDv7). */
202056
+ siteId: components["parameters"]["SiteId"];
202057
+ };
202058
+ cookie?: never;
202059
+ };
202060
+ requestBody?: never;
202061
+ responses: {
202062
+ /** @description The secret is being replaced. */
202063
+ 202: {
202064
+ headers: {
202065
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
202066
+ [name: string]: unknown;
202067
+ };
202068
+ content: {
202069
+ "application/json": components["schemas"]["SiteLoginCheck"];
202070
+ };
202071
+ };
202072
+ 401: components["responses"]["Unauthorized"];
202073
+ 403: components["responses"]["Forbidden"];
202074
+ 404: components["responses"]["NotFound"];
202075
+ 409: components["responses"]["Conflict"];
202076
+ 429: components["responses"]["TooManyRequests"];
202077
+ };
202078
+ };
201882
202079
  upgradeSiteToPhp: {
201883
202080
  parameters: {
201884
202081
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1520",
3
+ "version": "0.1.1521",
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>",