@deliverart/sdk-js-integration-diagnostics 2.45.1 → 2.45.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.
package/dist/index.cjs CHANGED
@@ -655,18 +655,19 @@ function describeElephantOperation(code, locale, resources = []) {
655
655
  nextStep: "Open the order and check its cash-register exports. Verify receipt on the cash register or request assistance before resending to avoid duplicates. Retry is unavailable from this historical finding."
656
656
  };
657
657
  if (!code || !Object.hasOwn(reasons2, code)) return null;
658
+ const restaurant = resources.some((resource) => resource.kind === "restaurant" && resource.role === "affected");
659
+ const platforms = {
660
+ migros_yemek: "Migros Yemek",
661
+ getir: "Getir",
662
+ yemeksepeti: "Yemeksepeti",
663
+ trendyol_go_meal: "Trendyol Go Meal",
664
+ fuudy: "Fuudy"
665
+ };
666
+ const platform = resources.find((resource) => resource.kind === "configuration" && resource.role === "context" && resource.identifier.startsWith("elephant_platform_"))?.identifier.slice("elephant_platform_".length);
667
+ const platformName = restaurant && platform && Object.hasOwn(platforms, platform) ? platforms[platform] : null;
658
668
  const unreachable = resources.some((resource) => resource.kind === "configuration" && resource.role === "context" && resource.identifier === "elephant_connection_unreachable");
