Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(client): client copied from telegram-bot repo #91

Merged
merged 67 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
963c9f8
feat(client): client copied from telegram-bot repo
JumpLink Nov 22, 2024
a1bd87d
chore(client): Simplify build script
JumpLink Nov 22, 2024
5d19224
chore(client): Upgrade deno to 2.1.1 to fix build issues
JumpLink Nov 22, 2024
82074ef
fix(client): Fix browser test
JumpLink Nov 22, 2024
e5853e1
chore(github): Merged workflow common-check.yml into check.yml
JumpLink Nov 22, 2024
99e1fb1
chore(browser): Removed browser exports from package.json files
JumpLink Nov 22, 2024
628c23d
chore(client): type import
JumpLink Nov 22, 2024
78b7388
feat(client): Improved client usage and add example
JumpLink Nov 22, 2024
b239d0d
feat(client): Add basic e2e test package
JumpLink Nov 22, 2024
7e88a01
feat(e2e-api-test): Experimental github action
JumpLink Nov 22, 2024
f3c4b2c
Merged main into feat/client
JumpLink Nov 26, 2024
b2871ef
Merged feat/client into test/e2e-api
JumpLink Nov 26, 2024
ea64942
Merged main into feat/client
JumpLink Nov 26, 2024
583bc3f
Merge branch 'feat/client' into test/e2e-api
JumpLink Nov 26, 2024
36f5819
feat(client): Port contact api from frontend to client
JumpLink Nov 26, 2024
70be7c2
feat(client): Renamed client files to xyz.client.ts
JumpLink Nov 26, 2024
e48c05c
feat(client): Split contact into contact, contribution, payment and r…
JumpLink Nov 27, 2024
dda6d74
fieat(client): Port tag operations to client
JumpLink Nov 27, 2024
8e798e3
fix(lint): Fix vue formatting
JumpLink Nov 27, 2024
24bdc02
feat(client): Port callout response and callout reviewer to client
JumpLink Nov 27, 2024
6d4fc72
feat(client): Port api key to client
JumpLink Nov 27, 2024
56b7ea9
feat(client): Add documentations
JumpLink Nov 27, 2024
0b9e8e3
chore: Add references to tsconfig files
JumpLink Nov 27, 2024
113e944
chore: Add more references to tsconfig files
JumpLink Nov 27, 2024
9a7cf96
chore: Add composite to tsconfig files
JumpLink Nov 27, 2024
890a3c1
feat(client): Port auth to client
JumpLink Nov 27, 2024
0d51bf0
feat(client): Port email to client
JumpLink Nov 27, 2024
bb188f1
feat(client): Port notice to client
JumpLink Nov 27, 2024
4bb4558
feat(client): Port payment to client
JumpLink Nov 27, 2024
b717db7
fix: type builds for common and client
JumpLink Nov 27, 2024
e23992a
feat(client): Port reset-securrity to client
JumpLink Nov 27, 2024
a58ef60
feat(client): Add deprecated tags to old api methods
JumpLink Nov 27, 2024
027dadf
feat(client): Port segments to client
JumpLink Nov 28, 2024
15df5f3
feat(client): Port segments to client
JumpLink Nov 28, 2024
0b470c6
feat(client): Port signup to client and improved redirect url handling
JumpLink Nov 28, 2024
922b6ba
feat(client): Port stats to client and improved tag clients
JumpLink Nov 28, 2024
a5d55a8
feat(client): Port upload to client
JumpLink Nov 28, 2024
bc8458d
fix(client): Fix fetch param parsing
JumpLink Nov 28, 2024
436404c
feat(client): Removed github action for now
JumpLink Nov 28, 2024
86c9797
feat(client): Fix test
JumpLink Nov 28, 2024
bc8f5a9
fix(docker): Fix docker build + fix wrong typescript references
JumpLink Dec 3, 2024
9bb0c35
chore(deno): Remove deno
JumpLink Dec 3, 2024
aa8383c
chore(deno): Port client, client scripts and formatting to Node.js
JumpLink Dec 3, 2024
f73fa8f
fix: Frontend formatting
JumpLink Dec 3, 2024
70fa6ad
Merge branch 'test/e2e-api' into test/e2e-api-no-deno
JumpLink Dec 3, 2024
0301f0f
chore: Upgrade prettier to use the same version on all packages
JumpLink Dec 3, 2024
6445457
chore: Remove common cli tool
JumpLink Dec 3, 2024
3f85478
chore(deno): Readd common deno tests
JumpLink Dec 3, 2024
e9b489b
chore(deno): Moved deno common tests to node path
JumpLink Dec 3, 2024
0fff0f4
chore(deno): Port common deno tests to node+jest
JumpLink Dec 3, 2024
d2d40f6
chore: Fix express type issues (no idea where these suddenly come from)
JumpLink Dec 3, 2024
fafc8b5
chore: Upgrade yyyarn and fix docker image build
JumpLink Dec 3, 2024
b5b8ec8
feat(e2e-api-test): Add a basic auth setup
JumpLink Dec 3, 2024
3a2e5aa
feat(e2e-api-test): Moved e2e api tests to apps
JumpLink Dec 3, 2024
57db290
chore(vscode): Moved e2e api tests to apps
JumpLink Dec 3, 2024
1c388cb
chore(client): Make list query param optional
JumpLink Dec 3, 2024
69849ea
feat(e2e-api-test): Run tests with ESM
JumpLink Dec 3, 2024
b51b8e7
feat(e2e-api-test): Test contact list
JumpLink Dec 3, 2024
a197bdd
test(common); Fix jest test for common with ESM
JumpLink Dec 3, 2024
53da280
Merge pull request #100 from beabee-communityrm/test/e2e-api-no-deno-…
wpf500 Dec 5, 2024
2754982
Merge pull request #99 from beabee-communityrm/test/e2e-api-no-deno
wpf500 Dec 5, 2024
fb29fa0
Merge branch 'main' into feat/client
wpf500 Dec 18, 2024
d35cec7
Merge branch 'feat/client' into test/e2e-api
wpf500 Dec 18, 2024
87a83bf
Remove build and test from check flow
wpf500 Dec 18, 2024
187a47b
Merge pull request #92 from beabee-communityrm/test/e2e-api
wpf500 Dec 18, 2024
d3dc1f8
Remove RequestHandler casting
wpf500 Dec 18, 2024
3fccf76
Force Express types to stay on v4 until we upgrade
wpf500 Dec 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: yarn check
- run: yarn build
wpf500 marked this conversation as resolved.
Show resolved Hide resolved
- run: yarn test
51 changes: 0 additions & 51 deletions .github/workflows/common-check.yml

