@lonca/trendyol 0.11.1 → 0.11.3

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.
@@ -2539,11 +2539,13 @@ declare class WebhooksResource {
2539
2539
 
2540
2540
  /**
2541
2541
  * Static feature-capability flags for the Trendyol marketplace, so consumers
2542
- * can feature-detect instead of hard-coding marketplace quirks.
2543
- *
2544
- * Intentionally a per-SDK literal constant (not a shared `@lonca/core` type):
2545
- * the flags are marketplace-specific and the set is still small. Read them off
2542
+ * can feature-detect instead of hard-coding marketplace quirks. Read them off
2546
2543
  * a client as `client.capabilities`.
2544
+ *
2545
+ * The flag *values* are marketplace-specific, but the const `satisfies` the
2546
+ * shared {@link MarketplaceCapabilities} contract so the key set can't drift
2547
+ * from the Hepsiburada SDK without a compile error. Kept `as const` so the
2548
+ * literal `true`/`false` values stay narrowed.
2547
2549
  */
2548
2550
  declare const trendyolCapabilities: {
2549
2551
  /** Trendyol has no time-bounded / scheduled pricing (`pricings[]`). */
@@ -2539,11 +2539,13 @@ declare class WebhooksResource {
2539
2539
 
2540
2540
  /**
2541
2541
  * Static feature-capability flags for the Trendyol marketplace, so consumers
2542
- * can feature-detect instead of hard-coding marketplace quirks.
2543
- *
2544
- * Intentionally a per-SDK literal constant (not a shared `@lonca/core` type):
2545
- * the flags are marketplace-specific and the set is still small. Read them off
2542
+ * can feature-detect instead of hard-coding marketplace quirks. Read them off
2546
2543
  * a client as `client.capabilities`.
2544
+ *
2545
+ * The flag *values* are marketplace-specific, but the const `satisfies` the
2546
+ * shared {@link MarketplaceCapabilities} contract so the key set can't drift
2547
+ * from the Hepsiburada SDK without a compile error. Kept `as const` so the
2548
+ * literal `true`/`false` values stay narrowed.
2547
2549
  */
2548
2550
  declare const trendyolCapabilities: {
2549
2551
  /** Trendyol has no time-bounded / scheduled pricing (`pricings[]`). */
package/dist/index.cjs CHANGED
@@ -2755,23 +2755,7 @@ function mapHttpError(status, body, retryAfterMs) {
2755
2755
  }
2756
2756
  function normalizeErrorIssues(body) {
2757
2757
  const errors = extractErrorsArray(body);
2758
- if (!errors) return [];
2759
- const issues = [];
2760
- for (const entry of errors) {
2761
- if (typeof entry === "string") {
2762
- issues.push({ message: entry });
2763
- continue;
2764
- }
2765
- if (entry && typeof entry === "object") {
2766
- const e = entry;
2767
- if (typeof e.message !== "string") continue;
2768
- const issue = { message: e.message };
2769
- if (typeof e.field === "string") issue.field = e.field;
2770
- if (typeof e.code === "string") issue.code = e.code;
2771
- issues.push(issue);
2772
- }
2773
- }
2774
- return issues;
2758
+ return errors ? core.normalizeIssueEntries(errors) : [];
2775
2759
  }
2776
2760
  function extractErrorsArray(body) {
2777
2761
  if (!body || typeof body !== "object") return void 0;