podverse-helpers 5.1.2-alpha.7 → 5.1.2-alpha.8
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/dist/dtos/category.d.ts +1 -0
- package/dist/dtos/category.d.ts.map +1 -1
- package/dist/dtos/channel/channel.d.ts +38 -0
- package/dist/dtos/channel/channel.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/lib/category.d.ts +2 -0
- package/dist/lib/category.d.ts.map +1 -1
- package/dist/lib/category.js +114 -113
- package/dist/lib/date.d.ts +2 -0
- package/dist/lib/date.d.ts.map +1 -1
- package/dist/lib/date.js +7 -1
- package/dist/lib/pagination.d.ts +2 -0
- package/dist/lib/pagination.d.ts.map +1 -0
- package/dist/lib/pagination.js +9 -0
- package/dist/lib/requests/_request.d.ts +4 -1
- package/dist/lib/requests/_request.d.ts.map +1 -1
- package/dist/lib/requests/_request.js +1 -1
- package/dist/lib/requests/api/_request.d.ts +7 -0
- package/dist/lib/requests/api/_request.d.ts.map +1 -1
- package/dist/lib/requests/api/_request.js +39 -8
- package/dist/lib/requests/api/_response.d.ts +2 -0
- package/dist/lib/requests/api/_response.d.ts.map +1 -1
- package/dist/lib/requests/api/auth/auth.d.ts +3 -0
- package/dist/lib/requests/api/auth/auth.d.ts.map +1 -1
- package/dist/lib/requests/api/auth/auth.js +10 -0
- package/dist/lib/requests/api/category/category.d.ts +5 -0
- package/dist/lib/requests/api/category/category.d.ts.map +1 -0
- package/dist/lib/requests/api/category/category.js +20 -0
- package/dist/lib/requests/api/channel/channel.d.ts +6 -0
- package/dist/lib/requests/api/channel/channel.d.ts.map +1 -0
- package/dist/lib/requests/api/channel/channel.js +24 -0
- package/dist/lib/requests/api/index.d.ts +3 -1
- package/dist/lib/requests/api/index.d.ts.map +1 -1
- package/dist/lib/requests/api/index.js +17 -3
- package/dist/lib/requests/api/queryParams.d.ts +17 -0
- package/dist/lib/requests/api/queryParams.d.ts.map +1 -0
- package/dist/lib/requests/api/queryParams.js +6 -0
- package/dist/lib/sortableTitle.d.ts.map +1 -1
- package/dist/lib/sortableTitle.js +12 -1
- package/package.json +2 -1
- package/dist/lib/requests/api/message.responses.d.ts +0 -4
- package/dist/lib/requests/api/message.responses.d.ts.map +0 -1
- package/dist/lib/requests/api/message.responses.js +0 -2
package/dist/dtos/category.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/dtos/category.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/dtos/category.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B"}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { DTOChannelAbout } from "./channelAbout";
|
|
2
|
+
import { DTOChannelCategory } from "./channelCategory";
|
|
3
|
+
import { DTOChannelChat } from "./channelChat";
|
|
4
|
+
import { DTOChannelDescription } from "./channelDescription";
|
|
5
|
+
import { DTOChannelFunding } from "./channelFunding";
|
|
6
|
+
import { DTOChannelImage } from "./channelImage";
|
|
7
|
+
import { DTOChannelInternalSettings } from "./channelInternalSettings";
|
|
8
|
+
import { DTOChannelLicense } from "./channelLicense";
|
|
9
|
+
import { DTOChannelLocation } from "./channelLocation";
|
|
10
|
+
import { DTOChannelPerson } from "./channelPerson";
|
|
11
|
+
import { DTOChannelPodroll } from "./channelPodroll";
|
|
12
|
+
import { DTOChannelPublisher } from "./channelPublisher";
|
|
13
|
+
import { DTOChannelRemoteItem } from "./channelRemoteItem";
|
|
14
|
+
import { DTOChannelSeason } from "./channelSeason";
|
|
15
|
+
import { DTOChannelSocialInteract } from "./channelSocialInteract";
|
|
16
|
+
import { DTOChannelTrailer } from "./channelTrailer";
|
|
17
|
+
import { DTOChannelTxt } from "./channelTxt";
|
|
18
|
+
import { DTOChannelValue } from "./channelValue";
|
|
19
|
+
import { DTOFeed } from "../feed/feed";
|
|
1
20
|
export interface DTOChannel {
|
|
2
21
|
id: number;
|
|
3
22
|
id_text: string;
|
|
@@ -10,5 +29,24 @@ export interface DTOChannel {
|
|
|
10
29
|
medium: string | null;
|
|
11
30
|
has_podcast_index_value: boolean;
|
|
12
31
|
has_value_time_splits: boolean;
|
|
32
|
+
feed?: DTOFeed;
|
|
33
|
+
channel_about?: DTOChannelAbout;
|
|
34
|
+
channel_categories?: DTOChannelCategory[];
|
|
35
|
+
channel_chat?: DTOChannelChat;
|
|
36
|
+
channel_description?: DTOChannelDescription;
|
|
37
|
+
channel_fundings?: DTOChannelFunding[];
|
|
38
|
+
channel_images?: DTOChannelImage[];
|
|
39
|
+
channel_internal_settings?: DTOChannelInternalSettings;
|
|
40
|
+
channel_license?: DTOChannelLicense;
|
|
41
|
+
channel_location?: DTOChannelLocation;
|
|
42
|
+
channel_persons?: DTOChannelPerson[];
|
|
43
|
+
channel_podroll?: DTOChannelPodroll;
|
|
44
|
+
channel_publisher?: DTOChannelPublisher;
|
|
45
|
+
channel_remote_items?: DTOChannelRemoteItem[];
|
|
46
|
+
channel_seasons?: DTOChannelSeason[];
|
|
47
|
+
channel_social_interacts?: DTOChannelSocialInteract[];
|
|
48
|
+
channel_trailers?: DTOChannelTrailer[];
|
|
49
|
+
channel_txts?: DTOChannelTxt[];
|
|
50
|
+
channel_values?: DTOChannelValue[];
|
|
13
51
|
}
|
|
14
52
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/dtos/channel/channel.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uBAAuB,EAAE,OAAO,CAAC;IACjC,qBAAqB,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/dtos/channel/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,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0B,CAAC;IACvD,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,eAAe,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACrC,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;IACxC,oBAAoB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC9C,eAAe,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACrC,wBAAwB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACtD,gBAAgB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvC,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,cAAc,CAAC,EAAE,eAAe,EAAE,CAAC;CACpC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './lib/hash';
|
|
|
10
10
|
export * from './lib/item';
|
|
11
11
|
export * from './lib/itemImage';
|
|
12
12
|
export * from './lib/medium';
|
|
13
|
+
export * from './lib/pagination';
|
|
13
14
|
export * from './lib/playlistResource';
|
|
14
15
|
export * from './lib/remoteItem';
|
|
15
16
|
export * from './lib/requests';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AAEvB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AAEvB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __exportStar(require("./lib/hash"), exports);
|
|
|
26
26
|
__exportStar(require("./lib/item"), exports);
|
|
27
27
|
__exportStar(require("./lib/itemImage"), exports);
|
|
28
28
|
__exportStar(require("./lib/medium"), exports);
|
|
29
|
+
__exportStar(require("./lib/pagination"), exports);
|
|
29
30
|
__exportStar(require("./lib/playlistResource"), exports);
|
|
30
31
|
__exportStar(require("./lib/remoteItem"), exports);
|
|
31
32
|
__exportStar(require("./lib/requests"), exports);
|
package/dist/lib/category.d.ts
CHANGED
|
@@ -111,4 +111,6 @@ export declare enum CategoryEnum {
|
|
|
111
111
|
TVReviews = 110
|
|
112
112
|
}
|
|
113
113
|
export declare function getCategoryEnumValue(input: string | null): CategoryEnum | null;
|
|
114
|
+
export declare const CATEGORY_MAPPING_KEYS: string[];
|
|
115
|
+
export type CategoryMappingKeys = typeof CATEGORY_MAPPING_KEYS[number];
|
|
114
116
|
//# sourceMappingURL=category.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/lib/category.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,MAAM,IAAI;IACV,SAAS,IAAI;IACb,OAAO,IAAI;IACX,UAAU,IAAI;IACd,OAAO,IAAI;IACX,gBAAgB,IAAI;IACpB,aAAa,IAAI;IACjB,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,IAAI,KAAK;IACT,uBAAuB,KAAK;IAC5B,OAAO,KAAK;IACZ,iBAAiB,KAAK;IACtB,MAAM,KAAK;IACX,UAAU,KAAK;IACf,SAAS,KAAK;IACd,SAAS,KAAK;IACd,KAAK,KAAK;IACV,MAAM,KAAK;IACX,gBAAgB,KAAK;IACrB,IAAI,KAAK;IACT,cAAc,KAAK;IACnB,UAAU,KAAK;IACf,OAAO,KAAK;IACZ,gBAAgB,KAAK;IACrB,SAAS,KAAK;IACd,UAAU,KAAK;IACf,SAAS,KAAK;IACd,SAAS,KAAK;IACd,gBAAgB,KAAK;IACrB,MAAM,KAAK;IACX,OAAO,KAAK;IACZ,OAAO,KAAK;IACZ,KAAK,KAAK;IACV,gBAAgB,KAAK;IACrB,eAAe,KAAK;IACpB,aAAa,KAAK;IAClB,KAAK,KAAK;IACV,cAAc,KAAK;IACnB,iBAAiB,KAAK;IACtB,OAAO,KAAK;IACZ,QAAQ,KAA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;IACnB,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,QAAQ,KAAK;IACb,QAAQ,KAAK;IACb,YAAY,KAAK;IACjB,QAAQ,KAAK;IACb,KAAK,KAAK;IACV,OAAO,KAAK;IACZ,QAAQ,KAAK;IACb,YAAY,KAAK;IACjB,SAAS,KAAK;IACd,SAAS,KAAK;IACd,aAAa,KAAK;IAClB,YAAY,KAAK;IACjB,WAAW,KAAK;IAChB,eAAe,KAAK;IACpB,MAAM,KAAK;IACX,OAAO,KAAK;IACZ,cAAc,KAAK;IACnB,WAAW,KAAK;IAChB,gBAAgB,KAAK;IACrB,UAAU,KAAK;IACf,eAAe,KAAK;IACpB,aAAa,KAAK;IAClB,QAAQ,KAAK;IACb,UAAU,KAAK;IACf,OAAO,KAAK;IACZ,aAAa,KAAK;IAClB,QAAQ,KAAK;IACb,IAAI,KAAK;IACT,MAAM,KAAK;IACX,KAAK,KAAK;IACV,OAAO,KAAK;IACZ,MAAM,MAAM;IACZ,QAAQ,MAAM;IACd,MAAM,MAAM;IACZ,UAAU,MAAM;IAChB,UAAU,MAAM;IAChB,SAAS,MAAM;IACf,UAAU,MAAM;IAChB,WAAW,MAAM;IACjB,cAAc,MAAM;IACpB,WAAW,MAAM;IACjB,SAAS,MAAM;CAChB;AAmHD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,GAAG,IAAI,CAM9E;AAED,eAAO,MAAM,qBAAqB,UAAuB,CAAC;AAE1D,MAAM,MAAM,mBAAmB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/lib/category.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CategoryEnum = void 0;
|
|
3
|
+
exports.CATEGORY_MAPPING_KEYS = exports.CategoryEnum = void 0;
|
|
4
4
|
exports.getCategoryEnumValue = getCategoryEnumValue;
|
|
5
5
|
var CategoryEnum;
|
|
6
6
|
(function (CategoryEnum) {
|
|
@@ -115,119 +115,120 @@ var CategoryEnum;
|
|
|
115
115
|
CategoryEnum[CategoryEnum["FilmReviews"] = 109] = "FilmReviews";
|
|
116
116
|
CategoryEnum[CategoryEnum["TVReviews"] = 110] = "TVReviews";
|
|
117
117
|
})(CategoryEnum || (exports.CategoryEnum = CategoryEnum = {}));
|
|
118
|
+
const mapping = {
|
|
119
|
+
arts: CategoryEnum.Arts,
|
|
120
|
+
books: CategoryEnum.Books,
|
|
121
|
+
design: CategoryEnum.Design,
|
|
122
|
+
fashionandbeauty: CategoryEnum.FashionAndBeauty,
|
|
123
|
+
food: CategoryEnum.Food,
|
|
124
|
+
performingarts: CategoryEnum.PerformingArts,
|
|
125
|
+
visualarts: CategoryEnum.VisualArts,
|
|
126
|
+
business: CategoryEnum.Business,
|
|
127
|
+
careers: CategoryEnum.Careers,
|
|
128
|
+
entrepreneurship: CategoryEnum.Entrepreneurship,
|
|
129
|
+
investing: CategoryEnum.Investing,
|
|
130
|
+
management: CategoryEnum.Management,
|
|
131
|
+
marketing: CategoryEnum.Marketing,
|
|
132
|
+
nonprofit: CategoryEnum.NonProfit,
|
|
133
|
+
comedy: CategoryEnum.Comedy,
|
|
134
|
+
comedyinterviews: CategoryEnum.ComedyInterviews,
|
|
135
|
+
improv: CategoryEnum.Improv,
|
|
136
|
+
standup: CategoryEnum.StandUp,
|
|
137
|
+
education: CategoryEnum.Education,
|
|
138
|
+
courses: CategoryEnum.Courses,
|
|
139
|
+
howto: CategoryEnum.HowTo,
|
|
140
|
+
languagelearning: CategoryEnum.LanguageLearning,
|
|
141
|
+
selfimprovement: CategoryEnum.SelfImprovement,
|
|
142
|
+
fiction: CategoryEnum.Fiction,
|
|
143
|
+
comedyfiction: CategoryEnum.ComedyFiction,
|
|
144
|
+
drama: CategoryEnum.Drama,
|
|
145
|
+
sciencefiction: CategoryEnum.ScienceFiction,
|
|
146
|
+
government: CategoryEnum.Government,
|
|
147
|
+
history: CategoryEnum.History,
|
|
148
|
+
healthandfitness: CategoryEnum.HealthAndFitness,
|
|
149
|
+
alternativehealth: CategoryEnum.AlternativeHealth,
|
|
150
|
+
fitness: CategoryEnum.Fitness,
|
|
151
|
+
medicine: CategoryEnum.Medicine,
|
|
152
|
+
mentalhealth: CategoryEnum.MentalHealth,
|
|
153
|
+
nutrition: CategoryEnum.Nutrition,
|
|
154
|
+
sexuality: CategoryEnum.Sexuality,
|
|
155
|
+
kidsandfamily: CategoryEnum.KidsAndFamily,
|
|
156
|
+
educationforkids: CategoryEnum.EducationForKids,
|
|
157
|
+
parenting: CategoryEnum.Parenting,
|
|
158
|
+
petsandanimals: CategoryEnum.PetsAndAnimals,
|
|
159
|
+
storiesforkids: CategoryEnum.StoriesForKids,
|
|
160
|
+
leisure: CategoryEnum.Leisure,
|
|
161
|
+
animationandmanga: CategoryEnum.AnimationAndManga,
|
|
162
|
+
automotive: CategoryEnum.Automotive,
|
|
163
|
+
aviation: CategoryEnum.Aviation,
|
|
164
|
+
crafts: CategoryEnum.Crafts,
|
|
165
|
+
games: CategoryEnum.Games,
|
|
166
|
+
hobbies: CategoryEnum.Hobbies,
|
|
167
|
+
homeandgarden: CategoryEnum.HomeAndGarden,
|
|
168
|
+
videogames: CategoryEnum.VideoGames,
|
|
169
|
+
music: CategoryEnum.Music,
|
|
170
|
+
musiccommentary: CategoryEnum.MusicCommentary,
|
|
171
|
+
musichistory: CategoryEnum.MusicHistory,
|
|
172
|
+
musicinterviews: CategoryEnum.MusicInterviews,
|
|
173
|
+
news: CategoryEnum.News,
|
|
174
|
+
businessnews: CategoryEnum.BusinessNews,
|
|
175
|
+
dailynews: CategoryEnum.DailyNews,
|
|
176
|
+
entertainmentnews: CategoryEnum.EntertainmentNews,
|
|
177
|
+
newscommentary: CategoryEnum.NewsCommentary,
|
|
178
|
+
politics: CategoryEnum.Politics,
|
|
179
|
+
sportsnews: CategoryEnum.SportsNews,
|
|
180
|
+
technews: CategoryEnum.TechNews,
|
|
181
|
+
religionandspirituality: CategoryEnum.ReligionAndSpirituality,
|
|
182
|
+
buddhism: CategoryEnum.Buddhism,
|
|
183
|
+
christianity: CategoryEnum.Christianity,
|
|
184
|
+
hinduism: CategoryEnum.Hinduism,
|
|
185
|
+
islam: CategoryEnum.Islam,
|
|
186
|
+
judaism: CategoryEnum.Judaism,
|
|
187
|
+
religion: CategoryEnum.Religion,
|
|
188
|
+
spirituality: CategoryEnum.Spirituality,
|
|
189
|
+
science: CategoryEnum.Science,
|
|
190
|
+
astronomy: CategoryEnum.Astronomy,
|
|
191
|
+
chemistry: CategoryEnum.Chemistry,
|
|
192
|
+
earthsciences: CategoryEnum.EarthSciences,
|
|
193
|
+
lifesciences: CategoryEnum.LifeSciences,
|
|
194
|
+
mathematics: CategoryEnum.Mathematics,
|
|
195
|
+
naturalsciences: CategoryEnum.NaturalSciences,
|
|
196
|
+
nature: CategoryEnum.Nature,
|
|
197
|
+
physics: CategoryEnum.Physics,
|
|
198
|
+
socialsciences: CategoryEnum.SocialSciences,
|
|
199
|
+
societyandculture: CategoryEnum.SocietyAndCulture,
|
|
200
|
+
documentary: CategoryEnum.Documentary,
|
|
201
|
+
personaljournals: CategoryEnum.PersonalJournals,
|
|
202
|
+
philosophy: CategoryEnum.Philosophy,
|
|
203
|
+
placesandtravel: CategoryEnum.PlacesAndTravel,
|
|
204
|
+
relationships: CategoryEnum.Relationships,
|
|
205
|
+
sports: CategoryEnum.Sports,
|
|
206
|
+
baseball: CategoryEnum.Baseball,
|
|
207
|
+
basketball: CategoryEnum.Basketball,
|
|
208
|
+
cricket: CategoryEnum.Cricket,
|
|
209
|
+
fantasysports: CategoryEnum.FantasySports,
|
|
210
|
+
football: CategoryEnum.Football,
|
|
211
|
+
golf: CategoryEnum.Golf,
|
|
212
|
+
hockey: CategoryEnum.Hockey,
|
|
213
|
+
rugby: CategoryEnum.Rugby,
|
|
214
|
+
running: CategoryEnum.Running,
|
|
215
|
+
soccer: CategoryEnum.Soccer,
|
|
216
|
+
swimming: CategoryEnum.Swimming,
|
|
217
|
+
tennis: CategoryEnum.Tennis,
|
|
218
|
+
volleyball: CategoryEnum.Volleyball,
|
|
219
|
+
wilderness: CategoryEnum.Wilderness,
|
|
220
|
+
wrestling: CategoryEnum.Wrestling,
|
|
221
|
+
technology: CategoryEnum.Technology,
|
|
222
|
+
truecrime: CategoryEnum.TrueCrime,
|
|
223
|
+
tvandfilm: CategoryEnum.TVAndFilm,
|
|
224
|
+
aftershows: CategoryEnum.AfterShows,
|
|
225
|
+
filmhistory: CategoryEnum.FilmHistory,
|
|
226
|
+
filminterviews: CategoryEnum.FilmInterviews,
|
|
227
|
+
filmreviews: CategoryEnum.FilmReviews,
|
|
228
|
+
tvreviews: CategoryEnum.TVReviews
|
|
229
|
+
};
|
|
118
230
|
function getCategoryEnumValue(input) {
|
|
119
231
|
const sanitizedInput = input === null || input === void 0 ? void 0 : input.toLowerCase().replace(/\s+/g, '').replace(/[^a-z0-9]/g, '');
|
|
120
|
-
const mapping = {
|
|
121
|
-
arts: CategoryEnum.Arts,
|
|
122
|
-
books: CategoryEnum.Books,
|
|
123
|
-
design: CategoryEnum.Design,
|
|
124
|
-
fashionandbeauty: CategoryEnum.FashionAndBeauty,
|
|
125
|
-
food: CategoryEnum.Food,
|
|
126
|
-
performingarts: CategoryEnum.PerformingArts,
|
|
127
|
-
visualarts: CategoryEnum.VisualArts,
|
|
128
|
-
business: CategoryEnum.Business,
|
|
129
|
-
careers: CategoryEnum.Careers,
|
|
130
|
-
entrepreneurship: CategoryEnum.Entrepreneurship,
|
|
131
|
-
investing: CategoryEnum.Investing,
|
|
132
|
-
management: CategoryEnum.Management,
|
|
133
|
-
marketing: CategoryEnum.Marketing,
|
|
134
|
-
nonprofit: CategoryEnum.NonProfit,
|
|
135
|
-
comedy: CategoryEnum.Comedy,
|
|
136
|
-
comedyinterviews: CategoryEnum.ComedyInterviews,
|
|
137
|
-
improv: CategoryEnum.Improv,
|
|
138
|
-
standup: CategoryEnum.StandUp,
|
|
139
|
-
education: CategoryEnum.Education,
|
|
140
|
-
courses: CategoryEnum.Courses,
|
|
141
|
-
howto: CategoryEnum.HowTo,
|
|
142
|
-
languagelearning: CategoryEnum.LanguageLearning,
|
|
143
|
-
selfimprovement: CategoryEnum.SelfImprovement,
|
|
144
|
-
fiction: CategoryEnum.Fiction,
|
|
145
|
-
comedyfiction: CategoryEnum.ComedyFiction,
|
|
146
|
-
drama: CategoryEnum.Drama,
|
|
147
|
-
sciencefiction: CategoryEnum.ScienceFiction,
|
|
148
|
-
government: CategoryEnum.Government,
|
|
149
|
-
history: CategoryEnum.History,
|
|
150
|
-
healthandfitness: CategoryEnum.HealthAndFitness,
|
|
151
|
-
alternativehealth: CategoryEnum.AlternativeHealth,
|
|
152
|
-
fitness: CategoryEnum.Fitness,
|
|
153
|
-
medicine: CategoryEnum.Medicine,
|
|
154
|
-
mentalhealth: CategoryEnum.MentalHealth,
|
|
155
|
-
nutrition: CategoryEnum.Nutrition,
|
|
156
|
-
sexuality: CategoryEnum.Sexuality,
|
|
157
|
-
kidsandfamily: CategoryEnum.KidsAndFamily,
|
|
158
|
-
educationforkids: CategoryEnum.EducationForKids,
|
|
159
|
-
parenting: CategoryEnum.Parenting,
|
|
160
|
-
petsandanimals: CategoryEnum.PetsAndAnimals,
|
|
161
|
-
storiesforkids: CategoryEnum.StoriesForKids,
|
|
162
|
-
leisure: CategoryEnum.Leisure,
|
|
163
|
-
animationandmanga: CategoryEnum.AnimationAndManga,
|
|
164
|
-
automotive: CategoryEnum.Automotive,
|
|
165
|
-
aviation: CategoryEnum.Aviation,
|
|
166
|
-
crafts: CategoryEnum.Crafts,
|
|
167
|
-
games: CategoryEnum.Games,
|
|
168
|
-
hobbies: CategoryEnum.Hobbies,
|
|
169
|
-
homeandgarden: CategoryEnum.HomeAndGarden,
|
|
170
|
-
videogames: CategoryEnum.VideoGames,
|
|
171
|
-
music: CategoryEnum.Music,
|
|
172
|
-
musiccommentary: CategoryEnum.MusicCommentary,
|
|
173
|
-
musichistory: CategoryEnum.MusicHistory,
|
|
174
|
-
musicinterviews: CategoryEnum.MusicInterviews,
|
|
175
|
-
news: CategoryEnum.News,
|
|
176
|
-
businessnews: CategoryEnum.BusinessNews,
|
|
177
|
-
dailynews: CategoryEnum.DailyNews,
|
|
178
|
-
entertainmentnews: CategoryEnum.EntertainmentNews,
|
|
179
|
-
newscommentary: CategoryEnum.NewsCommentary,
|
|
180
|
-
politics: CategoryEnum.Politics,
|
|
181
|
-
sportsnews: CategoryEnum.SportsNews,
|
|
182
|
-
technews: CategoryEnum.TechNews,
|
|
183
|
-
religionandspirituality: CategoryEnum.ReligionAndSpirituality,
|
|
184
|
-
buddhism: CategoryEnum.Buddhism,
|
|
185
|
-
christianity: CategoryEnum.Christianity,
|
|
186
|
-
hinduism: CategoryEnum.Hinduism,
|
|
187
|
-
islam: CategoryEnum.Islam,
|
|
188
|
-
judaism: CategoryEnum.Judaism,
|
|
189
|
-
religion: CategoryEnum.Religion,
|
|
190
|
-
spirituality: CategoryEnum.Spirituality,
|
|
191
|
-
science: CategoryEnum.Science,
|
|
192
|
-
astronomy: CategoryEnum.Astronomy,
|
|
193
|
-
chemistry: CategoryEnum.Chemistry,
|
|
194
|
-
earthsciences: CategoryEnum.EarthSciences,
|
|
195
|
-
lifesciences: CategoryEnum.LifeSciences,
|
|
196
|
-
mathematics: CategoryEnum.Mathematics,
|
|
197
|
-
naturalsciences: CategoryEnum.NaturalSciences,
|
|
198
|
-
nature: CategoryEnum.Nature,
|
|
199
|
-
physics: CategoryEnum.Physics,
|
|
200
|
-
socialsciences: CategoryEnum.SocialSciences,
|
|
201
|
-
societyandculture: CategoryEnum.SocietyAndCulture,
|
|
202
|
-
documentary: CategoryEnum.Documentary,
|
|
203
|
-
personaljournals: CategoryEnum.PersonalJournals,
|
|
204
|
-
philosophy: CategoryEnum.Philosophy,
|
|
205
|
-
placesandtravel: CategoryEnum.PlacesAndTravel,
|
|
206
|
-
relationships: CategoryEnum.Relationships,
|
|
207
|
-
sports: CategoryEnum.Sports,
|
|
208
|
-
baseball: CategoryEnum.Baseball,
|
|
209
|
-
basketball: CategoryEnum.Basketball,
|
|
210
|
-
cricket: CategoryEnum.Cricket,
|
|
211
|
-
fantasysports: CategoryEnum.FantasySports,
|
|
212
|
-
football: CategoryEnum.Football,
|
|
213
|
-
golf: CategoryEnum.Golf,
|
|
214
|
-
hockey: CategoryEnum.Hockey,
|
|
215
|
-
rugby: CategoryEnum.Rugby,
|
|
216
|
-
running: CategoryEnum.Running,
|
|
217
|
-
soccer: CategoryEnum.Soccer,
|
|
218
|
-
swimming: CategoryEnum.Swimming,
|
|
219
|
-
tennis: CategoryEnum.Tennis,
|
|
220
|
-
volleyball: CategoryEnum.Volleyball,
|
|
221
|
-
wilderness: CategoryEnum.Wilderness,
|
|
222
|
-
wrestling: CategoryEnum.Wrestling,
|
|
223
|
-
technology: CategoryEnum.Technology,
|
|
224
|
-
truecrime: CategoryEnum.TrueCrime,
|
|
225
|
-
tvandfilm: CategoryEnum.TVAndFilm,
|
|
226
|
-
aftershows: CategoryEnum.AfterShows,
|
|
227
|
-
filmhistory: CategoryEnum.FilmHistory,
|
|
228
|
-
filminterviews: CategoryEnum.FilmInterviews,
|
|
229
|
-
filmreviews: CategoryEnum.FilmReviews,
|
|
230
|
-
tvreviews: CategoryEnum.TVReviews
|
|
231
|
-
};
|
|
232
232
|
return (sanitizedInput && mapping[sanitizedInput]) || null;
|
|
233
233
|
}
|
|
234
|
+
exports.CATEGORY_MAPPING_KEYS = Object.keys(mapping);
|
package/dist/lib/date.d.ts
CHANGED
package/dist/lib/date.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/lib/date.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,WAGvD,CAAC"}
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/lib/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,gBAAgB,GAC3B,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,EAC5B,SAAS,MAAM,KACd,MAGF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,WAGvD,CAAC"}
|
package/dist/lib/date.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertSecondsToDaysText = void 0;
|
|
3
|
+
exports.convertSecondsToDaysText = exports.formatDateAbbrev = void 0;
|
|
4
|
+
const date_fns_1 = require("date-fns");
|
|
5
|
+
const formatDateAbbrev = (date, locale) => {
|
|
6
|
+
const d = typeof date === "string" || typeof date === "number" ? new Date(date) : date;
|
|
7
|
+
return (0, date_fns_1.format)(d, "MMM d yyyy", { locale });
|
|
8
|
+
};
|
|
9
|
+
exports.formatDateAbbrev = formatDateAbbrev;
|
|
4
10
|
const convertSecondsToDaysText = (seconds) => {
|
|
5
11
|
const totalDays = Math.round(parseInt(seconds, 10) / 86400);
|
|
6
12
|
return `${totalDays > 1 ? `${totalDays} days` : '24 hours'}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/lib/pagination.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getTotalPages = getTotalPages;
|
|
4
|
+
function getTotalPages(count, limit) {
|
|
5
|
+
const totalCount = count === null ? 1000 : count;
|
|
6
|
+
if (!limit || limit <= 0)
|
|
7
|
+
return 1;
|
|
8
|
+
return Math.ceil(totalCount / limit);
|
|
9
|
+
}
|
|
@@ -2,6 +2,9 @@ import { AxiosRequestConfig } from 'axios';
|
|
|
2
2
|
export declare const request: <T>(url: string, requestConfig?: AxiosRequestConfig, abort?: {
|
|
3
3
|
controller: AbortController;
|
|
4
4
|
timeoutMs: number;
|
|
5
|
-
}) => Promise<
|
|
5
|
+
}) => Promise<{
|
|
6
|
+
status: number;
|
|
7
|
+
data: T;
|
|
8
|
+
}>;
|
|
6
9
|
export declare const throwRequestError: (error: unknown) => never;
|
|
7
10
|
//# sourceMappingURL=_request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_request.d.ts","sourceRoot":"","sources":["../../../src/lib/requests/_request.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,kBAAkB,EAAiB,MAAM,OAAO,CAAC;AAEjE,eAAO,MAAM,OAAO,GAAU,CAAC,EAC7B,KAAK,MAAM,EACX,gBAAgB,kBAAkB,EAClC,QAAQ;IACN,UAAU,EAAE,eAAe,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;CAClB,KACA,OAAO,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"_request.d.ts","sourceRoot":"","sources":["../../../src/lib/requests/_request.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,kBAAkB,EAAiB,MAAM,OAAO,CAAC;AAEjE,eAAO,MAAM,OAAO,GAAU,CAAC,EAC7B,KAAK,MAAM,EACX,gBAAgB,kBAAkB,EAClC,QAAQ;IACN,UAAU,EAAE,eAAe,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;CAClB,KACA,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,CA8BrC,CAAC;AAMF,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,KAAG,KAWlD,CAAC"}
|
|
@@ -27,7 +27,7 @@ const request = (url, requestConfig, abort) => __awaiter(void 0, void 0, void 0,
|
|
|
27
27
|
const isJSONRequest = ((_a = requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === 'POST'
|
|
28
28
|
|| ((_b = requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.method) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === 'PUT';
|
|
29
29
|
const response = yield axios_1.default.request(Object.assign(Object.assign({ url, method: 'GET' }, requestConfig), { headers: Object.assign(Object.assign({}, (isJSONRequest ? { 'Content-Type': 'application/json' } : {})), requestConfig === null || requestConfig === void 0 ? void 0 : requestConfig.headers), signal: (_c = abort === null || abort === void 0 ? void 0 : abort.controller) === null || _c === void 0 ? void 0 : _c.signal }));
|
|
30
|
-
return response.data;
|
|
30
|
+
return { status: response.status, data: response.data };
|
|
31
31
|
}
|
|
32
32
|
finally {
|
|
33
33
|
if (timeoutId) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { QueryParamChannels } from './queryParams';
|
|
1
2
|
export type AbortOpts = {
|
|
2
3
|
controller: AbortController;
|
|
3
4
|
timeoutMs: number;
|
|
@@ -33,5 +34,11 @@ export declare class ApiRequestService {
|
|
|
33
34
|
}>;
|
|
34
35
|
reqAuthLogout(): Promise<import("./_response").ApiMessageResponse>;
|
|
35
36
|
reqAuthMe(): Promise<import("../../..").DTOAccount>;
|
|
37
|
+
reqAuthCheckSession(): Promise<import("./_response").ApiMessageResponse>;
|
|
38
|
+
reqCategoryGetAll(): Promise<import("./_response").ApiListResponse<import("../../..").DTOCategory>>;
|
|
39
|
+
reqChannelGetMany(params?: QueryParamChannels): Promise<import("./_response").ApiListResponse<import("../../..").DTOChannel>>;
|
|
36
40
|
}
|
|
41
|
+
export type ApiRequestServiceMethod = {
|
|
42
|
+
[K in keyof ApiRequestService]: ApiRequestService[K] extends (...args: unknown[]) => unknown ? ApiRequestService[K] : never;
|
|
43
|
+
}[keyof ApiRequestService];
|
|
37
44
|
//# sourceMappingURL=_request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_request.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/_request.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_request.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/_request.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,SAAS,GAAG;IAAE,UAAU,EAAE,eAAe,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,GAAG,CAAC,CAAS;gBAET,MAAM,EAAE;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd;IAOK,UAAU,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,MAAc,EAAE,IAAI,EAAE,MAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,GAAG,OAAO,CAAC,CAAC,CAAC;IAkChH,uBAAuB;IAMvB,YAAY,CAAC,MAAM,EAAE;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,0BAA0B,CAAC,EAAE,OAAO,CAAC;KACtC;;;IAID,aAAa;IAIb,SAAS;IAIT,mBAAmB;IAMnB,iBAAiB;IAMjB,iBAAiB,CAAC,MAAM,GAAE,kBAAuB;CAGlD;AAED,MAAM,MAAM,uBAAuB,GAAG;KACnC,CAAC,IAAI,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK;CAC5H,CAAC,MAAM,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.ApiRequestService = void 0;
|
|
4
13
|
const _request_1 = require("../_request");
|
|
5
14
|
const account_1 = require("./account/account");
|
|
6
15
|
const auth_1 = require("./auth/auth");
|
|
16
|
+
const category_1 = require("./category/category");
|
|
17
|
+
const channel_1 = require("./channel/channel");
|
|
7
18
|
class ApiRequestService {
|
|
8
19
|
constructor(params) {
|
|
9
20
|
const { protocol, host, port, prefix, version, jwt } = params;
|
|
@@ -11,15 +22,24 @@ class ApiRequestService {
|
|
|
11
22
|
this.apiBase = `${protocol}://${host}${portPart}${prefix.replace(/\/$/, '')}${version}`;
|
|
12
23
|
this.jwt = jwt;
|
|
13
24
|
}
|
|
14
|
-
apiRequest(
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
|
|
25
|
+
apiRequest(_a) {
|
|
26
|
+
return __awaiter(this, arguments, void 0, function* ({ path, method = 'GET', data, config = {}, abort, userAgent }) {
|
|
27
|
+
try {
|
|
28
|
+
const mergedConfig = Object.assign(Object.assign(Object.assign({}, config), (userAgent ? { userAgent } : {})), (this.jwt ?
|
|
29
|
+
{
|
|
30
|
+
headers: Object.assign(Object.assign({}, (config.headers || {})), { Cookie: `jwt=${this.jwt}` }),
|
|
31
|
+
}
|
|
32
|
+
: {}));
|
|
33
|
+
const options = method === 'GET' || method === 'DELETE'
|
|
34
|
+
? Object.assign({ method }, mergedConfig) : Object.assign({ method, data }, mergedConfig);
|
|
35
|
+
const response = yield (0, _request_1.request)(`${this.apiBase}${path}`, options, abort);
|
|
36
|
+
return response.data;
|
|
18
37
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
catch (error) {
|
|
39
|
+
console.error("API request error:", error);
|
|
40
|
+
throw error;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
23
43
|
}
|
|
24
44
|
/* ACCOUNT */
|
|
25
45
|
reqAccountGetManyPublic() {
|
|
@@ -35,5 +55,16 @@ class ApiRequestService {
|
|
|
35
55
|
reqAuthMe() {
|
|
36
56
|
return (0, auth_1.reqAuthMe)(this);
|
|
37
57
|
}
|
|
58
|
+
reqAuthCheckSession() {
|
|
59
|
+
return (0, auth_1.reqAuthCheckSession)(this);
|
|
60
|
+
}
|
|
61
|
+
/* CATEGORY */
|
|
62
|
+
reqCategoryGetAll() {
|
|
63
|
+
return (0, category_1.reqCategoryGetAll)(this);
|
|
64
|
+
}
|
|
65
|
+
/* CHANNEL */
|
|
66
|
+
reqChannelGetMany(params = {}) {
|
|
67
|
+
return (0, channel_1.reqChannelGetMany)(this, params);
|
|
68
|
+
}
|
|
38
69
|
}
|
|
39
70
|
exports.ApiRequestService = ApiRequestService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_response.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/_response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"_response.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/_response.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH"}
|
|
@@ -14,5 +14,8 @@ export declare function reqAuthLogout(api: ApiRequestService): Promise<ApiMessag
|
|
|
14
14
|
export declare function reqAuthMe(api: ApiRequestService, options?: {
|
|
15
15
|
headers?: Record<string, string>;
|
|
16
16
|
}): Promise<DTOAccount>;
|
|
17
|
+
export declare function reqAuthCheckSession(api: ApiRequestService, options?: {
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
}): Promise<ApiMessageResponse>;
|
|
17
20
|
export {};
|
|
18
21
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../src/lib/requests/api/auth/auth.ts"],"names":[],"mappings":"AAAA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CAAC,GAAG,EAAE,iBAAiB,+BAMzD;AAED,wBAAsB,SAAS,CAC7B,GAAG,EAAE,iBAAiB,EACtB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,uBAU/C;AAED,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,iBAAiB,EACtB,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,+BAU/C"}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.reqAuthLogin = reqAuthLogin;
|
|
13
13
|
exports.reqAuthLogout = reqAuthLogout;
|
|
14
14
|
exports.reqAuthMe = reqAuthMe;
|
|
15
|
+
exports.reqAuthCheckSession = reqAuthCheckSession;
|
|
15
16
|
function reqAuthLogin(api, params) {
|
|
16
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
18
|
var _a;
|
|
@@ -45,3 +46,12 @@ function reqAuthMe(api, options) {
|
|
|
45
46
|
});
|
|
46
47
|
});
|
|
47
48
|
}
|
|
49
|
+
function reqAuthCheckSession(api, options) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
return api.apiRequest({
|
|
52
|
+
path: '/auth/check-session',
|
|
53
|
+
method: 'GET',
|
|
54
|
+
config: Object.assign({ withCredentials: true }, ((options === null || options === void 0 ? void 0 : options.headers) ? { headers: options.headers } : {}))
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ApiRequestService } from '../_request';
|
|
2
|
+
import { ApiListResponse } from '../_response';
|
|
3
|
+
import { DTOCategory } from 'src/dtos';
|
|
4
|
+
export declare function reqCategoryGetAll(api: ApiRequestService): Promise<ApiListResponse<DTOCategory>>;
|
|
5
|
+
//# sourceMappingURL=category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../../../src/lib/requests/api/category/category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,iBAAiB,yCAK7D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.reqCategoryGetAll = reqCategoryGetAll;
|
|
13
|
+
function reqCategoryGetAll(api) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
return api.apiRequest({
|
|
16
|
+
path: '/category',
|
|
17
|
+
method: 'GET'
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ApiRequestService } from '../_request';
|
|
2
|
+
import { ApiListResponse } from '../_response';
|
|
3
|
+
import { DTOChannel } from 'src/dtos';
|
|
4
|
+
import { QueryParamChannels } from '../queryParams';
|
|
5
|
+
export declare function reqChannelGetMany(api: ApiRequestService, params?: QueryParamChannels): Promise<ApiListResponse<DTOChannel>>;
|
|
6
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../../src/lib/requests/api/channel/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,iBAAiB,EACtB,MAAM,GAAE,kBAAuB,wCAgBhC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.reqChannelGetMany = reqChannelGetMany;
|
|
13
|
+
function reqChannelGetMany(api_1) {
|
|
14
|
+
return __awaiter(this, arguments, void 0, function* (api, params = {}) {
|
|
15
|
+
return api.apiRequest({
|
|
16
|
+
path: '/channel',
|
|
17
|
+
method: 'GET',
|
|
18
|
+
config: {
|
|
19
|
+
params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (params.page ? { page: params.page } : {})), (params.sort ? { sort: params.sort } : {})), (params.type ? { type: params.type } : {})), (params.range ? { range: params.range } : {})), (params.category ? { category: params.category } : {})),
|
|
20
|
+
withCredentials: true
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
17
|
+
__exportStar(require("./_request"), exports);
|
|
18
|
+
__exportStar(require("./_response"), exports);
|
|
19
|
+
__exportStar(require("./queryParams"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CategoryMappingKeys } from "../../category";
|
|
2
|
+
export interface QueueParamPage {
|
|
3
|
+
page?: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const QUERY_PARAMS_STATS_RANGE_VALUES: readonly ["day", "week", "month", "all-time"];
|
|
6
|
+
export type QueryParamsStatsRange = typeof QUERY_PARAMS_STATS_RANGE_VALUES[number];
|
|
7
|
+
export declare const QUERY_PARAMS_CHANNELS_TYPE_VALUES: readonly ["all", "subscribed", "category"];
|
|
8
|
+
export declare const QUERY_PARAMS_CHANNELS_SORT_VALUES: readonly ["recent", "oldest", "alphabetical", "top"];
|
|
9
|
+
export type QueryParamsChannelsType = typeof QUERY_PARAMS_CHANNELS_TYPE_VALUES[number];
|
|
10
|
+
export type QueryParamsChannelsSort = typeof QUERY_PARAMS_CHANNELS_SORT_VALUES[number];
|
|
11
|
+
export interface QueryParamChannels extends QueueParamPage {
|
|
12
|
+
type?: QueryParamsChannelsType;
|
|
13
|
+
sort?: QueryParamsChannelsSort;
|
|
14
|
+
range?: QueryParamsStatsRange;
|
|
15
|
+
category?: CategoryMappingKeys;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=queryParams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryParams.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/queryParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,+BAA+B,+CAAgD,CAAC;AAE7F,MAAM,MAAM,qBAAqB,GAAG,OAAO,+BAA+B,CAAC,MAAM,CAAC,CAAC;AAEnF,eAAO,MAAM,iCAAiC,4CAA6C,CAAC;AAC5F,eAAO,MAAM,iCAAiC,sDAAuD,CAAC;AAEtG,MAAM,MAAM,uBAAuB,GAAG,OAAO,iCAAiC,CAAC,MAAM,CAAC,CAAC;AACvF,MAAM,MAAM,uBAAuB,GAAG,OAAO,iCAAiC,CAAC,MAAM,CAAC,CAAC;AAEvF,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAC/B,IAAI,CAAC,EAAE,uBAAuB,CAAC;IAC/B,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QUERY_PARAMS_CHANNELS_SORT_VALUES = exports.QUERY_PARAMS_CHANNELS_TYPE_VALUES = exports.QUERY_PARAMS_STATS_RANGE_VALUES = void 0;
|
|
4
|
+
exports.QUERY_PARAMS_STATS_RANGE_VALUES = ["day", "week", "month", "all-time"];
|
|
5
|
+
exports.QUERY_PARAMS_CHANNELS_TYPE_VALUES = ["all", "subscribed", "category"];
|
|
6
|
+
exports.QUERY_PARAMS_CHANNELS_SORT_VALUES = ["recent", "oldest", "alphabetical", "top"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortableTitle.d.ts","sourceRoot":"","sources":["../../src/lib/sortableTitle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sortableTitle.d.ts","sourceRoot":"","sources":["../../src/lib/sortableTitle.ts"],"names":[],"mappings":"AAYA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOzD"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createSortableTitle = createSortableTitle;
|
|
4
|
+
function removeLeadingArticle(input) {
|
|
5
|
+
const english = /^(the|a|an)\s+/i;
|
|
6
|
+
const patterns = [english];
|
|
7
|
+
for (const pattern of patterns) {
|
|
8
|
+
if (pattern.test(input)) {
|
|
9
|
+
return input.replace(pattern, '');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return input;
|
|
13
|
+
}
|
|
4
14
|
function createSortableTitle(input) {
|
|
5
|
-
|
|
15
|
+
const noArticle = removeLeadingArticle(input);
|
|
16
|
+
return noArticle
|
|
6
17
|
.toLowerCase()
|
|
7
18
|
.trim()
|
|
8
19
|
.replace(/\s+/g, '')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podverse-helpers",
|
|
3
|
-
"version": "5.1.2-alpha.
|
|
3
|
+
"version": "5.1.2-alpha.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"axios": "^1.7.4",
|
|
20
20
|
"bignumber.js": "^9.1.2",
|
|
21
|
+
"date-fns": "^4.1.0",
|
|
21
22
|
"joi": "^17.13.3",
|
|
22
23
|
"module-alias": "^2.2.3",
|
|
23
24
|
"podcast-partytime": "^4.8.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.responses.d.ts","sourceRoot":"","sources":["../../../../src/lib/requests/api/message.responses.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|