This file was deleted.

22 changes: 13 additions & 9 deletions .vscode/beabee.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,47 @@
"folders": [
{
"name": "ROOT",
"path": "../",
"path": ".."
},
{
"name": "apps/backend",
"path": "../apps/backend",
"path": "../apps/backend"
},
{
"name": "apps/frontend",
"path": "../apps/frontend",
"path": "../apps/frontend"
},
{
"name": "apps/legacy",
"path": "../apps/legacy",
},
{
"name": "apps/router",
"path": "../apps/router",
"path": "../apps/router"
},
{
"name": "apps/webhooks",
"path": "../apps/webhooks",
"path": "../apps/webhooks"
},
{
"name": "packages/common",
"path": "../packages/common",
"path": "../packages/common"
},
{
"name": "packages/core",
"path": "../packages/core",
"path": "../packages/core"
},
{
"name": "packages/client",
"path": "../packages/client"
},
{
"name": "packages/prettier-config",
"path": "../packages/prettier-config",
"path": "../packages/prettier-config"
},
{
"name": "packages/tsconfig",
"path": "../packages/tsconfig",
"path": "../packages/tsconfig"
}
],
"settings": {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You need the following tools installed on your machine:
- Docker Compose >= 2
- Node.js >= 20.10.0
- Yarn >= 1.22.22 (automatically uses the Yarn version from the repo)
- Deno >= 2.0.3
- Deno >= 2.1.1

### Initial Setup

Expand Down
1 change: 1 addition & 0 deletions apps/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ COPY .yarn /opt/.yarn

# Copy dependencies info
COPY packages/common/package.json /opt/packages/common/package.json
COPY packages/client/package.json /opt/packages/client/package.json
COPY apps/frontend/package.json /opt/apps/frontend/package.json

# Copy config files with dependencies info
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"serve": "vite preview",
"i18n": "node scripts/i18n.cjs $(git rev-parse --symbolic-full-name --abbrev-ref HEAD)",
"check": "yarn check:vue-tsc && yarn check:eslint && yarn check:prettier",
"check:vue-tsc": "vue-tsc --noEmit",
"check:vue-tsc": "node ../../node_modules/vue-tsc/index.js --noEmit",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was due to deno because it also stored the package.json packages in the node_modules folder. Should no longer be necessary with the removal of deno

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to this vuejs/language-tools#5020, I'll leave the temporary fix in for now.

"check:eslint": "eslint 'src/**/*.{ts,vue}'",
"check:prettier": "prettier -c .",
"format": "prettier --write .",
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/AppExpandableBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:class="
expanded ? 'relative rounded-b-none hover:bg-white' : 'bg-white/0'
"
@click="expanded = !expanded"
@click="(expanded = !expanded)"
>
{{ buttonText }}
<font-awesome-icon :icon="expanded ? faCaretUp : faCaretDown" />
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/button/AppDropdownButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:class="open ? '!rounded-b-none !bg-white' : ''"
:disabled="disabled"
:title="title"
@click="open = !open"
@click="(open = !open)"
>
<span v-if="showTitle">{{ title }} </span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
:icon="faPencil"
variant="primaryOutlined"
:title="t('actions.edit')"
@click="formVisible = !formVisible"
@click="(formVisible = !formVisible)"
/>
<AppButton
size="sm"
:icon="faTrash"
variant="danger"
:title="t('actions.delete')"
@click="showDeleteModal = true"
@click="(showDeleteModal = true)"
/>
</AppButtonGroup>
</div>
Expand All @@ -35,7 +35,7 @@
v-if="formVisible"
:comment="currentComment"
@submit="handleEditSubmit"
@cancel="formVisible = false"
@cancel="(formVisible = false)"
/>
<div v-else class="content-message" v-html="currentComment.text" />

Expand All @@ -45,7 +45,7 @@
:cancel="t('actions.noBack')"
:confirm="t('actions.yesDelete')"
variant="danger"
@close="showDeleteModal = false"
@close="(showDeleteModal = false)"
@confirm="handleDelete"
>
<p>{{ t('calloutResponseComments.confirmDelete.text') }}</p>
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/item-manager/ItemManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<ItemManagerForm
mode="add"
:data="itemToData(undefined)"
@cancel="formVisible = false"
@cancel="(formVisible = false)"
@save="handleAdd"
>
<template #default="{ data, mode }">
Expand All @@ -38,7 +38,7 @@
v-else
class="w-full"
variant="primaryOutlined"
@click="formVisible = true"
@click="(formVisible = true)"
>
{{ addButtonText }}
</AppButton>
Expand Down
8 changes: 4 additions & 4 deletions apps/frontend/src/components/item-manager/ItemManagerItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
v-if="!noUpdate"
size="sm"
variant="text"
@click="formVisible = !formVisible"
@click="(formVisible = !formVisible)"
>{{ t('actions.edit') }}</AppButton
>
<AppButton
size="sm"
variant="dangerText"
@click="showDeleteModal = true"
@click="(showDeleteModal = true)"
>
{{ t('actions.delete') }}
</AppButton>
Expand All @@ -26,7 +26,7 @@
class="p-4"
:data="itemToData(item)"
@save="handleUpdate"
@cancel="formVisible = false"
@cancel="(formVisible = false)"
>
<template #default="{ data, mode }">
<slot name="form" :data="data" :mode="mode" />
Expand All @@ -39,7 +39,7 @@
:cancel="t('actions.noBack')"
:confirm="t('actions.yesRemove')"
variant="danger"
@close="showDeleteModal = false"
@close="(showDeleteModal = false)"
@confirm="onDelete"
>
<p>{{ deleteText }}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
:slide-no="index"
:slides="slides"
:active="currentSlideId === element.id"
@select="currentSlideId = $event"
@select="(currentSlideId = $event)"
/>
</template>
</Draggable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AppModal
:open="showModal"
:title="t('advancedSearch.saveSegment.title')"
@close="showModal = false"
@close="(showModal = false)"
>
<p class="mb-4">
{{ t('advancedSearch.saveSegment.text') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<AppSelectableList
v-slot="{ item }"
:items="variantItems"
@click="currentVariant = $event.id"
@click="(currentVariant = $event.id)"
>
<font-awesome-icon :icon="faGlobe" class="mr-2" />{{ item.label }}
</AppSelectableList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:button-text="t('actions.changePassword')"
:reset-button-text="t('form.cancel')"
@submit="handleFormSubmit"
@reset="showForm = false"
@reset="(showForm = false)"
>
<div class="mb-4">
<AppInput
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/pages/profile/account/SetMFA.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
v-if="isEnabled"
variant="primaryOutlined"
:icon="faMobileAlt"
@click="showDisableConfirmModal = true"
@click="(showDisableConfirmModal = true)"
>
{{ t(`actions.disable`) }}
</AppButton>
Expand All @@ -30,7 +30,7 @@
v-else
variant="primaryOutlined"
:icon="faMobileAlt"
@click="showMFASettingsModal = !showMFASettingsModal"
@click="(showMFASettingsModal = !showMFASettingsModal)"
>
{{ t(`actions.enable`) }}
</AppButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<button
type="button"
class="flex-0 bg-primary-20 px-2"
@click="isRelative = !isRelative"
@click="(isRelative = !isRelative)"
>
<font-awesome-icon
:icon="isRelative ? faCircleArrowRight : faCircleDot"
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/layouts/menu/TheMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div
class="fixed bottom-0 left-menu right-0 top-0 z-30 h-full w-full cursor-pointer bg-black opacity-30"
:class="isMenuVisible ? 'block' : 'hidden'"
@click="isMenuVisible = false"
@click="(isMenuVisible = false)"
/>

<div class="flex cursor-pointer items-center" @click="toggleMenu">
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/admin/callouts/view/[id]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ meta:
>
{{ t('actions.reopen') }}
</ActionButton>
<ActionButton :icon="faTrash" @click="showDeleteModal = true">
<ActionButton :icon="faTrash" @click="(showDeleteModal = true)">
{{ t('actions.delete') }}
</ActionButton>
<AppConfirmDialog
Expand All @@ -91,7 +91,7 @@ meta:
:cancel="t('actions.noBack')"
:confirm="t('actions.yesDelete')"
variant="danger"
@close="showDeleteModal = false"
@close="(showDeleteModal = false)"
@confirm="confirmDeleteCallout"
>
<p>{{ t('calloutAdminOverview.actions.confirmDelete.text') }}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ meta:
size="sm"
variant="primaryOutlined"
class="ml-auto"
@click="editMode = !editMode"
@click="(editMode = !editMode)"
>
{{ t('actions.edit') }}
</AppButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ meta:
<AppSearch
v-model="currentRules"
:filter-groups="filterGroups"
@reset="currentRules = undefined"
@reset="(currentRules = undefined)"
>
<AppSelect
v-model="currentTag"
Expand Down Expand Up @@ -161,7 +161,7 @@ meta:
"
class="flex flex-col gap-2"
>
<TagList :tags="item.tags" @select="currentTag = $event" />
<TagList :tags="item.tags" @select="(currentTag = $event)" />
<p v-if="currentInlineComponent && item.answers">
<font-awesome-icon :icon="faUserPen" class="mr-2" />
<b>{{ t('calloutResponsesPage.showAnswer') }}:{{ ' ' }}</b>
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/admin/contacts/[id]/account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ meta:
<ActionButton
:icon="faTrash"
variant="danger"
@click="showDeleteModal = true"
@click="(showDeleteModal = true)"
>
{{ t('contactAccount.confirmDelete.title') }}
</ActionButton>
Expand All @@ -28,7 +28,7 @@ meta:
:cancel="t('actions.noBack')"
:confirm="t('actions.yesDelete')"
variant="danger"
@close="showDeleteModal = false"
@close="(showDeleteModal = false)"
@confirm="handleDelete"
>
<i18n-t
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/pages/admin/contacts/[id]/contribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ meta:
<ContactCancelContribution
:id="contact.id"
:contribution="contributionInfo"
@cancel="showCancelDialog = true"
@cancel="(showCancelDialog = true)"
/>
<AppConfirmDialog
:open="showCancelDialog"
:title="t('contactContribution.confirmCancel.title')"
:confirm="t('contactContribution.confirmCancel.confirm')"
:cancel="t('actions.noBack')"
@close="showCancelDialog = false"
@close="(showCancelDialog = false)"
@confirm="handleCancelContribution"
>
<p>{{ t('contactContribution.confirmCancel.text') }}</p>
Expand Down
Loading