@jh-tech/bff-update-feed-app-client 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/createClient.ts +12 -12
  2. package/dist/createClient.d.ts +8 -8
  3. package/dist/createClient.js +12 -12
  4. package/dist/methods/common/authentication.d.ts +7 -0
  5. package/dist/methods/common/authentication.js +25 -0
  6. package/dist/methods/common/collectionActions.d.ts +4 -0
  7. package/dist/methods/common/collectionActions.js +11 -0
  8. package/dist/methods/common/creatorActions.d.ts +4 -0
  9. package/dist/methods/common/creatorActions.js +11 -0
  10. package/dist/methods/common/projectActions.d.ts +4 -0
  11. package/dist/methods/common/projectActions.js +11 -0
  12. package/dist/methods/common/subscriptions.d.ts +4 -0
  13. package/dist/methods/common/subscriptions.js +9 -0
  14. package/dist/methods/common/user.d.ts +3 -0
  15. package/dist/methods/common/user.js +6 -0
  16. package/dist/methods/index.d.ts +12 -12
  17. package/dist/methods/index.js +12 -12
  18. package/dist/methods/pages/collectionPage.d.ts +3 -0
  19. package/dist/methods/pages/collectionPage.js +6 -0
  20. package/dist/methods/pages/creatorPage.d.ts +3 -0
  21. package/dist/methods/pages/creatorPage.js +6 -0
  22. package/dist/methods/pages/projectFeed.d.ts +3 -0
  23. package/dist/methods/pages/projectFeed.js +6 -0
  24. package/dist/methods/pages/projectPage.d.ts +3 -0
  25. package/dist/methods/pages/projectPage.js +6 -0
  26. package/dist/methods/pages/searchCreatorAndProject.d.ts +3 -0
  27. package/dist/methods/pages/searchCreatorAndProject.js +6 -0
  28. package/dist/methods/pages/updateFeed.d.ts +3 -0
  29. package/dist/methods/pages/updateFeed.js +6 -0
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/methods/common/authentication.ts +52 -0
  32. package/methods/common/collectionActions.ts +38 -0
  33. package/methods/common/creatorActions.ts +38 -0
  34. package/methods/common/projectActions.ts +38 -0
  35. package/methods/common/subscriptions.ts +34 -0
  36. package/methods/common/user.ts +15 -0
  37. package/methods/index.ts +12 -12
  38. package/methods/pages/collectionPage.ts +19 -0
  39. package/methods/pages/creatorPage.ts +15 -0
  40. package/methods/pages/projectFeed.ts +19 -0
  41. package/methods/pages/projectPage.ts +15 -0
  42. package/methods/pages/searchCreatorAndProject.ts +19 -0
  43. package/methods/pages/updateFeed.ts +19 -0
  44. package/package.json +5 -5
  45. package/methods/authentication.ts +0 -51
  46. package/methods/collectionActions.ts +0 -50
  47. package/methods/collectionPage.ts +0 -26
  48. package/methods/creatorActions.ts +0 -50
  49. package/methods/creatorPage.ts +0 -22
  50. package/methods/projectActions.ts +0 -50
  51. package/methods/projectFeed.ts +0 -25
  52. package/methods/projectPage.ts +0 -19
  53. package/methods/searchCreatorAndProject.ts +0 -23
  54. package/methods/subscriptions.ts +0 -48
  55. package/methods/updateFeed.ts +0 -25
  56. package/methods/user.ts +0 -24
