refactor: migrate interfaces to dedicated directory

Reorganizes TypeScript interfaces into a modular structure:
- Create dedicated interfaces directory with specialized files
- Split interfaces by domain (claims, common, limits, records, user)
- Update imports in endorserServer.ts to use new interface locations
- Replace 'any' types with 'unknown' for better type safety
- Add proper type imports and exports

This improves code organization and maintainability by:
- Centralizing interface definitions
- Reducing file size of endorserServer.ts
- Making interface relationships more explicit
- Improving type safety with stricter types
This commit is contained in:
Matthew Raymer
2025-02-24 11:21:08 +00:00
parent 90d688dba1
commit 79ef59c5a9
69 changed files with 663 additions and 645 deletions

View File

@@ -28,7 +28,7 @@
width="30"
style="display: inline; margin: 0 5px; vertical-align: middle"
/>and then "Add to Home Screen"
<fa icon="square-plus" title="Apple 'Add' icon" />
<font-awesome icon="square-plus" title="Apple 'Add' icon" />
and go click on that new app.
</span>
<span
@@ -36,10 +36,7 @@
>
You should see a prompt to install, or you can click on the
top-right dots
<fa
icon="ellipsis-vertical"
title="vertical ellipsis"
class="fa-fw"
<font-awesome icon="ellipsis-vertical" title="vertical ellipsis" />
/>
and then "Install"<img
src="../assets/help/install-android-chrome.png"
@@ -73,7 +70,7 @@
<div class="mb-8">
<div v-if="isCreatingIdentifier">
<p class="text-slate-500 text-center italic mt-4 mb-4">
<fa icon="spinner" class="fa-spin-pulse" />
<font-awesome icon="spinner" class="fa-spin-pulse" />
Loading&hellip;
</p>
</div>
@@ -119,7 +116,7 @@
@click="openGiftedPrompts()"
class="ml-2 block text-xs text-center bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1 rounded-md"
>
<fa icon="lightbulb" class="fa-fw" />
<font-awesome icon="lightbulb" class="fa-fw" />
</button>
</div>
@@ -181,7 +178,7 @@
class="absolute right-6 bottom-0 transform translate-y-1/2 text-center text-4xl leading-none bg-green-600 text-white w-14 py-2.5 rounded-full"
@click="openDialog()"
>
<fa icon="plus" class="fa-fw" />
<font-awesome icon="plus" class="fa-fw" />
</button>
</div>
@@ -192,12 +189,12 @@
Latest Activity
<button @click="openFeedFilters()">
<span class="text-xs text-white">
<fa
<font-awesome
v-if="resultsAreFiltered()"
icon="filter"
class="bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] px-1 py-1.5 rounded-md"
/>
<fa
<font-awesome
v-else
icon="filter"
class="bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] px-1 py-1.5 rounded-md"
@@ -265,7 +262,7 @@
<div class="grid grid-cols-12">
<span class="pt-1 col-span-1 justify-self-start">
<span>
<fa
<font-awesome
icon="circle-user"
:class="
computeKnownPersonIconStyleClassNames(
@@ -274,7 +271,7 @@
"
@click="toastUser('This involves your contacts.')"
/>
<fa
<font-awesome
icon="gift"
class="pl-3 text-slate-500"
@click="toastUser('This is a gift.')"
@@ -295,7 +292,7 @@
:profile-image-url="record.giver.profileImageUrl"
class="inline-block align-middle border border-slate-300 rounded-md mr-1"
/>
<fa
<font-awesome
v-if="
record.agentDid !== activeDid &&
record.recipientDid !== activeDid &&
@@ -319,7 +316,7 @@
{{ giveDescription(record) }}
</span>
<a @click="onClickLoadClaim(record.jwtId)">
<fa
<font-awesome
icon="file-lines"
class="pl-2 text-slate-500 cursor-pointer"
/>
@@ -333,7 +330,7 @@
encodeURIComponent(record.fulfillsPlanHandleId)
"
>
<fa icon="hammer" class="text-blue-500" />
<font-awesome icon="hammer" class="text-blue-500" />
</router-link>
<router-link
v-if="record.providerPlanHandleId"
@@ -342,7 +339,7 @@
encodeURIComponent(record.providerPlanHandleId)
"
>
<fa icon="hammer" class="text-blue-500" />
<font-awesome icon="hammer" class="text-blue-500" />
</router-link>
</span>
</div>
@@ -364,7 +361,7 @@
</InfiniteScroll>
<div v-if="isFeedLoading">
<p class="text-slate-500 text-center italic mt-4 mb-4">
<fa icon="spinner" class="fa-spin-pulse" /> Loading&hellip;
<font-awesome icon="spinner" class="fa-spin-pulse" /> Loading&hellip;
</p>
</div>
<div v-if="!isFeedLoading && feedData.length === 0">