@unboundcx/sdk 4.13.87 → 4.13.88

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.13.87",
3
+ "version": "4.13.88",
4
4
  "description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -43,4 +43,31 @@ export class FormsSettingsService {
43
43
  body: { ...(patch || {}) },
44
44
  });
45
45
  }
46
+
47
+ /**
48
+ * Review fix -- per-form Turnstile override (Settings tab's "Secret key
49
+ * (override)" field). Mirrors `set()`: the raw secret goes under
50
+ * `turnstileSecret`, never the stored `turnstileSecretRef` column name.
51
+ * Server route: `PUT /forms/:id/settings`
52
+ * (app1-api/src/services/forms/controllers/putFormSettings.js).
53
+ * @param {string} formId
54
+ * @param {Object} patch
55
+ * @param {string|null} [patch.captchaProvider]
56
+ * @param {string|null} [patch.turnstileSiteKey]
57
+ * @param {string} [patch.turnstileSecret] - Plaintext; omit (or send '')
58
+ * to leave the currently stored secret untouched.
59
+ * @returns {Promise<Object>}
60
+ */
61
+ async setForm(formId, patch) {
62
+ this.sdk.validateParams(
63
+ { formId },
64
+ { formId: { type: 'string', required: true } },
65
+ );
66
+ return internalRequest(
67
+ this.sdk,
68
+ `/forms/${encodeURIComponent(formId)}/settings`,
69
+ 'PUT',
70
+ { body: { ...(patch || {}) } },
71
+ );
72
+ }
46
73
  }