@@ -0,0 +1,34 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const getSubscribedCreators = async (
7
+ userId: string,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<defs.GetSubscribedCreatorsDef.Response> =>
11
+ await contentRequest<defs.GetSubscribedCreatorsDef.Response>(
12
+ defs.GetSubscribedCreatorsDef.definition,
13
+ {
14
+ query: { userId },
15
+ },
16
+ serviceName,
17
+ baseUrl,
18
+ reqModifier,
19
+ )
20
+
21
+ export const getSubscribedProjects = async (
22
+ userId: string,
23
+ reqModifier: ProcessingMethods,
24
+ baseUrl: string,
25
+ ): Promise<defs.GetSubscribedProjectsDef.Response> =>
26
+ await contentRequest<defs.GetSubscribedProjectsDef.Response>(
27
+ defs.GetSubscribedProjectsDef.definition,
28
+ {
29
+ query: { userId },
30
+ },
31
+ serviceName,
32
+ baseUrl,
33
+ reqModifier,
34
+ )
@@ -0,0 +1,15 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const getUser = async (userId: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<defs.GetUserDef.Response> =>
7
+ await contentRequest<defs.GetUserDef.Response>(
8
+ defs.GetUserDef.definition,
9
+ {
10
+ query: { userId },
11
+ },
12
+ serviceName,
13
+ baseUrl,
14
+ reqModifier,
15
+ )
package/methods/index.ts CHANGED
@@ -1,12 +1,12 @@
1
- export { signIn, signUp } from './authentication.js'
2
- export * from './collectionActions.js'
3
- export { getCollectionPage } from './collectionPage.js'
4
- export { getCreatorPage } from './creatorPage.js'
5
- export { getProjectPage } from './projectPage.js'
6
- export { getUpdateFeed } from './updateFeed.js'
7
- export { searchCreatorAndProject } from './searchCreatorAndProject.js'
8
- export * from './creatorActions.js'
9
- export * from './projectActions.js'
10
- export * from './subscriptions.js'
11
- export * from './projectFeed.js'
12
- export * from './user.js'
1
+ export { signIn, signUp } from './common/authentication.js'
2
+ export * from './common/collectionActions.js'
3
+ export { getCollectionPage } from './pages/collectionPage.js'
4
+ export { getCreatorPage } from './pages/creatorPage.js'
5
+ export { getProjectPage } from './pages/projectPage.js'
6
+ export { getUpdateFeed } from './pages/updateFeed.js'
7
+ export { searchCreatorAndProject } from './pages/searchCreatorAndProject.js'
8
+ export * from './common/creatorActions.js'
9
+ export * from './common/projectActions.js'
10
+ export * from './common/subscriptions.js'
11
+ export * from './pages/projectFeed.js'
12
+ export * from './common/user.js'
@@ -0,0 +1,19 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const getCollectionPage = async (
7
+ collectionId: string,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<defs.GetCollectionPageDef.Response> =>
11
+ await contentRequest<defs.GetCollectionPageDef.Response>(
12
+ defs.GetCollectionPageDef.definition,
13
+ {
14
+ params: { collectionId },
15
+ },
16
+ serviceName,
17
+ baseUrl,
18
+ reqModifier,
19
+ )
@@ -0,0 +1,15 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const getCreatorPage = async (creatorId: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<defs.GetCreatorPageDef.Response> =>
7
+ await contentRequest<defs.GetCreatorPageDef.Response>(
8
+ defs.GetCreatorPageDef.definition,
9
+ {
10
+ params: { creatorId },
11
+ },
12
+ serviceName,
13
+ baseUrl,
14
+ reqModifier,
15
+ )
@@ -0,0 +1,19 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const getProjectFeed = async (
7
+ query: defs.GetProjectFeedDef.Query,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<defs.GetProjectFeedDef.Response> =>
11
+ await contentRequest<defs.GetProjectFeedDef.Response>(
12
+ defs.GetProjectFeedDef.definition,
13
+ {
14
+ query,
15
+ },
16
+ serviceName,
17
+ baseUrl,
18
+ reqModifier,
19
+ )
@@ -0,0 +1,15 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const getProjectPage = async (projectId: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<defs.GetProjectPageDef.Response> =>
7
+ await contentRequest<defs.GetProjectPageDef.Response>(
8
+ defs.GetProjectPageDef.definition,
9
+ {
10
+ params: { projectId },
11
+ },
12
+ serviceName,
13
+ baseUrl,
14
+ reqModifier,
15
+ )
@@ -0,0 +1,19 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const searchCreatorAndProject = async (
7
+ query: defs.SearchCreatorProjectDef.Query,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<defs.SearchCreatorProjectDef.Response> =>
11
+ await contentRequest<defs.SearchCreatorProjectDef.Response>(
12
+ defs.SearchCreatorProjectDef.definition,
13
+ {
14
+ query,
15
+ },
16
+ serviceName,
17
+ baseUrl,
18
+ reqModifier,
19
+ )
@@ -0,0 +1,19 @@
1
+ import * as defs from '@jh-tech/bff-update-feed-app-shared'
2
+ import { contentRequest, ProcessingMethods } from 'jh-be-tools'
3
+
4
+ import { serviceName } from '../const.js'
5
+
6
+ export const getUpdateFeed = async (
7
+ query: defs.GetUpdateFeedDef.Query,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<defs.GetUpdateFeedDef.Response> =>
11
+ await contentRequest<defs.GetUpdateFeedDef.Response>(
12
+ defs.GetUpdateFeedDef.definition,
13
+ {
14
+ query,
15
+ },
16
+ serviceName,
17
+ baseUrl,
18
+ reqModifier,
19
+ )
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@jh-tech/bff-update-feed-app-client",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "The bff solution for interfacing between the update feed ui and its backend systems",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "sideEffects": false,
8
8
  "dependencies": {
9
- "@jackhayes/util-types": "0.0.29",
9
+ "@jackhayes/util-types": "0.0.32",
10
10
  "axios": "^1.10.0",
11
11
  "dotenv": "^17.2.0",
12
- "jh-be-tools": "^1.0.83",
12
+ "jh-be-tools": "1.0.95",
13
13
  "zod": "^4.1.11",
14
- "@jh-tech/bff-update-feed-app-shared": "0.0.31"
14
+ "@jh-tech/bff-update-feed-app-shared": "0.0.32"
15
15
  },
16
16
  "author": "",
17
17
  "license": "ISC",
@@ -19,6 +19,6 @@
19
19
  "scripts": {
20
20
  "test": "jest --collect-coverage",
21
21
  "build": "npx tsc --build",
22
- "build:publish": "rm -rf ./dist && pnpm -r run build && pnpm version patch && pnpm publish --access public --no-git-checks"
22
+ "build:publish": "pnpm -r run build && pnpm version patch && pnpm publish --access public --no-git-checks"
23
23
  }
24
24
  }
@@ -1,51 +0,0 @@
1
- import { AuthSignInDef, AuthSignUpDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { ProcessingMethods, request } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const signIn = async (email: string, password: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<AuthSignInDef.Response> => {
7
- const queryData: AuthSignInDef.Request = {
8
- body: {
9
- data: {
10
- email,
11
- password,
12
- },
13
- },
14
- headers: {
15
- userId: '', // Dummy data
16
- },
17
- }
18
- const definition = AuthSignInDef.definition
19
-
20
- return await request<AuthSignInDef.Response>(
21
- {
22
- queryData,
23
- baseUrl,
24
- serviceName,
25
- definition,
26
- },
27
- reqModifier,
28
- )
29
- }
30
-
31
- export const signUp = async (email: string, password: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<AuthSignUpDef.Response> => {
32
- const queryData: AuthSignUpDef.Request = {
33
- body: {
34
- data: {
35
- email,
36
- password,
37
- },
38
- },
39
- }
40
- const definition = AuthSignUpDef.definition
41
-
42
- return await request<AuthSignUpDef.Response>(
43
- {
44
- queryData,
45
- baseUrl,
46
- serviceName,
47
- definition,
48
- },
49
- reqModifier,
50
- )
51
- }
@@ -1,50 +0,0 @@
1
- import { CollectionSubscribeDef, CollectionUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { request, ProcessingMethods } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const subscribeCollection = async (
7
- collectionId: string,
8
- userId: string,
9
- reqModifier: ProcessingMethods,
10
- baseUrl: string,
11
- ): Promise<CollectionSubscribeDef.Response> => {
12
- const definition = CollectionSubscribeDef.definition
13
- const queryData: CollectionSubscribeDef.Request = {
14
- query: { userId },
15
- params: { collectionId },
16
- }
17
-
18
- return await request<CollectionSubscribeDef.Response>(
19
- {
20
- queryData,
21
- baseUrl,
22
- serviceName,
23
- definition,
24
- },
25
- reqModifier,
26
- )
27
- }
28
-
29
- export const unsubscribeCollection = async (
30
- collectionId: string,
31
- userId: string,
32
- reqModifier: ProcessingMethods,
33
- baseUrl: string,
34
- ): Promise<CollectionUnsubscribeDef.Response> => {
35
- const definition = CollectionUnsubscribeDef.definition
36
- const queryData: CollectionUnsubscribeDef.Request = {
37
- query: { userId },
38
- params: { collectionId },
39
- }
40
-
41
- return await request<CollectionUnsubscribeDef.Response>(
42
- {
43
- queryData,
44
- baseUrl,
45
- serviceName,
46
- definition,
47
- },
48
- reqModifier,
49
- )
50
- }
@@ -1,26 +0,0 @@
1
- import { GetCollectionPageDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { request, ProcessingMethods } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const getCollectionPage = async (
7
- collectionId: string,
8
- reqModifier: ProcessingMethods,
9
- baseUrl: string,
10
- ): Promise<GetCollectionPageDef.Response> => {
11
- const queryData: GetCollectionPageDef.Request = {
12
- params: { collectionId },
13
- }
14
-
15
- const definition = GetCollectionPageDef.definition
16
-
17
- return await request<GetCollectionPageDef.Response>(
18
- {
19
- queryData: { ...queryData },
20
- baseUrl,
21
- serviceName,
22
- definition,
23
- },
24
- reqModifier,
25
- )
26
- }
@@ -1,50 +0,0 @@
1
- import { CreatorSubscribeDef, CreatorUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { request, ProcessingMethods } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const subscribeCreator = async (
7
- creatorId: string,
8
- userId: string,
9
- reqModifier: ProcessingMethods,
10
- baseUrl: string,
11
- ): Promise<CreatorSubscribeDef.Response> => {
12
- const definition = CreatorSubscribeDef.definition
13
- const queryData: CreatorSubscribeDef.Request = {
14
- query: { userId },
15
- params: { creatorId },
16
- }
17
-
18
- return await request<CreatorSubscribeDef.Response>(
19
- {
20
- queryData,
21
- baseUrl,
22
- serviceName,
23
- definition,
24
- },
25
- reqModifier,
26
- )
27
- }
28
-
29
- export const unsubscribeCreator = async (
30
- creatorId: string,
31
- userId: string,
32
- reqModifier: ProcessingMethods,
33
- baseUrl: string,
34
- ): Promise<CreatorUnsubscribeDef.Response> => {
35
- const definition = CreatorUnsubscribeDef.definition
36
- const queryData: CreatorUnsubscribeDef.Request = {
37
- query: { userId },
38
- params: { creatorId },
39
- }
40
-
41
- return await request<CreatorUnsubscribeDef.Response>(
42
- {
43
- queryData,
44
- baseUrl,
45
- serviceName,
46
- definition,
47
- },
48
- reqModifier,
49
- )
50
- }
@@ -1,22 +0,0 @@
1
- import { GetCreatorPageDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { request, ProcessingMethods } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const getCreatorPage = async (creatorId: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<GetCreatorPageDef.Response> => {
7
- const queryData: GetCreatorPageDef.Request = {
8
- params: { creatorId },
9
- }
10
-
11
- const definition = GetCreatorPageDef.definition
12
-
13
- return await request<GetCreatorPageDef.Response>(
14
- {
15
- queryData: { ...queryData },
16
- baseUrl,
17
- serviceName,
18
- definition,
19
- },
20
- reqModifier,
21
- )
22
- }
@@ -1,50 +0,0 @@
1
- import { ProjectSubscribeDef, ProjectUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { ProcessingMethods, request } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const subscribeProject = async (
7
- projectId: string,
8
- userId: string,
9
- reqModifier: ProcessingMethods,
10
- baseUrl: string,
11
- ): Promise<ProjectSubscribeDef.Response> => {
12
- const definition = ProjectSubscribeDef.definition
13
- const queryData: ProjectSubscribeDef.Request = {
14
- query: { userId },
15
- params: { projectId },
16
- }
17
-
18
- return await request<ProjectSubscribeDef.Response>(
19
- {
20
- queryData,
21
- baseUrl,
22
- serviceName,
23
- definition,
24
- },
25
- reqModifier,
26
- )
27
- }
28
-
29
- export const unsubscribeProject = async (
30
- projectId: string,
31
- userId: string,
32
- reqModifier: ProcessingMethods,
33
- baseUrl: string,
34
- ): Promise<ProjectUnsubscribeDef.Response> => {
35
- const definition = ProjectUnsubscribeDef.definition
36
- const queryData: ProjectUnsubscribeDef.Request = {
37
- query: { userId },
38
- params: { projectId },
39
- }
40
-
41
- return await request<ProjectUnsubscribeDef.Response>(
42
- {
43
- queryData,
44
- baseUrl,
45
- serviceName,
46
- definition,
47
- },
48
- reqModifier,
49
- )
50
- }
@@ -1,25 +0,0 @@
1
- import { GetProjectFeedDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { ProcessingMethods, request } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const getProjectFeed = async (
7
- query: GetProjectFeedDef.Query,
8
- reqModifier: ProcessingMethods,
9
- baseUrl: string,
10
- ): Promise<GetProjectFeedDef.Response> => {
11
- const queryData: GetProjectFeedDef.Request = {
12
- query,
13
- }
14
- const definition = GetProjectFeedDef.definition
15
-
16
- return await request<GetProjectFeedDef.Response>(
17
- {
18
- queryData,
19
- baseUrl,
20
- serviceName,
21
- definition,
22
- },
23
- reqModifier,
24
- )
25
- }
@@ -1,19 +0,0 @@
1
- import { GetProjectPageDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { ProcessingMethods, request } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const getProjectPage = async (projectId: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<GetProjectPageDef.Response> => {
7
- const queryData: GetProjectPageDef.Request = { params: { projectId } }
8
- const definition = GetProjectPageDef.definition
9
-
10
- return await request<GetProjectPageDef.Response>(
11
- {
12
- queryData,
13
- baseUrl,
14
- serviceName,
15
- definition,
16
- },
17
- reqModifier,
18
- )
19
- }
@@ -1,23 +0,0 @@
1
- import { SearchCreatorProjectDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { ProcessingMethods, request } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const searchCreatorAndProject = async (
7
- query: SearchCreatorProjectDef.Query,
8
- reqModifier: ProcessingMethods,
9
- baseUrl: string,
10
- ): Promise<SearchCreatorProjectDef.Response> => {
11
- const queryData: SearchCreatorProjectDef.Request = { query }
12
- const definition = SearchCreatorProjectDef.definition
13
-
14
- return await request<SearchCreatorProjectDef.Response>(
15
- {
16
- queryData,
17
- baseUrl,
18
- serviceName,
19
- definition,
20
- },
21
- reqModifier,
22
- )
23
- }
@@ -1,48 +0,0 @@
1
- import { GetSubscribedCreatorsDef, GetSubscribedProjectsDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { request, ProcessingMethods } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const getSubscribedCreators = async (
7
- userId: string,
8
- reqModifier: ProcessingMethods,
9
- baseUrl: string,
10
- ): Promise<GetSubscribedCreatorsDef.Response> => {
11
- const queryData: GetSubscribedCreatorsDef.Request = {
12
- query: { userId },
13
- }
14
-
15
- const definition = GetSubscribedCreatorsDef.definition
16
-
17
- return await request<GetSubscribedCreatorsDef.Response>(
18
- {
19
- queryData: { ...queryData },
20
- baseUrl,
21
- serviceName,
22
- definition,
23
- },
24
- reqModifier,
25
- )
26
- }
27
-
28
- export const getSubscribedProjects = async (
29
- userId: string,
30
- reqModifier: ProcessingMethods,
31
- baseUrl: string,
32
- ): Promise<GetSubscribedProjectsDef.Response> => {
33
- const queryData: GetSubscribedProjectsDef.Request = {
34
- query: { userId },
35
- }
36
-
37
- const definition = GetSubscribedProjectsDef.definition
38
-
39
- return await request<GetSubscribedProjectsDef.Response>(
40
- {
41
- queryData: { ...queryData },
42
- baseUrl,
43
- serviceName,
44
- definition,
45
- },
46
- reqModifier,
47
- )
48
- }
@@ -1,25 +0,0 @@
1
- import { GetUpdateFeedDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { ProcessingMethods, request } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const getUpdateFeed = async (
7
- query: GetUpdateFeedDef.Query,
8
- reqModifier: ProcessingMethods,
9
- baseUrl: string,
10
- ): Promise<GetUpdateFeedDef.Response> => {
11
- const queryData: GetUpdateFeedDef.Request = {
12
- query,
13
- }
14
- const definition = GetUpdateFeedDef.definition
15
-
16
- return await request<GetUpdateFeedDef.Response>(
17
- {
18
- queryData,
19
- baseUrl,
20
- serviceName,
21
- definition,
22
- },
23
- reqModifier,
24
- )
25
- }
package/methods/user.ts DELETED
@@ -1,24 +0,0 @@
1
- import { GetUserDef } from '@jh-tech/bff-update-feed-app-shared'
2
- import { ProcessingMethods, request } from 'jh-be-tools'
3
-
4
- import { serviceName } from './const.js'
5
-
6
- export const getUser = async (userId: string, reqModifier: ProcessingMethods, baseUrl: string) => {
7
- const definition = GetUserDef.definition
8
-
9
- const queryData: GetUserDef.Request = {
10
- query: {
11
- userId,
12
- },
13
- }
14
-
15
- return await request<GetUserDef.Response>(
16
- {
17
- queryData,
18
- baseUrl,
19
- serviceName,
20
- definition,
21
- },
22
- reqModifier,
23
- )
24
- }