@jh-tech/bff-update-feed-app-client 0.0.21 → 0.0.23

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 (44) hide show
  1. package/createClient.ts +42 -0
  2. package/dist/createClient.d.ts +221 -0
  3. package/dist/createClient.js +31 -0
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.js +1 -1
  6. package/dist/methods/authentication.d.ts +2 -2
  7. package/dist/methods/authentication.js +4 -4
  8. package/dist/methods/collectionActions.d.ts +2 -2
  9. package/dist/methods/collectionActions.js +4 -4
  10. package/dist/methods/collectionPage.d.ts +1 -1
  11. package/dist/methods/collectionPage.js +2 -2
  12. package/dist/methods/creatorActions.d.ts +2 -2
  13. package/dist/methods/creatorActions.js +4 -4
  14. package/dist/methods/creatorPage.d.ts +1 -1
  15. package/dist/methods/creatorPage.js +2 -2
  16. package/dist/methods/projectActions.d.ts +2 -2
  17. package/dist/methods/projectActions.js +4 -4
  18. package/dist/methods/projectFeed.d.ts +1 -1
  19. package/dist/methods/projectFeed.js +2 -2
  20. package/dist/methods/projectPage.d.ts +1 -1
  21. package/dist/methods/projectPage.js +2 -2
  22. package/dist/methods/searchCreatorAndProject.d.ts +1 -1
  23. package/dist/methods/searchCreatorAndProject.js +3 -3
  24. package/dist/methods/subscriptions.d.ts +2 -2
  25. package/dist/methods/subscriptions.js +4 -4
  26. package/dist/methods/updateFeed.d.ts +1 -1
  27. package/dist/methods/updateFeed.js +2 -2
  28. package/dist/methods/user.d.ts +1 -1
  29. package/dist/methods/user.js +2 -2
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/index.ts +2 -1
  32. package/methods/authentication.ts +4 -4
  33. package/methods/collectionActions.ts +4 -2
  34. package/methods/collectionPage.ts +6 -2
  35. package/methods/creatorActions.ts +9 -3
  36. package/methods/creatorPage.ts +2 -2
  37. package/methods/projectActions.ts +9 -3
  38. package/methods/projectFeed.ts +6 -2
  39. package/methods/projectPage.ts +2 -2
  40. package/methods/searchCreatorAndProject.ts +7 -3
  41. package/methods/subscriptions.ts +12 -4
  42. package/methods/updateFeed.ts +6 -2
  43. package/methods/user.ts +2 -2
  44. package/package.json +3 -3