659
669
  if (unreachable) {
660
- const restaurant = resources.some((resource) => resource.kind === "restaurant" && resource.role === "affected");
661
- const platforms = {
662
- migros_yemek: "Migros Yemek",
663
- getir: "Getir",
664
- yemeksepeti: "Yemeksepeti",
665
- trendyol_go_meal: "Trendyol Go Meal",
666
- fuudy: "Fuudy"
667
- };
668
- const platform = resources.find((resource) => resource.kind === "configuration" && resource.role === "context" && resource.identifier.startsWith("elephant_platform_"))?.identifier.slice("elephant_platform_".length);
669
- const target = restaurant ? platform && Object.hasOwn(platforms, platform) ? platforms[platform] : locale === "it" ? "la piattaforma del ristorante" : "the restaurant platform" : "Deliverart";
670
+ const target = restaurant ? platformName ?? (locale === "it" ? "la piattaforma del ristorante" : "the restaurant platform") : "Deliverart";
670
671
  return locale === "it" ? {
671
672
  title: `Elephant non raggiunge ${target}`,
672
673
  explanation: `Il test di connessione eseguito da Elephant verso ${target} non \xE8 riuscito. Questo esito non identifica da solo la causa: non conferma credenziali errate n\xE9 un problema della cassa o della sincronizzazione del menu.`,
@@ -678,7 +679,7 @@ function describeElephantOperation(code, locale, resources = []) {
678
679
  };
679
680
  }
680
681
  return {
681
- title: locale === "it" ? "Operazione Elephant da verificare" : "Elephant operation needs attention",
682
+ title: platformName ? locale === "it" ? `Operazione Elephant su ${platformName} da verificare` : `Elephant operation for ${platformName} needs attention` : locale === "it" ? "Operazione Elephant da verificare" : "Elephant operation needs attention",
682
683
  explanation: `${reasons2[code][locale]} ${locale === "it" ? "La risorsa indica dove controllare. La fase mostrata \xE8 l\u2019ultimo passaggio di configurazione salvato e pu\xF2 non coincidere con l\u2019attivit\xE0 fallita. Lo stato distingue un tentativo programmato da un intervento necessario." : "The resource indicates where to investigate. The phase shown is the last saved configuration checkpoint and may not be the activity that failed. Status distinguishes a scheduled retry from required action."}`,
683
684
  nextStep: code === "elephant_sales_mode_missing" ? locale === "it" ? "Apri le impostazioni del ristorante Elephant e verifica la modalit\xE0 di vendita e la categoria Deliverart associate allo stesso POS. Dopo la correzione aggiorna la verifica; questo non conferma da solo il collegamento remoto." : "Open the Elephant restaurant settings and check that its sales mode and Deliverart category belong to the same POS. Refresh verification after correcting them; this alone does not confirm the remote connection." : code === "elephant_parent_tenant_missing" ? locale === "it" ? "La configurazione del tenant gestito \xE8 gestita da Deliverart. Richiedi assistenza indicando questa integrazione; non creare o rimuovere tenant per aggirare il problema." : "Deliverart manages the parent tenant configuration. Contact support and identify this integration; do not create or remove tenants to bypass the issue." : code === "elephant_deliverart_base_url_invalid" ? locale === "it" ? "L\u2019indirizzo HTTPS usato da Elephant per richiamare Deliverart richiede una correzione tecnica. Richiedi assistenza indicando questa integrazione; non modificare le credenziali." : "The HTTPS address Elephant uses to call Deliverart needs a technical correction. Contact support and identify this integration; do not change credentials." : locale === "it" ? "Controlla lo stato dell\u2019integrazione e del ristorante indicato. Se la configurazione non \xE8 modificabile, richiedi assistenza. Non ricreare o rimuovere risorse per aggirare il problema." : "Check the integration and indicated restaurant status. Request assistance if the configuration cannot be edited. Do not recreate or remove resources to bypass the problem."
684
685
  };
package/dist/index.js CHANGED
@@ -549,18 +549,19 @@ function describeElephantOperation(code, locale, resources = []) {
549
549
  nextStep: "Open the order and check its cash-register exports. Verify receipt on the cash register or request assistance before resending to avoid duplicates. Retry is unavailable from this historical finding."
550
550
  };
551
551
  if (!code || !Object.hasOwn(reasons2, code)) return null;
552
+ const restaurant = resources.some((resource) => resource.kind === "restaurant" && resource.role === "affected");
553
+ const platforms = {
554
+ migros_yemek: "Migros Yemek",
555
+ getir: "Getir",
556
+ yemeksepeti: "Yemeksepeti",
557
+ trendyol_go_meal: "Trendyol Go Meal",
558
+ fuudy: "Fuudy"
559
+ };
560
+ const platform = resources.find((resource) => resource.kind === "configuration" && resource.role === "context" && resource.identifier.startsWith("elephant_platform_"))?.identifier.slice("elephant_platform_".length);
561
+ const platformName = restaurant && platform && Object.hasOwn(platforms, platform) ? platforms[platform] : null;
552
562
  const unreachable = resources.some((resource) => resource.kind === "configuration" && resource.role === "context" && resource.identifier === "elephant_connection_unreachable");
553
563
  if (unreachable) {
554
- const restaurant = resources.some((resource) => resource.kind === "restaurant" && resource.role === "affected");
555
- const platforms = {
556
- migros_yemek: "Migros Yemek",
557
- getir: "Getir",
558
- yemeksepeti: "Yemeksepeti",
559
- trendyol_go_meal: "Trendyol Go Meal",
560
- fuudy: "Fuudy"
561
- };
562
- const platform = resources.find((resource) => resource.kind === "configuration" && resource.role === "context" && resource.identifier.startsWith("elephant_platform_"))?.identifier.slice("elephant_platform_".length);
563
- const target = restaurant ? platform && Object.hasOwn(platforms, platform) ? platforms[platform] : locale === "it" ? "la piattaforma del ristorante" : "the restaurant platform" : "Deliverart";
564
+ const target = restaurant ? platformName ?? (locale === "it" ? "la piattaforma del ristorante" : "the restaurant platform") : "Deliverart";
564
565
  return locale === "it" ? {
565
566
  title: `Elephant non raggiunge ${target}`,
566
567
  explanation: `Il test di connessione eseguito da Elephant verso ${target} non \xE8 riuscito. Questo esito non identifica da solo la causa: non conferma credenziali errate n\xE9 un problema della cassa o della sincronizzazione del menu.`,
@@ -572,7 +573,7 @@ function describeElephantOperation(code, locale, resources = []) {
572
573
  };
573
574
  }
574
575
  return {
575
- title: locale === "it" ? "Operazione Elephant da verificare" : "Elephant operation needs attention",
576
+ title: platformName ? locale === "it" ? `Operazione Elephant su ${platformName} da verificare` : `Elephant operation for ${platformName} needs attention` : locale === "it" ? "Operazione Elephant da verificare" : "Elephant operation needs attention",
576
577
  explanation: `${reasons2[code][locale]} ${locale === "it" ? "La risorsa indica dove controllare. La fase mostrata \xE8 l\u2019ultimo passaggio di configurazione salvato e pu\xF2 non coincidere con l\u2019attivit\xE0 fallita. Lo stato distingue un tentativo programmato da un intervento necessario." : "The resource indicates where to investigate. The phase shown is the last saved configuration checkpoint and may not be the activity that failed. Status distinguishes a scheduled retry from required action."}`,
577
578
  nextStep: code === "elephant_sales_mode_missing" ? locale === "it" ? "Apri le impostazioni del ristorante Elephant e verifica la modalit\xE0 di vendita e la categoria Deliverart associate allo stesso POS. Dopo la correzione aggiorna la verifica; questo non conferma da solo il collegamento remoto." : "Open the Elephant restaurant settings and check that its sales mode and Deliverart category belong to the same POS. Refresh verification after correcting them; this alone does not confirm the remote connection." : code === "elephant_parent_tenant_missing" ? locale === "it" ? "La configurazione del tenant gestito \xE8 gestita da Deliverart. Richiedi assistenza indicando questa integrazione; non creare o rimuovere tenant per aggirare il problema." : "Deliverart manages the parent tenant configuration. Contact support and identify this integration; do not create or remove tenants to bypass the issue." : code === "elephant_deliverart_base_url_invalid" ? locale === "it" ? "L\u2019indirizzo HTTPS usato da Elephant per richiamare Deliverart richiede una correzione tecnica. Richiedi assistenza indicando questa integrazione; non modificare le credenziali." : "The HTTPS address Elephant uses to call Deliverart needs a technical correction. Contact support and identify this integration; do not change credentials." : locale === "it" ? "Controlla lo stato dell\u2019integrazione e del ristorante indicato. Se la configurazione non \xE8 modificabile, richiedi assistenza. Non ricreare o rimuovere risorse per aggirare il problema." : "Check the integration and indicated restaurant status. Request assistance if the configuration cannot be edited. Do not recreate or remove resources to bypass the problem."
578
579
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-integration-diagnostics",
3
3
  "description": "Shared integration diagnostics, verification and explicit recovery contracts",
4
- "version": "2.45.1",
4
+ "version": "2.45.3",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -19,8 +19,8 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "zod": "4.3.5",
22
- "@deliverart/sdk-js-global-types": "2.45.1",
23
- "@deliverart/sdk-js-core": "2.45.1"
22
+ "@deliverart/sdk-js-core": "2.45.3",
23
+ "@deliverart/sdk-js-global-types": "2.45.3"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@vitest/coverage-v8": "4.1.11",