@jh-tech/bff-update-feed-app-client 0.0.22 → 0.0.24
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.
- package/createClient.ts +42 -0
- package/dist/createClient.d.ts +227 -0
- package/dist/createClient.js +31 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/methods/authentication.d.ts +2 -2
- package/dist/methods/authentication.js +4 -4
- package/dist/methods/collectionActions.d.ts +2 -2
- package/dist/methods/collectionActions.js +4 -4
- package/dist/methods/collectionPage.d.ts +1 -1
- package/dist/methods/collectionPage.js +2 -2
- package/dist/methods/creatorActions.d.ts +2 -2
- package/dist/methods/creatorActions.js +4 -4
- package/dist/methods/creatorPage.d.ts +1 -1
- package/dist/methods/creatorPage.js +2 -2
- package/dist/methods/projectActions.d.ts +2 -2
- package/dist/methods/projectActions.js +4 -4
- package/dist/methods/projectFeed.d.ts +1 -1
- package/dist/methods/projectFeed.js +2 -2
- package/dist/methods/projectPage.d.ts +1 -1
- package/dist/methods/projectPage.js +2 -2
- package/dist/methods/searchCreatorAndProject.d.ts +1 -1
- package/dist/methods/searchCreatorAndProject.js +2 -2
- package/dist/methods/subscriptions.d.ts +2 -2
- package/dist/methods/subscriptions.js +4 -4
- package/dist/methods/updateFeed.d.ts +1 -1
- package/dist/methods/updateFeed.js +2 -2
- package/dist/methods/user.d.ts +1 -1
- package/dist/methods/user.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/index.ts +2 -1
- package/methods/authentication.ts +4 -4
- package/methods/collectionActions.ts +4 -2
- package/methods/collectionPage.ts +6 -2
- package/methods/creatorActions.ts +9 -3
- package/methods/creatorPage.ts +2 -2
- package/methods/projectActions.ts +9 -3
- package/methods/projectFeed.ts +6 -2
- package/methods/projectPage.ts +2 -2
- package/methods/searchCreatorAndProject.ts +2 -1
- package/methods/subscriptions.ts +12 -4
- package/methods/updateFeed.ts +6 -2
- package/methods/user.ts +2 -2
- package/package.json +3 -3
package/createClient.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { GetProjectFeedDef, GetUpdateFeedDef, SearchCreatorProjectDef } from '@jh-tech/bff-update-feed-app-shared'
|
|
2
|
+
import { ProcessingMethods } from 'jh-be-tools'
|
|
3
|
+
|
|
4
|
+
import { signIn, signUp } from './methods/authentication.js'
|
|
5
|
+
import { subscribeCollection, unsubscribeCollection } from './methods/collectionActions.js'
|
|
6
|
+
import { getCollectionPage } from './methods/collectionPage.js'
|
|
7
|
+
import { subscribeCreator, unsubscribeCreator } from './methods/creatorActions.js'
|
|
8
|
+
import { getCreatorPage } from './methods/creatorPage.js'
|
|
9
|
+
import { subscribeProject, unsubscribeProject } from './methods/projectActions.js'
|
|
10
|
+
import { getProjectFeed } from './methods/projectFeed.js'
|
|
11
|
+
import { getProjectPage } from './methods/projectPage.js'
|
|
12
|
+
import { searchCreatorAndProject } from './methods/searchCreatorAndProject.js'
|
|
13
|
+
import { getSubscribedCreators, getSubscribedProjects } from './methods/subscriptions.js'
|
|
14
|
+
import { getUpdateFeed } from './methods/updateFeed.js'
|
|
15
|
+
import { getUser } from './methods/user.js'
|
|
16
|
+
|
|
17
|
+
export const createClient = (baseUrl: string) => ({
|
|
18
|
+
signIn: (email: string, password: string, reqModifier: ProcessingMethods) => signIn(email, password, reqModifier, baseUrl),
|
|
19
|
+
signUp: (email: string, password: string, reqModifier: ProcessingMethods) => signUp(email, password, reqModifier, baseUrl),
|
|
20
|
+
getCollectionPage: (collectionId: string, reqModifier: ProcessingMethods) => getCollectionPage(collectionId, reqModifier, baseUrl),
|
|
21
|
+
subscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods) =>
|
|
22
|
+
subscribeCollection(collectionId, userId, reqModifier, baseUrl),
|
|
23
|
+
unsubscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods) =>
|
|
24
|
+
unsubscribeCollection(collectionId, userId, reqModifier, baseUrl),
|
|
25
|
+
getCreatorPage: (creatorId: string, reqModifier: ProcessingMethods) => getCreatorPage(creatorId, reqModifier, baseUrl),
|
|
26
|
+
subscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods) => subscribeCreator(creatorId, userId, reqModifier, baseUrl),
|
|
27
|
+
unsubscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods) =>
|
|
28
|
+
unsubscribeCreator(creatorId, userId, reqModifier, baseUrl),
|
|
29
|
+
getProjectPage: (projectId: string, reqModifier: ProcessingMethods) => getProjectPage(projectId, reqModifier, baseUrl),
|
|
30
|
+
subscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods) => subscribeProject(projectId, userId, reqModifier, baseUrl),
|
|
31
|
+
unsubscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods) =>
|
|
32
|
+
unsubscribeProject(projectId, userId, reqModifier, baseUrl),
|
|
33
|
+
getProjectFeed: (query: GetProjectFeedDef.Query, reqModifier: ProcessingMethods) => getProjectFeed(query, reqModifier, baseUrl),
|
|
34
|
+
getUpdateFeed: (query: GetUpdateFeedDef.Query, reqModifier: ProcessingMethods) => getUpdateFeed(query, reqModifier, baseUrl),
|
|
35
|
+
searchCreatorAndProject: (query: SearchCreatorProjectDef.Query, reqModifier: ProcessingMethods) =>
|
|
36
|
+
searchCreatorAndProject(query, reqModifier, baseUrl),
|
|
37
|
+
getSubscribedCreators: (userId: string, reqModifier: ProcessingMethods) => getSubscribedCreators(userId, reqModifier, baseUrl),
|
|
38
|
+
getSubscribedProjects: (userId: string, reqModifier: ProcessingMethods) => getSubscribedProjects(userId, reqModifier, baseUrl),
|
|
39
|
+
getUser: (userId: string, reqModifier: ProcessingMethods) => getUser(userId, reqModifier, baseUrl),
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
export type BffClient = ReturnType<typeof createClient>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { GetProjectFeedDef, GetUpdateFeedDef, SearchCreatorProjectDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
|
+
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
+
export declare const createClient: (baseUrl: string) => {
|
|
4
|
+
signIn: (email: string, password: string, reqModifier: ProcessingMethods) => Promise<{
|
|
5
|
+
data: {
|
|
6
|
+
userId: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
9
|
+
signUp: (email: string, password: string, reqModifier: ProcessingMethods) => Promise<{
|
|
10
|
+
data: {
|
|
11
|
+
accessToken: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
15
|
+
getCollectionPage: (collectionId: string, reqModifier: ProcessingMethods) => Promise<{
|
|
16
|
+
data: {
|
|
17
|
+
items: {
|
|
18
|
+
collectionId: string;
|
|
19
|
+
createdAt: string;
|
|
20
|
+
title: string;
|
|
21
|
+
type: "movie" | "album" | "single" | "game" | "book" | "tv show" | "collection";
|
|
22
|
+
projectId?: string | undefined;
|
|
23
|
+
subCollectionId?: string | undefined;
|
|
24
|
+
}[];
|
|
25
|
+
collection: {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
subscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods) => Promise<import("@jh-tech/bff-update-feed-app-shared/dist/route-definitions/collection.subscribe.js").Response>;
|
|
34
|
+
unsubscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods) => Promise<import("@jh-tech/bff-update-feed-app-shared/dist/route-definitions/collection.unsubscribe.js").Response>;
|
|
35
|
+
getCreatorPage: (creatorId: string, reqModifier: ProcessingMethods) => Promise<{
|
|
36
|
+
data: {
|
|
37
|
+
projects: {
|
|
38
|
+
id: string;
|
|
39
|
+
title: string;
|
|
40
|
+
type: "movie" | "album" | "single" | "game" | "book" | "tv show";
|
|
41
|
+
createdAt: string;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
originalLanguage: "id" | "af" | "am" | "ar" | "bg" | "bn" | "ca" | "cs" | "cy" | "da" | "de" | "el" | "en" | "eo" | "es" | "fa" | "fi" | "fr" | "ga" | "he" | "hi" | "hr" | "hu" | "is" | "it" | "ja" | "ko" | "la" | "lb" | "mr" | "ms" | "mt" | "nl" | "no" | "pl" | "pt" | "ro" | "ru" | "sk" | "sr" | "sv" | "sw" | "ta" | "te" | "th" | "tl" | "tr" | "uk" | "ur" | "vi" | "zh";
|
|
44
|
+
originCountry: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "CV" | "KH" | "CM" | "CA" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "SZ" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MK" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
45
|
+
description?: string | undefined;
|
|
46
|
+
releaseDate?: string | undefined;
|
|
47
|
+
}[];
|
|
48
|
+
creator: {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
primaryRole: "studio" | "director" | "writer" | "actor" | "band" | "author" | "publisher" | "developer";
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
description?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
subscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods) => Promise<import("@jh-tech/bff-update-feed-app-shared/dist/route-definitions/creator.subscribe.js").Response>;
|
|
59
|
+
unsubscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods) => Promise<import("@jh-tech/bff-update-feed-app-shared/dist/route-definitions/creator.unsubscribe.js").Response>;
|
|
60
|
+
getProjectPage: (projectId: string, reqModifier: ProcessingMethods) => Promise<{
|
|
61
|
+
data: {
|
|
62
|
+
updates: {
|
|
63
|
+
id: string;
|
|
64
|
+
title: string;
|
|
65
|
+
links: string[];
|
|
66
|
+
projectId: string;
|
|
67
|
+
publishedAt: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
}[];
|
|
70
|
+
project: {
|
|
71
|
+
id: string;
|
|
72
|
+
title: string;
|
|
73
|
+
type: "movie" | "album" | "single" | "game" | "book" | "tv show";
|
|
74
|
+
createdAt: string;
|
|
75
|
+
updatedAt: string;
|
|
76
|
+
originalLanguage: "id" | "af" | "am" | "ar" | "bg" | "bn" | "ca" | "cs" | "cy" | "da" | "de" | "el" | "en" | "eo" | "es" | "fa" | "fi" | "fr" | "ga" | "he" | "hi" | "hr" | "hu" | "is" | "it" | "ja" | "ko" | "la" | "lb" | "mr" | "ms" | "mt" | "nl" | "no" | "pl" | "pt" | "ro" | "ru" | "sk" | "sr" | "sv" | "sw" | "ta" | "te" | "th" | "tl" | "tr" | "uk" | "ur" | "vi" | "zh";
|
|
77
|
+
originCountry: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "CV" | "KH" | "CM" | "CA" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "SZ" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MK" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
78
|
+
description?: string | undefined;
|
|
79
|
+
releaseDate?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
creators: {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
role: "studio" | "director" | "writer" | "actor" | "band" | "author" | "publisher" | "developer";
|
|
85
|
+
primary: boolean;
|
|
86
|
+
}[];
|
|
87
|
+
};
|
|
88
|
+
}>;
|
|
89
|
+
subscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods) => Promise<import("@jh-tech/bff-update-feed-app-shared/dist/route-definitions/project.subscribe.js").Response>;
|
|
90
|
+
unsubscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods) => Promise<import("@jh-tech/bff-update-feed-app-shared/dist/route-definitions/project.unsubscribe.js").Response>;
|
|
91
|
+
getProjectFeed: (query: GetProjectFeedDef.Query, reqModifier: ProcessingMethods) => Promise<{
|
|
92
|
+
data: {
|
|
93
|
+
id: string;
|
|
94
|
+
type: "project";
|
|
95
|
+
title: string;
|
|
96
|
+
projectType: "movie" | "album" | "single" | "game" | "book" | "tv show";
|
|
97
|
+
primaryCreators: {
|
|
98
|
+
id: string;
|
|
99
|
+
name: string;
|
|
100
|
+
type: "collection" | "creator" | "project";
|
|
101
|
+
}[];
|
|
102
|
+
subscribedCreators: {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
type: "collection" | "creator" | "project";
|
|
106
|
+
}[];
|
|
107
|
+
collections: {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
type: "collection" | "creator" | "project";
|
|
111
|
+
}[];
|
|
112
|
+
createdAt: string;
|
|
113
|
+
}[];
|
|
114
|
+
meta?: {
|
|
115
|
+
cursor?: string | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
}>;
|
|
118
|
+
getUpdateFeed: (query: GetUpdateFeedDef.Query, reqModifier: ProcessingMethods) => Promise<{
|
|
119
|
+
data: ({
|
|
120
|
+
id: string;
|
|
121
|
+
type: "update";
|
|
122
|
+
title: string;
|
|
123
|
+
links: string[];
|
|
124
|
+
projectType: "movie" | "album" | "single" | "game" | "book" | "tv show";
|
|
125
|
+
project: {
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
type: "collection" | "creator" | "project";
|
|
129
|
+
};
|
|
130
|
+
primaryCreators: {
|
|
131
|
+
id: string;
|
|
132
|
+
name: string;
|
|
133
|
+
type: "collection" | "creator" | "project";
|
|
134
|
+
}[];
|
|
135
|
+
subscribedCreators: {
|
|
136
|
+
id: string;
|
|
137
|
+
name: string;
|
|
138
|
+
type: "collection" | "creator" | "project";
|
|
139
|
+
}[];
|
|
140
|
+
createdAt: string;
|
|
141
|
+
} | {
|
|
142
|
+
id: string;
|
|
143
|
+
type: "project";
|
|
144
|
+
title: string;
|
|
145
|
+
projectType: "movie" | "album" | "single" | "game" | "book" | "tv show";
|
|
146
|
+
primaryCreators: {
|
|
147
|
+
id: string;
|
|
148
|
+
name: string;
|
|
149
|
+
type: "collection" | "creator" | "project";
|
|
150
|
+
}[];
|
|
151
|
+
subscribedCreators: {
|
|
152
|
+
id: string;
|
|
153
|
+
name: string;
|
|
154
|
+
type: "collection" | "creator" | "project";
|
|
155
|
+
}[];
|
|
156
|
+
collections: {
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
type: "collection" | "creator" | "project";
|
|
160
|
+
}[];
|
|
161
|
+
createdAt: string;
|
|
162
|
+
} | {
|
|
163
|
+
id: string;
|
|
164
|
+
type: "collection";
|
|
165
|
+
name: string;
|
|
166
|
+
collection: {
|
|
167
|
+
id: string;
|
|
168
|
+
name: string;
|
|
169
|
+
type: "collection" | "creator" | "project";
|
|
170
|
+
};
|
|
171
|
+
createdAt: string;
|
|
172
|
+
})[];
|
|
173
|
+
meta?: {
|
|
174
|
+
cursor?: string | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
searchCreatorAndProject: (query: SearchCreatorProjectDef.Query, reqModifier: ProcessingMethods) => Promise<{
|
|
178
|
+
data: {
|
|
179
|
+
name: string;
|
|
180
|
+
creatorId?: string | undefined;
|
|
181
|
+
projectId?: string | undefined;
|
|
182
|
+
collectionId?: string | undefined;
|
|
183
|
+
projectType?: "movie" | "album" | "single" | "game" | "book" | "tv show" | undefined;
|
|
184
|
+
creatorRole?: "studio" | "director" | "writer" | "actor" | "band" | "author" | "publisher" | "developer" | undefined;
|
|
185
|
+
}[];
|
|
186
|
+
meta?: {
|
|
187
|
+
cursor?: string | undefined;
|
|
188
|
+
} | undefined;
|
|
189
|
+
}>;
|
|
190
|
+
getSubscribedCreators: (userId: string, reqModifier: ProcessingMethods) => Promise<{
|
|
191
|
+
data: {
|
|
192
|
+
creators: {
|
|
193
|
+
id: string;
|
|
194
|
+
name: string;
|
|
195
|
+
primaryRole: "studio" | "director" | "writer" | "actor" | "band" | "author" | "publisher" | "developer";
|
|
196
|
+
createdAt: string;
|
|
197
|
+
updatedAt: string;
|
|
198
|
+
description?: string | undefined;
|
|
199
|
+
}[];
|
|
200
|
+
};
|
|
201
|
+
}>;
|
|
202
|
+
getSubscribedProjects: (userId: string, reqModifier: ProcessingMethods) => Promise<{
|
|
203
|
+
data: {
|
|
204
|
+
projects: {
|
|
205
|
+
id: string;
|
|
206
|
+
title: string;
|
|
207
|
+
type: "movie" | "album" | "single" | "game" | "book" | "tv show";
|
|
208
|
+
createdAt: string;
|
|
209
|
+
updatedAt: string;
|
|
210
|
+
originalLanguage: "id" | "af" | "am" | "ar" | "bg" | "bn" | "ca" | "cs" | "cy" | "da" | "de" | "el" | "en" | "eo" | "es" | "fa" | "fi" | "fr" | "ga" | "he" | "hi" | "hr" | "hu" | "is" | "it" | "ja" | "ko" | "la" | "lb" | "mr" | "ms" | "mt" | "nl" | "no" | "pl" | "pt" | "ro" | "ru" | "sk" | "sr" | "sv" | "sw" | "ta" | "te" | "th" | "tl" | "tr" | "uk" | "ur" | "vi" | "zh";
|
|
211
|
+
originCountry: "AF" | "AX" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "CV" | "KH" | "CM" | "CA" | "KY" | "CF" | "TD" | "CL" | "CN" | "CX" | "CC" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CW" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "SZ" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "TF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GG" | "GN" | "GW" | "GY" | "HT" | "HM" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MK" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PT" | "PR" | "QA" | "RE" | "RO" | "RU" | "RW" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SB" | "SO" | "ZA" | "GS" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "UM" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "EH" | "YE" | "ZM" | "ZW";
|
|
212
|
+
description?: string | undefined;
|
|
213
|
+
releaseDate?: string | undefined;
|
|
214
|
+
}[];
|
|
215
|
+
};
|
|
216
|
+
}>;
|
|
217
|
+
getUser: (userId: string, reqModifier: ProcessingMethods) => Promise<{
|
|
218
|
+
data: {
|
|
219
|
+
subscriptions: {
|
|
220
|
+
projectIds: string[];
|
|
221
|
+
creatorIds: string[];
|
|
222
|
+
collectionIds: string[];
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
}>;
|
|
226
|
+
};
|
|
227
|
+
export type BffClient = ReturnType<typeof createClient>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { signIn, signUp } from './methods/authentication.js';
|
|
2
|
+
import { subscribeCollection, unsubscribeCollection } from './methods/collectionActions.js';
|
|
3
|
+
import { getCollectionPage } from './methods/collectionPage.js';
|
|
4
|
+
import { subscribeCreator, unsubscribeCreator } from './methods/creatorActions.js';
|
|
5
|
+
import { getCreatorPage } from './methods/creatorPage.js';
|
|
6
|
+
import { subscribeProject, unsubscribeProject } from './methods/projectActions.js';
|
|
7
|
+
import { getProjectFeed } from './methods/projectFeed.js';
|
|
8
|
+
import { getProjectPage } from './methods/projectPage.js';
|
|
9
|
+
import { searchCreatorAndProject } from './methods/searchCreatorAndProject.js';
|
|
10
|
+
import { getSubscribedCreators, getSubscribedProjects } from './methods/subscriptions.js';
|
|
11
|
+
import { getUpdateFeed } from './methods/updateFeed.js';
|
|
12
|
+
import { getUser } from './methods/user.js';
|
|
13
|
+
export const createClient = (baseUrl) => ({
|
|
14
|
+
signIn: (email, password, reqModifier) => signIn(email, password, reqModifier, baseUrl),
|
|
15
|
+
signUp: (email, password, reqModifier) => signUp(email, password, reqModifier, baseUrl),
|
|
16
|
+
getCollectionPage: (collectionId, reqModifier) => getCollectionPage(collectionId, reqModifier, baseUrl),
|
|
17
|
+
subscribeCollection: (collectionId, userId, reqModifier) => subscribeCollection(collectionId, userId, reqModifier, baseUrl),
|
|
18
|
+
unsubscribeCollection: (collectionId, userId, reqModifier) => unsubscribeCollection(collectionId, userId, reqModifier, baseUrl),
|
|
19
|
+
getCreatorPage: (creatorId, reqModifier) => getCreatorPage(creatorId, reqModifier, baseUrl),
|
|
20
|
+
subscribeCreator: (creatorId, userId, reqModifier) => subscribeCreator(creatorId, userId, reqModifier, baseUrl),
|
|
21
|
+
unsubscribeCreator: (creatorId, userId, reqModifier) => unsubscribeCreator(creatorId, userId, reqModifier, baseUrl),
|
|
22
|
+
getProjectPage: (projectId, reqModifier) => getProjectPage(projectId, reqModifier, baseUrl),
|
|
23
|
+
subscribeProject: (projectId, userId, reqModifier) => subscribeProject(projectId, userId, reqModifier, baseUrl),
|
|
24
|
+
unsubscribeProject: (projectId, userId, reqModifier) => unsubscribeProject(projectId, userId, reqModifier, baseUrl),
|
|
25
|
+
getProjectFeed: (query, reqModifier) => getProjectFeed(query, reqModifier, baseUrl),
|
|
26
|
+
getUpdateFeed: (query, reqModifier) => getUpdateFeed(query, reqModifier, baseUrl),
|
|
27
|
+
searchCreatorAndProject: (query, reqModifier) => searchCreatorAndProject(query, reqModifier, baseUrl),
|
|
28
|
+
getSubscribedCreators: (userId, reqModifier) => getSubscribedCreators(userId, reqModifier, baseUrl),
|
|
29
|
+
getSubscribedProjects: (userId, reqModifier) => getSubscribedProjects(userId, reqModifier, baseUrl),
|
|
30
|
+
getUser: (userId, reqModifier) => getUser(userId, reqModifier, baseUrl),
|
|
31
|
+
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { createClient } from './createClient.js';
|
|
2
2
|
export * from '@jh-tech/bff-update-feed-app-shared';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AuthSignInDef, AuthSignUpDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const signIn: (email: string, password: string, reqModifier: ProcessingMethods) => Promise<AuthSignInDef.Response>;
|
|
4
|
-
export declare const signUp: (email: string, password: string, reqModifier: ProcessingMethods) => Promise<AuthSignUpDef.Response>;
|
|
3
|
+
export declare const signIn: (email: string, password: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<AuthSignInDef.Response>;
|
|
4
|
+
export declare const signUp: (email: string, password: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<AuthSignUpDef.Response>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthSignInDef, AuthSignUpDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const signIn = async (email, password, reqModifier) => {
|
|
4
|
+
export const signIn = async (email, password, reqModifier, baseUrl) => {
|
|
5
5
|
const queryData = {
|
|
6
6
|
body: {
|
|
7
7
|
data: {
|
|
@@ -16,12 +16,12 @@ export const signIn = async (email, password, reqModifier) => {
|
|
|
16
16
|
const definition = AuthSignInDef.definition;
|
|
17
17
|
return await request({
|
|
18
18
|
queryData,
|
|
19
|
-
baseUrl
|
|
19
|
+
baseUrl,
|
|
20
20
|
serviceName,
|
|
21
21
|
definition,
|
|
22
22
|
}, reqModifier);
|
|
23
23
|
};
|
|
24
|
-
export const signUp = async (email, password, reqModifier) => {
|
|
24
|
+
export const signUp = async (email, password, reqModifier, baseUrl) => {
|
|
25
25
|
const queryData = {
|
|
26
26
|
body: {
|
|
27
27
|
data: {
|
|
@@ -33,7 +33,7 @@ export const signUp = async (email, password, reqModifier) => {
|
|
|
33
33
|
const definition = AuthSignUpDef.definition;
|
|
34
34
|
return await request({
|
|
35
35
|
queryData,
|
|
36
|
-
baseUrl
|
|
36
|
+
baseUrl,
|
|
37
37
|
serviceName,
|
|
38
38
|
definition,
|
|
39
39
|
}, reqModifier);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CollectionSubscribeDef, CollectionUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const subscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods) => Promise<CollectionSubscribeDef.Response>;
|
|
4
|
-
export declare const unsubscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods) => Promise<CollectionUnsubscribeDef.Response>;
|
|
3
|
+
export declare const subscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<CollectionSubscribeDef.Response>;
|
|
4
|
+
export declare const unsubscribeCollection: (collectionId: string, userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<CollectionUnsubscribeDef.Response>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CollectionSubscribeDef, CollectionUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const subscribeCollection = async (collectionId, userId, reqModifier) => {
|
|
4
|
+
export const subscribeCollection = async (collectionId, userId, reqModifier, baseUrl) => {
|
|
5
5
|
const definition = CollectionSubscribeDef.definition;
|
|
6
6
|
const queryData = {
|
|
7
7
|
query: { userId },
|
|
@@ -9,12 +9,12 @@ export const subscribeCollection = async (collectionId, userId, reqModifier) =>
|
|
|
9
9
|
};
|
|
10
10
|
return await request({
|
|
11
11
|
queryData,
|
|
12
|
-
baseUrl
|
|
12
|
+
baseUrl,
|
|
13
13
|
serviceName,
|
|
14
14
|
definition,
|
|
15
15
|
}, reqModifier);
|
|
16
16
|
};
|
|
17
|
-
export const unsubscribeCollection = async (collectionId, userId, reqModifier) => {
|
|
17
|
+
export const unsubscribeCollection = async (collectionId, userId, reqModifier, baseUrl) => {
|
|
18
18
|
const definition = CollectionUnsubscribeDef.definition;
|
|
19
19
|
const queryData = {
|
|
20
20
|
query: { userId },
|
|
@@ -22,7 +22,7 @@ export const unsubscribeCollection = async (collectionId, userId, reqModifier) =
|
|
|
22
22
|
};
|
|
23
23
|
return await request({
|
|
24
24
|
queryData,
|
|
25
|
-
baseUrl
|
|
25
|
+
baseUrl,
|
|
26
26
|
serviceName,
|
|
27
27
|
definition,
|
|
28
28
|
}, reqModifier);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GetCollectionPageDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const getCollectionPage: (collectionId: string, reqModifier: ProcessingMethods) => Promise<GetCollectionPageDef.Response>;
|
|
3
|
+
export declare const getCollectionPage: (collectionId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<GetCollectionPageDef.Response>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { GetCollectionPageDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const getCollectionPage = async (collectionId, reqModifier) => {
|
|
4
|
+
export const getCollectionPage = async (collectionId, reqModifier, baseUrl) => {
|
|
5
5
|
const queryData = {
|
|
6
6
|
params: { collectionId },
|
|
7
7
|
};
|
|
8
8
|
const definition = GetCollectionPageDef.definition;
|
|
9
9
|
return await request({
|
|
10
10
|
queryData: { ...queryData },
|
|
11
|
-
baseUrl
|
|
11
|
+
baseUrl,
|
|
12
12
|
serviceName,
|
|
13
13
|
definition,
|
|
14
14
|
}, reqModifier);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CreatorSubscribeDef, CreatorUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const subscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods) => Promise<CreatorSubscribeDef.Response>;
|
|
4
|
-
export declare const unsubscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods) => Promise<CreatorUnsubscribeDef.Response>;
|
|
3
|
+
export declare const subscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<CreatorSubscribeDef.Response>;
|
|
4
|
+
export declare const unsubscribeCreator: (creatorId: string, userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<CreatorUnsubscribeDef.Response>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreatorSubscribeDef, CreatorUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const subscribeCreator = async (creatorId, userId, reqModifier) => {
|
|
4
|
+
export const subscribeCreator = async (creatorId, userId, reqModifier, baseUrl) => {
|
|
5
5
|
const definition = CreatorSubscribeDef.definition;
|
|
6
6
|
const queryData = {
|
|
7
7
|
query: { userId },
|
|
@@ -9,12 +9,12 @@ export const subscribeCreator = async (creatorId, userId, reqModifier) => {
|
|
|
9
9
|
};
|
|
10
10
|
return await request({
|
|
11
11
|
queryData,
|
|
12
|
-
baseUrl
|
|
12
|
+
baseUrl,
|
|
13
13
|
serviceName,
|
|
14
14
|
definition,
|
|
15
15
|
}, reqModifier);
|
|
16
16
|
};
|
|
17
|
-
export const unsubscribeCreator = async (creatorId, userId, reqModifier) => {
|
|
17
|
+
export const unsubscribeCreator = async (creatorId, userId, reqModifier, baseUrl) => {
|
|
18
18
|
const definition = CreatorUnsubscribeDef.definition;
|
|
19
19
|
const queryData = {
|
|
20
20
|
query: { userId },
|
|
@@ -22,7 +22,7 @@ export const unsubscribeCreator = async (creatorId, userId, reqModifier) => {
|
|
|
22
22
|
};
|
|
23
23
|
return await request({
|
|
24
24
|
queryData,
|
|
25
|
-
baseUrl
|
|
25
|
+
baseUrl,
|
|
26
26
|
serviceName,
|
|
27
27
|
definition,
|
|
28
28
|
}, reqModifier);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GetCreatorPageDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const getCreatorPage: (creatorId: string, reqModifier: ProcessingMethods) => Promise<GetCreatorPageDef.Response>;
|
|
3
|
+
export declare const getCreatorPage: (creatorId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<GetCreatorPageDef.Response>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { GetCreatorPageDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const getCreatorPage = async (creatorId, reqModifier) => {
|
|
4
|
+
export const getCreatorPage = async (creatorId, reqModifier, baseUrl) => {
|
|
5
5
|
const queryData = {
|
|
6
6
|
params: { creatorId },
|
|
7
7
|
};
|
|
8
8
|
const definition = GetCreatorPageDef.definition;
|
|
9
9
|
return await request({
|
|
10
10
|
queryData: { ...queryData },
|
|
11
|
-
baseUrl
|
|
11
|
+
baseUrl,
|
|
12
12
|
serviceName,
|
|
13
13
|
definition,
|
|
14
14
|
}, reqModifier);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ProjectSubscribeDef, ProjectUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const subscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods) => Promise<ProjectSubscribeDef.Response>;
|
|
4
|
-
export declare const unsubscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods) => Promise<ProjectUnsubscribeDef.Response>;
|
|
3
|
+
export declare const subscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<ProjectSubscribeDef.Response>;
|
|
4
|
+
export declare const unsubscribeProject: (projectId: string, userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<ProjectUnsubscribeDef.Response>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProjectSubscribeDef, ProjectUnsubscribeDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const subscribeProject = async (projectId, userId, reqModifier) => {
|
|
4
|
+
export const subscribeProject = async (projectId, userId, reqModifier, baseUrl) => {
|
|
5
5
|
const definition = ProjectSubscribeDef.definition;
|
|
6
6
|
const queryData = {
|
|
7
7
|
query: { userId },
|
|
@@ -9,12 +9,12 @@ export const subscribeProject = async (projectId, userId, reqModifier) => {
|
|
|
9
9
|
};
|
|
10
10
|
return await request({
|
|
11
11
|
queryData,
|
|
12
|
-
baseUrl
|
|
12
|
+
baseUrl,
|
|
13
13
|
serviceName,
|
|
14
14
|
definition,
|
|
15
15
|
}, reqModifier);
|
|
16
16
|
};
|
|
17
|
-
export const unsubscribeProject = async (projectId, userId, reqModifier) => {
|
|
17
|
+
export const unsubscribeProject = async (projectId, userId, reqModifier, baseUrl) => {
|
|
18
18
|
const definition = ProjectUnsubscribeDef.definition;
|
|
19
19
|
const queryData = {
|
|
20
20
|
query: { userId },
|
|
@@ -22,7 +22,7 @@ export const unsubscribeProject = async (projectId, userId, reqModifier) => {
|
|
|
22
22
|
};
|
|
23
23
|
return await request({
|
|
24
24
|
queryData,
|
|
25
|
-
baseUrl
|
|
25
|
+
baseUrl,
|
|
26
26
|
serviceName,
|
|
27
27
|
definition,
|
|
28
28
|
}, reqModifier);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GetProjectFeedDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const getProjectFeed: (query: GetProjectFeedDef.Query, reqModifier: ProcessingMethods) => Promise<GetProjectFeedDef.Response>;
|
|
3
|
+
export declare const getProjectFeed: (query: GetProjectFeedDef.Query, reqModifier: ProcessingMethods, baseUrl: string) => Promise<GetProjectFeedDef.Response>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { GetProjectFeedDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const getProjectFeed = async (query, reqModifier) => {
|
|
4
|
+
export const getProjectFeed = async (query, reqModifier, baseUrl) => {
|
|
5
5
|
const queryData = {
|
|
6
6
|
query,
|
|
7
7
|
};
|
|
8
8
|
const definition = GetProjectFeedDef.definition;
|
|
9
9
|
return await request({
|
|
10
10
|
queryData,
|
|
11
|
-
baseUrl
|
|
11
|
+
baseUrl,
|
|
12
12
|
serviceName,
|
|
13
13
|
definition,
|
|
14
14
|
}, reqModifier);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GetProjectPageDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const getProjectPage: (projectId: string, reqModifier: ProcessingMethods) => Promise<GetProjectPageDef.Response>;
|
|
3
|
+
export declare const getProjectPage: (projectId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<GetProjectPageDef.Response>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { GetProjectPageDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const getProjectPage = async (projectId, reqModifier) => {
|
|
4
|
+
export const getProjectPage = async (projectId, reqModifier, baseUrl) => {
|
|
5
5
|
const queryData = { params: { projectId } };
|
|
6
6
|
const definition = GetProjectPageDef.definition;
|
|
7
7
|
return await request({
|
|
8
8
|
queryData,
|
|
9
|
-
baseUrl
|
|
9
|
+
baseUrl,
|
|
10
10
|
serviceName,
|
|
11
11
|
definition,
|
|
12
12
|
}, reqModifier);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SearchCreatorProjectDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const searchCreatorAndProject: (query: SearchCreatorProjectDef.Query, reqModifier: ProcessingMethods) => Promise<SearchCreatorProjectDef.Response>;
|
|
3
|
+
export declare const searchCreatorAndProject: (query: SearchCreatorProjectDef.Query, reqModifier: ProcessingMethods, baseUrl: string) => Promise<SearchCreatorProjectDef.Response>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SearchCreatorProjectDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { request } from 'jh-be-tools';
|
|
3
3
|
import { serviceName } from './const.js';
|
|
4
|
-
export const searchCreatorAndProject = async (query, reqModifier) => {
|
|
4
|
+
export const searchCreatorAndProject = async (query, reqModifier, baseUrl) => {
|
|
5
5
|
const queryData = { query };
|
|
6
6
|
const definition = SearchCreatorProjectDef.definition;
|
|
7
7
|
return await request({
|
|
8
8
|
queryData,
|
|
9
|
-
baseUrl
|
|
9
|
+
baseUrl,
|
|
10
10
|
serviceName,
|
|
11
11
|
definition,
|
|
12
12
|
}, reqModifier);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GetSubscribedCreatorsDef, GetSubscribedProjectsDef } from '@jh-tech/bff-update-feed-app-shared';
|
|
2
2
|
import { ProcessingMethods } from 'jh-be-tools';
|
|
3
|
-
export declare const getSubscribedCreators: (userId: string, reqModifier: ProcessingMethods) => Promise<GetSubscribedCreatorsDef.Response>;
|
|
4
|
-
export declare const getSubscribedProjects: (userId: string, reqModifier: ProcessingMethods) => Promise<GetSubscribedProjectsDef.Response>;
|
|
3
|
+
export declare const getSubscribedCreators: (userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<GetSubscribedCreatorsDef.Response>;
|
|
4
|
+
export declare const getSubscribedProjects: (userId: string, reqModifier: ProcessingMethods, baseUrl: string) => Promise<GetSubscribedProjectsDef.Response>;
|