@@ -3,7 +3,7 @@ import { request, ProcessingMethods } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const getCreatorPage = async (creatorId: string, reqModifier: ProcessingMethods): Promise<GetCreatorPageDef.Response> => {
6
+ export const getCreatorPage = async (creatorId: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<GetCreatorPageDef.Response> => {
7
7
  const queryData: GetCreatorPageDef.Request = {
8
8
  params: { creatorId },
9
9
  }
@@ -13,7 +13,7 @@ export const getCreatorPage = async (creatorId: string, reqModifier: ProcessingM
13
13
  return await request<GetCreatorPageDef.Response>(
14
14
  {
15
15
  queryData: { ...queryData },
16
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
16
+ baseUrl,
17
17
  serviceName,
18
18
  definition,
19
19
  },
@@ -3,7 +3,12 @@ import { ProcessingMethods, request } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const subscribeProject = async (projectId: string, userId: string, reqModifier: ProcessingMethods): Promise<ProjectSubscribeDef.Response> => {
6
+ export const subscribeProject = async (
7
+ projectId: string,
8
+ userId: string,
9
+ reqModifier: ProcessingMethods,
10
+ baseUrl: string,
11
+ ): Promise<ProjectSubscribeDef.Response> => {
7
12
  const definition = ProjectSubscribeDef.definition
8
13
  const queryData: ProjectSubscribeDef.Request = {
9
14
  query: { userId },
@@ -13,7 +18,7 @@ export const subscribeProject = async (projectId: string, userId: string, reqMod
13
18
  return await request<ProjectSubscribeDef.Response>(
14
19
  {
15
20
  queryData,
16
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
21
+ baseUrl,
17
22
  serviceName,
18
23
  definition,
19
24
  },
@@ -25,6 +30,7 @@ export const unsubscribeProject = async (
25
30
  projectId: string,
26
31
  userId: string,
27
32
  reqModifier: ProcessingMethods,
33
+ baseUrl: string,
28
34
  ): Promise<ProjectUnsubscribeDef.Response> => {
29
35
  const definition = ProjectUnsubscribeDef.definition
30
36
  const queryData: ProjectUnsubscribeDef.Request = {
@@ -35,7 +41,7 @@ export const unsubscribeProject = async (
35
41
  return await request<ProjectUnsubscribeDef.Response>(
36
42
  {
37
43
  queryData,
38
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
44
+ baseUrl,
39
45
  serviceName,
40
46
  definition,
41
47
  },
@@ -3,7 +3,11 @@ import { ProcessingMethods, request } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const getProjectFeed = async (query: GetProjectFeedDef.Query, reqModifier: ProcessingMethods): Promise<GetProjectFeedDef.Response> => {
6
+ export const getProjectFeed = async (
7
+ query: GetProjectFeedDef.Query,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<GetProjectFeedDef.Response> => {
7
11
  const queryData: GetProjectFeedDef.Request = {
8
12
  query,
9
13
  }
@@ -12,7 +16,7 @@ export const getProjectFeed = async (query: GetProjectFeedDef.Query, reqModifier
12
16
  return await request<GetProjectFeedDef.Response>(
13
17
  {
14
18
  queryData,
15
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
19
+ baseUrl,
16
20
  serviceName,
17
21
  definition,
18
22
  },
@@ -3,14 +3,14 @@ import { ProcessingMethods, request } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const getProjectPage = async (projectId: string, reqModifier: ProcessingMethods): Promise<GetProjectPageDef.Response> => {
6
+ export const getProjectPage = async (projectId: string, reqModifier: ProcessingMethods, baseUrl: string): Promise<GetProjectPageDef.Response> => {
7
7
  const queryData: GetProjectPageDef.Request = { params: { projectId } }
8
8
  const definition = GetProjectPageDef.definition
9
9
 
10
10
  return await request<GetProjectPageDef.Response>(
11
11
  {
12
12
  queryData,
13
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
13
+ baseUrl,
14
14
  serviceName,
15
15
  definition,
16
16
  },
@@ -3,14 +3,18 @@ import { ProcessingMethods, request } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const searchCreatorAndProject = async (search: string, reqModifier: ProcessingMethods): Promise<SearchCreatorProjectDef.Response> => {
7
- const queryData: SearchCreatorProjectDef.Request = { query: { search } }
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 }
8
12
  const definition = SearchCreatorProjectDef.definition
9
13
 
10
14
  return await request<SearchCreatorProjectDef.Response>(
11
15
  {
12
16
  queryData,
13
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
17
+ baseUrl,
14
18
  serviceName,
15
19
  definition,
16
20
  },
@@ -3,7 +3,11 @@ import { request, ProcessingMethods } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const getSubscribedCreators = async (userId: string, reqModifier: ProcessingMethods): Promise<GetSubscribedCreatorsDef.Response> => {
6
+ export const getSubscribedCreators = async (
7
+ userId: string,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<GetSubscribedCreatorsDef.Response> => {
7
11
  const queryData: GetSubscribedCreatorsDef.Request = {
8
12
  query: { userId },
9
13
  }
@@ -13,7 +17,7 @@ export const getSubscribedCreators = async (userId: string, reqModifier: Process
13
17
  return await request<GetSubscribedCreatorsDef.Response>(
14
18
  {
15
19
  queryData: { ...queryData },
16
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
20
+ baseUrl,
17
21
  serviceName,
18
22
  definition,
19
23
  },
@@ -21,7 +25,11 @@ export const getSubscribedCreators = async (userId: string, reqModifier: Process
21
25
  )
22
26
  }
23
27
 
24
- export const getSubscribedProjects = async (userId: string, reqModifier: ProcessingMethods): Promise<GetSubscribedProjectsDef.Response> => {
28
+ export const getSubscribedProjects = async (
29
+ userId: string,
30
+ reqModifier: ProcessingMethods,
31
+ baseUrl: string,
32
+ ): Promise<GetSubscribedProjectsDef.Response> => {
25
33
  const queryData: GetSubscribedProjectsDef.Request = {
26
34
  query: { userId },
27
35
  }
@@ -31,7 +39,7 @@ export const getSubscribedProjects = async (userId: string, reqModifier: Process
31
39
  return await request<GetSubscribedProjectsDef.Response>(
32
40
  {
33
41
  queryData: { ...queryData },
34
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
42
+ baseUrl,
35
43
  serviceName,
36
44
  definition,
37
45
  },
@@ -3,7 +3,11 @@ import { ProcessingMethods, request } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const getUpdateFeed = async (query: GetUpdateFeedDef.Query, reqModifier: ProcessingMethods): Promise<GetUpdateFeedDef.Response> => {
6
+ export const getUpdateFeed = async (
7
+ query: GetUpdateFeedDef.Query,
8
+ reqModifier: ProcessingMethods,
9
+ baseUrl: string,
10
+ ): Promise<GetUpdateFeedDef.Response> => {
7
11
  const queryData: GetUpdateFeedDef.Request = {
8
12
  query,
9
13
  }
@@ -12,7 +16,7 @@ export const getUpdateFeed = async (query: GetUpdateFeedDef.Query, reqModifier:
12
16
  return await request<GetUpdateFeedDef.Response>(
13
17
  {
14
18
  queryData,
15
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
19
+ baseUrl,
16
20
  serviceName,
17
21
  definition,
18
22
  },
package/methods/user.ts CHANGED
@@ -3,7 +3,7 @@ import { ProcessingMethods, request } from 'jh-be-tools'
3
3
 
4
4
  import { serviceName } from './const.js'
5
5
 
6
- export const getUser = async (userId: string, reqModifier: ProcessingMethods) => {
6
+ export const getUser = async (userId: string, reqModifier: ProcessingMethods, baseUrl: string) => {
7
7
  const definition = GetUserDef.definition
8
8
 
9
9
  const queryData: GetUserDef.Request = {
@@ -15,7 +15,7 @@ export const getUser = async (userId: string, reqModifier: ProcessingMethods) =>
15
15
  return await request<GetUserDef.Response>(
16
16
  {
17
17
  queryData,
18
- baseUrl: `${process.env.BFF_UPDATE_FEED}`,
18
+ baseUrl,
19
19
  serviceName,
20
20
  definition,
21
21
  },
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@jh-tech/bff-update-feed-app-client",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
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.24",
9
+ "@jackhayes/util-types": "^0.0.26",
10
10
  "axios": "^1.10.0",
11
11
  "dotenv": "^17.2.0",
12
12
  "jh-be-tools": "^1.0.83",
13
13
  "zod": "^4.1.11",
14
- "@jh-tech/bff-update-feed-app-shared": "0.0.21"
14
+ "@jh-tech/bff-update-feed-app-shared": "0.0.23"
15
15
  },
16
16
  "author": "",
17
17
  "license": "ISC",