@smplkit/sdk 3.0.89 → 3.0.90

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/dist/index.d.cts CHANGED
@@ -261,11 +261,26 @@ declare class HttpConfiguration {
261
261
  * (`"2xx"`, `"4xx"`). Defaults to `"2xx"`.
262
262
  */
263
263
  successStatus: string;
264
+ /**
265
+ * Whether to verify the destination's TLS certificate chain. Defaults
266
+ * to `true`; flip to `false` only for short-lived testing against a
267
+ * destination that serves an untrusted certificate. Prefer pinning the
268
+ * CA via {@link caCert} for long-lived self-signed setups.
269
+ */
270
+ tlsVerify: boolean;
271
+ /**
272
+ * Optional PEM-encoded certificate (or bundle) trusted in addition to
273
+ * the system CA store. Ignored when {@link tlsVerify} is `false`.
274
+ * `null` (the default) means "use system CAs only".
275
+ */
276
+ caCert: string | null;
264
277
  constructor(fields?: {
265
278
  method?: HttpMethod;
266
279
  url?: string;
267
280
  headers?: HttpHeader[];
268
281
  successStatus?: string;
282
+ tlsVerify?: boolean;
283
+ caCert?: string | null;
269
284
  });
270
285
  }
271
286
  /**
package/dist/index.d.ts CHANGED
@@ -261,11 +261,26 @@ declare class HttpConfiguration {
261
261
  * (`"2xx"`, `"4xx"`). Defaults to `"2xx"`.
262
262
  */
263
263
  successStatus: string;
264
+ /**
265
+ * Whether to verify the destination's TLS certificate chain. Defaults
266
+ * to `true`; flip to `false` only for short-lived testing against a
267
+ * destination that serves an untrusted certificate. Prefer pinning the
268
+ * CA via {@link caCert} for long-lived self-signed setups.
269
+ */
270
+ tlsVerify: boolean;
271
+ /**
272
+ * Optional PEM-encoded certificate (or bundle) trusted in addition to
273
+ * the system CA store. Ignored when {@link tlsVerify} is `false`.
274
+ * `null` (the default) means "use system CAs only".
275
+ */
276
+ caCert: string | null;
264
277
  constructor(fields?: {
265
278
  method?: HttpMethod;
266
279
  url?: string;
267
280
  headers?: HttpHeader[];
268
281
  successStatus?: string;
282
+ tlsVerify?: boolean;
283
+ caCert?: string | null;
269
284
  });
270
285
  }
271
286
  /**
package/dist/index.js CHANGED
@@ -20224,11 +20224,26 @@ var HttpConfiguration = class {
20224
20224
  * (`"2xx"`, `"4xx"`). Defaults to `"2xx"`.
20225
20225
  */
20226
20226
  successStatus;
20227
+ /**
20228
+ * Whether to verify the destination's TLS certificate chain. Defaults
20229
+ * to `true`; flip to `false` only for short-lived testing against a
20230
+ * destination that serves an untrusted certificate. Prefer pinning the
20231
+ * CA via {@link caCert} for long-lived self-signed setups.
20232
+ */
20233
+ tlsVerify;
20234
+ /**
20235
+ * Optional PEM-encoded certificate (or bundle) trusted in addition to
20236
+ * the system CA store. Ignored when {@link tlsVerify} is `false`.
20237
+ * `null` (the default) means "use system CAs only".
20238
+ */
20239
+ caCert;
20227
20240
  constructor(fields = {}) {
20228
20241
  this.method = fields.method ?? "POST" /* POST */;
20229
20242
  this.url = fields.url ?? "";
20230
20243
  this.headers = fields.headers ?? [];
20231
20244
  this.successStatus = fields.successStatus ?? "2xx";
20245
+ this.tlsVerify = fields.tlsVerify ?? true;
20246
+ this.caCert = fields.caCert ?? null;
20232
20247
  }
20233
20248
  };
20234
20249
  var Forwarder = class {
@@ -20383,7 +20398,9 @@ function _configurationToWire(config) {
20383
20398
  method: config.method,
20384
20399
  url: config.url,
20385
20400
  headers: config.headers.map((h) => ({ name: h.name, value: h.value })),
20386
- success_status: config.successStatus
20401
+ success_status: config.successStatus,
20402
+ tls_verify: config.tlsVerify,
20403
+ ca_cert: config.caCert
20387
20404
  };
20388
20405
  }
20389
20406
  function _configurationFromWire(raw) {
@@ -20396,7 +20413,9 @@ function _configurationFromWire(raw) {
20396
20413
  method: r.method ?? "POST" /* POST */,
20397
20414
  url: String(r.url ?? ""),
20398
20415
  headers,
20399
- successStatus: String(r.success_status ?? "2xx")
20416
+ successStatus: String(r.success_status ?? "2xx"),
20417
+ tlsVerify: r.tls_verify === void 0 ? true : Boolean(r.tls_verify),
20418
+ caCert: r.ca_cert == null ? null : String(r.ca_cert)
20400
20419
  });
20401
20420
  }
20402
20421
  function _forwarderAttrs(forwarder) {