strapi-plugin-hubspot 0.3.0 → 0.4.0

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.
Files changed (44) hide show
  1. package/README.md +121 -2
  2. package/dist/_chunks/HubspotObjectInput-DAq_W1rA.js +91 -0
  3. package/dist/_chunks/HubspotObjectInput-G-A_pL2j.mjs +73 -0
  4. package/dist/_chunks/HubspotPropertyInput-B-Jg0x68.js +186 -0
  5. package/dist/_chunks/HubspotPropertyInput-Cv77QiS6.mjs +168 -0
  6. package/dist/_chunks/Settings-58edRL5D.mjs +1293 -0
  7. package/dist/_chunks/Settings-CryiUgSe.js +1311 -0
  8. package/dist/_chunks/en-CnQbjHs-.js +81 -0
  9. package/dist/_chunks/en-DHQZuRsj.mjs +81 -0
  10. package/dist/_chunks/fr-Bv8zsNX5.js +81 -0
  11. package/dist/_chunks/fr-Dxgil7RP.mjs +81 -0
  12. package/dist/_chunks/index-BudHTwSw.mjs +137 -0
  13. package/dist/_chunks/index-Tlw1p93d.js +136 -0
  14. package/dist/_chunks/objectLabels-CJTKZ4vT.mjs +425 -0
  15. package/dist/_chunks/objectLabels-GRmYGCIn.js +442 -0
  16. package/dist/admin/index.js +1 -1
  17. package/dist/admin/index.mjs +1 -1
  18. package/dist/admin/src/components/AuditSection.d.ts +5 -0
  19. package/dist/admin/src/components/FailuresSection.d.ts +11 -0
  20. package/dist/admin/src/components/HubspotObjectInput.d.ts +28 -0
  21. package/dist/admin/src/components/HubspotPropertyInput.d.ts +1 -0
  22. package/dist/admin/src/getTranslation.d.ts +3 -0
  23. package/dist/admin/src/index.d.ts +6 -0
  24. package/dist/admin/src/objectLabels.d.ts +2 -1
  25. package/dist/server/index.js +417 -69
  26. package/dist/server/index.mjs +417 -69
  27. package/dist/server/src/__tests__/audit.test.d.ts +1 -0
  28. package/dist/server/src/__tests__/checkMapping.test.d.ts +1 -0
  29. package/dist/server/src/__tests__/loadSchema.test.d.ts +1 -0
  30. package/dist/server/src/__tests__/submit.test.d.ts +1 -0
  31. package/dist/server/src/__tests__/validation.test.d.ts +1 -0
  32. package/dist/server/src/audit.d.ts +60 -0
  33. package/dist/server/src/content-types.d.ts +56 -0
  34. package/dist/server/src/index.d.ts +104 -28
  35. package/dist/server/src/properties.d.ts +7 -2
  36. package/dist/server/src/submit.d.ts +35 -0
  37. package/dist/server/src/validation.d.ts +37 -0
  38. package/package.json +5 -2
  39. package/dist/_chunks/HubspotPropertyInput-C3KbDHYP.mjs +0 -106
  40. package/dist/_chunks/HubspotPropertyInput-C9PpYYgj.js +0 -124
  41. package/dist/_chunks/Settings-DGJ_mmlw.mjs +0 -140
  42. package/dist/_chunks/Settings-Lj49S5fO.js +0 -158
  43. package/dist/_chunks/index-Bq1tS5h6.js +0 -71
  44. package/dist/_chunks/index-lx7um1Yx.mjs +0 -72
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const en = {
4
+ "property.label": "HubSpot property",
5
+ "property.description": "Picked from the portal's real properties",
6
+ "options.section": "HubSpot",
7
+ "options.objectField.label": "Object field",
8
+ "options.objectField.description": "Name of the sibling field holding the HubSpot object (e.g. hsObject). Leave empty to list every object's properties.",
9
+ "options.objectField.placeholder": "hsObject",
10
+ "options.optionsField.label": "Options field",
11
+ "options.optionsField.description": `Name of the sibling repeatable holding this field's choices (value/label entries), filled by the import button on enumeration properties. Defaults to "options".`,
12
+ "options.optionsField.placeholder": "options",
13
+ "object.label": "HubSpot object",
14
+ "object.description": "Picked from the portal's configured objects",
15
+ "object.loading": "Loading HubSpot objects…",
16
+ "object.placeholder": "Choose an object…",
17
+ "object.no-scope": "{object} — missing scope on the token",
18
+ "settings.section": "HubSpot",
19
+ "settings.link": "Configuration",
20
+ "picker.loading": "Loading HubSpot properties…",
21
+ "picker.placeholder": "Search a property…",
22
+ "picker.free-placeholder": "e.g. hs_role, numberofemployees",
23
+ "picker.load-error": "HubSpot properties unavailable",
24
+ "picker.not-configured": "No HubSpot API key — free text. Set it in Settings → HubSpot.",
25
+ "picker.object-unavailable": "Properties of “{object}” unreadable — missing scope on the token.",
26
+ "picker.belongs-to": "{property} — belongs to {object}",
27
+ "picker.unknown": "{property} — unknown to the portal",
28
+ "picker.view": "View in HubSpot",
29
+ "picker.import": "Import the {count} options from HubSpot",
30
+ "picker.imported": "Options imported — save to keep them.",
31
+ "settings.subtitle": "The private app token used to read the portal's properties and validate form mappings.",
32
+ "settings.configured": "Configured {hint}",
33
+ "settings.not-configured": "Not configured",
34
+ "settings.source": "source: {source}",
35
+ "settings.source.settings": "set here",
36
+ "settings.source.config": "config/plugins.ts",
37
+ "settings.source.env": "environment variable",
38
+ "settings.key.label": "Private app token",
39
+ "settings.key.hint": "A key entered here overrides the ones from config/plugins.ts and HUBSPOT_API_KEY.",
40
+ "settings.key.placeholder.set": "•••••••• (leave empty to keep)",
41
+ "settings.key.placeholder.empty": "pat-eu1-…",
42
+ "settings.save": "Save",
43
+ "settings.test": "Test connection",
44
+ "settings.remove": "Remove",
45
+ "settings.loading": "Loading…",
46
+ "settings.load-error": "Could not load settings.",
47
+ "settings.saved": "Key saved.",
48
+ "settings.save-error": "Could not save the key.",
49
+ "settings.removed": "Key removed.",
50
+ "settings.remove-error": "Could not remove the key.",
51
+ "settings.test-ok": "Connection established — {count} readable properties.",
52
+ "settings.test-no-key": "No key configured.",
53
+ "settings.test-error": "HubSpot unreachable — invalid or revoked key?",
54
+ "settings.scopes": "The token needs the crm.schemas.contacts.read and crm.schemas.companies.read scopes to list properties. It is never returned to the browser: only its existence, its source and its last four characters are.",
55
+ "audit.title": "Mapping audit",
56
+ "audit.subtitle": "Scans every entry of the validated content types and lists the mappings the portal would reject today — including properties deleted in HubSpot since they were saved.",
57
+ "audit.run": "Run the audit",
58
+ "audit.error": "Audit failed — HubSpot unreachable?",
59
+ "audit.no-targets": "No content type to audit — declare them under `validate` in the plugin config.",
60
+ "audit.clean": "Nothing to report — every mapping is valid.",
61
+ "audit.summary": "{entries} entries · {mappings} mappings",
62
+ "audit.target-error": "Could not scan: {error}",
63
+ "failures.title": "Failed submissions",
64
+ "failures.subtitle": "Submissions HubSpot couldn't take after the automatic retries. They can be inspected under Content Manager → HubSpot failed submissions.",
65
+ "failures.count": "{count} queued",
66
+ "failures.retry": "Replay now",
67
+ "failures.retried": "{succeeded} replayed, {failed} still failing.",
68
+ "failures.error": "Replay failed.",
69
+ "problem.unknown": "“{property}” does not exist on {object} in this portal",
70
+ "problem.wrong-object": "“{property}” exists on {actual}, not on {object}",
71
+ "problem.whitespace": "“{property}” has surrounding whitespace",
72
+ "problem.bad-option": "“{property}” does not accept {values}",
73
+ "objects.contact": "Contact",
74
+ "objects.company": "Company",
75
+ "objects.deal": "Deal",
76
+ "objects.ticket": "Ticket",
77
+ "objects.product": "Product",
78
+ "objects.line_item": "Line item",
79
+ "objects.quote": "Quote"
80
+ };
81
+ exports.default = en;
@@ -0,0 +1,81 @@
1
+ const en = {
2
+ "property.label": "HubSpot property",
3
+ "property.description": "Picked from the portal's real properties",
4
+ "options.section": "HubSpot",
5
+ "options.objectField.label": "Object field",
6
+ "options.objectField.description": "Name of the sibling field holding the HubSpot object (e.g. hsObject). Leave empty to list every object's properties.",
7
+ "options.objectField.placeholder": "hsObject",
8
+ "options.optionsField.label": "Options field",
9
+ "options.optionsField.description": `Name of the sibling repeatable holding this field's choices (value/label entries), filled by the import button on enumeration properties. Defaults to "options".`,
10
+ "options.optionsField.placeholder": "options",
11
+ "object.label": "HubSpot object",
12
+ "object.description": "Picked from the portal's configured objects",
13
+ "object.loading": "Loading HubSpot objects…",
14
+ "object.placeholder": "Choose an object…",
15
+ "object.no-scope": "{object} — missing scope on the token",
16
+ "settings.section": "HubSpot",
17
+ "settings.link": "Configuration",
18
+ "picker.loading": "Loading HubSpot properties…",
19
+ "picker.placeholder": "Search a property…",
20
+ "picker.free-placeholder": "e.g. hs_role, numberofemployees",
21
+ "picker.load-error": "HubSpot properties unavailable",
22
+ "picker.not-configured": "No HubSpot API key — free text. Set it in Settings → HubSpot.",
23
+ "picker.object-unavailable": "Properties of “{object}” unreadable — missing scope on the token.",
24
+ "picker.belongs-to": "{property} — belongs to {object}",
25
+ "picker.unknown": "{property} — unknown to the portal",
26
+ "picker.view": "View in HubSpot",
27
+ "picker.import": "Import the {count} options from HubSpot",
28
+ "picker.imported": "Options imported — save to keep them.",
29
+ "settings.subtitle": "The private app token used to read the portal's properties and validate form mappings.",
30
+ "settings.configured": "Configured {hint}",
31
+ "settings.not-configured": "Not configured",
32
+ "settings.source": "source: {source}",
33
+ "settings.source.settings": "set here",
34
+ "settings.source.config": "config/plugins.ts",
35
+ "settings.source.env": "environment variable",
36
+ "settings.key.label": "Private app token",
37
+ "settings.key.hint": "A key entered here overrides the ones from config/plugins.ts and HUBSPOT_API_KEY.",
38
+ "settings.key.placeholder.set": "•••••••• (leave empty to keep)",
39
+ "settings.key.placeholder.empty": "pat-eu1-…",
40
+ "settings.save": "Save",
41
+ "settings.test": "Test connection",
42
+ "settings.remove": "Remove",
43
+ "settings.loading": "Loading…",
44
+ "settings.load-error": "Could not load settings.",
45
+ "settings.saved": "Key saved.",
46
+ "settings.save-error": "Could not save the key.",
47
+ "settings.removed": "Key removed.",
48
+ "settings.remove-error": "Could not remove the key.",
49
+ "settings.test-ok": "Connection established — {count} readable properties.",
50
+ "settings.test-no-key": "No key configured.",
51
+ "settings.test-error": "HubSpot unreachable — invalid or revoked key?",
52
+ "settings.scopes": "The token needs the crm.schemas.contacts.read and crm.schemas.companies.read scopes to list properties. It is never returned to the browser: only its existence, its source and its last four characters are.",
53
+ "audit.title": "Mapping audit",
54
+ "audit.subtitle": "Scans every entry of the validated content types and lists the mappings the portal would reject today — including properties deleted in HubSpot since they were saved.",
55
+ "audit.run": "Run the audit",
56
+ "audit.error": "Audit failed — HubSpot unreachable?",
57
+ "audit.no-targets": "No content type to audit — declare them under `validate` in the plugin config.",
58
+ "audit.clean": "Nothing to report — every mapping is valid.",
59
+ "audit.summary": "{entries} entries · {mappings} mappings",
60
+ "audit.target-error": "Could not scan: {error}",
61
+ "failures.title": "Failed submissions",
62
+ "failures.subtitle": "Submissions HubSpot couldn't take after the automatic retries. They can be inspected under Content Manager → HubSpot failed submissions.",
63
+ "failures.count": "{count} queued",
64
+ "failures.retry": "Replay now",
65
+ "failures.retried": "{succeeded} replayed, {failed} still failing.",
66
+ "failures.error": "Replay failed.",
67
+ "problem.unknown": "“{property}” does not exist on {object} in this portal",
68
+ "problem.wrong-object": "“{property}” exists on {actual}, not on {object}",
69
+ "problem.whitespace": "“{property}” has surrounding whitespace",
70
+ "problem.bad-option": "“{property}” does not accept {values}",
71
+ "objects.contact": "Contact",
72
+ "objects.company": "Company",
73
+ "objects.deal": "Deal",
74
+ "objects.ticket": "Ticket",
75
+ "objects.product": "Product",
76
+ "objects.line_item": "Line item",
77
+ "objects.quote": "Quote"
78
+ };
79
+ export {
80
+ en as default
81
+ };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const fr = {
4
+ "property.label": "Propriété HubSpot",
5
+ "property.description": "Choisie dans les propriétés réelles du portail",
6
+ "options.section": "HubSpot",
7
+ "options.objectField.label": "Champ objet",
8
+ "options.objectField.description": "Nom du champ voisin qui porte l'objet HubSpot (ex. hsObject). Laisser vide pour lister les propriétés de tous les objets.",
9
+ "options.objectField.placeholder": "hsObject",
10
+ "options.optionsField.label": "Champ options",
11
+ "options.optionsField.description": "Nom du repeatable voisin qui porte les choix de ce champ (entrées value/label), rempli par le bouton d'import sur les propriétés à énumération. Par défaut : « options ».",
12
+ "options.optionsField.placeholder": "options",
13
+ "object.label": "Objet HubSpot",
14
+ "object.description": "Choisi parmi les objets configurés du portail",
15
+ "object.loading": "Chargement des objets HubSpot…",
16
+ "object.placeholder": "Choisir un objet…",
17
+ "object.no-scope": "{object} — portée manquante sur le jeton",
18
+ "settings.section": "HubSpot",
19
+ "settings.link": "Configuration",
20
+ "picker.loading": "Chargement des propriétés HubSpot…",
21
+ "picker.placeholder": "Rechercher une propriété…",
22
+ "picker.free-placeholder": "ex. hs_role, numberofemployees",
23
+ "picker.load-error": "Propriétés HubSpot indisponibles",
24
+ "picker.not-configured": "Aucune clé API HubSpot — saisie libre. Renseignez-la dans Réglages → HubSpot.",
25
+ "picker.object-unavailable": "Propriétés de « {object} » illisibles — portée manquante sur le jeton.",
26
+ "picker.belongs-to": "{property} — appartient à {object}",
27
+ "picker.unknown": "{property} — inconnue du portail",
28
+ "picker.view": "Voir dans HubSpot",
29
+ "picker.import": "Importer les {count} options depuis HubSpot",
30
+ "picker.imported": "Options importées — enregistrez pour les conserver.",
31
+ "settings.subtitle": "Le jeton d'application privée utilisé pour lire les propriétés du portail et valider les mappings de formulaires.",
32
+ "settings.configured": "Configurée {hint}",
33
+ "settings.not-configured": "Non configurée",
34
+ "settings.source": "source : {source}",
35
+ "settings.source.settings": "saisie ici",
36
+ "settings.source.config": "config/plugins.ts",
37
+ "settings.source.env": "variable d'environnement",
38
+ "settings.key.label": "Jeton d'application privée",
39
+ "settings.key.hint": "Saisir une clé ici remplace celles venant de config/plugins.ts et de HUBSPOT_API_KEY.",
40
+ "settings.key.placeholder.set": "•••••••• (laisser vide pour conserver)",
41
+ "settings.key.placeholder.empty": "pat-eu1-…",
42
+ "settings.save": "Enregistrer",
43
+ "settings.test": "Tester la connexion",
44
+ "settings.remove": "Supprimer",
45
+ "settings.loading": "Chargement…",
46
+ "settings.load-error": "Réglages illisibles.",
47
+ "settings.saved": "Clé enregistrée.",
48
+ "settings.save-error": "Enregistrement impossible.",
49
+ "settings.removed": "Clé supprimée.",
50
+ "settings.remove-error": "Suppression impossible.",
51
+ "settings.test-ok": "Connexion établie — {count} propriétés lisibles.",
52
+ "settings.test-no-key": "Aucune clé configurée.",
53
+ "settings.test-error": "HubSpot injoignable — clé invalide ou révoquée ?",
54
+ "settings.scopes": "Le jeton a besoin des portées crm.schemas.contacts.read et crm.schemas.companies.read pour lister les propriétés. Il n'est jamais renvoyé au navigateur : seuls son existence, sa provenance et ses quatre derniers caractères le sont.",
55
+ "audit.title": "Audit des mappings",
56
+ "audit.subtitle": "Parcourt toutes les entrées des content-types validés et liste les mappings que le portail refuserait aujourd'hui — y compris les propriétés supprimées dans HubSpot depuis leur enregistrement.",
57
+ "audit.run": "Lancer l'audit",
58
+ "audit.error": "Audit impossible — HubSpot injoignable ?",
59
+ "audit.no-targets": "Aucun content-type à auditer — déclarez-les dans `validate` dans la config du plugin.",
60
+ "audit.clean": "Rien à signaler — tous les mappings sont valides.",
61
+ "audit.summary": "{entries} entrées · {mappings} mappings",
62
+ "audit.target-error": "Scan impossible : {error}",
63
+ "failures.title": "Envois en échec",
64
+ "failures.subtitle": "Les soumissions que HubSpot n'a pas pu recevoir après les tentatives automatiques. Elles sont consultables dans Content Manager → HubSpot failed submissions.",
65
+ "failures.count": "{count} en attente",
66
+ "failures.retry": "Rejouer maintenant",
67
+ "failures.retried": "{succeeded} rejouées, {failed} encore en échec.",
68
+ "failures.error": "Rejeu impossible.",
69
+ "problem.unknown": "« {property} » n'existe pas sur {object} dans ce portail",
70
+ "problem.wrong-object": "« {property} » existe sur {actual}, pas sur {object}",
71
+ "problem.whitespace": "« {property} » contient des espaces autour",
72
+ "problem.bad-option": "« {property} » n'accepte pas {values}",
73
+ "objects.contact": "Contact",
74
+ "objects.company": "Société",
75
+ "objects.deal": "Transaction",
76
+ "objects.ticket": "Ticket",
77
+ "objects.product": "Produit",
78
+ "objects.line_item": "Ligne de commande",
79
+ "objects.quote": "Devis"
80
+ };
81
+ exports.default = fr;
@@ -0,0 +1,81 @@
1
+ const fr = {
2
+ "property.label": "Propriété HubSpot",
3
+ "property.description": "Choisie dans les propriétés réelles du portail",
4
+ "options.section": "HubSpot",
5
+ "options.objectField.label": "Champ objet",
6
+ "options.objectField.description": "Nom du champ voisin qui porte l'objet HubSpot (ex. hsObject). Laisser vide pour lister les propriétés de tous les objets.",
7
+ "options.objectField.placeholder": "hsObject",
8
+ "options.optionsField.label": "Champ options",
9
+ "options.optionsField.description": "Nom du repeatable voisin qui porte les choix de ce champ (entrées value/label), rempli par le bouton d'import sur les propriétés à énumération. Par défaut : « options ».",
10
+ "options.optionsField.placeholder": "options",
11
+ "object.label": "Objet HubSpot",
12
+ "object.description": "Choisi parmi les objets configurés du portail",
13
+ "object.loading": "Chargement des objets HubSpot…",
14
+ "object.placeholder": "Choisir un objet…",
15
+ "object.no-scope": "{object} — portée manquante sur le jeton",
16
+ "settings.section": "HubSpot",
17
+ "settings.link": "Configuration",
18
+ "picker.loading": "Chargement des propriétés HubSpot…",
19
+ "picker.placeholder": "Rechercher une propriété…",
20
+ "picker.free-placeholder": "ex. hs_role, numberofemployees",
21
+ "picker.load-error": "Propriétés HubSpot indisponibles",
22
+ "picker.not-configured": "Aucune clé API HubSpot — saisie libre. Renseignez-la dans Réglages → HubSpot.",
23
+ "picker.object-unavailable": "Propriétés de « {object} » illisibles — portée manquante sur le jeton.",
24
+ "picker.belongs-to": "{property} — appartient à {object}",
25
+ "picker.unknown": "{property} — inconnue du portail",
26
+ "picker.view": "Voir dans HubSpot",
27
+ "picker.import": "Importer les {count} options depuis HubSpot",
28
+ "picker.imported": "Options importées — enregistrez pour les conserver.",
29
+ "settings.subtitle": "Le jeton d'application privée utilisé pour lire les propriétés du portail et valider les mappings de formulaires.",
30
+ "settings.configured": "Configurée {hint}",
31
+ "settings.not-configured": "Non configurée",
32
+ "settings.source": "source : {source}",
33
+ "settings.source.settings": "saisie ici",
34
+ "settings.source.config": "config/plugins.ts",
35
+ "settings.source.env": "variable d'environnement",
36
+ "settings.key.label": "Jeton d'application privée",
37
+ "settings.key.hint": "Saisir une clé ici remplace celles venant de config/plugins.ts et de HUBSPOT_API_KEY.",
38
+ "settings.key.placeholder.set": "•••••••• (laisser vide pour conserver)",
39
+ "settings.key.placeholder.empty": "pat-eu1-…",
40
+ "settings.save": "Enregistrer",
41
+ "settings.test": "Tester la connexion",
42
+ "settings.remove": "Supprimer",
43
+ "settings.loading": "Chargement…",
44
+ "settings.load-error": "Réglages illisibles.",
45
+ "settings.saved": "Clé enregistrée.",
46
+ "settings.save-error": "Enregistrement impossible.",
47
+ "settings.removed": "Clé supprimée.",
48
+ "settings.remove-error": "Suppression impossible.",
49
+ "settings.test-ok": "Connexion établie — {count} propriétés lisibles.",
50
+ "settings.test-no-key": "Aucune clé configurée.",
51
+ "settings.test-error": "HubSpot injoignable — clé invalide ou révoquée ?",
52
+ "settings.scopes": "Le jeton a besoin des portées crm.schemas.contacts.read et crm.schemas.companies.read pour lister les propriétés. Il n'est jamais renvoyé au navigateur : seuls son existence, sa provenance et ses quatre derniers caractères le sont.",
53
+ "audit.title": "Audit des mappings",
54
+ "audit.subtitle": "Parcourt toutes les entrées des content-types validés et liste les mappings que le portail refuserait aujourd'hui — y compris les propriétés supprimées dans HubSpot depuis leur enregistrement.",
55
+ "audit.run": "Lancer l'audit",
56
+ "audit.error": "Audit impossible — HubSpot injoignable ?",
57
+ "audit.no-targets": "Aucun content-type à auditer — déclarez-les dans `validate` dans la config du plugin.",
58
+ "audit.clean": "Rien à signaler — tous les mappings sont valides.",
59
+ "audit.summary": "{entries} entrées · {mappings} mappings",
60
+ "audit.target-error": "Scan impossible : {error}",
61
+ "failures.title": "Envois en échec",
62
+ "failures.subtitle": "Les soumissions que HubSpot n'a pas pu recevoir après les tentatives automatiques. Elles sont consultables dans Content Manager → HubSpot failed submissions.",
63
+ "failures.count": "{count} en attente",
64
+ "failures.retry": "Rejouer maintenant",
65
+ "failures.retried": "{succeeded} rejouées, {failed} encore en échec.",
66
+ "failures.error": "Rejeu impossible.",
67
+ "problem.unknown": "« {property} » n'existe pas sur {object} dans ce portail",
68
+ "problem.wrong-object": "« {property} » existe sur {actual}, pas sur {object}",
69
+ "problem.whitespace": "« {property} » contient des espaces autour",
70
+ "problem.bad-option": "« {property} » n'accepte pas {values}",
71
+ "objects.contact": "Contact",
72
+ "objects.company": "Société",
73
+ "objects.deal": "Transaction",
74
+ "objects.ticket": "Ticket",
75
+ "objects.product": "Produit",
76
+ "objects.line_item": "Ligne de commande",
77
+ "objects.quote": "Devis"
78
+ };
79
+ export {
80
+ fr as default
81
+ };
@@ -0,0 +1,137 @@
1
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
2
+ const v = glob[path];
3
+ if (v) {
4
+ return typeof v === "function" ? v() : Promise.resolve(v);
5
+ }
6
+ return new Promise((_, reject) => {
7
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
8
+ reject.bind(
9
+ null,
10
+ new Error(
11
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
12
+ )
13
+ )
14
+ );
15
+ });
16
+ };
17
+ const PLUGIN_ID = "hubspot";
18
+ const getTranslation = (id) => `${PLUGIN_ID}.${id}`;
19
+ const prefixPluginTranslations = (trad) => Object.fromEntries(Object.entries(trad).map(([key, value]) => [getTranslation(key), value]));
20
+ const index = {
21
+ register(app) {
22
+ app.customFields.register({
23
+ name: "property",
24
+ pluginId: PLUGIN_ID,
25
+ type: "string",
26
+ intlLabel: {
27
+ id: `${PLUGIN_ID}.property.label`,
28
+ defaultMessage: "HubSpot property"
29
+ },
30
+ intlDescription: {
31
+ id: `${PLUGIN_ID}.property.description`,
32
+ defaultMessage: "Picked from the portal's real properties"
33
+ },
34
+ components: {
35
+ Input: async () => import("./HubspotPropertyInput-Cv77QiS6.mjs")
36
+ },
37
+ // Exposed in the Content-Type Builder. Without this, `objectField` could
38
+ // only be set by hand-editing schema.json — which is not how anyone
39
+ // installing from npm adds a field, so the filtering would be unreachable.
40
+ options: {
41
+ base: [
42
+ {
43
+ sectionTitle: {
44
+ id: `${PLUGIN_ID}.options.section`,
45
+ defaultMessage: "HubSpot"
46
+ },
47
+ items: [
48
+ {
49
+ name: "options.objectField",
50
+ type: "text",
51
+ intlLabel: {
52
+ id: `${PLUGIN_ID}.options.objectField.label`,
53
+ defaultMessage: "Object field"
54
+ },
55
+ description: {
56
+ id: `${PLUGIN_ID}.options.objectField.description`,
57
+ defaultMessage: "Name of the sibling field holding the HubSpot object (e.g. hsObject). Leave empty to list every object's properties."
58
+ },
59
+ placeholder: {
60
+ id: `${PLUGIN_ID}.options.objectField.placeholder`,
61
+ defaultMessage: "hsObject"
62
+ }
63
+ },
64
+ {
65
+ name: "options.optionsField",
66
+ type: "text",
67
+ intlLabel: {
68
+ id: `${PLUGIN_ID}.options.optionsField.label`,
69
+ defaultMessage: "Options field"
70
+ },
71
+ description: {
72
+ id: `${PLUGIN_ID}.options.optionsField.description`,
73
+ defaultMessage: `Name of the sibling repeatable holding this field's choices (value/label entries), filled by the import button on enumeration properties. Defaults to "options".`
74
+ },
75
+ placeholder: {
76
+ id: `${PLUGIN_ID}.options.optionsField.placeholder`,
77
+ defaultMessage: "options"
78
+ }
79
+ }
80
+ ]
81
+ }
82
+ ]
83
+ }
84
+ });
85
+ app.customFields.register({
86
+ name: "object",
87
+ pluginId: PLUGIN_ID,
88
+ type: "string",
89
+ intlLabel: {
90
+ id: `${PLUGIN_ID}.object.label`,
91
+ defaultMessage: "HubSpot object"
92
+ },
93
+ intlDescription: {
94
+ id: `${PLUGIN_ID}.object.description`,
95
+ defaultMessage: "Picked from the portal's configured objects"
96
+ },
97
+ components: {
98
+ Input: async () => import("./HubspotObjectInput-G-A_pL2j.mjs")
99
+ }
100
+ });
101
+ app.createSettingSection(
102
+ {
103
+ id: PLUGIN_ID,
104
+ intlLabel: { id: `${PLUGIN_ID}.settings.section`, defaultMessage: "HubSpot" }
105
+ },
106
+ [
107
+ {
108
+ intlLabel: { id: `${PLUGIN_ID}.settings.link`, defaultMessage: "Configuration" },
109
+ id: `${PLUGIN_ID}-settings`,
110
+ to: `/settings/${PLUGIN_ID}`,
111
+ // Mirrors the RBAC action registered server-side: a role without it
112
+ // doesn't see the link at all — the routes refuse it anyway.
113
+ permissions: [{ action: `plugin::${PLUGIN_ID}.settings`, subject: null }],
114
+ Component: async () => (await import("./Settings-58edRL5D.mjs")).default
115
+ }
116
+ ]
117
+ );
118
+ app.registerPlugin({ id: PLUGIN_ID, name: PLUGIN_ID });
119
+ },
120
+ async registerTrads({ locales }) {
121
+ return Promise.all(
122
+ locales.map(async (locale) => {
123
+ try {
124
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-DHQZuRsj.mjs"), "./translations/fr.json": () => import("./fr-Dxgil7RP.mjs") }), `./translations/${locale}.json`, 3);
125
+ return { data: prefixPluginTranslations(data), locale };
126
+ } catch {
127
+ return { data: {}, locale };
128
+ }
129
+ })
130
+ );
131
+ }
132
+ };
133
+ export {
134
+ PLUGIN_ID as P,
135
+ getTranslation as g,
136
+ index as i
137
+ };
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
3
+ const v = glob[path];
4
+ if (v) {
5
+ return typeof v === "function" ? v() : Promise.resolve(v);
6
+ }
7
+ return new Promise((_, reject) => {
8
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
9
+ reject.bind(
10
+ null,
11
+ new Error(
12
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
13
+ )
14
+ )
15
+ );
16
+ });
17
+ };
18
+ const PLUGIN_ID = "hubspot";
19
+ const getTranslation = (id) => `${PLUGIN_ID}.${id}`;
20
+ const prefixPluginTranslations = (trad) => Object.fromEntries(Object.entries(trad).map(([key, value]) => [getTranslation(key), value]));
21
+ const index = {
22
+ register(app) {
23
+ app.customFields.register({
24
+ name: "property",
25
+ pluginId: PLUGIN_ID,
26
+ type: "string",
27
+ intlLabel: {
28
+ id: `${PLUGIN_ID}.property.label`,
29
+ defaultMessage: "HubSpot property"
30
+ },
31
+ intlDescription: {
32
+ id: `${PLUGIN_ID}.property.description`,
33
+ defaultMessage: "Picked from the portal's real properties"
34
+ },
35
+ components: {
36
+ Input: async () => Promise.resolve().then(() => require("./HubspotPropertyInput-B-Jg0x68.js"))
37
+ },
38
+ // Exposed in the Content-Type Builder. Without this, `objectField` could
39
+ // only be set by hand-editing schema.json — which is not how anyone
40
+ // installing from npm adds a field, so the filtering would be unreachable.
41
+ options: {
42
+ base: [
43
+ {
44
+ sectionTitle: {
45
+ id: `${PLUGIN_ID}.options.section`,
46
+ defaultMessage: "HubSpot"
47
+ },
48
+ items: [
49
+ {
50
+ name: "options.objectField",
51
+ type: "text",
52
+ intlLabel: {
53
+ id: `${PLUGIN_ID}.options.objectField.label`,
54
+ defaultMessage: "Object field"
55
+ },
56
+ description: {
57
+ id: `${PLUGIN_ID}.options.objectField.description`,
58
+ defaultMessage: "Name of the sibling field holding the HubSpot object (e.g. hsObject). Leave empty to list every object's properties."
59
+ },
60
+ placeholder: {
61
+ id: `${PLUGIN_ID}.options.objectField.placeholder`,
62
+ defaultMessage: "hsObject"
63
+ }
64
+ },
65
+ {
66
+ name: "options.optionsField",
67
+ type: "text",
68
+ intlLabel: {
69
+ id: `${PLUGIN_ID}.options.optionsField.label`,
70
+ defaultMessage: "Options field"
71
+ },
72
+ description: {
73
+ id: `${PLUGIN_ID}.options.optionsField.description`,
74
+ defaultMessage: `Name of the sibling repeatable holding this field's choices (value/label entries), filled by the import button on enumeration properties. Defaults to "options".`
75
+ },
76
+ placeholder: {
77
+ id: `${PLUGIN_ID}.options.optionsField.placeholder`,
78
+ defaultMessage: "options"
79
+ }
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ }
85
+ });
86
+ app.customFields.register({
87
+ name: "object",
88
+ pluginId: PLUGIN_ID,
89
+ type: "string",
90
+ intlLabel: {
91
+ id: `${PLUGIN_ID}.object.label`,
92
+ defaultMessage: "HubSpot object"
93
+ },
94
+ intlDescription: {
95
+ id: `${PLUGIN_ID}.object.description`,
96
+ defaultMessage: "Picked from the portal's configured objects"
97
+ },
98
+ components: {
99
+ Input: async () => Promise.resolve().then(() => require("./HubspotObjectInput-DAq_W1rA.js"))
100
+ }
101
+ });
102
+ app.createSettingSection(
103
+ {
104
+ id: PLUGIN_ID,
105
+ intlLabel: { id: `${PLUGIN_ID}.settings.section`, defaultMessage: "HubSpot" }
106
+ },
107
+ [
108
+ {
109
+ intlLabel: { id: `${PLUGIN_ID}.settings.link`, defaultMessage: "Configuration" },
110
+ id: `${PLUGIN_ID}-settings`,
111
+ to: `/settings/${PLUGIN_ID}`,
112
+ // Mirrors the RBAC action registered server-side: a role without it
113
+ // doesn't see the link at all — the routes refuse it anyway.
114
+ permissions: [{ action: `plugin::${PLUGIN_ID}.settings`, subject: null }],
115
+ Component: async () => (await Promise.resolve().then(() => require("./Settings-CryiUgSe.js"))).default
116
+ }
117
+ ]
118
+ );
119
+ app.registerPlugin({ id: PLUGIN_ID, name: PLUGIN_ID });
120
+ },
121
+ async registerTrads({ locales }) {
122
+ return Promise.all(
123
+ locales.map(async (locale) => {
124
+ try {
125
+ const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-CnQbjHs-.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-Bv8zsNX5.js")) }), `./translations/${locale}.json`, 3);
126
+ return { data: prefixPluginTranslations(data), locale };
127
+ } catch {
128
+ return { data: {}, locale };
129
+ }
130
+ })
131
+ );
132
+ }
133
+ };
134
+ exports.PLUGIN_ID = PLUGIN_ID;
135
+ exports.getTranslation = getTranslation;
136
+ exports.index = index;