diff --git a/Cargo.lock b/Cargo.lock index c04322dc3..cb8296eff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,12 +99,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "aligned-vec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" - [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -132,6 +126,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +[[package]] +name = "android_log-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85965b6739a430150bdd138e2374a98af0c3ee0d030b3bb7fc3bddff58d0102e" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -196,23 +196,6 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" - -[[package]] -name = "arg_enum_proc_macro" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "arrayref" version = "0.3.7" @@ -520,29 +503,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "av1-grain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" -dependencies = [ - "anyhow", - "arrayvec", - "log", - "nom", - "num-rational", - "v_frame", -] - -[[package]] -name = "avif-serialize" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2" -dependencies = [ - "arrayvec", -] - [[package]] name = "aws-config" version = "1.5.1" @@ -1157,12 +1117,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bitstream-io" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c12d1856e42f0d817a835fe55853957c85c8c8a470114029143d3f12671446e" - [[package]] name = "bitvec" version = "1.0.1" @@ -1311,12 +1265,6 @@ dependencies = [ "serde", ] -[[package]] -name = "built" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6a6c0b39c38fd754ac338b00a88066436389c0f029da5d37d1e01091d9b7c17" - [[package]] name = "builtin-psl-connectors" version = "0.1.0" @@ -1356,12 +1304,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "byteorder-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" - [[package]] name = "bytes" version = "1.6.0" @@ -4431,35 +4373,20 @@ dependencies = [ [[package]] name = "image" -version = "0.25.1" +version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11" +checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" dependencies = [ "bytemuck", "byteorder", "color_quant", "exr", "gif", - "image-webp", + "jpeg-decoder", "num-traits", "png", "qoi", - "ravif", - "rayon", - "rgb", "tiff", - "zune-core", - "zune-jpeg", -] - -[[package]] -name = "image-webp" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d730b085583c4d789dfd07fdcf185be59501666a90c97c40162b37e4fdad272d" -dependencies = [ - "byteorder-lite", - "thiserror", ] [[package]] @@ -4468,12 +4395,6 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" -[[package]] -name = "imgref" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" - [[package]] name = "include_dir" version = "0.7.3" @@ -4589,17 +4510,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "interpolate_name" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "ipconfig" version = "0.3.2" @@ -4643,15 +4553,6 @@ version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" -[[package]] -name = "iter_tools" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f85582248e8796b1d7146eabe9f70c5b9de4db16bf934ca893581d33c66403b6" -dependencies = [ - "itertools 0.11.0", -] - [[package]] name = "itertools" version = "0.10.5" @@ -4661,15 +4562,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.12.1" @@ -4759,6 +4651,9 @@ name = "jpeg-decoder" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" +dependencies = [ + "rayon", +] [[package]] name = "js-sys" @@ -4962,17 +4857,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "libfuzzer-sys" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" -dependencies = [ - "arbitrary", - "cc", - "once_cell", -] - [[package]] name = "libheif-rs" version = "1.0.2" @@ -5593,15 +5477,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "loop9" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" -dependencies = [ - "imgref", -] - [[package]] name = "lru" version = "0.7.8" @@ -5739,16 +5614,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" -[[package]] -name = "maybe-rayon" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" -dependencies = [ - "cfg-if", - "rayon", -] - [[package]] name = "md-5" version = "0.10.6" @@ -6309,12 +6174,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "noop_proc_macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" - [[package]] name = "normpath" version = "1.2.0" @@ -6420,17 +6279,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "num-integer" version = "0.1.46" @@ -7002,8 +6850,9 @@ dependencies = [ [[package]] name = "pdfium-render" -version = "0.8.21" -source = "git+https://github.com/fogodev/pdfium-render.git?rev=e7aa1111f441c49e857cebda15b4e51b24356aaa#e7aa1111f441c49e857cebda15b4e51b24356aaa" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d2f2669618a1ae68a86fe975fdda1c6a0b6dc9d5358ea8d2cdcd8da3307e5a" dependencies = [ "bindgen", "bitflags 2.5.0", @@ -7013,7 +6862,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "image", - "iter_tools", + "itertools 0.13.0", "js-sys", "libloading 0.8.3", "log", @@ -7677,19 +7526,6 @@ name = "profiling" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" -dependencies = [ - "profiling-procmacros", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" -dependencies = [ - "quote", - "syn 2.0.66", -] [[package]] name = "prometheus-client" @@ -7887,12 +7723,6 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quick-protobuf" version = "0.8.1" @@ -8077,56 +7907,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rav1e" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" -dependencies = [ - "arbitrary", - "arg_enum_proc_macro", - "arrayvec", - "av1-grain", - "bitstream-io", - "built", - "cfg-if", - "interpolate_name", - "itertools 0.12.1", - "libc", - "libfuzzer-sys", - "log", - "maybe-rayon", - "new_debug_unreachable", - "noop_proc_macro", - "num-derive", - "num-traits", - "once_cell", - "paste", - "profiling", - "rand 0.8.5", - "rand_chacha 0.3.1", - "simd_helpers", - "system-deps", - "thiserror", - "v_frame", - "wasm-bindgen", -] - -[[package]] -name = "ravif" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc13288f5ab39e6d7c9d501759712e6969fcc9734220846fc9ed26cae2cc4234" -dependencies = [ - "avif-serialize", - "imgref", - "loop9", - "quick-error 2.0.1", - "rav1e", - "rayon", - "rgb", -] - [[package]] name = "raw-cpuid" version = "10.7.0" @@ -8397,7 +8177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" dependencies = [ "hostname 0.3.1", - "quick-error 1.2.3", + "quick-error", ] [[package]] @@ -8941,7 +8721,7 @@ dependencies = [ [[package]] name = "sd-core" -version = "0.3.1" +version = "0.3.2" dependencies = [ "async-channel", "async-recursion", @@ -9027,6 +8807,7 @@ dependencies = [ "tokio-util", "tower-service", "tracing", + "tracing-android", "tracing-appender", "tracing-subscriber", "tracing-test", @@ -9174,7 +8955,7 @@ dependencies = [ [[package]] name = "sd-desktop" -version = "0.3.1" +version = "0.3.2" dependencies = [ "axum", "dbus", @@ -9866,15 +9647,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "simd_helpers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" -dependencies = [ - "quote", -] - [[package]] name = "simplecss" version = "0.2.1" @@ -11250,6 +11022,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-android" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12612be8f868a09c0ceae7113ff26afe79d81a24473a393cb9120ece162e86c0" +dependencies = [ + "android_log-sys", + "tracing", + "tracing-subscriber", +] + [[package]] name = "tracing-appender" version = "0.2.3" @@ -11816,17 +11599,6 @@ dependencies = [ "serde", ] -[[package]] -name = "v_frame" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" -dependencies = [ - "aligned-vec", - "num-traits", - "wasm-bindgen", -] - [[package]] name = "valuable" version = "0.1.0" @@ -12097,9 +11869,9 @@ dependencies = [ [[package]] name = "webp" -version = "0.3.0" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f53152f51fb5af0c08484c33d16cca96175881d1f3dec068c23b31a158c2d99" +checksum = "4bb5d8e7814e92297b0e1c773ce43d290bef6c17452dafd9fc49e5edb5beba71" dependencies = [ "image", "libwebp-sys", @@ -13125,12 +12897,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "zune-core" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" - [[package]] name = "zune-inflate" version = "0.2.54" @@ -13140,15 +12906,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "zune-jpeg" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448" -dependencies = [ - "zune-core", -] - [[package]] name = "zvariant" version = "4.0.0" diff --git a/Cargo.toml b/Cargo.toml index 349d571ad..1cc1388c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ gix-ignore = "0.11.2" globset = "0.4.14" http = "0.2" # Update blocked by axum hyper = "0.14" # Update blocked due to API breaking changes -image = "0.25.1" +image = "0.24.9" # Update blocked due to https://github.com/image-rs/image/issues/2230 itertools = "0.13.0" lending-stream = "1.0" libc = "0.2" @@ -66,7 +66,7 @@ tracing-subscriber = "0.3.18" tracing-test = "0.2.5" uhlc = "0.6.0" # Must follow version used by specta uuid = "1.8" -webp = "0.3.0" +webp = "0.2.6" # Update blocked by image [workspace.dependencies.prisma-client-rust] git = "https://github.com/brendonovich/prisma-client-rust" @@ -101,8 +101,6 @@ libp2p-stream = { git = "https://github.com/spacedriveapp/rust-libp2p.git", rev blake3 = { git = "https://github.com/spacedriveapp/blake3.git", rev = "d3aab416c12a75c2bfabce33bcd594e428a79069" } -# Due to image crate version bump -pdfium-render = { git = "https://github.com/fogodev/pdfium-render.git", rev = "e7aa1111f441c49e857cebda15b4e51b24356aaa" } [profile.dev] # Make compilation faster on macOS @@ -143,7 +141,7 @@ incremental = false # Optimize release builds [profile.release] -panic = "abort" # Strip expensive panic clean-up logic +panic = "unwind" # Sadly we need unwind to avoid unexpected crashes on third party crates codegen-units = 1 # Compile crates one after another so the compiler can optimize better lto = true # Enables link to optimizations opt-level = "s" # Optimize for binary size diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index c7c502320..4d3910fd0 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sd-desktop" -version = "0.3.1" +version = "0.3.2" description = "The universal file manager." authors = ["Spacedrive Technology Inc "] default-run = "sd-desktop" diff --git a/apps/landing/public/images/team/haden.jpg b/apps/landing/public/images/team/haden.jpg new file mode 100644 index 000000000..2c5549762 Binary files /dev/null and b/apps/landing/public/images/team/haden.jpg differ diff --git a/apps/landing/public/images/team/matheus.jpg b/apps/landing/public/images/team/matheus.jpg new file mode 100644 index 000000000..6d7841333 Binary files /dev/null and b/apps/landing/public/images/team/matheus.jpg differ diff --git a/apps/landing/public/images/team/valerie.jpeg b/apps/landing/public/images/team/valerie.jpeg new file mode 100644 index 000000000..39b80aab3 Binary files /dev/null and b/apps/landing/public/images/team/valerie.jpeg differ diff --git a/apps/landing/src/app/NewBanner.tsx b/apps/landing/src/app/NewBanner.tsx index 9f7ef86a5..d8e1497cf 100644 --- a/apps/landing/src/app/NewBanner.tsx +++ b/apps/landing/src/app/NewBanner.tsx @@ -4,8 +4,8 @@ import Link from 'next/link'; export interface NewBannerProps { headline: string; - href: string; - link: string; + href?: string; + link?: string; className?: string; } @@ -14,7 +14,7 @@ export function NewBanner(props: NewBannerProps) { return (

{headline}

-
- - {link} - + {link && ( + <> +
+ + {link} + + + )} ); } diff --git a/apps/landing/src/app/api/slack/webhook/createRelease.ts b/apps/landing/src/app/api/slack/webhook/createRelease.ts index c447071b6..c394e49d3 100644 --- a/apps/landing/src/app/api/slack/webhook/createRelease.ts +++ b/apps/landing/src/app/api/slack/webhook/createRelease.ts @@ -1,8 +1,8 @@ -import { z } from 'zod'; +import { object, z } from 'zod'; import { env } from '~/env'; import * as github from './github'; -import { createSlashCommand, createViewSubmission, USER_REF } from './utils'; +import { createBlockActions, createSlashCommand, createViewSubmission, USER_REF } from './utils'; export const callbackId = 'createReleaseModal' as const; export const fields = { @@ -17,7 +17,7 @@ export const fields = { } as const; export const COMMAND_NAME = '/release' as const; -export const EVENT_SCHEMAS = [createSlashCommand(COMMAND_NAME), createViewSubmission()] as const; +export const EVENT_SCHEMAS = [createSlashCommand(COMMAND_NAME), createViewSubmission(), createBlockActions()] as const; export async function createModal( trigger_id: string, @@ -63,7 +63,7 @@ export async function createModal( type: 'plain_text', text: 'View Commit' }, - url: `${github.REPO_API}/commit/${commit}` + url: `${github.REPO_API}/commits/${commit}` }, text: { type: 'mrkdwn', @@ -185,7 +185,18 @@ export async function handleSubmission( const { tag, commit, responseUrl } = JSON.parse(privateMetadata); - await fetch(`${github.REPO_API}/git/refs`, { + const createTag = await fetch(`${github.REPO_API}/git/tags`, { + method: 'POST', + body: JSON.stringify({ + tag, + message: tagline, + object: commit, + type: 'commit' + }), + headers: github.HEADERS + }).then((r) => r.json()); + + const getRef = await fetch(`${github.REPO_API}/git/refs`, { method: 'POST', body: JSON.stringify({ ref: `refs/tags/${tag}`, @@ -222,6 +233,7 @@ export async function handleSubmission( headers: github.HEADERS } ); + const [release] = await Promise.all([createRelease, dispatchWorkflowRun]); await fetch(responseUrl, { @@ -267,7 +279,7 @@ export async function handleSubmission( type: 'plain_text', text: 'View Commit' }, - url: `https://github.com/${env.GITHUB_ORG}/${env.GITHUB_REPO}/commit/${commit}` + url: `https://github.com/${env.GITHUB_ORG}/${env.GITHUB_REPO}/commits/${commit}` } ] } diff --git a/apps/landing/src/app/api/slack/webhook/route.ts b/apps/landing/src/app/api/slack/webhook/route.ts index 55a926cd7..509ba3d50 100644 --- a/apps/landing/src/app/api/slack/webhook/route.ts +++ b/apps/landing/src/app/api/slack/webhook/route.ts @@ -16,6 +16,7 @@ export async function POST(req: Request) { if (!isValid.valid) return new Response(isValid.error, { status: 400 }); const parsedBody = BODY.safeParse(Object.fromEntries([...new URLSearchParams(body)])); + if (!parsedBody.success) { console.log(parsedBody.error); return new Response('Unexpected request', { status: 400 }); diff --git a/apps/landing/src/app/api/slack/webhook/utils.ts b/apps/landing/src/app/api/slack/webhook/utils.ts index 5cfbc478e..9be732291 100644 --- a/apps/landing/src/app/api/slack/webhook/utils.ts +++ b/apps/landing/src/app/api/slack/webhook/utils.ts @@ -42,11 +42,91 @@ export function createViewSubmission() { export function createSlashCommand(command: T) { return z.object({ - command: z.literal(command), + token: z.string(), + team_id: z.string(), + team_domain: z.string(), channel_id: z.string(), - text: z.string().transform((s) => s.split(' ')), + channel_name: z.string(), user_id: z.string(), - trigger_id: z.string(), - response_url: z.string() + user_name: z.string(), + command: z.literal(command), + text: z.string().transform((s) => s.split(' ')), + api_app_id: z.string(), + is_enterprise_install: z.union([z.literal('false'), z.literal('true')]).transform((v) => v === 'true'), + response_url: z.string(), + trigger_id: z.string() }); } + +const BLOCK_ACTIONS_INNER = z.object({ + api_app_id: z.string(), + token: z.string(), + container: z.object({ + type: z.string(), + message_ts: z.string(), + channel_id: z.string(), + is_ephemeral: z.boolean() + }), + trigger_id: z.string(), + team: z.object({ + id: z.string(), + domain: z.string() + }), + enterprise: z.any().nullable(), + is_enterprise_install: z.boolean(), + channel: z.object({ + id: z.string(), + name: z.string() + }), + message: z.object({ + subtype: z.string(), + text: z.string(), + type: z.string(), + ts: z.string(), + bot_id: z.string(), + blocks: z.array( + z.object({ + type: z.string(), + block_id: z.string(), + text: z.object({ + type: z.string(), + text: z.string(), + verbatim: z.boolean() + }).optional(), + elements: z.array( + z.object({ + type: z.string(), + action_id: z.string(), + text: z.object({ + type: z.string(), + text: z.string(), + emoji: z.boolean() + }), + url: z.string().optional() + }) + ).optional() + }) + ) + }), + state: z.object({ + values: z.record(z.record(z.any())) + }), + response_url: z.string(), + actions: z.array( + z.object({ + action_id: z.string(), + block_id: z.string(), + text: z.object({ + type: z.string(), + text: z.string(), + emoji: z.boolean() + }), + type: z.string(), + action_ts: z.string() + }) + ) +}); + +export function createBlockActions() { + return createInteraction('block_actions', BLOCK_ACTIONS_INNER); +} diff --git a/apps/landing/src/app/page.tsx b/apps/landing/src/app/page.tsx index 590655827..d01723ac0 100644 --- a/apps/landing/src/app/page.tsx +++ b/apps/landing/src/app/page.tsx @@ -39,12 +39,7 @@ export default async function Page() {