@upstart.gg/sdk 0.0.130 → 0.0.131
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/shared/ai/schemas.d.ts +13 -0
- package/dist/shared/ai/schemas.d.ts.map +1 -0
- package/dist/shared/ai/schemas.js +3 -0
- package/dist/shared/ai/types.d.ts +164 -0
- package/dist/shared/ai/types.d.ts.map +1 -0
- package/dist/shared/{chunk-EJGNYD4V.js → ai/types.js} +0 -1
- package/dist/shared/ajv.d.ts +2 -1
- package/dist/shared/ajv.d.ts.map +1 -1
- package/dist/shared/ajv.js +1 -1
- package/dist/shared/attributes.d.ts +300 -12
- package/dist/shared/attributes.d.ts.map +1 -1
- package/dist/shared/attributes.js +1 -1
- package/dist/shared/brick-manifest.d.ts +3 -1
- package/dist/shared/brick-manifest.d.ts.map +1 -1
- package/dist/shared/brick-manifest.js +1 -1
- package/dist/shared/bricks/manifests/accordion.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/accordion.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/accordion.manifest.js +1 -1
- package/dist/shared/bricks/manifests/all-manifests.d.ts +4 -1
- package/dist/shared/bricks/manifests/all-manifests.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/all-manifests.js +1 -1
- package/dist/shared/bricks/manifests/box.manifest.d.ts +6 -4
- package/dist/shared/bricks/manifests/box.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/box.manifest.js +1 -1
- package/dist/shared/bricks/manifests/button.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/button.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/button.manifest.js +1 -1
- package/dist/shared/bricks/manifests/card.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/card.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/card.manifest.js +1 -1
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/carousel.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/carousel.manifest.js +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.d.ts +40 -5
- package/dist/shared/bricks/manifests/footer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/footer.manifest.js +1 -1
- package/dist/shared/bricks/manifests/form.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/form.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/form.manifest.js +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/hero.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/hero.manifest.js +1 -1
- package/dist/shared/bricks/manifests/html.manifest.d.ts +3 -2
- package/dist/shared/bricks/manifests/html.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/html.manifest.js +1 -1
- package/dist/shared/bricks/manifests/icon.manifest.d.ts +3 -2
- package/dist/shared/bricks/manifests/icon.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/icon.manifest.js +1 -1
- package/dist/shared/bricks/manifests/image.manifest.d.ts +10 -6
- package/dist/shared/bricks/manifests/image.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/image.manifest.js +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts +7 -6
- package/dist/shared/bricks/manifests/images-gallery.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/images-gallery.manifest.js +1 -1
- package/dist/shared/bricks/manifests/map.manifest.d.ts +5 -4
- package/dist/shared/bricks/manifests/map.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/map.manifest.js +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts +42 -8
- package/dist/shared/bricks/manifests/navbar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/navbar.manifest.js +1 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/sidebar.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/sidebar.manifest.js +1 -1
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts +5 -4
- package/dist/shared/bricks/manifests/social-links.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/social-links.manifest.js +1 -1
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts +3 -2
- package/dist/shared/bricks/manifests/spacer.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/spacer.manifest.js +1 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts +6 -5
- package/dist/shared/bricks/manifests/testimonials.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/testimonials.manifest.js +1 -1
- package/dist/shared/bricks/manifests/text.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/text.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/text.manifest.js +1 -1
- package/dist/shared/bricks/manifests/video.manifest.d.ts +4 -3
- package/dist/shared/bricks/manifests/video.manifest.d.ts.map +1 -1
- package/dist/shared/bricks/manifests/video.manifest.js +1 -1
- package/dist/shared/bricks/props/align.d.ts.map +1 -1
- package/dist/shared/bricks/props/align.js +1 -1
- package/dist/shared/bricks/props/background.d.ts +6 -9
- package/dist/shared/bricks/props/background.d.ts.map +1 -1
- package/dist/shared/bricks/props/background.js +1 -1
- package/dist/shared/bricks/props/border.d.ts.map +1 -1
- package/dist/shared/bricks/props/border.js +1 -1
- package/dist/shared/bricks/props/color-preset.d.ts +3 -4
- package/dist/shared/bricks/props/color-preset.d.ts.map +1 -1
- package/dist/shared/bricks/props/color-preset.js +1 -1
- package/dist/shared/bricks/props/color.js +1 -1
- package/dist/shared/bricks/props/common.d.ts +6 -6
- package/dist/shared/bricks/props/common.d.ts.map +1 -1
- package/dist/shared/bricks/props/common.js +1 -1
- package/dist/shared/bricks/props/css-length.d.ts.map +1 -1
- package/dist/shared/bricks/props/css-length.js +1 -1
- package/dist/shared/bricks/props/datasource.d.ts +1 -1
- package/dist/shared/bricks/props/datasource.js +1 -1
- package/dist/shared/bricks/props/date.d.ts.map +1 -1
- package/dist/shared/bricks/props/date.js +1 -1
- package/dist/shared/bricks/props/direction.d.ts.map +1 -1
- package/dist/shared/bricks/props/direction.js +1 -1
- package/dist/shared/bricks/props/dynamic.d.ts.map +1 -1
- package/dist/shared/bricks/props/dynamic.js +1 -1
- package/dist/shared/bricks/props/effects.d.ts +0 -1
- package/dist/shared/bricks/props/effects.d.ts.map +1 -1
- package/dist/shared/bricks/props/effects.js +1 -1
- package/dist/shared/bricks/props/file.d.ts.map +1 -1
- package/dist/shared/bricks/props/file.js +1 -1
- package/dist/shared/bricks/props/geolocation.js +1 -1
- package/dist/shared/bricks/props/helpers.d.ts +2 -2
- package/dist/shared/bricks/props/helpers.js +1 -1
- package/dist/shared/bricks/props/image.d.ts +4 -4
- package/dist/shared/bricks/props/image.d.ts.map +1 -1
- package/dist/shared/bricks/props/image.js +1 -1
- package/dist/shared/bricks/props/position.d.ts +0 -2
- package/dist/shared/bricks/props/position.d.ts.map +1 -1
- package/dist/shared/bricks/props/position.js +1 -1
- package/dist/shared/bricks/props/string.js +1 -1
- package/dist/shared/bricks/props/tags.d.ts.map +1 -1
- package/dist/shared/bricks/props/tags.js +1 -1
- package/dist/shared/bricks/props/text.js +1 -1
- package/dist/shared/bricks/props/types.d.ts +1 -2
- package/dist/shared/bricks/props/types.d.ts.map +1 -1
- package/dist/shared/bricks.d.ts +189 -18
- package/dist/shared/bricks.d.ts.map +1 -1
- package/dist/shared/bricks.js +1 -1
- package/dist/shared/chunk-2CYAFF56.js +3 -0
- package/dist/shared/chunk-2NLDX5FG.js +3 -0
- package/dist/shared/chunk-3FPFR5RA.js +3 -0
- package/dist/shared/chunk-3P36LG6T.js +3 -0
- package/dist/shared/chunk-3QOAHMV4.js +5 -0
- package/dist/shared/chunk-4GIZ6WSG.js +3 -0
- package/dist/shared/chunk-5WY7LYXK.js +3 -0
- package/dist/shared/chunk-5X5SX5N7.js +4 -0
- package/dist/shared/chunk-6L3Z5SZQ.js +3 -0
- package/dist/shared/{chunk-UU2MSQXY.js → chunk-6PGAWO4H.js} +1 -1
- package/dist/shared/chunk-6R76KIHZ.js +3 -0
- package/dist/shared/chunk-7UBMXMNJ.js +3 -0
- package/dist/shared/chunk-AB3IMRXZ.js +3 -0
- package/dist/shared/chunk-AMQAGDFH.js +3 -0
- package/dist/shared/chunk-ARMM6B47.js +3 -0
- package/dist/shared/chunk-ARYG4XMX.js +3 -0
- package/dist/shared/chunk-AZHH3XJJ.js +3 -0
- package/dist/shared/chunk-COT2ROEH.js +34 -0
- package/dist/shared/chunk-DHSWVVMI.js +3 -0
- package/dist/shared/chunk-DKNOZLA6.js +3 -0
- package/dist/shared/chunk-EVDZ2KND.js +6 -0
- package/dist/shared/chunk-F4JNKU7J.js +3 -0
- package/dist/shared/chunk-GC5OWY2Z.js +3 -0
- package/dist/shared/chunk-GXNHF6J5.js +3 -0
- package/dist/shared/chunk-HP7CZB2F.js +3 -0
- package/dist/shared/chunk-HSRXUIVM.js +3 -0
- package/dist/shared/chunk-ILIWVWHC.js +8 -0
- package/dist/shared/chunk-JRCVYDCD.js +3 -0
- package/dist/shared/chunk-L2HOZVBC.js +3 -0
- package/dist/shared/chunk-LEWKHCRI.js +3 -0
- package/dist/shared/chunk-LT4CW2F7.js +3 -0
- package/dist/shared/chunk-MVCVVKBY.js +3 -0
- package/dist/shared/chunk-NKIEDT7V.js +3 -0
- package/dist/shared/chunk-NQKXDMQ5.js +3 -0
- package/dist/shared/chunk-NXIF3UMD.js +3 -0
- package/dist/shared/chunk-PW5HRVMD.js +3 -0
- package/dist/shared/chunk-PZYX3ACO.js +3 -0
- package/dist/shared/chunk-QDJQAZIA.js +8 -0
- package/dist/shared/chunk-QGFQA7OZ.js +4 -0
- package/dist/shared/chunk-RJZZWCBD.js +3 -0
- package/dist/shared/chunk-SAJY7H6N.js +3 -0
- package/dist/shared/chunk-SFDRAHYP.js +3 -0
- package/dist/shared/chunk-STDCM2KD.js +3 -0
- package/dist/shared/chunk-TCTVRT4O.js +3 -0
- package/dist/shared/chunk-TH5SONR6.js +3 -0
- package/dist/shared/chunk-UCR2UZOY.js +3 -0
- package/dist/shared/chunk-UDQWYGSO.js +3 -0
- package/dist/shared/{chunk-LSPN22SI.js → chunk-URRCKLAS.js} +3 -3
- package/dist/shared/{chunk-OIOYMECS.js → chunk-US53TNMK.js} +1 -1
- package/dist/shared/chunk-VDX2J22H.js +3 -0
- package/dist/shared/chunk-VE3S4LGT.js +3 -0
- package/dist/shared/chunk-VK26ZZFR.js +3 -0
- package/dist/shared/chunk-VLXZMESE.js +3 -0
- package/dist/shared/chunk-WAML3IGZ.js +3 -0
- package/dist/shared/chunk-WXKRIUTA.js +3 -0
- package/dist/shared/chunk-X62OEAE6.js +3 -0
- package/dist/shared/chunk-XED6ARVN.js +3 -0
- package/dist/shared/chunk-Y3X4F4YJ.js +3 -0
- package/dist/shared/chunk-Z4YKRLOX.js +3 -0
- package/dist/shared/context.d.ts +4 -12
- package/dist/shared/context.d.ts.map +1 -1
- package/dist/shared/datarecords/external/airtable/handler.d.ts +22 -5
- package/dist/shared/datarecords/external/airtable/handler.d.ts.map +1 -1
- package/dist/shared/datarecords/external/airtable/handler.js +1 -1
- package/dist/shared/datarecords/external/airtable/oauth/config.js +3 -0
- package/dist/shared/datarecords/external/airtable/types.d.ts +25 -0
- package/dist/shared/datarecords/external/airtable/types.d.ts.map +1 -1
- package/dist/shared/datarecords/external/airtable/types.js +3 -0
- package/dist/shared/datarecords/external/generic-webhook/handler.js +3 -0
- package/dist/shared/datarecords/external/generic-webhook/options.js +3 -0
- package/dist/shared/datarecords/external/google/sheets/client.js +3 -0
- package/dist/shared/datarecords/external/google/sheets/handler.d.ts +29 -5
- package/dist/shared/datarecords/external/google/sheets/handler.d.ts.map +1 -1
- package/dist/shared/datarecords/external/google/sheets/handler.js +5 -4
- package/dist/shared/datarecords/external/google/sheets/{options.d.ts → types.d.ts} +1 -1
- package/dist/shared/datarecords/external/google/sheets/types.d.ts.map +1 -0
- package/dist/shared/datarecords/external/google/sheets/types.js +3 -0
- package/dist/shared/datarecords/external/notion/handler.d.ts +29 -7
- package/dist/shared/datarecords/external/notion/handler.d.ts.map +1 -1
- package/dist/shared/datarecords/external/notion/handler.js +1 -1
- package/dist/shared/datarecords/external/notion/oauth/config.js +3 -0
- package/dist/shared/datarecords/external/notion/{options.d.ts → types.d.ts} +11 -1
- package/dist/shared/datarecords/external/notion/types.d.ts.map +1 -0
- package/dist/shared/datarecords/external/notion/types.js +3 -0
- package/dist/shared/datarecords/types.d.ts +17 -165
- package/dist/shared/datarecords/types.d.ts.map +1 -1
- package/dist/shared/datarecords/types.js +1 -1
- package/dist/shared/datarecords.d.ts +2 -2
- package/dist/shared/datarecords.d.ts.map +1 -1
- package/dist/shared/datarecords.js +1 -1
- package/dist/shared/datasources/external/facebook/posts/fetcher.js +3 -0
- package/dist/shared/datasources/external/facebook/posts/schema.js +3 -0
- package/dist/shared/datasources/external/http-json/fetcher.js +3 -0
- package/dist/shared/datasources/external/http-json/options.js +3 -0
- package/dist/shared/datasources/external/http-json/schema.js +3 -0
- package/dist/shared/datasources/external/instagram/feed/fetcher.js +3 -0
- package/dist/shared/datasources/external/instagram/feed/schema.js +3 -0
- package/dist/shared/datasources/external/mastodon/account/fetcher.js +3 -0
- package/dist/shared/datasources/external/mastodon/account/schema.js +3 -0
- package/dist/shared/datasources/external/mastodon/options.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/fetcher.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/sample.array.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/sample.single.js +3 -0
- package/dist/shared/datasources/external/mastodon/status/schema.d.ts.map +1 -1
- package/dist/shared/datasources/external/mastodon/status/schema.js +3 -0
- package/dist/shared/datasources/external/meta/options.js +3 -0
- package/dist/shared/datasources/external/rss/fetcher.js +3 -0
- package/dist/shared/datasources/external/rss/options.js +3 -0
- package/dist/shared/datasources/external/rss/schema.js +3 -0
- package/dist/shared/datasources/external/threads/media/fetcher.js +3 -0
- package/dist/shared/datasources/external/threads/media/schema.js +3 -0
- package/dist/shared/datasources/external/tiktok/video/fetcher.js +3 -0
- package/dist/shared/datasources/external/tiktok/video/options.js +3 -0
- package/dist/shared/datasources/external/tiktok/video/schema.js +3 -0
- package/dist/shared/datasources/external/youtube/list/fetcher.js +3 -0
- package/dist/shared/datasources/external/youtube/list/options.js +3 -0
- package/dist/shared/datasources/external/youtube/list/schema.js +3 -0
- package/dist/shared/datasources/fetcher.js +2 -0
- package/dist/shared/datasources/internal/blog/schema.js +3 -0
- package/dist/shared/datasources/internal/changelog/schema.js +3 -0
- package/dist/shared/datasources/internal/contact-info/schema.js +3 -0
- package/dist/shared/datasources/internal/cv/schema.js +3 -0
- package/dist/shared/datasources/internal/faq/schema.js +3 -0
- package/dist/shared/datasources/internal/job-board/schema.js +3 -0
- package/dist/shared/datasources/internal/links/schema.js +3 -0
- package/dist/shared/datasources/internal/recipes/schema.js +3 -0
- package/dist/shared/datasources/internal/restaurant/schema.js +3 -0
- package/dist/shared/datasources/samples.js +3 -0
- package/dist/shared/datasources/schemas.d.ts +0 -49
- package/dist/shared/datasources/schemas.d.ts.map +1 -1
- package/dist/shared/datasources/schemas.js +1 -1
- package/dist/shared/datasources/types.d.ts +53 -130
- package/dist/shared/datasources/types.d.ts.map +1 -1
- package/dist/shared/datasources/types.js +1 -1
- package/dist/shared/datasources/utils.js +3 -0
- package/dist/shared/datasources.d.ts +7 -4
- package/dist/shared/datasources.d.ts.map +1 -1
- package/dist/shared/datasources.js +1 -1
- package/dist/shared/errors.js +1 -1
- package/dist/shared/images.d.ts +1 -12
- package/dist/shared/images.d.ts.map +1 -1
- package/dist/shared/images.js +1 -1
- package/dist/shared/index.js +3 -0
- package/dist/shared/manifest.js +3 -0
- package/dist/shared/page.d.ts +143 -12
- package/dist/shared/page.d.ts.map +1 -1
- package/dist/shared/page.js +1 -1
- package/dist/shared/site.d.ts +224 -114
- package/dist/shared/site.d.ts.map +1 -1
- package/dist/shared/site.js +1 -1
- package/dist/shared/sitemap.d.ts +167 -23
- package/dist/shared/sitemap.d.ts.map +1 -1
- package/dist/shared/sitemap.js +1 -1
- package/dist/shared/social-icons.js +3 -0
- package/dist/shared/theme.d.ts +41 -4
- package/dist/shared/theme.d.ts.map +1 -1
- package/dist/shared/theme.js +1 -1
- package/dist/shared/utils/invariant.js +1 -1
- package/dist/shared/utils/llm.d.ts +19 -0
- package/dist/shared/utils/llm.d.ts.map +1 -0
- package/dist/shared/utils/llm.js +3 -0
- package/dist/shared/utils/schema.d.ts +6 -1
- package/dist/shared/utils/schema.d.ts.map +1 -1
- package/dist/shared/utils/schema.js +1 -1
- package/dist/shared/utils/tests/schema.test.d.ts +2 -0
- package/dist/shared/utils/tests/schema.test.d.ts.map +1 -0
- package/dist/shared/utils/typed-ref.d.ts +1 -6
- package/dist/shared/utils/typed-ref.d.ts.map +1 -1
- package/dist/shared/utils/typed-ref.js +1 -1
- package/package.json +18 -19
- package/src/shared/ai/schemas.ts +33 -0
- package/src/shared/ai/types.ts +151 -0
- package/src/shared/ajv.ts +123 -0
- package/src/shared/analytics/init.ts +14 -0
- package/src/shared/analytics/track.ts +21 -0
- package/src/shared/analytics/types.ts +13 -0
- package/src/shared/attributes.ts +396 -0
- package/src/shared/brick-manifest.ts +119 -0
- package/src/shared/bricks/manifests/accordion.manifest.ts +482 -0
- package/src/shared/bricks/manifests/all-manifests.ts +121 -0
- package/src/shared/bricks/manifests/box.manifest.ts +551 -0
- package/src/shared/bricks/manifests/button.manifest.ts +208 -0
- package/src/shared/bricks/manifests/card.manifest.ts +320 -0
- package/src/shared/bricks/manifests/carousel.manifest.ts +708 -0
- package/src/shared/bricks/manifests/footer.manifest.ts +509 -0
- package/src/shared/bricks/manifests/form.manifest.ts +226 -0
- package/src/shared/bricks/manifests/hero.manifest.ts +365 -0
- package/src/shared/bricks/manifests/html.manifest.ts +127 -0
- package/src/shared/bricks/manifests/icon.manifest.ts +164 -0
- package/src/shared/bricks/manifests/image.manifest.ts +378 -0
- package/src/shared/bricks/manifests/images-gallery.manifest.ts +822 -0
- package/src/shared/bricks/manifests/map.manifest.ts +215 -0
- package/src/shared/bricks/manifests/navbar.manifest.ts +361 -0
- package/src/shared/bricks/manifests/sidebar.manifest.ts +88 -0
- package/src/shared/bricks/manifests/social-links.manifest.ts +497 -0
- package/src/shared/bricks/manifests/spacer.manifest.ts +54 -0
- package/src/shared/bricks/manifests/testimonials.manifest.ts +480 -0
- package/src/shared/bricks/manifests/tests/header.manifest.test.ts +10 -0
- package/src/shared/bricks/manifests/text.manifest.ts +245 -0
- package/src/shared/bricks/manifests/video.manifest.ts +115 -0
- package/src/shared/bricks/props/align.ts +63 -0
- package/src/shared/bricks/props/background.ts +79 -0
- package/src/shared/bricks/props/boolean.ts +7 -0
- package/src/shared/bricks/props/border.ts +86 -0
- package/src/shared/bricks/props/color-preset.ts +390 -0
- package/src/shared/bricks/props/color.ts +40 -0
- package/src/shared/bricks/props/common.ts +64 -0
- package/src/shared/bricks/props/css-length.ts +32 -0
- package/src/shared/bricks/props/datarecord.ts +11 -0
- package/src/shared/bricks/props/datasource.ts +82 -0
- package/src/shared/bricks/props/date.ts +21 -0
- package/src/shared/bricks/props/direction.ts +21 -0
- package/src/shared/bricks/props/dynamic.ts +112 -0
- package/src/shared/bricks/props/effects.ts +71 -0
- package/src/shared/bricks/props/enum.ts +38 -0
- package/src/shared/bricks/props/file.ts +10 -0
- package/src/shared/bricks/props/geolocation.ts +36 -0
- package/src/shared/bricks/props/helpers.ts +73 -0
- package/src/shared/bricks/props/image.ts +96 -0
- package/src/shared/bricks/props/number.ts +8 -0
- package/src/shared/bricks/props/position.ts +11 -0
- package/src/shared/bricks/props/string.ts +72 -0
- package/src/shared/bricks/props/tags.ts +26 -0
- package/src/shared/bricks/props/tests/background.test.ts +90 -0
- package/src/shared/bricks/props/tests/border.test.ts +12 -0
- package/src/shared/bricks/props/tests/effects.test.ts +37 -0
- package/src/shared/bricks/props/tests/helpers.test.ts +98 -0
- package/src/shared/bricks/props/tests/image.test.ts +71 -0
- package/src/shared/bricks/props/tests/string.test.ts +80 -0
- package/src/shared/bricks/props/text.ts +107 -0
- package/src/shared/bricks/props/types.ts +72 -0
- package/src/shared/bricks.ts +1237 -0
- package/src/shared/context.ts +32 -0
- package/src/shared/datarecords/external/airtable/handler.ts +501 -0
- package/src/shared/datarecords/external/airtable/oauth/config.ts +11 -0
- package/src/shared/datarecords/external/airtable/types.ts +63 -0
- package/src/shared/datarecords/external/generic-webhook/handler.ts +10 -0
- package/src/shared/datarecords/external/generic-webhook/options.ts +13 -0
- package/src/shared/datarecords/external/google/oauth/config.ts +30 -0
- package/src/shared/datarecords/external/google/sheets/client.ts +112 -0
- package/src/shared/datarecords/external/google/sheets/handler.ts +253 -0
- package/src/shared/datarecords/external/google/sheets/types.ts +10 -0
- package/src/shared/datarecords/external/notion/handler.ts +469 -0
- package/src/shared/datarecords/external/notion/oauth/config.ts +7 -0
- package/src/shared/datarecords/external/notion/types.ts +28 -0
- package/src/shared/datarecords/types.ts +165 -0
- package/src/shared/datarecords.ts +5 -0
- package/src/shared/datasources/README.md +3 -0
- package/src/shared/datasources/external/facebook/posts/fetcher.ts +52 -0
- package/src/shared/datasources/external/facebook/posts/sample.ts +35 -0
- package/src/shared/datasources/external/facebook/posts/schema.ts +33 -0
- package/src/shared/datasources/external/facebook/posts/tests/fetcher.test.ts +73 -0
- package/src/shared/datasources/external/http-json/fetcher.ts +31 -0
- package/src/shared/datasources/external/http-json/options.ts +8 -0
- package/src/shared/datasources/external/http-json/schema.ts +6 -0
- package/src/shared/datasources/external/http-json/tests/fetcher.test.ts +70 -0
- package/src/shared/datasources/external/instagram/feed/fetcher.ts +33 -0
- package/src/shared/datasources/external/instagram/feed/sample.ts +22 -0
- package/src/shared/datasources/external/instagram/feed/schema.ts +23 -0
- package/src/shared/datasources/external/instagram/feed/tests/fetcher.test.ts +64 -0
- package/src/shared/datasources/external/mastodon/account/fetcher.ts +24 -0
- package/src/shared/datasources/external/mastodon/account/sample.ts +33 -0
- package/src/shared/datasources/external/mastodon/account/schema.ts +45 -0
- package/src/shared/datasources/external/mastodon/account/tests/fetcher.test.ts +47 -0
- package/src/shared/datasources/external/mastodon/options.ts +6 -0
- package/src/shared/datasources/external/mastodon/status/fetcher.ts +35 -0
- package/src/shared/datasources/external/mastodon/status/sample.array.ts +59 -0
- package/src/shared/datasources/external/mastodon/status/sample.single.ts +55 -0
- package/src/shared/datasources/external/mastodon/status/schema.ts +125 -0
- package/src/shared/datasources/external/mastodon/status/tests/fetcher.test.ts +74 -0
- package/src/shared/datasources/external/meta/oauth/config.ts +16 -0
- package/src/shared/datasources/external/meta/options.ts +7 -0
- package/src/shared/datasources/external/rss/fetcher.ts +31 -0
- package/src/shared/datasources/external/rss/options.ts +7 -0
- package/src/shared/datasources/external/rss/sample.ts +22 -0
- package/src/shared/datasources/external/rss/schema.ts +42 -0
- package/src/shared/datasources/external/threads/media/fetcher.ts +53 -0
- package/src/shared/datasources/external/threads/media/sample.ts +44 -0
- package/src/shared/datasources/external/threads/media/schema.ts +37 -0
- package/src/shared/datasources/external/tiktok/oauth/config.ts +17 -0
- package/src/shared/datasources/external/tiktok/video/fetcher.ts +39 -0
- package/src/shared/datasources/external/tiktok/video/options.ts +8 -0
- package/src/shared/datasources/external/tiktok/video/sample.ts +26 -0
- package/src/shared/datasources/external/tiktok/video/schema.ts +27 -0
- package/src/shared/datasources/external/youtube/list/fetcher.ts +37 -0
- package/src/shared/datasources/external/youtube/list/options.ts +11 -0
- package/src/shared/datasources/external/youtube/list/sample.ts +33 -0
- package/src/shared/datasources/external/youtube/list/schema.ts +38 -0
- package/src/shared/datasources/external/youtube/oauth/config.ts +15 -0
- package/src/shared/datasources/fetcher.ts +16 -0
- package/src/shared/datasources/internal/blog/schema.ts +69 -0
- package/src/shared/datasources/internal/changelog/schema.ts +48 -0
- package/src/shared/datasources/internal/contact-info/schema.ts +20 -0
- package/src/shared/datasources/internal/cv/schema.ts +217 -0
- package/src/shared/datasources/internal/faq/schema.ts +27 -0
- package/src/shared/datasources/internal/job-board/schema.ts +228 -0
- package/src/shared/datasources/internal/links/schema.ts +15 -0
- package/src/shared/datasources/internal/recipes/schema.ts +42 -0
- package/src/shared/datasources/internal/restaurant/schema.ts +225 -0
- package/src/shared/datasources/samples.ts +26 -0
- package/src/shared/datasources/schemas.ts +48 -0
- package/src/shared/datasources/types.ts +490 -0
- package/src/shared/datasources/utils.ts +17 -0
- package/src/shared/datasources.ts +57 -0
- package/src/shared/env.ts +23 -0
- package/src/shared/errors.ts +1 -0
- package/src/shared/images.ts +44 -0
- package/src/shared/index.ts +3 -0
- package/src/shared/layout-constants.ts +19 -0
- package/src/shared/manifest.ts +50 -0
- package/src/shared/oauth.ts +16 -0
- package/src/shared/page.ts +36 -0
- package/src/shared/prompt.ts +9 -0
- package/src/shared/responsive.ts +5 -0
- package/src/shared/site.ts +59 -0
- package/src/shared/sitemap.ts +98 -0
- package/src/shared/social-icons.ts +307 -0
- package/src/shared/tests/attributes.test.ts +31 -0
- package/src/shared/theme.ts +244 -0
- package/src/shared/themes/README.md +34 -0
- package/src/shared/themes/color-system.ts +146 -0
- package/src/shared/themes/tests/color-system.test.ts +170 -0
- package/src/shared/utils/canvas-data-uri.ts +2 -0
- package/src/shared/utils/invariant.ts +25 -0
- package/src/shared/utils/json-date.ts +8 -0
- package/src/shared/utils/llm.ts +282 -0
- package/src/shared/utils/merge.ts +12 -0
- package/src/shared/utils/object-hash.ts +7 -0
- package/src/shared/utils/schema.ts +359 -0
- package/src/shared/utils/string-enum.ts +12 -0
- package/src/shared/utils/tests/schema.test.ts +724 -0
- package/src/shared/utils/try-catch.ts +12 -0
- package/src/shared/utils/typed-ref.ts +53 -0
- package/dist/shared/bricks/props/container.d.ts +0 -11
- package/dist/shared/bricks/props/container.d.ts.map +0 -1
- package/dist/shared/bricks/props/container.js +0 -3
- package/dist/shared/bricks/props/gap.d.ts +0 -9
- package/dist/shared/bricks/props/gap.d.ts.map +0 -1
- package/dist/shared/bricks/props/gap.js +0 -3
- package/dist/shared/bricks/props/padding.d.ts +0 -5
- package/dist/shared/bricks/props/padding.d.ts.map +0 -1
- package/dist/shared/bricks/props/padding.js +0 -3
- package/dist/shared/bricks/props/tests/padding.d.ts +0 -2
- package/dist/shared/bricks/props/tests/padding.d.ts.map +0 -1
- package/dist/shared/chunk-2IYSJYNE.js +0 -3
- package/dist/shared/chunk-3EM3B4DX.js +0 -3
- package/dist/shared/chunk-4TH3C76A.js +0 -3
- package/dist/shared/chunk-5N6MBJJ4.js +0 -3
- package/dist/shared/chunk-6FITVVZX.js +0 -3
- package/dist/shared/chunk-6WCGUAQN.js +0 -3
- package/dist/shared/chunk-7DMUDZ4H.js +0 -3
- package/dist/shared/chunk-ACVLF55Q.js +0 -3
- package/dist/shared/chunk-AQPN5SE2.js +0 -3
- package/dist/shared/chunk-BZGNY7LB.js +0 -3
- package/dist/shared/chunk-C3VGP4CA.js +0 -3
- package/dist/shared/chunk-CT3EI7YN.js +0 -3
- package/dist/shared/chunk-DQXDGV67.js +0 -3
- package/dist/shared/chunk-E22E4XWE.js +0 -3
- package/dist/shared/chunk-ETYYRWLK.js +0 -3
- package/dist/shared/chunk-EYPREFMH.js +0 -3
- package/dist/shared/chunk-FKNNTHWX.js +0 -5
- package/dist/shared/chunk-HHO3ONTQ.js +0 -3
- package/dist/shared/chunk-I46VBMLF.js +0 -3
- package/dist/shared/chunk-IIFTGWFZ.js +0 -3
- package/dist/shared/chunk-JS4K5JRM.js +0 -5
- package/dist/shared/chunk-KHFNN4P3.js +0 -3
- package/dist/shared/chunk-L6WHBSRZ.js +0 -8
- package/dist/shared/chunk-LFQZRGHS.js +0 -3
- package/dist/shared/chunk-LGP6GWIY.js +0 -3
- package/dist/shared/chunk-NLEWXPVM.js +0 -3
- package/dist/shared/chunk-NNI225RG.js +0 -3
- package/dist/shared/chunk-QISTDGPP.js +0 -3
- package/dist/shared/chunk-QSZWDE3D.js +0 -3
- package/dist/shared/chunk-RGLVKILY.js +0 -3
- package/dist/shared/chunk-SLRU4CT6.js +0 -4
- package/dist/shared/chunk-T3LIA4YB.js +0 -3
- package/dist/shared/chunk-T4LMBG2G.js +0 -3
- package/dist/shared/chunk-TATG6SFZ.js +0 -3
- package/dist/shared/chunk-TF3JVVRU.js +0 -3
- package/dist/shared/chunk-TTTXV7TJ.js +0 -6
- package/dist/shared/chunk-TWBY2GOR.js +0 -3
- package/dist/shared/chunk-UAQHU6L6.js +0 -3
- package/dist/shared/chunk-UHF6IEKV.js +0 -3
- package/dist/shared/chunk-UMHXXXVP.js +0 -3
- package/dist/shared/chunk-VGRYSAXA.js +0 -3
- package/dist/shared/chunk-VPFCY4DH.js +0 -3
- package/dist/shared/chunk-VZPXXFVX.js +0 -3
- package/dist/shared/chunk-WU6Q4WYD.js +0 -3
- package/dist/shared/chunk-X43MB5WD.js +0 -3
- package/dist/shared/chunk-YBGPPF7T.js +0 -3
- package/dist/shared/chunk-YFFTZ5T6.js +0 -3
- package/dist/shared/chunk-ZQGNYK5I.js +0 -8
- package/dist/shared/chunk-ZTDUXSWH.js +0 -3
- package/dist/shared/datarecords/external/airtable/client.d.ts +0 -8
- package/dist/shared/datarecords/external/airtable/client.d.ts.map +0 -1
- package/dist/shared/datarecords/external/airtable/elements.d.ts +0 -21
- package/dist/shared/datarecords/external/airtable/elements.d.ts.map +0 -1
- package/dist/shared/datarecords/external/airtable/options.d.ts +0 -10
- package/dist/shared/datarecords/external/airtable/options.d.ts.map +0 -1
- package/dist/shared/datarecords/external/google/sheets/options.d.ts.map +0 -1
- package/dist/shared/datarecords/external/notion/client.d.ts +0 -8
- package/dist/shared/datarecords/external/notion/client.d.ts.map +0 -1
- package/dist/shared/datarecords/external/notion/options.d.ts.map +0 -1
- package/dist/shared/datarecords/external/notion/utils.d.ts +0 -5
- package/dist/shared/datarecords/external/notion/utils.d.ts.map +0 -1
- package/dist/shared/utils/schema-resolver.d.ts +0 -3
- package/dist/shared/utils/schema-resolver.d.ts.map +0 -1
- package/dist/shared/utils/schema-resolver.js +0 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export const tiktokVideoListSchema = Type.Object({
|
|
4
|
+
data: Type.Object({
|
|
5
|
+
has_more: Type.Boolean(),
|
|
6
|
+
cursor: Type.Number(),
|
|
7
|
+
videos: Type.Array(
|
|
8
|
+
Type.Object({
|
|
9
|
+
title: Type.String(),
|
|
10
|
+
video_description: Type.String(),
|
|
11
|
+
cover_image_url: Type.String(),
|
|
12
|
+
duration: Type.Number(),
|
|
13
|
+
embed_link: Type.String(),
|
|
14
|
+
id: Type.String(),
|
|
15
|
+
}),
|
|
16
|
+
),
|
|
17
|
+
}),
|
|
18
|
+
error: Type.Optional(
|
|
19
|
+
Type.Object({
|
|
20
|
+
code: Type.String(),
|
|
21
|
+
message: Type.String(),
|
|
22
|
+
log_id: Type.String(),
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type TiktokVideoListSchema = Static<typeof tiktokVideoListSchema>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { YoutubeListOptions } from "./options";
|
|
2
|
+
import type { YoutubeListSchema } from "./schema";
|
|
3
|
+
import { UnauthorizedError } from "~/shared/errors";
|
|
4
|
+
import { stringifyObjectValues } from "~/shared/datasources/utils";
|
|
5
|
+
import type { YoutubeFullOAuthConfig } from "../oauth/config";
|
|
6
|
+
import type { DatasourceFetcher } from "~/shared/datasources/fetcher";
|
|
7
|
+
|
|
8
|
+
const fetchYoutubeList: DatasourceFetcher<
|
|
9
|
+
YoutubeListSchema,
|
|
10
|
+
YoutubeFullOAuthConfig,
|
|
11
|
+
YoutubeListOptions
|
|
12
|
+
> = async ({ options, oauth }) => {
|
|
13
|
+
const params = new URLSearchParams({
|
|
14
|
+
...stringifyObjectValues(options),
|
|
15
|
+
part: "snippet,id",
|
|
16
|
+
type: "video",
|
|
17
|
+
videoEmbeddable: "true",
|
|
18
|
+
access_token: oauth.config.accessToken,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const url = `https://www.googleapis.com/youtube/v3/search?${params}`;
|
|
22
|
+
|
|
23
|
+
const response = await fetch(url);
|
|
24
|
+
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
if (response.status === 401) {
|
|
27
|
+
throw new UnauthorizedError(`fetchYoutubeList Error: Unauthorized.`);
|
|
28
|
+
}
|
|
29
|
+
throw new Error(`fetchYoutubeList Error: Response status: ${response.status}`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const data = (await response.json()) as YoutubeListSchema;
|
|
33
|
+
|
|
34
|
+
return data;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default fetchYoutubeList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export const youtubeListOptions = Type.Object({
|
|
4
|
+
channelId: Type.String(),
|
|
5
|
+
order: Type.Optional(Type.String()),
|
|
6
|
+
maxResults: Type.Optional(Type.Number()),
|
|
7
|
+
regionCode: Type.Optional(Type.String()),
|
|
8
|
+
relevanceLanguage: Type.Optional(Type.String()),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type YoutubeListOptions = Static<typeof youtubeListOptions>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { YoutubeListSchema } from "./schema";
|
|
2
|
+
|
|
3
|
+
export const sample = [
|
|
4
|
+
{
|
|
5
|
+
etag: "123456789",
|
|
6
|
+
id: {
|
|
7
|
+
videoId: "dQw4w9WgXcQ",
|
|
8
|
+
channelId: "UCXuqSBlHAE6Xw-yeJA0Tunw",
|
|
9
|
+
playlistId: "PLFgquLnL59alCl_2TQvOiD5Vgm1hCaGSI",
|
|
10
|
+
},
|
|
11
|
+
snippet: {
|
|
12
|
+
channelId: "UCXuqSBlHAE6Xw-yeJA0Tunw",
|
|
13
|
+
channelTitle: "RickAstleyVEVO",
|
|
14
|
+
description:
|
|
15
|
+
"Rick Astley's official music video for “Never Gonna Give You Up” Listen to Rick Astley: https://RickAstley.lnk.to/_listenYD Subscribe to the official Rick Astley YouTube channel: https://RickAstley.lnk.to/_subscribeYD Follow Rick Astley: Facebook: https://RickAstley.lnk.to/_followYD Twitter: https://RickAstley.lnk.to/_followYD Instagram: https://RickAstley.lnk.to/_followYD Website: https://RickAstley.lnk.to/_followYD Spotify: https://RickAstley.lnk.to/_followYD Lyrics: We're no strangers to love You know the rules and so do I A full commitment's what I'm thinking of You wouldn't get this from any other guy I just wanna tell you how I'm feeling Gotta make you understand Never gonna give you up Never gonna let you down Never gonna run around and desert you Never gonna make you cry Never gonna say goodbye Never gonna tell a lie and hurt you #RickAstley #NeverGonnaGiveYouUp #DancePop",
|
|
16
|
+
liveBroadcastContent: "none",
|
|
17
|
+
publishedAt: "2009-10-25",
|
|
18
|
+
thumbnails: {
|
|
19
|
+
default: {
|
|
20
|
+
height: 90,
|
|
21
|
+
url: "https://i.ytimg.com/vi/dQw4w9WgXcQ/default.jpg",
|
|
22
|
+
width: 120,
|
|
23
|
+
},
|
|
24
|
+
standard: {
|
|
25
|
+
height: 480,
|
|
26
|
+
url: "https://i.ytimg.com/vi/dQw4w9WgXcQ/sddefault.jpg",
|
|
27
|
+
width: 640,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
title: "Rick Astley - Never Gonna Give You Up (Official Music Video)",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
] satisfies YoutubeListSchema;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export const youtubeListSchema = Type.Array(
|
|
4
|
+
Type.Object({
|
|
5
|
+
etag: Type.String(),
|
|
6
|
+
id: Type.Object({
|
|
7
|
+
videoId: Type.String(),
|
|
8
|
+
channelId: Type.String(),
|
|
9
|
+
playlistId: Type.String(),
|
|
10
|
+
}),
|
|
11
|
+
snippet: Type.Object({
|
|
12
|
+
publishedAt: Type.String(),
|
|
13
|
+
channelId: Type.String(),
|
|
14
|
+
title: Type.String(),
|
|
15
|
+
description: Type.String(),
|
|
16
|
+
thumbnails: Type.Object({
|
|
17
|
+
default: Type.Object({
|
|
18
|
+
url: Type.String(),
|
|
19
|
+
width: Type.Number(),
|
|
20
|
+
height: Type.Number(),
|
|
21
|
+
}),
|
|
22
|
+
standard: Type.Object({
|
|
23
|
+
url: Type.String(),
|
|
24
|
+
width: Type.Number(),
|
|
25
|
+
height: Type.Number(),
|
|
26
|
+
}),
|
|
27
|
+
}),
|
|
28
|
+
channelTitle: Type.String(),
|
|
29
|
+
liveBroadcastContent: Type.String(),
|
|
30
|
+
}),
|
|
31
|
+
}),
|
|
32
|
+
{
|
|
33
|
+
title: "Youtube list schema",
|
|
34
|
+
description: "Schema for a list of Youtube videos",
|
|
35
|
+
},
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export type YoutubeListSchema = Static<typeof youtubeListSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
import { buildOAuthConfigSchema } from "~/shared/oauth";
|
|
3
|
+
|
|
4
|
+
const youtubeOAuthConfig = Type.Object({
|
|
5
|
+
accessToken: Type.String(),
|
|
6
|
+
expiresIn: Type.Number(),
|
|
7
|
+
openId: Type.String(),
|
|
8
|
+
refreshExpiresIn: Type.Number(),
|
|
9
|
+
refreshToken: Type.String(),
|
|
10
|
+
scope: Type.String(),
|
|
11
|
+
tokenType: Type.String(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const youtubeFullOAuthConfig = buildOAuthConfigSchema(youtubeOAuthConfig);
|
|
15
|
+
export type YoutubeFullOAuthConfig = Static<typeof youtubeFullOAuthConfig>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PageAttributes } from "../attributes";
|
|
2
|
+
|
|
3
|
+
export type DatasourceFetcherParams<
|
|
4
|
+
OAuthProps = unknown,
|
|
5
|
+
Opts extends Record<string, unknown> = Record<string, unknown>,
|
|
6
|
+
> = {
|
|
7
|
+
options: Opts;
|
|
8
|
+
oauth: OAuthProps;
|
|
9
|
+
pageAttributes?: PageAttributes;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type DatasourceFetcher<
|
|
13
|
+
T = unknown,
|
|
14
|
+
OAuthOpts = unknown,
|
|
15
|
+
Opts extends Record<string, unknown> = Record<string, unknown>,
|
|
16
|
+
> = (params: DatasourceFetcherParams<OAuthOpts, Opts>) => Promise<T>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export const blogSchema = Type.Array(
|
|
4
|
+
Type.Object({
|
|
5
|
+
title: Type.String({
|
|
6
|
+
title: "Title",
|
|
7
|
+
description: "Blog post title",
|
|
8
|
+
}),
|
|
9
|
+
excerpt: Type.String({
|
|
10
|
+
title: "Excerpt",
|
|
11
|
+
description: "Short summary of the blog post",
|
|
12
|
+
format: "markdown",
|
|
13
|
+
}),
|
|
14
|
+
image: Type.Optional(
|
|
15
|
+
Type.String({
|
|
16
|
+
title: "Image URL",
|
|
17
|
+
format: "uri",
|
|
18
|
+
description: "Blog post image",
|
|
19
|
+
}),
|
|
20
|
+
),
|
|
21
|
+
content: Type.String({
|
|
22
|
+
title: "Content",
|
|
23
|
+
description: "Blog post content",
|
|
24
|
+
format: "markdown",
|
|
25
|
+
}),
|
|
26
|
+
author: Type.Object({
|
|
27
|
+
name: Type.String({
|
|
28
|
+
title: "Author Name",
|
|
29
|
+
description: "Author's name",
|
|
30
|
+
}),
|
|
31
|
+
}),
|
|
32
|
+
publishedAt: Type.String({
|
|
33
|
+
title: "Published Date",
|
|
34
|
+
format: "date",
|
|
35
|
+
description: "Publication date in ISO format",
|
|
36
|
+
}),
|
|
37
|
+
slug: Type.String({
|
|
38
|
+
title: "Slug",
|
|
39
|
+
pattern: "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
40
|
+
description: "URL-friendly version of the title",
|
|
41
|
+
}),
|
|
42
|
+
status: Type.Union([Type.Literal("draft"), Type.Literal("published"), Type.Literal("archived")], {
|
|
43
|
+
title: "Status",
|
|
44
|
+
description: "Publication status of the blog post",
|
|
45
|
+
}),
|
|
46
|
+
categories: Type.Optional(
|
|
47
|
+
Type.Array(
|
|
48
|
+
Type.String({
|
|
49
|
+
title: "Categories",
|
|
50
|
+
description: "Blog post categories",
|
|
51
|
+
}),
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
tags: Type.Optional(
|
|
55
|
+
Type.Array(
|
|
56
|
+
Type.String({
|
|
57
|
+
title: "Tags",
|
|
58
|
+
description: "Blog post tags",
|
|
59
|
+
}),
|
|
60
|
+
),
|
|
61
|
+
),
|
|
62
|
+
}),
|
|
63
|
+
{
|
|
64
|
+
title: "Blog Posts",
|
|
65
|
+
description: "List of blog posts",
|
|
66
|
+
},
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
export type BlogSchema = Static<typeof blogSchema>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export const changelogSchema = Type.Array(
|
|
4
|
+
Type.Object({
|
|
5
|
+
title: Type.String({
|
|
6
|
+
title: "Release Title",
|
|
7
|
+
description: "Title of the release",
|
|
8
|
+
}),
|
|
9
|
+
version: Type.Optional(
|
|
10
|
+
Type.String({
|
|
11
|
+
title: "Version",
|
|
12
|
+
description: "Version number",
|
|
13
|
+
}),
|
|
14
|
+
),
|
|
15
|
+
date: Type.String({
|
|
16
|
+
title: "Release Date",
|
|
17
|
+
format: "date",
|
|
18
|
+
description: "Release date in ISO format",
|
|
19
|
+
}),
|
|
20
|
+
changes: Type.Array(
|
|
21
|
+
Type.Object({
|
|
22
|
+
type: Type.Union(
|
|
23
|
+
[
|
|
24
|
+
Type.Literal("added"),
|
|
25
|
+
Type.Literal("changed"),
|
|
26
|
+
Type.Literal("fixed"),
|
|
27
|
+
Type.Literal("improved"),
|
|
28
|
+
Type.Literal("deprecated"),
|
|
29
|
+
Type.Literal("removed"),
|
|
30
|
+
],
|
|
31
|
+
{
|
|
32
|
+
title: "Change Type",
|
|
33
|
+
},
|
|
34
|
+
),
|
|
35
|
+
description: Type.String({
|
|
36
|
+
title: "Description",
|
|
37
|
+
format: "markdown",
|
|
38
|
+
}),
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
}),
|
|
42
|
+
{
|
|
43
|
+
title: "Changelog",
|
|
44
|
+
description: "Changelog items",
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export type ChangelogSchema = Static<typeof changelogSchema>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
import { linksSchema } from "../links/schema";
|
|
3
|
+
|
|
4
|
+
export const contactInfoSchema = Type.Object(
|
|
5
|
+
{
|
|
6
|
+
email: Type.String({ format: "email", title: "Email" }),
|
|
7
|
+
phone: Type.Optional(Type.String({ title: "Phone" })),
|
|
8
|
+
companyName: Type.Optional(Type.String({ title: "Company Name" })),
|
|
9
|
+
firstName: Type.Optional(Type.String({ title: "First Name" })),
|
|
10
|
+
lastName: Type.Optional(Type.String({ title: "Last Name" })),
|
|
11
|
+
url: Type.Optional(Type.String({ format: "uri", title: "Website URL" })),
|
|
12
|
+
address: Type.Optional(Type.String({ title: "Address" })),
|
|
13
|
+
socialLinks: linksSchema,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
description: "A generic schema representing a person or company contact information",
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export type ContactInfo = Static<typeof contactInfoSchema>;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
export const cvSchema = Type.Object(
|
|
3
|
+
{
|
|
4
|
+
firstName: Type.String({
|
|
5
|
+
title: "First name",
|
|
6
|
+
}),
|
|
7
|
+
lastName: Type.String({
|
|
8
|
+
title: "Last name",
|
|
9
|
+
}),
|
|
10
|
+
tagLine: Type.String({
|
|
11
|
+
title: "Tag line",
|
|
12
|
+
}),
|
|
13
|
+
email: Type.String({
|
|
14
|
+
title: "Email",
|
|
15
|
+
pattern: "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
|
16
|
+
}),
|
|
17
|
+
phoneNumber: Type.Optional(
|
|
18
|
+
Type.String({
|
|
19
|
+
title: "Phone number",
|
|
20
|
+
pattern: "^\\+?[1-9]\\d{1,14}$", // International phone number format
|
|
21
|
+
}),
|
|
22
|
+
),
|
|
23
|
+
address: Type.Optional(
|
|
24
|
+
Type.String({
|
|
25
|
+
title: "Address",
|
|
26
|
+
}),
|
|
27
|
+
),
|
|
28
|
+
socialLinks: Type.Optional(
|
|
29
|
+
Type.Array(
|
|
30
|
+
Type.Object({
|
|
31
|
+
platform: Type.String({
|
|
32
|
+
title: "Platform",
|
|
33
|
+
enum: ["LinkedIn", "GitHub", "Twitter", "Portfolio", "Other"],
|
|
34
|
+
}),
|
|
35
|
+
url: Type.String({
|
|
36
|
+
title: "URL",
|
|
37
|
+
pattern: "^https?://.*",
|
|
38
|
+
}),
|
|
39
|
+
}),
|
|
40
|
+
),
|
|
41
|
+
),
|
|
42
|
+
professionalSummary: Type.String({
|
|
43
|
+
title: "Professional Summary",
|
|
44
|
+
description: "Brief overview of your professional background and goals",
|
|
45
|
+
maxLength: 2000,
|
|
46
|
+
}),
|
|
47
|
+
workExperience: Type.Array(
|
|
48
|
+
Type.Object({
|
|
49
|
+
company: Type.String({ title: "Company Name" }),
|
|
50
|
+
position: Type.String({ title: "Position" }),
|
|
51
|
+
location: Type.Optional(Type.String({ title: "Location" })),
|
|
52
|
+
startDate: Type.String({
|
|
53
|
+
title: "Start Date",
|
|
54
|
+
format: "date",
|
|
55
|
+
}),
|
|
56
|
+
endDate: Type.Optional(
|
|
57
|
+
Type.String({
|
|
58
|
+
title: "End Date",
|
|
59
|
+
format: "date",
|
|
60
|
+
}),
|
|
61
|
+
),
|
|
62
|
+
current: Type.Optional(
|
|
63
|
+
Type.Boolean({
|
|
64
|
+
title: "Current Position",
|
|
65
|
+
default: false,
|
|
66
|
+
}),
|
|
67
|
+
),
|
|
68
|
+
description: Type.String({
|
|
69
|
+
title: "Description",
|
|
70
|
+
description: "Description of responsibilities and achievements",
|
|
71
|
+
format: "markdown",
|
|
72
|
+
}),
|
|
73
|
+
achievements: Type.Optional(
|
|
74
|
+
Type.Array(
|
|
75
|
+
Type.String({
|
|
76
|
+
title: "Achievement",
|
|
77
|
+
}),
|
|
78
|
+
),
|
|
79
|
+
),
|
|
80
|
+
}),
|
|
81
|
+
),
|
|
82
|
+
education: Type.Array(
|
|
83
|
+
Type.Object({
|
|
84
|
+
institution: Type.String({ title: "Institution" }),
|
|
85
|
+
degree: Type.String({ title: "Degree" }),
|
|
86
|
+
field: Type.String({ title: "Field of Study" }),
|
|
87
|
+
startDate: Type.String({
|
|
88
|
+
title: "Start Date",
|
|
89
|
+
format: "date",
|
|
90
|
+
}),
|
|
91
|
+
endDate: Type.Optional(
|
|
92
|
+
Type.String({
|
|
93
|
+
title: "End Date",
|
|
94
|
+
format: "date",
|
|
95
|
+
}),
|
|
96
|
+
),
|
|
97
|
+
gpa: Type.Optional(
|
|
98
|
+
Type.Number({
|
|
99
|
+
title: "GPA",
|
|
100
|
+
minimum: 0,
|
|
101
|
+
maximum: 4,
|
|
102
|
+
}),
|
|
103
|
+
),
|
|
104
|
+
honors: Type.Optional(
|
|
105
|
+
Type.Array(
|
|
106
|
+
Type.String({
|
|
107
|
+
title: "Honor/Award",
|
|
108
|
+
}),
|
|
109
|
+
),
|
|
110
|
+
),
|
|
111
|
+
}),
|
|
112
|
+
),
|
|
113
|
+
skills: Type.Array(
|
|
114
|
+
Type.Object({
|
|
115
|
+
category: Type.String({
|
|
116
|
+
title: "Skill Category",
|
|
117
|
+
description: "E.g., Programming Languages, Tools, Soft Skills",
|
|
118
|
+
}),
|
|
119
|
+
items: Type.Array(
|
|
120
|
+
Type.Object({
|
|
121
|
+
name: Type.String({ title: "Skill Name" }),
|
|
122
|
+
level: Type.Optional(
|
|
123
|
+
Type.String({
|
|
124
|
+
title: "Proficiency Level",
|
|
125
|
+
enum: ["Beginner", "Intermediate", "Advanced", "Expert"],
|
|
126
|
+
}),
|
|
127
|
+
),
|
|
128
|
+
}),
|
|
129
|
+
),
|
|
130
|
+
}),
|
|
131
|
+
),
|
|
132
|
+
certifications: Type.Optional(
|
|
133
|
+
Type.Array(
|
|
134
|
+
Type.Object({
|
|
135
|
+
name: Type.String({ title: "Certification Name" }),
|
|
136
|
+
issuer: Type.String({ title: "Issuing Organization" }),
|
|
137
|
+
dateObtained: Type.String({
|
|
138
|
+
title: "Date Obtained",
|
|
139
|
+
format: "date",
|
|
140
|
+
}),
|
|
141
|
+
expiryDate: Type.Optional(
|
|
142
|
+
Type.String({
|
|
143
|
+
title: "Expiry Date",
|
|
144
|
+
format: "date",
|
|
145
|
+
}),
|
|
146
|
+
),
|
|
147
|
+
credentialId: Type.Optional(Type.String({ title: "Credential ID" })),
|
|
148
|
+
}),
|
|
149
|
+
),
|
|
150
|
+
),
|
|
151
|
+
languages: Type.Optional(
|
|
152
|
+
Type.Array(
|
|
153
|
+
Type.Object({
|
|
154
|
+
language: Type.String({ title: "Language" }),
|
|
155
|
+
proficiency: Type.String({
|
|
156
|
+
title: "Proficiency Level",
|
|
157
|
+
enum: ["Basic", "Intermediate", "Advanced", "Native/Bilingual"],
|
|
158
|
+
}),
|
|
159
|
+
}),
|
|
160
|
+
),
|
|
161
|
+
),
|
|
162
|
+
projects: Type.Optional(
|
|
163
|
+
Type.Array(
|
|
164
|
+
Type.Object({
|
|
165
|
+
name: Type.String({ title: "Project Name" }),
|
|
166
|
+
description: Type.String({ title: "Description" }),
|
|
167
|
+
url: Type.Optional(
|
|
168
|
+
Type.String({
|
|
169
|
+
title: "Project URL",
|
|
170
|
+
pattern: "^https?://.*",
|
|
171
|
+
}),
|
|
172
|
+
),
|
|
173
|
+
technologies: Type.Array(Type.String({ title: "Technology" })),
|
|
174
|
+
startDate: Type.Optional(
|
|
175
|
+
Type.String({
|
|
176
|
+
title: "Start Date",
|
|
177
|
+
format: "date",
|
|
178
|
+
}),
|
|
179
|
+
),
|
|
180
|
+
endDate: Type.Optional(
|
|
181
|
+
Type.String({
|
|
182
|
+
title: "End Date",
|
|
183
|
+
format: "date",
|
|
184
|
+
}),
|
|
185
|
+
),
|
|
186
|
+
}),
|
|
187
|
+
),
|
|
188
|
+
),
|
|
189
|
+
references: Type.Optional(
|
|
190
|
+
Type.Array(
|
|
191
|
+
Type.Object({
|
|
192
|
+
name: Type.String({ title: "Reference Name" }),
|
|
193
|
+
position: Type.String({ title: "Position" }),
|
|
194
|
+
company: Type.String({ title: "Company" }),
|
|
195
|
+
email: Type.Optional(
|
|
196
|
+
Type.String({
|
|
197
|
+
title: "Email",
|
|
198
|
+
pattern: "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
|
199
|
+
}),
|
|
200
|
+
),
|
|
201
|
+
phoneNumber: Type.Optional(
|
|
202
|
+
Type.String({
|
|
203
|
+
title: "Phone Number",
|
|
204
|
+
pattern: "^\\+?[1-9]\\d{1,14}$",
|
|
205
|
+
}),
|
|
206
|
+
),
|
|
207
|
+
relationship: Type.String({ title: "Professional Relationship" }),
|
|
208
|
+
}),
|
|
209
|
+
),
|
|
210
|
+
),
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
description: "Schema representing a comprehensive CV",
|
|
214
|
+
},
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
export type CVschema = Static<typeof cvSchema>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Type, type Static } from "@sinclair/typebox";
|
|
2
|
+
|
|
3
|
+
export const faqSchema = Type.Array(
|
|
4
|
+
Type.Object({
|
|
5
|
+
question: Type.String({
|
|
6
|
+
title: "Question",
|
|
7
|
+
format: "markdown",
|
|
8
|
+
}),
|
|
9
|
+
answer: Type.String({
|
|
10
|
+
title: "Answer",
|
|
11
|
+
format: "markdown",
|
|
12
|
+
}),
|
|
13
|
+
category: Type.Optional(
|
|
14
|
+
Type.String({
|
|
15
|
+
title: "Category",
|
|
16
|
+
}),
|
|
17
|
+
),
|
|
18
|
+
tags: Type.Optional(Type.Array(Type.String(), { title: "Tags" })),
|
|
19
|
+
order: Type.Optional(Type.Number({ title: "Order in the list" })),
|
|
20
|
+
}),
|
|
21
|
+
{
|
|
22
|
+
title: "FAQ",
|
|
23
|
+
description: "Schema representing a collection of frequently asked questions (FAQ)",
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export type FaqSchema = Static<typeof faqSchema>;
|