Skip to content

Commit

Permalink
Merge pull request #35 from beabee-communityrm/feat/content-telegram
Browse files Browse the repository at this point in the history
Feat(content telegram): Make use of custom message stored in beabee
  • Loading branch information
JumpLink authored May 10, 2024
2 parents 189bb0e + fc34d80 commit ee9d3a8
Show file tree
Hide file tree
Showing 114 changed files with 307 additions and 816 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ jobs:
with:
deno-version: ${{ matrix.deno-version }}

- name: Verify formatting
run: deno task check

- name: Run linter
run: deno task lint

- name: Cache dependencies
run: deno task cache

- name: Build node and browser bundles
run: deno task build

- name: Verify formatting
run: deno task check

- name: Run linter
run: deno task lint

- name: Run tests
run: deno task test

2 changes: 1 addition & 1 deletion beabee-client/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test:node": "npm run test:node",
"test:web": "npm run test:web",
"lint": "deno lint mod.ts src",
"format": "deno fmt",
"format": "deno fmt src scripts test",
"check": "deno task check:types && deno task check:format",
"check:format": "deno task format --check",
"check:types": "deno check mod.ts",
Expand Down
2 changes: 1 addition & 1 deletion beabee-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions beabee-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
},
"scripts": {
"prepare": "npm run build",
"lint": "deno task lint",
"format": "deno task format",
"build": "deno task build",
"build:node": "deno task build:node",
"build:node:esm": "deno task build:node:esm",
Expand Down
7 changes: 4 additions & 3 deletions beabee-client/src/api/callout-client.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import { BaseClient } from "./base-client.ts";
import { cleanUrl } from "../utils/index.ts";

import type { BaseClientOptions } from "../types/index.ts";

import type {
BaseClientOptions,
CreateCalloutData,
GetCalloutData,
GetCalloutDataWith,
GetCalloutsQuery,
GetCalloutWith,
Paginated,
Serial,
UpdateCalloutData,
} from "../types/index.ts";
import type { Paginated } from "../deps.ts";
} from "../deps.ts";

export class CalloutClient extends BaseClient {
constructor(protected readonly options: BaseClientOptions) {
Expand Down
7 changes: 3 additions & 4 deletions beabee-client/src/api/callout-response-client.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { BaseClient } from "./base-client.ts";
import { cleanUrl } from "../utils/index.ts";

import type {
BaseClientOptions,
CreateCalloutResponseData,
} from "../types/index.ts";
import type { BaseClientOptions } from "../types/index.ts";

import type { CreateCalloutResponseData } from "../deps.ts";

export class CalloutResponseClient extends BaseClient {
constructor(protected readonly options: BaseClientOptions) {
Expand Down
12 changes: 8 additions & 4 deletions beabee-client/src/api/content-client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { BaseClient } from "./base-client.ts";
import { cleanUrl } from "../utils/index.ts";

import type { BaseClientOptions, Content, ContentId } from "../types/index.ts";
import type { BaseClientOptions } from "../types/index.ts";
import type { ContentData, ContentId } from "../deps.ts";

export class ContentClient extends BaseClient {
constructor(protected readonly options: BaseClientOptions) {
Expand All @@ -10,20 +11,23 @@ export class ContentClient extends BaseClient {
super(options);
}

protected deserialize<Id extends ContentId>(content: Content<Id>) {
protected deserialize<Id extends ContentId>(content: ContentData<Id>) {
return content;
}

async get<Id extends ContentId>(
id: Id,
) {
const { data } = await this.fetch.get<Content<Id>>(
const { data } = await this.fetch.get<ContentData<Id>>(
`/${id}`,
);
return this.deserialize(data);
}

async update<Id extends ContentId>(id: Id, content: Partial<Content<Id>>) {
async update<Id extends ContentId>(
id: Id,
content: Partial<ContentData<Id>>,
) {
return await this.fetch.patch(
`/${id}`,
content,
Expand Down
23 changes: 1 addition & 22 deletions beabee-client/src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
export type {
CalloutResponseAnswer,
CalloutResponseAnswerAddress,
CalloutResponseAnswerFileUpload,
CalloutResponseAnswers,
CalloutResponseAnswersSlide,
ContributionPeriod,
ContributionType,
GetCalloutFormSchema,
ItemStatus,
MembershipStatus,
NewsletterStatus,
Paginated,
PaginatedQuery,
PaymentMethod,
PaymentSource,
PaymentStatus,
RoleType,
RuleGroup,
SetCalloutFormSchema,
StripeFeeCountry,
} from "@beabee/beabee-common";
export type * from "@beabee/beabee-common";
6 changes: 0 additions & 6 deletions beabee-client/src/types/address.ts

This file was deleted.

7 changes: 0 additions & 7 deletions beabee-client/src/types/allow-null.ts

This file was deleted.

12 changes: 0 additions & 12 deletions beabee-client/src/types/callout-data.ts

This file was deleted.

11 changes: 0 additions & 11 deletions beabee-client/src/types/callout-map-schema.ts

This file was deleted.

6 changes: 0 additions & 6 deletions beabee-client/src/types/callout-response-comment-data.ts

This file was deleted.

11 changes: 0 additions & 11 deletions beabee-client/src/types/callout-response-view-schema.ts

This file was deleted.

7 changes: 0 additions & 7 deletions beabee-client/src/types/client-api-error-data.ts

This file was deleted.

7 changes: 0 additions & 7 deletions beabee-client/src/types/contact-data.ts

This file was deleted.

17 changes: 0 additions & 17 deletions beabee-client/src/types/contact-profile-data.ts

This file was deleted.

6 changes: 0 additions & 6 deletions beabee-client/src/types/contact-role-data.ts

This file was deleted.

4 changes: 0 additions & 4 deletions beabee-client/src/types/content-contacts.ts

This file was deleted.

5 changes: 0 additions & 5 deletions beabee-client/src/types/content-email.ts

This file was deleted.

32 changes: 0 additions & 32 deletions beabee-client/src/types/content-general.ts

This file was deleted.

8 changes: 0 additions & 8 deletions beabee-client/src/types/content-id.ts

This file was deleted.

14 changes: 0 additions & 14 deletions beabee-client/src/types/content-join-setup.ts

This file was deleted.

22 changes: 0 additions & 22 deletions beabee-client/src/types/content-join.ts

This file was deleted.

3 changes: 0 additions & 3 deletions beabee-client/src/types/content-profile.ts

This file was deleted.

6 changes: 0 additions & 6 deletions beabee-client/src/types/content-share.ts

This file was deleted.

19 changes: 0 additions & 19 deletions beabee-client/src/types/content.ts

This file was deleted.

20 changes: 0 additions & 20 deletions beabee-client/src/types/contribution-info.ts

This file was deleted.

4 changes: 0 additions & 4 deletions beabee-client/src/types/create-api-key-data.ts

This file was deleted.

Loading

0 comments on commit ee9d3a8

Please sign in to comment.