aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/bindings
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-02-14 00:00:47 +0100
committerGitHub <noreply@github.com>2023-02-14 00:00:47 +0100
commit2bdc60266adc1920a31488309657dd8db13b33f0 (patch)
tree9c8c73cdcc4fa97a0688af8f192a1e871f2a8c8d /src-tauri/bindings
parentcb638c556594a996c94f501fcbd009984a63fd55 (diff)
downloadFlightCore-2bdc60266adc1920a31488309657dd8db13b33f0.tar.gz
FlightCore-2bdc60266adc1920a31488309657dd8db13b33f0.zip
refactor: Get TS package API response from backend (#168)
* refactor: Get TS package API response from backend Previously Thunderstore package index was done in frontend. Should be moved to backend instead as backend is reponsible for such tasks while frontend should just be used to store and display information. * refactor: Filter TS API response in backend * refactor: Rename function Makes it more descriptive what it does * refactor: Use gen. binds instead of duped struct Replaces the current TypeScript interface defintions with autogenerated bindings. * fix: Properly type variable * fix: Correct imported path of interface file * fix: Update struct field types to fix typing issue i32 should be big enough unless Thunderstore and Northstar suddenly becomes really huge and we start seeing over 4 million downloads on some mod * fix: Correct imported path of interface file
Diffstat (limited to 'src-tauri/bindings')
-rw-r--r--src-tauri/bindings/ThunderstoreMod.ts4
-rw-r--r--src-tauri/bindings/ThunderstoreModVersion.ts3
2 files changed, 7 insertions, 0 deletions
diff --git a/src-tauri/bindings/ThunderstoreMod.ts b/src-tauri/bindings/ThunderstoreMod.ts
new file mode 100644
index 00000000..25d119cb
--- /dev/null
+++ b/src-tauri/bindings/ThunderstoreMod.ts
@@ -0,0 +1,4 @@
+// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
+import type { ThunderstoreModVersion } from "./ThunderstoreModVersion";
+
+export interface ThunderstoreMod { name: string, full_name: string, owner: string, package_url: string, date_created: string, date_updated: string, uuid4: string, rating_score: number, is_pinned: boolean, is_deprecated: boolean, has_nsfw_content: boolean, categories: Array<string>, versions: Array<ThunderstoreModVersion>, } \ No newline at end of file
diff --git a/src-tauri/bindings/ThunderstoreModVersion.ts b/src-tauri/bindings/ThunderstoreModVersion.ts
new file mode 100644
index 00000000..7e76308e
--- /dev/null
+++ b/src-tauri/bindings/ThunderstoreModVersion.ts
@@ -0,0 +1,3 @@
+// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
+
+export interface ThunderstoreModVersion { name: string, full_name: string, description: string, icon: string, version_number: string, dependencies: Array<string>, download_url: string, downloads: number, date_created: string, website_url: string, is_active: boolean, uuid4: string, file_size: bigint, } \ No newline at end of file