@redseat/api 0.3.14 → 0.4.2
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/CLAUDE.md +275 -2
- package/dist/client.d.ts +2 -1
- package/dist/client.js +2 -0
- package/dist/interfaces.d.ts +156 -9
- package/dist/interfaces.js +1 -0
- package/dist/library.d.ts +85 -63
- package/dist/library.js +205 -11
- package/dist/server.d.ts +5 -2
- package/dist/server.js +50 -0
- package/dist/sse-types.d.ts +12 -4
- package/libraries.md +176 -9
- package/package.json +1 -1
- package/server.md +34 -3
package/CLAUDE.md
CHANGED
|
@@ -1,2 +1,275 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# AI Agent Instructions
|
|
2
|
+
|
|
3
|
+
This document provides guidelines for AI agents working with the `@redseat/api` package. Follow these instructions to maintain code quality and keep documentation up to date.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Always Read First
|
|
8
|
+
|
|
9
|
+
1. **Start with [README.md](README.md)**
|
|
10
|
+
- Understand the package structure
|
|
11
|
+
- Identify which API classes are relevant to your task
|
|
12
|
+
- Find links to specialized documentation
|
|
13
|
+
|
|
14
|
+
2. **Read Relevant Documentation**
|
|
15
|
+
- [client.md](client.md) - For HTTP client changes
|
|
16
|
+
- [server.md](server.md) - For server API changes
|
|
17
|
+
- [libraries.md](libraries.md) - For library API changes
|
|
18
|
+
- [encryption.md](encryption.md) - For encryption module changes
|
|
19
|
+
- [test.md](test.md) - For testing changes
|
|
20
|
+
|
|
21
|
+
3. **Examine Source Code**
|
|
22
|
+
- Read the actual implementation files in `src/`
|
|
23
|
+
- Understand the current architecture
|
|
24
|
+
- Check existing patterns and conventions
|
|
25
|
+
|
|
26
|
+
## Documentation Maintenance
|
|
27
|
+
|
|
28
|
+
### When Modifying Existing Functionality
|
|
29
|
+
|
|
30
|
+
**Required Actions:**
|
|
31
|
+
|
|
32
|
+
1. **Update the Relevant Documentation File**
|
|
33
|
+
- If changing `RedseatClient`: Update [client.md](client.md)
|
|
34
|
+
- If changing `ServerApi`: Update [server.md](server.md)
|
|
35
|
+
- If changing `LibraryApi`: Update [libraries.md](libraries.md)
|
|
36
|
+
- If changing encryption: Update [encryption.md](encryption.md)
|
|
37
|
+
|
|
38
|
+
2. **Update Method Signatures**
|
|
39
|
+
- Document new parameters
|
|
40
|
+
- Document changed return types
|
|
41
|
+
- Document new error cases
|
|
42
|
+
- Update examples if behavior changed
|
|
43
|
+
|
|
44
|
+
3. **Update README.md if Needed**
|
|
45
|
+
- If API signatures changed significantly
|
|
46
|
+
- If new major features were added
|
|
47
|
+
- If package exports changed
|
|
48
|
+
|
|
49
|
+
4. **Keep Examples Current**
|
|
50
|
+
- Update code examples to reflect new behavior
|
|
51
|
+
- Ensure examples are runnable
|
|
52
|
+
- Fix broken examples
|
|
53
|
+
|
|
54
|
+
**Example Workflow:**
|
|
55
|
+
```
|
|
56
|
+
1. User requests: "Add timeout parameter to getMedia()"
|
|
57
|
+
2. Read libraries.md to see current getMedia() documentation
|
|
58
|
+
3. Modify src/library.ts to add timeout parameter
|
|
59
|
+
4. Update libraries.md with new parameter documentation
|
|
60
|
+
5. Update example code in libraries.md
|
|
61
|
+
6. Check if README.md needs updates (probably not for this change)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### When Adding New Functionality
|
|
65
|
+
|
|
66
|
+
**Required Actions:**
|
|
67
|
+
|
|
68
|
+
1. **Document in Appropriate File**
|
|
69
|
+
- Add new methods to the relevant documentation file
|
|
70
|
+
- Follow existing formatting and structure
|
|
71
|
+
- Include parameters, return types, and examples
|
|
72
|
+
|
|
73
|
+
2. **Update README.md**
|
|
74
|
+
- Add to package exports list if it's a new public export
|
|
75
|
+
- Update overview if it's a major feature
|
|
76
|
+
- Add to quick start if it's commonly used
|
|
77
|
+
|
|
78
|
+
3. **Include Usage Examples**
|
|
79
|
+
- Provide at least one example per new method
|
|
80
|
+
- Show common use cases
|
|
81
|
+
- Include error handling examples
|
|
82
|
+
|
|
83
|
+
4. **Update Related Documentation**
|
|
84
|
+
- If adding new encryption function: Update [encryption.md](encryption.md)
|
|
85
|
+
- If adding new test: Update [test.md](test.md)
|
|
86
|
+
- Cross-reference related functionality
|
|
87
|
+
|
|
88
|
+
**Example Workflow:**
|
|
89
|
+
```
|
|
90
|
+
1. User requests: "Add getMediaStats() method to LibraryApi"
|
|
91
|
+
2. Implement method in src/library.ts
|
|
92
|
+
3. Add documentation to libraries.md in "Media" section
|
|
93
|
+
4. Add example showing usage
|
|
94
|
+
5. Update README.md exports if needed
|
|
95
|
+
6. Add test and update test.md if applicable
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Code Change Workflow
|
|
99
|
+
|
|
100
|
+
### Before Making Changes
|
|
101
|
+
|
|
102
|
+
1. **Understand the Request**
|
|
103
|
+
- What functionality is being added/modified?
|
|
104
|
+
- Which files are affected?
|
|
105
|
+
- Are there breaking changes?
|
|
106
|
+
|
|
107
|
+
2. **Plan the Changes**
|
|
108
|
+
- Identify all files that need modification
|
|
109
|
+
- Identify all documentation that needs updates
|
|
110
|
+
- Consider backward compatibility
|
|
111
|
+
|
|
112
|
+
3. **Check Dependencies**
|
|
113
|
+
- Will this change affect other parts of the codebase?
|
|
114
|
+
- Are there tests that need updating?
|
|
115
|
+
- Are there examples that need updating?
|
|
116
|
+
|
|
117
|
+
### During Implementation
|
|
118
|
+
|
|
119
|
+
1. **Follow Existing Patterns**
|
|
120
|
+
- Match code style and conventions
|
|
121
|
+
- Use similar error handling
|
|
122
|
+
- Follow naming conventions
|
|
123
|
+
|
|
124
|
+
2. **Write Tests**
|
|
125
|
+
- Add tests for new functionality
|
|
126
|
+
- Update tests for modified functionality
|
|
127
|
+
- Ensure tests pass
|
|
128
|
+
|
|
129
|
+
3. **Update Documentation As You Go**
|
|
130
|
+
- Don't wait until the end
|
|
131
|
+
- Update docs as you implement
|
|
132
|
+
- This helps catch documentation issues early
|
|
133
|
+
|
|
134
|
+
### After Implementation
|
|
135
|
+
|
|
136
|
+
1. **Verify Documentation**
|
|
137
|
+
- Read through your documentation changes
|
|
138
|
+
- Ensure examples are correct
|
|
139
|
+
- Check for typos and formatting
|
|
140
|
+
|
|
141
|
+
2. **Check Cross-References**
|
|
142
|
+
- Update links if files moved
|
|
143
|
+
- Update related documentation
|
|
144
|
+
- Ensure consistency across files
|
|
145
|
+
|
|
146
|
+
3. **Test Examples**
|
|
147
|
+
- Verify code examples are syntactically correct
|
|
148
|
+
- Ensure examples demonstrate the feature correctly
|
|
149
|
+
- Check that examples use current API
|
|
150
|
+
|
|
151
|
+
## Documentation Standards
|
|
152
|
+
|
|
153
|
+
### Formatting
|
|
154
|
+
|
|
155
|
+
- Use consistent markdown formatting
|
|
156
|
+
- Use code blocks with language tags for code examples
|
|
157
|
+
- Use proper heading hierarchy (## for sections, ### for subsections)
|
|
158
|
+
- Include parameter tables for complex methods
|
|
159
|
+
|
|
160
|
+
### Code Examples
|
|
161
|
+
|
|
162
|
+
- Always include TypeScript type annotations
|
|
163
|
+
- Show both success and error cases when relevant
|
|
164
|
+
- Include imports when showing complete examples
|
|
165
|
+
- Use realistic variable names
|
|
166
|
+
|
|
167
|
+
### Method Documentation Template
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
### `methodName(param1: Type1, param2: Type2): Promise<ReturnType>`
|
|
171
|
+
|
|
172
|
+
Brief description of what the method does.
|
|
173
|
+
|
|
174
|
+
**Parameters:**
|
|
175
|
+
- `param1`: Description of parameter
|
|
176
|
+
- `param2`: Description of parameter
|
|
177
|
+
|
|
178
|
+
**Returns:** Promise resolving to description
|
|
179
|
+
|
|
180
|
+
**Example:**
|
|
181
|
+
\`\`\`typescript
|
|
182
|
+
const result = await libraryApi.methodName('value1', 'value2');
|
|
183
|
+
\`\`\`
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Common Scenarios
|
|
187
|
+
|
|
188
|
+
### Scenario 1: Adding a New Method to LibraryApi
|
|
189
|
+
|
|
190
|
+
1. Implement method in `src/library.ts`
|
|
191
|
+
2. Add documentation to [libraries.md](libraries.md) in appropriate section
|
|
192
|
+
3. Add example code
|
|
193
|
+
4. Add test to appropriate test file
|
|
194
|
+
5. Update [test.md](test.md) if new test file created
|
|
195
|
+
6. Check if [README.md](README.md) needs updates
|
|
196
|
+
|
|
197
|
+
### Scenario 2: Modifying Encryption Function
|
|
198
|
+
|
|
199
|
+
1. Modify function in `src/encryption.ts`
|
|
200
|
+
2. Update [encryption.md](encryption.md) with changes
|
|
201
|
+
3. Update examples if behavior changed
|
|
202
|
+
4. Update tests in `src/encryption.test.ts`
|
|
203
|
+
5. Check if [libraries.md](libraries.md) needs updates (if LibraryApi uses it)
|
|
204
|
+
|
|
205
|
+
### Scenario 3: Adding New Export
|
|
206
|
+
|
|
207
|
+
1. Add export to `src/index.ts`
|
|
208
|
+
2. Update [README.md](README.md) package exports section
|
|
209
|
+
3. Add documentation to appropriate file
|
|
210
|
+
4. Add example in README or relevant doc file
|
|
211
|
+
|
|
212
|
+
### Scenario 4: Breaking Change
|
|
213
|
+
|
|
214
|
+
1. Document breaking change clearly
|
|
215
|
+
2. Update all affected documentation
|
|
216
|
+
3. Update examples to show new usage
|
|
217
|
+
4. Consider migration guide if significant
|
|
218
|
+
|
|
219
|
+
## Quality Checklist
|
|
220
|
+
|
|
221
|
+
Before completing a task, verify:
|
|
222
|
+
|
|
223
|
+
- [ ] All code changes are implemented
|
|
224
|
+
- [ ] All relevant documentation is updated
|
|
225
|
+
- [ ] Examples are current and correct
|
|
226
|
+
- [ ] Tests are added/updated
|
|
227
|
+
- [ ] README.md is updated if needed
|
|
228
|
+
- [ ] Cross-references are correct
|
|
229
|
+
- [ ] No broken links
|
|
230
|
+
- [ ] Code follows existing patterns
|
|
231
|
+
- [ ] Documentation is clear and complete
|
|
232
|
+
|
|
233
|
+
## Error Prevention
|
|
234
|
+
|
|
235
|
+
### Common Mistakes to Avoid
|
|
236
|
+
|
|
237
|
+
1. **Forgetting to Update Documentation**
|
|
238
|
+
- Always update docs when code changes
|
|
239
|
+
- Don't assume someone else will do it
|
|
240
|
+
|
|
241
|
+
2. **Outdated Examples**
|
|
242
|
+
- Verify examples still work
|
|
243
|
+
- Update examples when API changes
|
|
244
|
+
|
|
245
|
+
3. **Inconsistent Formatting**
|
|
246
|
+
- Follow existing documentation style
|
|
247
|
+
- Use consistent code formatting
|
|
248
|
+
|
|
249
|
+
4. **Missing Error Cases**
|
|
250
|
+
- Document when methods throw errors
|
|
251
|
+
- Show error handling in examples
|
|
252
|
+
|
|
253
|
+
5. **Incomplete Documentation**
|
|
254
|
+
- Document all parameters
|
|
255
|
+
- Document return types
|
|
256
|
+
- Include usage examples
|
|
257
|
+
|
|
258
|
+
## Questions?
|
|
259
|
+
|
|
260
|
+
If you're unsure about:
|
|
261
|
+
- Which documentation file to update
|
|
262
|
+
- How to format documentation
|
|
263
|
+
- Whether a change needs documentation
|
|
264
|
+
|
|
265
|
+
**Default Action:** Update the documentation. It's better to have slightly redundant documentation than missing documentation.
|
|
266
|
+
|
|
267
|
+
## Related Documentation
|
|
268
|
+
|
|
269
|
+
- [README.md](README.md) - Start here for package overview
|
|
270
|
+
- [client.md](client.md) - RedseatClient documentation
|
|
271
|
+
- [server.md](server.md) - ServerApi documentation
|
|
272
|
+
- [libraries.md](libraries.md) - LibraryApi documentation
|
|
273
|
+
- [encryption.md](encryption.md) - Encryption module documentation
|
|
274
|
+
- [test.md](test.md) - Testing guide
|
|
275
|
+
|
package/dist/client.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Method, AxiosRequestConfig } from 'axios';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { IToken } from './auth.js';
|
|
4
4
|
import { IServer } from './interfaces.js';
|
|
5
|
-
import { SSEConnectionState, SSEConnectionOptions, SSEConnectionError, SSELibraryEvent, SSELibraryStatusEvent, SSEMediasEvent, SSEUploadProgressEvent, SSEConvertProgressEvent, SSEEpisodesEvent, SSESeriesEvent, SSEMoviesEvent, SSEPeopleEvent, SSETagsEvent, SSEBackupsEvent, SSEBackupFilesEvent, SSEMediaRatingEvent, SSEMediaProgressEvent, SSEPlayersListEvent, SSEWatchedEvent, SSEUnwatchedEvent, SSERequestProcessingEvent } from './sse-types.js';
|
|
5
|
+
import { SSEConnectionState, SSEConnectionOptions, SSEConnectionError, SSELibraryEvent, SSELibraryStatusEvent, SSEMediasEvent, SSEUploadProgressEvent, SSEConvertProgressEvent, SSEEpisodesEvent, SSESeriesEvent, SSEMoviesEvent, SSEBooksEvent, SSEPeopleEvent, SSETagsEvent, SSEBackupsEvent, SSEBackupFilesEvent, SSEMediaRatingEvent, SSEMediaProgressEvent, SSEPlayersListEvent, SSEWatchedEvent, SSEUnwatchedEvent, SSERequestProcessingEvent } from './sse-types.js';
|
|
6
6
|
export interface ClientOptions {
|
|
7
7
|
server: IServer;
|
|
8
8
|
getIdToken: (forceRefresh?: boolean) => Promise<string>;
|
|
@@ -47,6 +47,7 @@ export declare class RedseatClient {
|
|
|
47
47
|
readonly episodes$: Observable<SSEEpisodesEvent>;
|
|
48
48
|
readonly series$: Observable<SSESeriesEvent>;
|
|
49
49
|
readonly movies$: Observable<SSEMoviesEvent>;
|
|
50
|
+
readonly books$: Observable<SSEBooksEvent>;
|
|
50
51
|
readonly people$: Observable<SSEPeopleEvent>;
|
|
51
52
|
readonly tags$: Observable<SSETagsEvent>;
|
|
52
53
|
readonly backups$: Observable<SSEBackupsEvent>;
|
package/dist/client.js
CHANGED
|
@@ -20,6 +20,7 @@ export class RedseatClient {
|
|
|
20
20
|
'episodes': 'episodes',
|
|
21
21
|
'series': 'series',
|
|
22
22
|
'movies': 'movies',
|
|
23
|
+
'books': 'books',
|
|
23
24
|
'people': 'people',
|
|
24
25
|
'tags': 'tags',
|
|
25
26
|
'request_processing': 'requestProcessing',
|
|
@@ -60,6 +61,7 @@ export class RedseatClient {
|
|
|
60
61
|
this.episodes$ = this.createEventStream('episodes');
|
|
61
62
|
this.series$ = this.createEventStream('series');
|
|
62
63
|
this.movies$ = this.createEventStream('movies');
|
|
64
|
+
this.books$ = this.createEventStream('books');
|
|
63
65
|
this.people$ = this.createEventStream('people');
|
|
64
66
|
this.tags$ = this.createEventStream('tags');
|
|
65
67
|
this.backups$ = this.createEventStream('backups');
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -96,9 +96,6 @@ export interface IFile {
|
|
|
96
96
|
pages?: number;
|
|
97
97
|
progress?: number;
|
|
98
98
|
lang?: string;
|
|
99
|
-
tags?: MediaItemReference[];
|
|
100
|
-
series?: SerieInMedia[];
|
|
101
|
-
people?: MediaItemReference[];
|
|
102
99
|
faces?: FaceEmbedding[];
|
|
103
100
|
backups?: BackupFile[];
|
|
104
101
|
thumb?: string;
|
|
@@ -106,16 +103,73 @@ export interface IFile {
|
|
|
106
103
|
thumbsize?: number;
|
|
107
104
|
iv?: string;
|
|
108
105
|
origin?: RsLink;
|
|
109
|
-
movie?: string;
|
|
110
106
|
uploader?: string;
|
|
111
107
|
uploadkey?: string;
|
|
112
108
|
faceRecognitionError?: string;
|
|
109
|
+
relations?: Relations;
|
|
110
|
+
}
|
|
111
|
+
export interface MediaForUpdate {
|
|
112
|
+
name?: string;
|
|
113
|
+
description?: string;
|
|
114
|
+
mimetype?: string;
|
|
115
|
+
kind?: FileTypes;
|
|
116
|
+
size?: number;
|
|
117
|
+
md5?: string;
|
|
118
|
+
modified?: number;
|
|
119
|
+
created?: number;
|
|
120
|
+
width?: number;
|
|
121
|
+
height?: number;
|
|
122
|
+
orientation?: number;
|
|
123
|
+
colorSpace?: string;
|
|
124
|
+
icc?: string;
|
|
125
|
+
mp?: number;
|
|
126
|
+
vcodecs?: string[];
|
|
127
|
+
acodecs?: string[];
|
|
128
|
+
fps?: number;
|
|
129
|
+
bitrate?: number;
|
|
130
|
+
focal?: number;
|
|
131
|
+
iso?: number;
|
|
132
|
+
model?: string;
|
|
133
|
+
sspeed?: string;
|
|
134
|
+
fNumber?: number;
|
|
135
|
+
pages?: number;
|
|
136
|
+
duration?: number;
|
|
137
|
+
progress?: number;
|
|
138
|
+
addTags?: MediaItemReference[];
|
|
139
|
+
removeTags?: string[];
|
|
140
|
+
tagsLookup?: string[];
|
|
141
|
+
addSeries?: SerieInMedia[];
|
|
142
|
+
removeSeries?: SerieInMedia[];
|
|
143
|
+
seriesLookup?: string[];
|
|
144
|
+
season?: number;
|
|
145
|
+
episode?: number;
|
|
146
|
+
addPeople?: MediaItemReference[];
|
|
147
|
+
removePeople?: string[];
|
|
148
|
+
peopleLookup?: string[];
|
|
149
|
+
long?: number;
|
|
150
|
+
lat?: number;
|
|
151
|
+
gps?: string;
|
|
152
|
+
origin?: RsLink;
|
|
153
|
+
originUrl?: string;
|
|
154
|
+
ignoreOriginDuplicate?: boolean;
|
|
155
|
+
movie?: string;
|
|
156
|
+
book?: string;
|
|
157
|
+
lang?: string;
|
|
158
|
+
rating?: number;
|
|
159
|
+
thumbsize?: number;
|
|
160
|
+
iv?: string;
|
|
161
|
+
uploader?: string;
|
|
162
|
+
uploadkey?: string;
|
|
163
|
+
uploadId?: string;
|
|
164
|
+
originalHash?: string;
|
|
165
|
+
originalId?: string;
|
|
113
166
|
}
|
|
114
167
|
export declare enum LibraryTypes {
|
|
115
168
|
'Photos' = "photos",
|
|
116
169
|
'Shows' = "shows",
|
|
117
170
|
'Movies' = "movies",
|
|
118
|
-
'IPTV' = "iptv"
|
|
171
|
+
'IPTV' = "iptv",
|
|
172
|
+
'Books' = "books"
|
|
119
173
|
}
|
|
120
174
|
export declare enum LibrarySources {
|
|
121
175
|
'Path' = "PathProvider",
|
|
@@ -131,7 +185,8 @@ export declare enum LibraryRole {
|
|
|
131
185
|
admin = "admin"
|
|
132
186
|
}
|
|
133
187
|
export interface UserMapping {
|
|
134
|
-
|
|
188
|
+
from: string;
|
|
189
|
+
to: string;
|
|
135
190
|
}
|
|
136
191
|
export interface ServerLibrarySettings {
|
|
137
192
|
faceThreshold?: number;
|
|
@@ -140,14 +195,25 @@ export interface ServerLibrarySettings {
|
|
|
140
195
|
mapProgress?: UserMapping[];
|
|
141
196
|
dataPath?: string;
|
|
142
197
|
}
|
|
198
|
+
export interface ServerLibraryForUpdate {
|
|
199
|
+
name?: string;
|
|
200
|
+
source?: LibrarySources;
|
|
201
|
+
root?: string;
|
|
202
|
+
settings?: ServerLibrarySettings;
|
|
203
|
+
credentials?: string;
|
|
204
|
+
plugin?: string;
|
|
205
|
+
}
|
|
143
206
|
export interface ILibrary {
|
|
144
207
|
id?: string;
|
|
145
208
|
name: string;
|
|
146
209
|
type: LibraryTypes;
|
|
147
210
|
source?: LibrarySources;
|
|
211
|
+
root?: string;
|
|
148
212
|
roles?: LibraryRole[];
|
|
149
213
|
crypt?: boolean;
|
|
150
214
|
settings: ServerLibrarySettings;
|
|
215
|
+
credentials?: string;
|
|
216
|
+
plugin?: string;
|
|
151
217
|
hidden?: boolean;
|
|
152
218
|
status?: string;
|
|
153
219
|
}
|
|
@@ -163,6 +229,7 @@ export interface ITag {
|
|
|
163
229
|
alt?: string[];
|
|
164
230
|
thumb?: string;
|
|
165
231
|
params?: any;
|
|
232
|
+
otherids?: string[];
|
|
166
233
|
}
|
|
167
234
|
export declare enum LinkType {
|
|
168
235
|
'profile' = "profile",
|
|
@@ -197,6 +264,7 @@ export interface IPerson {
|
|
|
197
264
|
tmdb?: number;
|
|
198
265
|
trakt?: number;
|
|
199
266
|
socials?: RsLink[];
|
|
267
|
+
otherids?: string[];
|
|
200
268
|
gender?: Gender;
|
|
201
269
|
country?: string;
|
|
202
270
|
bio?: string;
|
|
@@ -218,7 +286,7 @@ export interface ISerie {
|
|
|
218
286
|
tmdb?: number;
|
|
219
287
|
trakt?: number;
|
|
220
288
|
tvdb?: number;
|
|
221
|
-
otherids?: string;
|
|
289
|
+
otherids?: string[];
|
|
222
290
|
imdbRating?: number;
|
|
223
291
|
imdbVotes?: number;
|
|
224
292
|
traktRating?: number;
|
|
@@ -298,6 +366,32 @@ export interface IMovie {
|
|
|
298
366
|
backgroundv: number;
|
|
299
367
|
cardv: number;
|
|
300
368
|
}
|
|
369
|
+
export interface IBook {
|
|
370
|
+
id: string;
|
|
371
|
+
name: string;
|
|
372
|
+
kind?: string;
|
|
373
|
+
serieRef?: string;
|
|
374
|
+
volume?: number;
|
|
375
|
+
chapter?: number;
|
|
376
|
+
year?: number;
|
|
377
|
+
airdate?: number;
|
|
378
|
+
overview?: string;
|
|
379
|
+
pages?: number;
|
|
380
|
+
params?: any;
|
|
381
|
+
lang?: string;
|
|
382
|
+
original?: string;
|
|
383
|
+
isbn13?: string;
|
|
384
|
+
openlibraryEditionId?: string;
|
|
385
|
+
openlibraryWorkId?: string;
|
|
386
|
+
googleBooksVolumeId?: string;
|
|
387
|
+
asin?: string;
|
|
388
|
+
modified: number;
|
|
389
|
+
added: number;
|
|
390
|
+
posterv?: number;
|
|
391
|
+
backgroundv?: number;
|
|
392
|
+
cardv?: number;
|
|
393
|
+
}
|
|
394
|
+
export type BookSort = 'modified' | 'added' | 'name' | 'year';
|
|
301
395
|
export interface IServer {
|
|
302
396
|
id: string;
|
|
303
397
|
name?: string;
|
|
@@ -349,8 +443,58 @@ export interface IBackupFile {
|
|
|
349
443
|
error?: string;
|
|
350
444
|
}
|
|
351
445
|
export interface ExternalImage {
|
|
352
|
-
|
|
353
|
-
|
|
446
|
+
type?: string;
|
|
447
|
+
url: RsRequest;
|
|
448
|
+
aspectRatio?: number;
|
|
449
|
+
height?: number;
|
|
450
|
+
lang?: string;
|
|
451
|
+
voteAverage?: number;
|
|
452
|
+
voteCount?: number;
|
|
453
|
+
width?: number;
|
|
454
|
+
}
|
|
455
|
+
export interface Relations {
|
|
456
|
+
peopleDetails?: IPerson[];
|
|
457
|
+
tagsDetails?: ITag[];
|
|
458
|
+
people?: MediaItemReference[];
|
|
459
|
+
tags?: MediaItemReference[];
|
|
460
|
+
series?: SerieInMedia[];
|
|
461
|
+
seriesDetails?: ISerie[];
|
|
462
|
+
movies?: string[];
|
|
463
|
+
moviesDetails?: IMovie[];
|
|
464
|
+
books?: string[];
|
|
465
|
+
booksDetails?: IBook[];
|
|
466
|
+
extImages?: ExternalImage[];
|
|
467
|
+
}
|
|
468
|
+
export type ItemWithRelations<T> = T & {
|
|
469
|
+
relations?: Relations;
|
|
470
|
+
};
|
|
471
|
+
export interface SearchRelations {
|
|
472
|
+
peopleDetails?: IPerson[];
|
|
473
|
+
tagsDetails?: ITag[];
|
|
474
|
+
people?: MediaItemReference[];
|
|
475
|
+
tags?: MediaItemReference[];
|
|
476
|
+
extImages?: ExternalImage[];
|
|
477
|
+
}
|
|
478
|
+
export interface SearchStreamResultBase {
|
|
479
|
+
relations?: SearchRelations;
|
|
480
|
+
images?: ExternalImage[];
|
|
481
|
+
}
|
|
482
|
+
export type SearchStreamResult<K extends string, T> = SearchStreamResultBase & {
|
|
483
|
+
metadata?: Partial<Record<K, T>>;
|
|
484
|
+
};
|
|
485
|
+
export type SearchResult<K extends string, T> = SearchStreamResult<K, T>;
|
|
486
|
+
export type BookSearchResult = SearchResult<'book', IBook>;
|
|
487
|
+
export type MovieSearchResult = SearchResult<'movie', IMovie>;
|
|
488
|
+
export type SerieSearchResult = SearchResult<'serie', ISerie>;
|
|
489
|
+
export type BookSearchStreamResult = SearchStreamResult<'book', IBook>;
|
|
490
|
+
export type MovieSearchStreamResult = SearchStreamResult<'movie', IMovie>;
|
|
491
|
+
export type SerieSearchStreamResult = SearchStreamResult<'serie', ISerie>;
|
|
492
|
+
export type LookupSearchStreamResult = SearchStreamResult<'book' | 'movie' | 'serie', IBook | IMovie | ISerie>;
|
|
493
|
+
export type GroupedSearchStreamPayload<T> = Record<string, T[]>;
|
|
494
|
+
export interface SearchStreamCallbacks<T> {
|
|
495
|
+
onResults?: (results: GroupedSearchStreamPayload<T>) => void;
|
|
496
|
+
onFinished?: () => void;
|
|
497
|
+
onError?: (error: unknown) => void;
|
|
354
498
|
}
|
|
355
499
|
export interface IChannel {
|
|
356
500
|
id: string;
|
|
@@ -759,6 +903,8 @@ export interface RsRequest {
|
|
|
759
903
|
albums?: string[];
|
|
760
904
|
season?: number;
|
|
761
905
|
episode?: number;
|
|
906
|
+
movie?: string;
|
|
907
|
+
book?: SerieInMedia;
|
|
762
908
|
language?: string;
|
|
763
909
|
resolution?: string;
|
|
764
910
|
videoFormat?: string;
|
|
@@ -780,6 +926,7 @@ export interface RsGroupDownload {
|
|
|
780
926
|
groupFilename?: string;
|
|
781
927
|
groupMime?: string;
|
|
782
928
|
requests: RsRequest[];
|
|
929
|
+
infos?: MediaForUpdate;
|
|
783
930
|
}
|
|
784
931
|
/**
|
|
785
932
|
* Request processing status from plugin-based download/processing.
|
package/dist/interfaces.js
CHANGED
|
@@ -14,6 +14,7 @@ export var LibraryTypes;
|
|
|
14
14
|
LibraryTypes["Shows"] = "shows";
|
|
15
15
|
LibraryTypes["Movies"] = "movies";
|
|
16
16
|
LibraryTypes["IPTV"] = "iptv";
|
|
17
|
+
LibraryTypes["Books"] = "books";
|
|
17
18
|
})(LibraryTypes || (LibraryTypes = {}));
|
|
18
19
|
export var LibrarySources;
|
|
19
20
|
(function (LibrarySources) {
|