twenty-sdk 0.6.1 → 0.6.3-alpha

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 (46) hide show
  1. package/README.md +5 -1
  2. package/dist/{HtmlTagToRemoteComponent-DvFlyCDv.js → HtmlTagToRemoteComponent-CgtwxDeH.js} +1 -1
  3. package/dist/{HtmlTagToRemoteComponent-CALlgbCB.mjs → HtmlTagToRemoteComponent-D_EW5OLu.mjs} +1498 -1447
  4. package/dist/cli/utilities/build/manifest/manifest-extract-config.d.ts +2 -0
  5. package/dist/cli/utilities/client/client-service.d.ts +0 -1
  6. package/dist/cli/utilities/client/twenty-client-template.d.ts +42 -0
  7. package/dist/cli.cjs +138 -89
  8. package/dist/cli.mjs +2570 -2490
  9. package/dist/front-component-renderer/index.cjs +8 -8
  10. package/dist/front-component-renderer/index.mjs +588 -479
  11. package/dist/front-component-renderer/remote/generated/remote-components.d.ts +42 -2
  12. package/dist/front-component-renderer/remote/generated/remote-elements.d.ts +52 -2
  13. package/dist/front-component-renderer/types/FrontComponentExecutionContext.d.ts +1 -0
  14. package/dist/front-component-renderer/types/FrontComponentHostCommunicationApi.d.ts +2 -1
  15. package/dist/{get-function-input-schema-BZ7_XyUh-CzwPUwwE.js → get-function-input-schema-BZ7_XyUh-CCSi0u_q.js} +1 -1
  16. package/dist/{get-function-input-schema-BZ7_XyUh-C9RBS5oC.mjs → get-function-input-schema-BZ7_XyUh-DAPandzB.mjs} +1 -1
  17. package/dist/index.cjs +2 -2
  18. package/dist/index.mjs +164 -124
  19. package/dist/sdk/application/application-config.d.ts +1 -1
  20. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.d.ts +1 -0
  21. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js +57 -6
  22. package/dist/sdk/front-component-api/constants/AllowedHtmlElements.js.map +1 -1
  23. package/dist/sdk/front-component-api/constants/EventToReact.js +22 -3
  24. package/dist/sdk/front-component-api/constants/EventToReact.js.map +1 -1
  25. package/dist/sdk/front-component-api/constants/SerializedEventData.d.ts +7 -0
  26. package/dist/sdk/front-component-api/functions/openAskAIWithPrompt.d.ts +2 -0
  27. package/dist/sdk/front-component-api/functions/openAskAIWithPrompt.js +12 -0
  28. package/dist/sdk/front-component-api/functions/openAskAIWithPrompt.js.map +1 -0
  29. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.d.ts +4 -0
  30. package/dist/sdk/front-component-api/globals/frontComponentHostCommunicationApi.js.map +1 -1
  31. package/dist/sdk/front-component-api/hooks/useRecordId.d.ts +1 -0
  32. package/dist/sdk/front-component-api/hooks/useRecordId.js +6 -0
  33. package/dist/sdk/front-component-api/hooks/useRecordId.js.map +1 -0
  34. package/dist/sdk/front-component-api/index.d.ts +2 -0
  35. package/dist/sdk/front-component-api/types/FrontComponentExecutionContext.d.ts +1 -0
  36. package/dist/sdk/index.d.ts +4 -1
  37. package/dist/sdk/index.js +75 -67
  38. package/dist/sdk/index.js.map +1 -1
  39. package/dist/sdk/logic-functions/define-post-install-logic-function.d.ts +6 -0
  40. package/dist/sdk/logic-functions/define-post-install-logic-function.js +12 -0
  41. package/dist/sdk/logic-functions/define-post-install-logic-function.js.map +1 -0
  42. package/dist/sdk/logic-functions/define-pre-install-logic-function.d.ts +6 -0
  43. package/dist/sdk/logic-functions/define-pre-install-logic-function.js +12 -0
  44. package/dist/sdk/logic-functions/define-pre-install-logic-function.js.map +1 -0
  45. package/dist/sdk/logic-functions/install-logic-function-payload-type.d.ts +4 -0
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AllowedHtmlElements.js","sources":["../../../../src/sdk/front-component-api/constants/AllowedHtmlElements.ts"],"sourcesContent":["type PropertySchema = {\n type: 'string' | 'number' | 'boolean';\n optional: boolean;\n};\n\nexport type AllowedHtmlElement = {\n tag: string;\n name: string;\n properties: Record<string, PropertySchema>;\n};\n\nexport const ALLOWED_HTML_ELEMENTS: AllowedHtmlElement[] = [\n { tag: 'html-div', name: 'HtmlDiv', properties: {} },\n { tag: 'html-span', name: 'HtmlSpan', properties: {} },\n { tag: 'html-section', name: 'HtmlSection', properties: {} },\n { tag: 'html-article', name: 'HtmlArticle', properties: {} },\n { tag: 'html-header', name: 'HtmlHeader', properties: {} },\n { tag: 'html-footer', name: 'HtmlFooter', properties: {} },\n { tag: 'html-main', name: 'HtmlMain', properties: {} },\n { tag: 'html-nav', name: 'HtmlNav', properties: {} },\n { tag: 'html-aside', name: 'HtmlAside', properties: {} },\n { tag: 'html-p', name: 'HtmlP', properties: {} },\n { tag: 'html-h1', name: 'HtmlH1', properties: {} },\n { tag: 'html-h2', name: 'HtmlH2', properties: {} },\n { tag: 'html-h3', name: 'HtmlH3', properties: {} },\n { tag: 'html-h4', name: 'HtmlH4', properties: {} },\n { tag: 'html-h5', name: 'HtmlH5', properties: {} },\n { tag: 'html-h6', name: 'HtmlH6', properties: {} },\n { tag: 'html-strong', name: 'HtmlStrong', properties: {} },\n { tag: 'html-em', name: 'HtmlEm', properties: {} },\n { tag: 'html-small', name: 'HtmlSmall', properties: {} },\n { tag: 'html-code', name: 'HtmlCode', properties: {} },\n { tag: 'html-pre', name: 'HtmlPre', properties: {} },\n { tag: 'html-blockquote', name: 'HtmlBlockquote', properties: {} },\n {\n tag: 'html-a',\n name: 'HtmlA',\n properties: {\n href: { type: 'string', optional: true },\n target: { type: 'string', optional: true },\n rel: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-img',\n name: 'HtmlImg',\n properties: {\n src: { type: 'string', optional: true },\n alt: { type: 'string', optional: true },\n width: { type: 'number', optional: true },\n height: { type: 'number', optional: true },\n },\n },\n { tag: 'html-ul', name: 'HtmlUl', properties: {} },\n { tag: 'html-ol', name: 'HtmlOl', properties: {} },\n { tag: 'html-li', name: 'HtmlLi', properties: {} },\n {\n tag: 'html-form',\n name: 'HtmlForm',\n properties: {\n action: { type: 'string', optional: true },\n method: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-label',\n name: 'HtmlLabel',\n properties: {\n htmlFor: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-input',\n name: 'HtmlInput',\n properties: {\n type: { type: 'string', optional: true },\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n checked: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-textarea',\n name: 'HtmlTextarea',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n rows: { type: 'number', optional: true },\n cols: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-select',\n name: 'HtmlSelect',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n multiple: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-option',\n name: 'HtmlOption',\n properties: {\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n selected: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-button',\n name: 'HtmlButton',\n properties: {\n type: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n },\n },\n { tag: 'html-table', name: 'HtmlTable', properties: {} },\n { tag: 'html-thead', name: 'HtmlThead', properties: {} },\n { tag: 'html-tbody', name: 'HtmlTbody', properties: {} },\n { tag: 'html-tfoot', name: 'HtmlTfoot', properties: {} },\n { tag: 'html-tr', name: 'HtmlTr', properties: {} },\n {\n tag: 'html-th',\n name: 'HtmlTh',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-td',\n name: 'HtmlTd',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n { tag: 'html-br', name: 'HtmlBr', properties: {} },\n { tag: 'html-hr', name: 'HtmlHr', properties: {} },\n {\n tag: 'html-iframe',\n name: 'HtmlIframe',\n properties: {\n src: { type: 'string', optional: true },\n title: { type: 'string', optional: true },\n width: { type: 'string', optional: true },\n height: { type: 'string', optional: true },\n allow: { type: 'string', optional: true },\n sandbox: { type: 'string', optional: true },\n allowFullScreen: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-video',\n name: 'HtmlVideo',\n properties: {\n src: { type: 'string', optional: true },\n poster: { type: 'string', optional: true },\n controls: { type: 'boolean', optional: true },\n autoPlay: { type: 'boolean', optional: true },\n loop: { type: 'boolean', optional: true },\n muted: { type: 'boolean', optional: true },\n preload: { type: 'string', optional: true },\n width: { type: 'string', optional: true },\n height: { type: 'string', optional: true },\n crossOrigin: { type: 'string', optional: true },\n playsInline: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-audio',\n name: 'HtmlAudio',\n properties: {\n src: { type: 'string', optional: true },\n controls: { type: 'boolean', optional: true },\n autoPlay: { type: 'boolean', optional: true },\n loop: { type: 'boolean', optional: true },\n muted: { type: 'boolean', optional: true },\n preload: { type: 'string', optional: true },\n crossOrigin: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-source',\n name: 'HtmlSource',\n properties: {\n src: { type: 'string', optional: true },\n type: { type: 'string', optional: true },\n media: { type: 'string', optional: true },\n },\n },\n];\n"],"names":["ALLOWED_HTML_ELEMENTS"],"mappings":"AAWO,MAAMA,IAA8C;AAAA,EACzD,EAAE,KAAK,YAAY,MAAM,WAAW,YAAY,CAAA,EAAC;AAAA,EACjD,EAAE,KAAK,aAAa,MAAM,YAAY,YAAY,CAAA,EAAC;AAAA,EACnD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,EAAC;AAAA,EACvD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,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AU,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACvC,UAAU,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACvC,MAAM,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACnC,OAAO,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACpC,SAAS,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACrC,OAAO,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACnC,QAAQ,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACpC,aAAa,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACzC,aAAa,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,IAAK;AAAA,EACjD;AAAA,EAEF;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,YAAY;AAAA,MACV,KAAK,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACjC,UAAU,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACvC,UAAU,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACvC,MAAM,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACnC,OAAO,EAAE,MAAM,WAAW,UAAU,GAAA;AAAA,MACpC,SAAS,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACrC,aAAa,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,IAAK;AAAA,EAChD;AAAA,EAEF;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,YAAY;AAAA,MACV,KAAK,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACjC,MAAM,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MAClC,OAAO,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,IAAK;AAAA,EAC1C;AAEJ;"}
1
+ {"version":3,"file":"AllowedHtmlElements.js","sources":["../../../../src/sdk/front-component-api/constants/AllowedHtmlElements.ts"],"sourcesContent":["type PropertySchema = {\n type: 'string' | 'number' | 'boolean';\n optional: boolean;\n};\n\nexport type AllowedHtmlElement = {\n tag: string;\n name: string;\n properties: Record<string, PropertySchema>;\n events?: string[];\n};\n\nexport const ALLOWED_HTML_ELEMENTS: AllowedHtmlElement[] = [\n { tag: 'html-div', name: 'HtmlDiv', properties: {} },\n { tag: 'html-span', name: 'HtmlSpan', properties: {} },\n { tag: 'html-section', name: 'HtmlSection', properties: {} },\n { tag: 'html-article', name: 'HtmlArticle', properties: {} },\n { tag: 'html-header', name: 'HtmlHeader', properties: {} },\n { tag: 'html-footer', name: 'HtmlFooter', properties: {} },\n { tag: 'html-main', name: 'HtmlMain', properties: {} },\n { tag: 'html-nav', name: 'HtmlNav', properties: {} },\n { tag: 'html-aside', name: 'HtmlAside', properties: {} },\n { tag: 'html-p', name: 'HtmlP', properties: {} },\n { tag: 'html-h1', name: 'HtmlH1', properties: {} },\n { tag: 'html-h2', name: 'HtmlH2', properties: {} },\n { tag: 'html-h3', name: 'HtmlH3', properties: {} },\n { tag: 'html-h4', name: 'HtmlH4', properties: {} },\n { tag: 'html-h5', name: 'HtmlH5', properties: {} },\n { tag: 'html-h6', name: 'HtmlH6', properties: {} },\n { tag: 'html-strong', name: 'HtmlStrong', properties: {} },\n { tag: 'html-em', name: 'HtmlEm', properties: {} },\n { tag: 'html-small', name: 'HtmlSmall', properties: {} },\n { tag: 'html-code', name: 'HtmlCode', properties: {} },\n { tag: 'html-pre', name: 'HtmlPre', properties: {} },\n { tag: 'html-blockquote', name: 'HtmlBlockquote', properties: {} },\n {\n tag: 'html-a',\n name: 'HtmlA',\n properties: {\n href: { type: 'string', optional: true },\n target: { type: 'string', optional: true },\n rel: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-img',\n name: 'HtmlImg',\n properties: {\n src: { type: 'string', optional: true },\n alt: { type: 'string', optional: true },\n width: { type: 'number', optional: true },\n height: { type: 'number', optional: true },\n },\n },\n { tag: 'html-ul', name: 'HtmlUl', properties: {} },\n { tag: 'html-ol', name: 'HtmlOl', properties: {} },\n { tag: 'html-li', name: 'HtmlLi', properties: {} },\n {\n tag: 'html-form',\n name: 'HtmlForm',\n properties: {\n action: { type: 'string', optional: true },\n method: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-label',\n name: 'HtmlLabel',\n properties: {\n htmlFor: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-input',\n name: 'HtmlInput',\n properties: {\n type: { type: 'string', optional: true },\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n checked: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-textarea',\n name: 'HtmlTextarea',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n placeholder: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n readOnly: { type: 'boolean', optional: true },\n rows: { type: 'number', optional: true },\n cols: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-select',\n name: 'HtmlSelect',\n properties: {\n name: { type: 'string', optional: true },\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n multiple: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-option',\n name: 'HtmlOption',\n properties: {\n value: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n selected: { type: 'boolean', optional: true },\n },\n },\n {\n tag: 'html-button',\n name: 'HtmlButton',\n properties: {\n type: { type: 'string', optional: true },\n disabled: { type: 'boolean', optional: true },\n },\n },\n { tag: 'html-table', name: 'HtmlTable', properties: {} },\n { tag: 'html-thead', name: 'HtmlThead', properties: {} },\n { tag: 'html-tbody', name: 'HtmlTbody', properties: {} },\n { tag: 'html-tfoot', name: 'HtmlTfoot', properties: {} },\n { tag: 'html-tr', name: 'HtmlTr', properties: {} },\n {\n tag: 'html-th',\n name: 'HtmlTh',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n {\n tag: 'html-td',\n name: 'HtmlTd',\n properties: {\n colSpan: { type: 'number', optional: true },\n rowSpan: { type: 'number', optional: true },\n },\n },\n { tag: 'html-br', name: 'HtmlBr', properties: {} },\n { tag: 'html-hr', name: 'HtmlHr', properties: {} },\n {\n tag: 'html-iframe',\n name: 'HtmlIframe',\n properties: {\n src: { type: 'string', optional: true },\n name: { type: 'string', optional: true },\n width: { type: 'string', optional: true },\n height: { type: 'string', optional: true },\n allow: { type: 'string', optional: true },\n sandbox: { type: 'string', optional: true },\n allowFullScreen: { type: 'boolean', optional: true },\n loading: { type: 'string', optional: true },\n referrerPolicy: { type: 'string', optional: true },\n srcDoc: { type: 'string', optional: true },\n },\n },\n {\n tag: 'html-video',\n name: 'HtmlVideo',\n properties: {\n src: { type: 'string', optional: true },\n poster: { type: 'string', optional: true },\n controls: { type: 'boolean', optional: true },\n autoPlay: { type: 'boolean', optional: true },\n loop: { type: 'boolean', optional: true },\n muted: { type: 'boolean', optional: true },\n preload: { type: 'string', optional: true },\n width: { type: 'string', optional: true },\n height: { type: 'string', optional: true },\n crossOrigin: { type: 'string', optional: true },\n playsInline: { type: 'boolean', optional: true },\n disablePictureInPicture: { type: 'boolean', optional: true },\n disableRemotePlayback: { type: 'boolean', optional: true },\n },\n events: [\n 'timeupdate',\n 'play',\n 'pause',\n 'ended',\n 'loadedmetadata',\n 'loadeddata',\n 'volumechange',\n 'seeking',\n 'seeked',\n 'error',\n 'canplay',\n 'canplaythrough',\n 'waiting',\n 'progress',\n 'durationchange',\n 'ratechange',\n 'stalled',\n 'suspend',\n 'emptied',\n ],\n },\n {\n tag: 'html-audio',\n name: 'HtmlAudio',\n properties: {\n src: { type: 'string', optional: true },\n controls: { type: 'boolean', optional: true },\n autoPlay: { type: 'boolean', optional: true },\n loop: { type: 'boolean', optional: true },\n muted: { type: 'boolean', optional: true },\n preload: { type: 'string', optional: true },\n crossOrigin: { type: 'string', optional: true },\n },\n events: [\n 'timeupdate',\n 'play',\n 'pause',\n 'ended',\n 'loadedmetadata',\n 'loadeddata',\n 'volumechange',\n 'seeking',\n 'seeked',\n 'error',\n 'canplay',\n 'canplaythrough',\n 'waiting',\n 'progress',\n 'durationchange',\n 'ratechange',\n 'stalled',\n 'suspend',\n 'emptied',\n ],\n },\n {\n tag: 'html-source',\n name: 'HtmlSource',\n properties: {\n src: { type: 'string', optional: true },\n type: { type: 'string', optional: true },\n media: { type: 'string', optional: true },\n srcSet: { type: 'string', optional: true },\n sizes: { type: 'string', optional: true },\n width: { type: 'number', optional: true },\n height: { type: 'number', optional: true },\n },\n },\n];\n"],"names":["ALLOWED_HTML_ELEMENTS"],"mappings":"AAYO,MAAMA,IAA8C;AAAA,EACzD,EAAE,KAAK,YAAY,MAAM,WAAW,YAAY,CAAA,EAAC;AAAA,EACjD,EAAE,KAAK,aAAa,MAAM,YAAY,YAAY,CAAA,EAAC;AAAA,EACnD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,gBAAgB,MAAM,eAAe,YAAY,CAAA,EAAC;AAAA,EACzD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,EAAC;AAAA,EACvD,EAAE,KAAK,eAAe,MAAM,cAAc,YAAY,CAAA,EAAC;AAAA,EACvD,EAAE,KAAK,aAAa,MAAM,YAAY,YAAY,CAAA,EAAC;AAAA,EACnD,EAAE,KAAK,YAAY,MAAM,WAAW,YAAY,CAAA,EAAC;AAAA,EACjD,EAAE,KAAK,cAAc,MAAM,aAAa,YAAY,CAAA,EAAC;AAAA,EACrD,EAAE,KAAK,UAAU,MAAM,SAAS,YAAY,CAAA,EAAC;AAAA,EAC7C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MAAM,UAAU,YAAY,CAAA,EAAC;AAAA,EAC/C,EAAE,KAAK,WAAW,MA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,GAAA;AAAA,MACjC,MAAM,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MAClC,OAAO,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACnC,QAAQ,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACpC,OAAO,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACnC,OAAO,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,MACnC,QAAQ,EAAE,MAAM,UAAU,UAAU,GAAA;AAAA,IAAK;AAAA,EAC3C;AAEJ;"}
@@ -1,4 +1,4 @@
1
- const o = {
1
+ const e = {
2
2
  click: "onClick",
3
3
  dblclick: "onDoubleClick",
4
4
  mousedown: "onMouseDown",
@@ -18,9 +18,28 @@ const o = {
18
18
  scroll: "onScroll",
19
19
  wheel: "onWheel",
20
20
  contextmenu: "onContextMenu",
21
- drag: "onDrag"
21
+ drag: "onDrag",
22
+ timeupdate: "onTimeUpdate",
23
+ play: "onPlay",
24
+ pause: "onPause",
25
+ ended: "onEnded",
26
+ loadedmetadata: "onLoadedMetadata",
27
+ loadeddata: "onLoadedData",
28
+ volumechange: "onVolumeChange",
29
+ seeking: "onSeeking",
30
+ seeked: "onSeeked",
31
+ error: "onError",
32
+ canplay: "onCanPlay",
33
+ canplaythrough: "onCanPlayThrough",
34
+ waiting: "onWaiting",
35
+ progress: "onProgress",
36
+ durationchange: "onDurationChange",
37
+ ratechange: "onRateChange",
38
+ stalled: "onStalled",
39
+ suspend: "onSuspend",
40
+ emptied: "onEmptied"
22
41
  };
23
42
  export {
24
- o as EVENT_TO_REACT
43
+ e as EVENT_TO_REACT
25
44
  };
26
45
  //# sourceMappingURL=EventToReact.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventToReact.js","sources":["../../../../src/sdk/front-component-api/constants/EventToReact.ts"],"sourcesContent":["export const EVENT_TO_REACT: Record<string, string> = {\n click: 'onClick',\n dblclick: 'onDoubleClick',\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mouseout: 'onMouseOut',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n keydown: 'onKeyDown',\n keyup: 'onKeyUp',\n keypress: 'onKeyPress',\n focus: 'onFocus',\n blur: 'onBlur',\n change: 'onChange',\n input: 'onInput',\n submit: 'onSubmit',\n scroll: 'onScroll',\n wheel: 'onWheel',\n contextmenu: 'onContextMenu',\n drag: 'onDrag',\n};\n"],"names":["EVENT_TO_REACT"],"mappings":"AAAO,MAAMA,IAAyC;AAAA,EACpD,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AACR;"}
1
+ {"version":3,"file":"EventToReact.js","sources":["../../../../src/sdk/front-component-api/constants/EventToReact.ts"],"sourcesContent":["export const EVENT_TO_REACT: Record<string, string> = {\n click: 'onClick',\n dblclick: 'onDoubleClick',\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mouseout: 'onMouseOut',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n keydown: 'onKeyDown',\n keyup: 'onKeyUp',\n keypress: 'onKeyPress',\n focus: 'onFocus',\n blur: 'onBlur',\n change: 'onChange',\n input: 'onInput',\n submit: 'onSubmit',\n scroll: 'onScroll',\n wheel: 'onWheel',\n contextmenu: 'onContextMenu',\n drag: 'onDrag',\n timeupdate: 'onTimeUpdate',\n play: 'onPlay',\n pause: 'onPause',\n ended: 'onEnded',\n loadedmetadata: 'onLoadedMetadata',\n loadeddata: 'onLoadedData',\n volumechange: 'onVolumeChange',\n seeking: 'onSeeking',\n seeked: 'onSeeked',\n error: 'onError',\n canplay: 'onCanPlay',\n canplaythrough: 'onCanPlayThrough',\n waiting: 'onWaiting',\n progress: 'onProgress',\n durationchange: 'onDurationChange',\n ratechange: 'onRateChange',\n stalled: 'onStalled',\n suspend: 'onSuspend',\n emptied: 'onEmptied',\n};\n"],"names":["EVENT_TO_REACT"],"mappings":"AAAO,MAAMA,IAAyC;AAAA,EACpD,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;"}
@@ -23,4 +23,11 @@ export type SerializedEventData = {
23
23
  deltaY?: number;
24
24
  deltaZ?: number;
25
25
  deltaMode?: number;
26
+ currentTime?: number;
27
+ duration?: number;
28
+ paused?: boolean;
29
+ ended?: boolean;
30
+ volume?: number;
31
+ muted?: boolean;
32
+ playbackRate?: number;
26
33
  };
@@ -0,0 +1,2 @@
1
+ import { type OpenAskAIWithPromptFunction } from '../globals/frontComponentHostCommunicationApi';
2
+ export declare const openAskAIWithPrompt: OpenAskAIWithPromptFunction;
@@ -0,0 +1,12 @@
1
+ import { isDefined as n } from "twenty-shared/utils";
2
+ import { frontComponentHostCommunicationApi as r } from "../globals/frontComponentHostCommunicationApi.js";
3
+ const e = (t) => {
4
+ const o = r.openAskAIWithPrompt;
5
+ if (!n(o))
6
+ throw new Error("openAskAIWithPromptFunction is not set");
7
+ return o(t);
8
+ };
9
+ export {
10
+ e as openAskAIWithPrompt
11
+ };
12
+ //# sourceMappingURL=openAskAIWithPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openAskAIWithPrompt.js","sources":["../../../../src/sdk/front-component-api/functions/openAskAIWithPrompt.ts"],"sourcesContent":["import { isDefined } from 'twenty-shared/utils';\n\nimport {\n frontComponentHostCommunicationApi,\n type OpenAskAIWithPromptFunction,\n} from '../globals/frontComponentHostCommunicationApi';\n\nexport const openAskAIWithPrompt: OpenAskAIWithPromptFunction = (params) => {\n const openAskAIWithPromptFunction =\n frontComponentHostCommunicationApi.openAskAIWithPrompt;\n\n if (!isDefined(openAskAIWithPromptFunction)) {\n throw new Error('openAskAIWithPromptFunction is not set');\n }\n\n return openAskAIWithPromptFunction(params);\n};\n"],"names":["openAskAIWithPrompt","params","openAskAIWithPromptFunction","frontComponentHostCommunicationApi","isDefined"],"mappings":";;AAOO,MAAMA,IAAmD,CAACC,MAAW;AAC1E,QAAMC,IACJC,EAAmC;AAErC,MAAI,CAACC,EAAUF,CAA2B;AACxC,UAAM,IAAI,MAAM,wCAAwC;AAG1D,SAAOA,EAA4BD,CAAM;AAC3C;"}
@@ -11,6 +11,9 @@ export type UnmountFrontComponentFunction = () => Promise<void>;
11
11
  export type EnqueueSnackbarFunction = (params: EnqueueSnackbarParams) => Promise<void>;
12
12
  export type CloseSidePanelFunction = () => Promise<void>;
13
13
  export type RequestAccessTokenRefreshFunction = () => Promise<string>;
14
+ export type OpenAskAIWithPromptFunction = (params: {
15
+ prompt: string;
16
+ }) => Promise<void>;
14
17
  export type FrontComponentHostCommunicationApiStore = {
15
18
  navigate?: NavigateFunction;
16
19
  requestAccessTokenRefresh?: RequestAccessTokenRefreshFunction;
@@ -18,6 +21,7 @@ export type FrontComponentHostCommunicationApiStore = {
18
21
  unmountFrontComponent?: UnmountFrontComponentFunction;
19
22
  enqueueSnackbar?: EnqueueSnackbarFunction;
20
23
  closeSidePanel?: CloseSidePanelFunction;
24
+ openAskAIWithPrompt?: OpenAskAIWithPromptFunction;
21
25
  };
22
26
  declare global {
23
27
  var frontComponentHostCommunicationApi: FrontComponentHostCommunicationApiStore;
@@ -1 +1 @@
1
- {"version":3,"file":"frontComponentHostCommunicationApi.js","sources":["../../../../src/sdk/front-component-api/globals/frontComponentHostCommunicationApi.ts"],"sourcesContent":["import {\n type AppPath,\n type CommandMenuPages,\n type EnqueueSnackbarParams,\n type NavigateOptions,\n} from 'twenty-shared/types';\nimport { type getAppPath } from 'twenty-shared/utils';\n\nexport type NavigateFunction = <T extends AppPath>(\n to: T,\n params?: Parameters<typeof getAppPath<T>>[1],\n queryParams?: Record<string, any>,\n options?: NavigateOptions,\n) => Promise<void>;\n\nexport type OpenSidePanelPageFunction = (params: {\n page: CommandMenuPages;\n pageTitle: string;\n pageIcon?: string;\n shouldResetSearchState?: boolean;\n}) => Promise<void>;\n\nexport type UnmountFrontComponentFunction = () => Promise<void>;\n\nexport type EnqueueSnackbarFunction = (\n params: EnqueueSnackbarParams,\n) => Promise<void>;\n\nexport type CloseSidePanelFunction = () => Promise<void>;\n\nexport type RequestAccessTokenRefreshFunction = () => Promise<string>;\n\nexport type FrontComponentHostCommunicationApiStore = {\n navigate?: NavigateFunction;\n requestAccessTokenRefresh?: RequestAccessTokenRefreshFunction;\n openSidePanelPage?: OpenSidePanelPageFunction;\n unmountFrontComponent?: UnmountFrontComponentFunction;\n enqueueSnackbar?: EnqueueSnackbarFunction;\n closeSidePanel?: CloseSidePanelFunction;\n};\n\ndeclare global {\n var frontComponentHostCommunicationApi: FrontComponentHostCommunicationApiStore;\n}\n\nglobalThis.frontComponentHostCommunicationApi ??= {};\n\nexport const frontComponentHostCommunicationApi =\n globalThis.frontComponentHostCommunicationApi;\n"],"names":["frontComponentHostCommunicationApi"],"mappings":"AA6CA,WAAW,uCAAuC,CAAA;AAE3C,MAAMA,IACX,WAAW;"}
1
+ {"version":3,"file":"frontComponentHostCommunicationApi.js","sources":["../../../../src/sdk/front-component-api/globals/frontComponentHostCommunicationApi.ts"],"sourcesContent":["import {\n type AppPath,\n type CommandMenuPages,\n type EnqueueSnackbarParams,\n type NavigateOptions,\n} from 'twenty-shared/types';\nimport { type getAppPath } from 'twenty-shared/utils';\n\nexport type NavigateFunction = <T extends AppPath>(\n to: T,\n params?: Parameters<typeof getAppPath<T>>[1],\n queryParams?: Record<string, any>,\n options?: NavigateOptions,\n) => Promise<void>;\n\nexport type OpenSidePanelPageFunction = (params: {\n page: CommandMenuPages;\n pageTitle: string;\n pageIcon?: string;\n shouldResetSearchState?: boolean;\n}) => Promise<void>;\n\nexport type UnmountFrontComponentFunction = () => Promise<void>;\n\nexport type EnqueueSnackbarFunction = (\n params: EnqueueSnackbarParams,\n) => Promise<void>;\n\nexport type CloseSidePanelFunction = () => Promise<void>;\n\nexport type RequestAccessTokenRefreshFunction = () => Promise<string>;\n\nexport type OpenAskAIWithPromptFunction = (params: {\n prompt: string;\n}) => Promise<void>;\n\nexport type FrontComponentHostCommunicationApiStore = {\n navigate?: NavigateFunction;\n requestAccessTokenRefresh?: RequestAccessTokenRefreshFunction;\n openSidePanelPage?: OpenSidePanelPageFunction;\n unmountFrontComponent?: UnmountFrontComponentFunction;\n enqueueSnackbar?: EnqueueSnackbarFunction;\n closeSidePanel?: CloseSidePanelFunction;\n openAskAIWithPrompt?: OpenAskAIWithPromptFunction;\n};\n\ndeclare global {\n var frontComponentHostCommunicationApi: FrontComponentHostCommunicationApiStore;\n}\n\nglobalThis.frontComponentHostCommunicationApi ??= {};\n\nexport const frontComponentHostCommunicationApi =\n globalThis.frontComponentHostCommunicationApi;\n"],"names":["frontComponentHostCommunicationApi"],"mappings":"AAkDA,WAAW,uCAAuC,CAAA;AAE3C,MAAMA,IACX,WAAW;"}
@@ -0,0 +1 @@
1
+ export declare const useRecordId: () => string | null;
@@ -0,0 +1,6 @@
1
+ import { useFrontComponentExecutionContext as e } from "./useFrontComponentExecutionContext.js";
2
+ const t = (o) => o.recordId, n = () => e(t);
3
+ export {
4
+ n as useRecordId
5
+ };
6
+ //# sourceMappingURL=useRecordId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRecordId.js","sources":["../../../../src/sdk/front-component-api/hooks/useRecordId.ts"],"sourcesContent":["import { type FrontComponentExecutionContext } from '../types/FrontComponentExecutionContext';\nimport { useFrontComponentExecutionContext } from './useFrontComponentExecutionContext';\n\nconst selectRecordId = (\n context: FrontComponentExecutionContext,\n): string | null => context.recordId;\n\nexport const useRecordId = (): string | null => {\n return useFrontComponentExecutionContext(selectRecordId);\n};\n"],"names":["selectRecordId","context","useRecordId","useFrontComponentExecutionContext"],"mappings":";AAGA,MAAMA,IAAiB,CACrBC,MACkBA,EAAQ,UAEfC,IAAc,MAClBC,EAAkCH,CAAc;"}
@@ -2,10 +2,12 @@ export { setFrontComponentExecutionContext } from './context/frontComponentConte
2
2
  export { closeSidePanel } from './functions/closeSidePanel';
3
3
  export { enqueueSnackbar } from './functions/enqueueSnackbar';
4
4
  export { navigate } from './functions/navigate';
5
+ export { openAskAIWithPrompt } from './functions/openAskAIWithPrompt';
5
6
  export { openSidePanelPage } from './functions/openSidePanelPage';
6
7
  export { unmountFrontComponent } from './functions/unmountFrontComponent';
7
8
  export { useFrontComponentExecutionContext } from './hooks/useFrontComponentExecutionContext';
8
9
  export { useFrontComponentId } from './hooks/useFrontComponentId';
10
+ export { useRecordId } from './hooks/useRecordId';
9
11
  export { useUserId } from './hooks/useUserId';
10
12
  export type { FrontComponentExecutionContext } from './types/FrontComponentExecutionContext';
11
13
  export { getFrontComponentActionErrorDedupeKey } from './utils/getFrontComponentActionErrorDedupeKey';
@@ -1,4 +1,5 @@
1
1
  export type FrontComponentExecutionContext = {
2
2
  frontComponentId: string;
3
3
  userId: string | null;
4
+ recordId: string | null;
4
5
  };
@@ -12,6 +12,9 @@ export { RelationType } from './fields/relation-type';
12
12
  export { validateFields } from './fields/validate-fields';
13
13
  export type { FrontComponentCommandConfig, FrontComponentConfig, FrontComponentType, } from './front-component-config';
14
14
  export { defineLogicFunction } from './logic-functions/define-logic-function';
15
+ export type { InstallLogicFunctionPayload, InstallLogicFunctionHandler, } from './logic-functions/install-logic-function-payload-type';
16
+ export { definePreInstallLogicFunction } from './logic-functions/define-pre-install-logic-function';
17
+ export { definePostInstallLogicFunction } from './logic-functions/define-post-install-logic-function';
15
18
  export type { LogicFunctionConfig, LogicFunctionHandler, } from './logic-functions/logic-function-config';
16
19
  export type { CronPayload } from './logic-functions/triggers/cron-payload-type';
17
20
  export type { DatabaseEventPayload, ObjectRecordBaseEvent, ObjectRecordCreateEvent, ObjectRecordDeleteEvent, ObjectRecordDestroyEvent, ObjectRecordEvent, ObjectRecordRestoreEvent, ObjectRecordUpdateEvent, ObjectRecordUpsertEvent, } from './logic-functions/triggers/database-event-payload-type';
@@ -35,7 +38,7 @@ export { ActionLink } from './action';
35
38
  export type { ActionLinkProps } from './action';
36
39
  export { ActionOpenSidePanelPage } from './action';
37
40
  export type { ActionOpenSidePanelPageProps } from './action';
38
- export { enqueueSnackbar, getFrontComponentActionErrorDedupeKey, closeSidePanel, navigate, openSidePanelPage, unmountFrontComponent, useFrontComponentExecutionContext, useFrontComponentId, useUserId, } from './front-component-api';
41
+ export { enqueueSnackbar, getFrontComponentActionErrorDedupeKey, closeSidePanel, navigate, openAskAIWithPrompt, openSidePanelPage, unmountFrontComponent, useFrontComponentExecutionContext, useFrontComponentId, useRecordId, useUserId, } from './front-component-api';
39
42
  export type { FrontComponentExecutionContext } from './front-component-api';
40
43
  export { AppPath, CommandMenuPages } from 'twenty-shared/types';
41
44
  export type { EnqueueSnackbarParams, SnackBarVariant, } from 'twenty-shared/types';
package/dist/sdk/index.js CHANGED
@@ -2,78 +2,86 @@ import { defineApplication as r } from "./application/define-application.js";
2
2
  import { createValidationResult as n } from "./common/utils/create-validation-result.js";
3
3
  import { defineFrontComponent as i } from "./define-front-component.js";
4
4
  import { defineField as m } from "./fields/define-field.js";
5
- import { AggregateOperations as x, AppPath as T, CommandMenuPages as d, FieldMetadataType as l, ObjectRecordGroupByDateGranularity as E, RelationOnDeleteAction as s, PageLayoutTabLayoutMode as A, RelationType as O } from "twenty-shared/types";
6
- import { validateFields as _ } from "./fields/validate-fields.js";
7
- import { defineLogicFunction as c } from "./logic-functions/define-logic-function.js";
8
- import { defineNavigationMenuItem as C } from "./navigation-menu-items/define-navigation-menu-item.js";
9
- import { defineObject as R } from "./objects/define-object.js";
10
- import { STANDARD_OBJECTS as N, STANDARD_OBJECTS as P } from "twenty-shared/metadata";
11
- import { definePageLayout as L } from "./page-layouts/define-page-layout.js";
12
- import { defineRole as I } from "./roles/define-role.js";
13
- import { PermissionFlagType as b } from "twenty-shared/constants";
14
- import { defineSkill as G } from "./skills/define-skill.js";
15
- import { defineView as J } from "./views/define-view.js";
16
- import { Action as v } from "./action/Action.js";
17
- import { ActionLink as U } from "./action/ActionLink.js";
18
- import { ActionOpenSidePanelPage as q } from "./action/ActionOpenSidePanelPage.js";
19
- import { closeSidePanel as K } from "./front-component-api/functions/closeSidePanel.js";
20
- import { enqueueSnackbar as z } from "./front-component-api/functions/enqueueSnackbar.js";
21
- import { navigate as X } from "./front-component-api/functions/navigate.js";
22
- import { openSidePanelPage as Z } from "./front-component-api/functions/openSidePanelPage.js";
23
- import { unmountFrontComponent as ee } from "./front-component-api/functions/unmountFrontComponent.js";
24
- import { useFrontComponentExecutionContext as re } from "./front-component-api/hooks/useFrontComponentExecutionContext.js";
25
- import { useFrontComponentId as ne } from "./front-component-api/hooks/useFrontComponentId.js";
26
- import { useUserId as ie } from "./front-component-api/hooks/useUserId.js";
27
- import { getFrontComponentActionErrorDedupeKey as me } from "./front-component-api/utils/getFrontComponentActionErrorDedupeKey.js";
28
- import { ALLOWED_HTML_ELEMENTS as xe } from "./front-component-api/constants/AllowedHtmlElements.js";
29
- import { COMMON_HTML_EVENTS as de } from "./front-component-api/constants/CommonHtmlEvents.js";
30
- import { EVENT_TO_REACT as Ee } from "./front-component-api/constants/EventToReact.js";
31
- import { HTML_COMMON_PROPERTIES as Ae } from "./front-component-api/constants/HtmlCommonProperties.js";
32
- import { HTML_TAG_TO_REMOTE_COMPONENT as ue } from "./front-component-api/constants/HtmlTagToRemoteComponent.js";
33
- import { installStyleBridge as Se } from "./front-component-renderer/polyfills/installStyleBridge.js";
34
- import { exposeGlobals as ge } from "./front-component-renderer/remote/utils/exposeGlobals.js";
5
+ import { AggregateOperations as x, AppPath as d, CommandMenuPages as l, FieldMetadataType as T, ObjectRecordGroupByDateGranularity as s, RelationOnDeleteAction as A, PageLayoutTabLayoutMode as E, RelationType as c } from "twenty-shared/types";
6
+ import { validateFields as O } from "./fields/validate-fields.js";
7
+ import { defineLogicFunction as g } from "./logic-functions/define-logic-function.js";
8
+ import { definePreInstallLogicFunction as S } from "./logic-functions/define-pre-install-logic-function.js";
9
+ import { definePostInstallLogicFunction as C } from "./logic-functions/define-post-install-logic-function.js";
10
+ import { defineNavigationMenuItem as L } from "./navigation-menu-items/define-navigation-menu-item.js";
11
+ import { defineObject as D } from "./objects/define-object.js";
12
+ import { STANDARD_OBJECTS as I, STANDARD_OBJECTS as y } from "twenty-shared/metadata";
13
+ import { definePageLayout as b } from "./page-layouts/define-page-layout.js";
14
+ import { defineRole as k } from "./roles/define-role.js";
15
+ import { PermissionFlagType as H } from "twenty-shared/constants";
16
+ import { defineSkill as v } from "./skills/define-skill.js";
17
+ import { defineView as j } from "./views/define-view.js";
18
+ import { Action as W } from "./action/Action.js";
19
+ import { ActionLink as w } from "./action/ActionLink.js";
20
+ import { ActionOpenSidePanelPage as z } from "./action/ActionOpenSidePanelPage.js";
21
+ import { closeSidePanel as X } from "./front-component-api/functions/closeSidePanel.js";
22
+ import { enqueueSnackbar as Z } from "./front-component-api/functions/enqueueSnackbar.js";
23
+ import { navigate as ee } from "./front-component-api/functions/navigate.js";
24
+ import { openAskAIWithPrompt as re } from "./front-component-api/functions/openAskAIWithPrompt.js";
25
+ import { openSidePanelPage as ne } from "./front-component-api/functions/openSidePanelPage.js";
26
+ import { unmountFrontComponent as ie } from "./front-component-api/functions/unmountFrontComponent.js";
27
+ import { useFrontComponentExecutionContext as me } from "./front-component-api/hooks/useFrontComponentExecutionContext.js";
28
+ import { useFrontComponentId as xe } from "./front-component-api/hooks/useFrontComponentId.js";
29
+ import { useRecordId as le } from "./front-component-api/hooks/useRecordId.js";
30
+ import { useUserId as se } from "./front-component-api/hooks/useUserId.js";
31
+ import { getFrontComponentActionErrorDedupeKey as Ee } from "./front-component-api/utils/getFrontComponentActionErrorDedupeKey.js";
32
+ import { ALLOWED_HTML_ELEMENTS as ue } from "./front-component-api/constants/AllowedHtmlElements.js";
33
+ import { COMMON_HTML_EVENTS as _e } from "./front-component-api/constants/CommonHtmlEvents.js";
34
+ import { EVENT_TO_REACT as Pe } from "./front-component-api/constants/EventToReact.js";
35
+ import { HTML_COMMON_PROPERTIES as Re } from "./front-component-api/constants/HtmlCommonProperties.js";
36
+ import { HTML_TAG_TO_REMOTE_COMPONENT as Fe } from "./front-component-api/constants/HtmlTagToRemoteComponent.js";
37
+ import { installStyleBridge as Me } from "./front-component-renderer/polyfills/installStyleBridge.js";
38
+ import { exposeGlobals as Ne } from "./front-component-renderer/remote/utils/exposeGlobals.js";
35
39
  export {
36
- xe as ALLOWED_HTML_ELEMENTS,
37
- v as Action,
38
- U as ActionLink,
39
- q as ActionOpenSidePanelPage,
40
+ ue as ALLOWED_HTML_ELEMENTS,
41
+ W as Action,
42
+ w as ActionLink,
43
+ z as ActionOpenSidePanelPage,
40
44
  x as AggregateOperations,
41
- T as AppPath,
42
- de as COMMON_HTML_EVENTS,
43
- d as CommandMenuPages,
44
- Ee as EVENT_TO_REACT,
45
- l as FieldType,
46
- Ae as HTML_COMMON_PROPERTIES,
47
- ue as HTML_TAG_TO_REMOTE_COMPONENT,
48
- E as ObjectRecordGroupByDateGranularity,
49
- s as OnDeleteAction,
50
- A as PageLayoutTabLayoutMode,
51
- b as PermissionFlag,
52
- O as RelationType,
53
- N as STANDARD_OBJECT,
54
- P as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
55
- K as closeSidePanel,
45
+ d as AppPath,
46
+ _e as COMMON_HTML_EVENTS,
47
+ l as CommandMenuPages,
48
+ Pe as EVENT_TO_REACT,
49
+ T as FieldType,
50
+ Re as HTML_COMMON_PROPERTIES,
51
+ Fe as HTML_TAG_TO_REMOTE_COMPONENT,
52
+ s as ObjectRecordGroupByDateGranularity,
53
+ A as OnDeleteAction,
54
+ E as PageLayoutTabLayoutMode,
55
+ H as PermissionFlag,
56
+ c as RelationType,
57
+ I as STANDARD_OBJECT,
58
+ y as STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS,
59
+ X as closeSidePanel,
56
60
  n as createValidationResult,
57
61
  r as defineApplication,
58
62
  m as defineField,
59
63
  i as defineFrontComponent,
60
- c as defineLogicFunction,
61
- C as defineNavigationMenuItem,
62
- R as defineObject,
63
- L as definePageLayout,
64
- I as defineRole,
65
- G as defineSkill,
66
- J as defineView,
67
- z as enqueueSnackbar,
68
- ge as exposeGlobals,
69
- me as getFrontComponentActionErrorDedupeKey,
70
- Se as installStyleBridge,
71
- X as navigate,
72
- Z as openSidePanelPage,
73
- ee as unmountFrontComponent,
74
- re as useFrontComponentExecutionContext,
75
- ne as useFrontComponentId,
76
- ie as useUserId,
77
- _ as validateFields
64
+ g as defineLogicFunction,
65
+ L as defineNavigationMenuItem,
66
+ D as defineObject,
67
+ b as definePageLayout,
68
+ C as definePostInstallLogicFunction,
69
+ S as definePreInstallLogicFunction,
70
+ k as defineRole,
71
+ v as defineSkill,
72
+ j as defineView,
73
+ Z as enqueueSnackbar,
74
+ Ne as exposeGlobals,
75
+ Ee as getFrontComponentActionErrorDedupeKey,
76
+ Me as installStyleBridge,
77
+ ee as navigate,
78
+ re as openAskAIWithPrompt,
79
+ ne as openSidePanelPage,
80
+ ie as unmountFrontComponent,
81
+ me as useFrontComponentExecutionContext,
82
+ xe as useFrontComponentId,
83
+ le as useRecordId,
84
+ se as useUserId,
85
+ O as validateFields
78
86
  };
79
87
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,6 @@
1
+ import { type LogicFunctionConfig } from '../../sdk/logic-functions/logic-function-config';
2
+ import { type InstallLogicFunctionHandler } from '../../sdk/logic-functions/install-logic-function-payload-type';
3
+ import type { DefineEntity } from '../../sdk/common/types/define-entity.type';
4
+ export declare const definePostInstallLogicFunction: DefineEntity<Omit<LogicFunctionConfig, 'cronTriggerSettings' | 'databaseEventTriggerSettings' | 'httpRouteTriggerSettings' | 'isTool' | 'handler'> & {
5
+ handler: InstallLogicFunctionHandler;
6
+ }>;
@@ -0,0 +1,12 @@
1
+ import { createValidationResult as i } from "../common/utils/create-validation-result.js";
2
+ const s = (t) => {
3
+ const n = [];
4
+ return t.universalIdentifier || n.push("Post install logic function must have a universalIdentifier"), t.handler || n.push("Post install logic function must have a handler"), typeof t.handler != "function" && n.push("Post install logic function handler must be a function"), i({
5
+ config: t,
6
+ errors: n
7
+ });
8
+ };
9
+ export {
10
+ s as definePostInstallLogicFunction
11
+ };
12
+ //# sourceMappingURL=define-post-install-logic-function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-post-install-logic-function.js","sources":["../../../src/sdk/logic-functions/define-post-install-logic-function.ts"],"sourcesContent":["import { type LogicFunctionConfig } from '@/sdk/logic-functions/logic-function-config';\nimport { type InstallLogicFunctionHandler } from '@/sdk/logic-functions/install-logic-function-payload-type';\nimport { createValidationResult } from '@/sdk/common/utils/create-validation-result';\nimport type { DefineEntity } from '@/sdk/common/types/define-entity.type';\n\nexport const definePostInstallLogicFunction: DefineEntity<\n Omit<\n LogicFunctionConfig,\n | 'cronTriggerSettings'\n | 'databaseEventTriggerSettings'\n | 'httpRouteTriggerSettings'\n | 'isTool'\n | 'handler'\n > & {\n handler: InstallLogicFunctionHandler;\n }\n> = (config) => {\n const errors = [];\n\n if (!config.universalIdentifier) {\n errors.push('Post install logic function must have a universalIdentifier');\n }\n\n if (!config.handler) {\n errors.push('Post install logic function must have a handler');\n }\n\n if (typeof config.handler !== 'function') {\n errors.push('Post install logic function handler must be a function');\n }\n\n return createValidationResult({\n config,\n errors,\n });\n};\n"],"names":["definePostInstallLogicFunction","config","errors","createValidationResult"],"mappings":";AAKO,MAAMA,IAWT,CAACC,MAAW;AACd,QAAMC,IAAS,CAAA;AAEf,SAAKD,EAAO,uBACVC,EAAO,KAAK,6DAA6D,GAGtED,EAAO,WACVC,EAAO,KAAK,iDAAiD,GAG3D,OAAOD,EAAO,WAAY,cAC5BC,EAAO,KAAK,wDAAwD,GAG/DC,EAAuB;AAAA,IAC5B,QAAAF;AAAA,IACA,QAAAC;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,6 @@
1
+ import { type LogicFunctionConfig } from '../../sdk/logic-functions/logic-function-config';
2
+ import { type InstallLogicFunctionHandler } from '../../sdk/logic-functions/install-logic-function-payload-type';
3
+ import type { DefineEntity } from '../../sdk/common/types/define-entity.type';
4
+ export declare const definePreInstallLogicFunction: DefineEntity<Omit<LogicFunctionConfig, 'cronTriggerSettings' | 'databaseEventTriggerSettings' | 'httpRouteTriggerSettings' | 'isTool' | 'handler'> & {
5
+ handler: InstallLogicFunctionHandler;
6
+ }>;
@@ -0,0 +1,12 @@
1
+ import { createValidationResult as t } from "../common/utils/create-validation-result.js";
2
+ const r = (e) => {
3
+ const n = [];
4
+ return e.universalIdentifier || n.push("Pre install logic function must have a universalIdentifier"), e.handler || n.push("Pre install logic function must have a handler"), typeof e.handler != "function" && n.push("Pre install logic function handler must be a function"), t({
5
+ config: e,
6
+ errors: n
7
+ });
8
+ };
9
+ export {
10
+ r as definePreInstallLogicFunction
11
+ };
12
+ //# sourceMappingURL=define-pre-install-logic-function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define-pre-install-logic-function.js","sources":["../../../src/sdk/logic-functions/define-pre-install-logic-function.ts"],"sourcesContent":["import { type LogicFunctionConfig } from '@/sdk/logic-functions/logic-function-config';\nimport { type InstallLogicFunctionHandler } from '@/sdk/logic-functions/install-logic-function-payload-type';\nimport { createValidationResult } from '@/sdk/common/utils/create-validation-result';\nimport type { DefineEntity } from '@/sdk/common/types/define-entity.type';\n\nexport const definePreInstallLogicFunction: DefineEntity<\n Omit<\n LogicFunctionConfig,\n | 'cronTriggerSettings'\n | 'databaseEventTriggerSettings'\n | 'httpRouteTriggerSettings'\n | 'isTool'\n | 'handler'\n > & {\n handler: InstallLogicFunctionHandler;\n }\n> = (config) => {\n const errors = [];\n\n if (!config.universalIdentifier) {\n errors.push('Pre install logic function must have a universalIdentifier');\n }\n\n if (!config.handler) {\n errors.push('Pre install logic function must have a handler');\n }\n\n if (typeof config.handler !== 'function') {\n errors.push('Pre install logic function handler must be a function');\n }\n\n return createValidationResult({\n config,\n errors,\n });\n};\n"],"names":["definePreInstallLogicFunction","config","errors","createValidationResult"],"mappings":";AAKO,MAAMA,IAWT,CAACC,MAAW;AACd,QAAMC,IAAS,CAAA;AAEf,SAAKD,EAAO,uBACVC,EAAO,KAAK,4DAA4D,GAGrED,EAAO,WACVC,EAAO,KAAK,gDAAgD,GAG1D,OAAOD,EAAO,WAAY,cAC5BC,EAAO,KAAK,uDAAuD,GAG9DC,EAAuB;AAAA,IAC5B,QAAAF;AAAA,IACA,QAAAC;AAAA,EAAA,CACD;AACH;"}
@@ -0,0 +1,4 @@
1
+ export type InstallLogicFunctionPayload = {
2
+ previousVersion: string;
3
+ };
4
+ export type InstallLogicFunctionHandler = (payload: InstallLogicFunctionPayload) => any | Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twenty-sdk",
3
- "version": "0.6.1",
3
+ "version": "0.6.3-alpha",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/sdk/index.d.ts",