n8n-nodes-codex 1.0.0
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/LICENSE.md +19 -0
- package/README.md +108 -0
- package/dist/credentials/CodexApi.credentials.d.ts +10 -0
- package/dist/credentials/CodexApi.credentials.js +92 -0
- package/dist/credentials/CodexApi.credentials.js.map +1 -0
- package/dist/icons/codex-dark.svg +7 -0
- package/dist/icons/codex-light.svg +7 -0
- package/dist/icons/codex.svg +7 -0
- package/dist/icons/github.dark.svg +3 -0
- package/dist/icons/github.svg +3 -0
- package/dist/nodes/Codex/Codex.node.d.ts +4 -0
- package/dist/nodes/Codex/Codex.node.js +133 -0
- package/dist/nodes/Codex/Codex.node.js.map +1 -0
- package/dist/nodes/Codex/resources/admin/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/admin/index.js +489 -0
- package/dist/nodes/Codex/resources/admin/index.js.map +1 -0
- package/dist/nodes/Codex/resources/apiKey/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/apiKey/index.js +233 -0
- package/dist/nodes/Codex/resources/apiKey/index.js.map +1 -0
- package/dist/nodes/Codex/resources/book/get.d.ts +2 -0
- package/dist/nodes/Codex/resources/book/get.js +5 -0
- package/dist/nodes/Codex/resources/book/get.js.map +1 -0
- package/dist/nodes/Codex/resources/book/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/book/index.js +450 -0
- package/dist/nodes/Codex/resources/book/index.js.map +1 -0
- package/dist/nodes/Codex/resources/book/list.d.ts +2 -0
- package/dist/nodes/Codex/resources/book/list.js +81 -0
- package/dist/nodes/Codex/resources/book/list.js.map +1 -0
- package/dist/nodes/Codex/resources/book/updateMetadata.d.ts +2 -0
- package/dist/nodes/Codex/resources/book/updateMetadata.js +98 -0
- package/dist/nodes/Codex/resources/book/updateMetadata.js.map +1 -0
- package/dist/nodes/Codex/resources/book/updateProgress.d.ts +2 -0
- package/dist/nodes/Codex/resources/book/updateProgress.js +46 -0
- package/dist/nodes/Codex/resources/book/updateProgress.js.map +1 -0
- package/dist/nodes/Codex/resources/duplicate/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/duplicate/index.js +162 -0
- package/dist/nodes/Codex/resources/duplicate/index.js.map +1 -0
- package/dist/nodes/Codex/resources/filesystem/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/filesystem/index.js +64 -0
- package/dist/nodes/Codex/resources/filesystem/index.js.map +1 -0
- package/dist/nodes/Codex/resources/genre/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/genre/index.js +83 -0
- package/dist/nodes/Codex/resources/genre/index.js.map +1 -0
- package/dist/nodes/Codex/resources/library/create.d.ts +2 -0
- package/dist/nodes/Codex/resources/library/create.js +94 -0
- package/dist/nodes/Codex/resources/library/create.js.map +1 -0
- package/dist/nodes/Codex/resources/library/delete.d.ts +2 -0
- package/dist/nodes/Codex/resources/library/delete.js +5 -0
- package/dist/nodes/Codex/resources/library/delete.js.map +1 -0
- package/dist/nodes/Codex/resources/library/get.d.ts +2 -0
- package/dist/nodes/Codex/resources/library/get.js +5 -0
- package/dist/nodes/Codex/resources/library/get.js.map +1 -0
- package/dist/nodes/Codex/resources/library/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/library/index.js +360 -0
- package/dist/nodes/Codex/resources/library/index.js.map +1 -0
- package/dist/nodes/Codex/resources/library/list.d.ts +2 -0
- package/dist/nodes/Codex/resources/library/list.js +5 -0
- package/dist/nodes/Codex/resources/library/list.js.map +1 -0
- package/dist/nodes/Codex/resources/library/scan.d.ts +2 -0
- package/dist/nodes/Codex/resources/library/scan.js +37 -0
- package/dist/nodes/Codex/resources/library/scan.js.map +1 -0
- package/dist/nodes/Codex/resources/library/update.d.ts +2 -0
- package/dist/nodes/Codex/resources/library/update.js +73 -0
- package/dist/nodes/Codex/resources/library/update.js.map +1 -0
- package/dist/nodes/Codex/resources/metric/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/metric/index.js +154 -0
- package/dist/nodes/Codex/resources/metric/index.js.map +1 -0
- package/dist/nodes/Codex/resources/misc/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/misc/index.js +216 -0
- package/dist/nodes/Codex/resources/misc/index.js.map +1 -0
- package/dist/nodes/Codex/resources/series/get.d.ts +2 -0
- package/dist/nodes/Codex/resources/series/get.js +5 -0
- package/dist/nodes/Codex/resources/series/get.js.map +1 -0
- package/dist/nodes/Codex/resources/series/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/series/index.js +1348 -0
- package/dist/nodes/Codex/resources/series/index.js.map +1 -0
- package/dist/nodes/Codex/resources/series/list.d.ts +2 -0
- package/dist/nodes/Codex/resources/series/list.js +108 -0
- package/dist/nodes/Codex/resources/series/list.js.map +1 -0
- package/dist/nodes/Codex/resources/series/updateMetadata.d.ts +2 -0
- package/dist/nodes/Codex/resources/series/updateMetadata.js +116 -0
- package/dist/nodes/Codex/resources/series/updateMetadata.js.map +1 -0
- package/dist/nodes/Codex/resources/tag/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/tag/index.js +83 -0
- package/dist/nodes/Codex/resources/tag/index.js.map +1 -0
- package/dist/nodes/Codex/resources/task/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/task/index.js +241 -0
- package/dist/nodes/Codex/resources/task/index.js.map +1 -0
- package/dist/nodes/Codex/resources/user/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/user/index.js +362 -0
- package/dist/nodes/Codex/resources/user/index.js.map +1 -0
- package/dist/nodes/Codex/resources/userPreference/index.d.ts +2 -0
- package/dist/nodes/Codex/resources/userPreference/index.js +358 -0
- package/dist/nodes/Codex/resources/userPreference/index.js.map +1 -0
- package/dist/nodes/Codex/shared/descriptions.d.ts +6 -0
- package/dist/nodes/Codex/shared/descriptions.js +94 -0
- package/dist/nodes/Codex/shared/descriptions.js.map +1 -0
- package/dist/package.json +60 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bookDescription = void 0;
|
|
4
|
+
const descriptions_1 = require("../../shared/descriptions");
|
|
5
|
+
const list_1 = require("./list");
|
|
6
|
+
const get_1 = require("./get");
|
|
7
|
+
const updateMetadata_1 = require("./updateMetadata");
|
|
8
|
+
const updateProgress_1 = require("./updateProgress");
|
|
9
|
+
const showOnlyForBooks = {
|
|
10
|
+
resource: ['book'],
|
|
11
|
+
};
|
|
12
|
+
exports.bookDescription = [
|
|
13
|
+
{
|
|
14
|
+
displayName: 'Operation',
|
|
15
|
+
name: 'operation',
|
|
16
|
+
type: 'options',
|
|
17
|
+
noDataExpression: true,
|
|
18
|
+
displayOptions: {
|
|
19
|
+
show: showOnlyForBooks,
|
|
20
|
+
},
|
|
21
|
+
options: [
|
|
22
|
+
{
|
|
23
|
+
name: 'Analyze',
|
|
24
|
+
value: 'analyze',
|
|
25
|
+
action: 'Analyze a book',
|
|
26
|
+
description: 'Trigger analysis of a book',
|
|
27
|
+
routing: {
|
|
28
|
+
request: {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/analyze',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Analyze If Unanalyzed',
|
|
36
|
+
value: 'analyzeUnanalyzed',
|
|
37
|
+
action: 'Analyze if unanalyzed',
|
|
38
|
+
description: 'Trigger analysis only if the book has not been analyzed',
|
|
39
|
+
routing: {
|
|
40
|
+
request: {
|
|
41
|
+
method: 'POST',
|
|
42
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/analyze-unanalyzed',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Delete Progress',
|
|
48
|
+
value: 'deleteProgress',
|
|
49
|
+
action: 'Delete reading progress',
|
|
50
|
+
description: 'Delete reading progress for a book',
|
|
51
|
+
routing: {
|
|
52
|
+
request: {
|
|
53
|
+
method: 'DELETE',
|
|
54
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/progress',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Generate Thumbnail',
|
|
60
|
+
value: 'generateThumbnail',
|
|
61
|
+
action: 'Generate thumbnail',
|
|
62
|
+
description: 'Generate a thumbnail for the book',
|
|
63
|
+
routing: {
|
|
64
|
+
request: {
|
|
65
|
+
method: 'POST',
|
|
66
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/thumbnail/generate',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Get',
|
|
72
|
+
value: 'get',
|
|
73
|
+
action: 'Get a book',
|
|
74
|
+
description: 'Get the data of a single book',
|
|
75
|
+
routing: {
|
|
76
|
+
request: {
|
|
77
|
+
method: 'GET',
|
|
78
|
+
url: '=/api/v1/books/{{$parameter.bookId}}',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Get Adjacent',
|
|
84
|
+
value: 'getAdjacent',
|
|
85
|
+
action: 'Get adjacent books',
|
|
86
|
+
description: 'Get previous and next books in the series',
|
|
87
|
+
routing: {
|
|
88
|
+
request: {
|
|
89
|
+
method: 'GET',
|
|
90
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/adjacent',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Get Errors',
|
|
96
|
+
value: 'getErrors',
|
|
97
|
+
action: 'Get book errors',
|
|
98
|
+
description: 'Get all book processing errors',
|
|
99
|
+
routing: {
|
|
100
|
+
request: {
|
|
101
|
+
method: 'GET',
|
|
102
|
+
url: '/api/v1/books/errors',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'Get File',
|
|
108
|
+
value: 'getFile',
|
|
109
|
+
action: 'Download book file',
|
|
110
|
+
description: 'Download the book file (CBZ, PDF, etc.)',
|
|
111
|
+
routing: {
|
|
112
|
+
request: {
|
|
113
|
+
method: 'GET',
|
|
114
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/file',
|
|
115
|
+
encoding: 'arraybuffer',
|
|
116
|
+
returnFullResponse: true,
|
|
117
|
+
},
|
|
118
|
+
output: {
|
|
119
|
+
postReceive: [
|
|
120
|
+
async function (_items, response) {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
const contentType = ((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a['content-type']) || 'application/octet-stream';
|
|
123
|
+
const contentDisposition = (_b = response === null || response === void 0 ? void 0 : response.headers) === null || _b === void 0 ? void 0 : _b['content-disposition'];
|
|
124
|
+
let filename = 'book';
|
|
125
|
+
if (contentDisposition) {
|
|
126
|
+
const match = contentDisposition.match(/filename="?([^";\n]+)"?/);
|
|
127
|
+
if (match) {
|
|
128
|
+
filename = match[1];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const binaryData = await this.helpers.prepareBinaryData(response === null || response === void 0 ? void 0 : response.body, filename, contentType);
|
|
132
|
+
return [
|
|
133
|
+
{
|
|
134
|
+
json: {},
|
|
135
|
+
binary: {
|
|
136
|
+
data: binaryData,
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'Get In Progress',
|
|
147
|
+
value: 'getInProgress',
|
|
148
|
+
action: 'Get in progress books',
|
|
149
|
+
description: 'Get books currently being read',
|
|
150
|
+
routing: {
|
|
151
|
+
request: {
|
|
152
|
+
method: 'GET',
|
|
153
|
+
url: '/api/v1/books/in-progress',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'Get On Deck',
|
|
159
|
+
value: 'getOnDeck',
|
|
160
|
+
action: 'Get on deck books',
|
|
161
|
+
description: 'Get next books to read',
|
|
162
|
+
routing: {
|
|
163
|
+
request: {
|
|
164
|
+
method: 'GET',
|
|
165
|
+
url: '/api/v1/books/on-deck',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'Get Page',
|
|
171
|
+
value: 'getPage',
|
|
172
|
+
action: 'Get page image',
|
|
173
|
+
description: 'Get a specific page image from the book',
|
|
174
|
+
routing: {
|
|
175
|
+
request: {
|
|
176
|
+
method: 'GET',
|
|
177
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/pages/{{$parameter.pageNumber}}',
|
|
178
|
+
headers: {
|
|
179
|
+
Accept: 'image/jpeg',
|
|
180
|
+
},
|
|
181
|
+
encoding: 'arraybuffer',
|
|
182
|
+
returnFullResponse: true,
|
|
183
|
+
},
|
|
184
|
+
output: {
|
|
185
|
+
postReceive: [
|
|
186
|
+
async function (_items, response) {
|
|
187
|
+
var _a;
|
|
188
|
+
const contentType = ((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a['content-type']) || 'image/jpeg';
|
|
189
|
+
const binaryData = await this.helpers.prepareBinaryData(response === null || response === void 0 ? void 0 : response.body, 'page.jpg', contentType);
|
|
190
|
+
return [
|
|
191
|
+
{
|
|
192
|
+
json: {},
|
|
193
|
+
binary: {
|
|
194
|
+
data: binaryData,
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
];
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: 'Get Progress',
|
|
205
|
+
value: 'getProgress',
|
|
206
|
+
action: 'Get reading progress',
|
|
207
|
+
description: 'Get reading progress for a book',
|
|
208
|
+
routing: {
|
|
209
|
+
request: {
|
|
210
|
+
method: 'GET',
|
|
211
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/progress',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'Get Recently Added',
|
|
217
|
+
value: 'recentlyAdded',
|
|
218
|
+
action: 'Get recently added books',
|
|
219
|
+
description: 'Get recently added books',
|
|
220
|
+
routing: {
|
|
221
|
+
request: {
|
|
222
|
+
method: 'GET',
|
|
223
|
+
url: '/api/v1/books/recently-added',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: 'Get Recently Read',
|
|
229
|
+
value: 'recentlyRead',
|
|
230
|
+
action: 'Get recently read books',
|
|
231
|
+
description: 'Get recently read books',
|
|
232
|
+
routing: {
|
|
233
|
+
request: {
|
|
234
|
+
method: 'GET',
|
|
235
|
+
url: '/api/v1/books/recently-read',
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: 'Get Thumbnail',
|
|
241
|
+
value: 'getThumbnail',
|
|
242
|
+
action: 'Get book thumbnail',
|
|
243
|
+
description: 'Get the thumbnail image for a book',
|
|
244
|
+
routing: {
|
|
245
|
+
request: {
|
|
246
|
+
method: 'GET',
|
|
247
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/thumbnail',
|
|
248
|
+
headers: {
|
|
249
|
+
Accept: 'image/jpeg',
|
|
250
|
+
},
|
|
251
|
+
encoding: 'arraybuffer',
|
|
252
|
+
returnFullResponse: true,
|
|
253
|
+
},
|
|
254
|
+
output: {
|
|
255
|
+
postReceive: [
|
|
256
|
+
async function (_items, response) {
|
|
257
|
+
var _a;
|
|
258
|
+
const contentType = ((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a['content-type']) || 'image/jpeg';
|
|
259
|
+
const binaryData = await this.helpers.prepareBinaryData(response === null || response === void 0 ? void 0 : response.body, 'thumbnail.jpg', contentType);
|
|
260
|
+
return [
|
|
261
|
+
{
|
|
262
|
+
json: {},
|
|
263
|
+
binary: {
|
|
264
|
+
data: binaryData,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
];
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: 'Get With Errors',
|
|
275
|
+
value: 'getWithErrors',
|
|
276
|
+
action: 'Get books with errors',
|
|
277
|
+
description: 'Get books that have processing errors',
|
|
278
|
+
routing: {
|
|
279
|
+
request: {
|
|
280
|
+
method: 'GET',
|
|
281
|
+
url: '/api/v1/books/with-errors',
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
name: 'List',
|
|
287
|
+
value: 'list',
|
|
288
|
+
action: 'List books',
|
|
289
|
+
description: 'List books with optional filters',
|
|
290
|
+
routing: {
|
|
291
|
+
request: {
|
|
292
|
+
method: 'GET',
|
|
293
|
+
url: '/api/v1/books',
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
name: 'Mark As Read',
|
|
299
|
+
value: 'markAsRead',
|
|
300
|
+
action: 'Mark book as read',
|
|
301
|
+
description: 'Mark a book as completed',
|
|
302
|
+
routing: {
|
|
303
|
+
request: {
|
|
304
|
+
method: 'POST',
|
|
305
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/read',
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'Mark As Unread',
|
|
311
|
+
value: 'markAsUnread',
|
|
312
|
+
action: 'Mark book as unread',
|
|
313
|
+
description: 'Mark a book as unread',
|
|
314
|
+
routing: {
|
|
315
|
+
request: {
|
|
316
|
+
method: 'POST',
|
|
317
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/unread',
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
name: 'Retry',
|
|
323
|
+
value: 'retry',
|
|
324
|
+
action: 'Retry errored book',
|
|
325
|
+
description: 'Retry processing a book that had errors',
|
|
326
|
+
routing: {
|
|
327
|
+
request: {
|
|
328
|
+
method: 'POST',
|
|
329
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/retry',
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: 'Retry All Errors',
|
|
335
|
+
value: 'retryAllErrors',
|
|
336
|
+
action: 'Retry all errored books',
|
|
337
|
+
description: 'Retry processing all books that have errors',
|
|
338
|
+
routing: {
|
|
339
|
+
request: {
|
|
340
|
+
method: 'POST',
|
|
341
|
+
url: '/api/v1/books/retry-all-errors',
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: 'Search',
|
|
347
|
+
value: 'search',
|
|
348
|
+
action: 'Search books',
|
|
349
|
+
description: 'Search and filter books',
|
|
350
|
+
routing: {
|
|
351
|
+
request: {
|
|
352
|
+
method: 'POST',
|
|
353
|
+
url: '/api/v1/books/list',
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: 'Update Metadata',
|
|
359
|
+
value: 'updateMetadata',
|
|
360
|
+
action: 'Update book metadata',
|
|
361
|
+
description: 'Update the metadata of a book',
|
|
362
|
+
routing: {
|
|
363
|
+
request: {
|
|
364
|
+
method: 'PATCH',
|
|
365
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/metadata',
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
name: 'Update Progress',
|
|
371
|
+
value: 'updateProgress',
|
|
372
|
+
action: 'Update reading progress',
|
|
373
|
+
description: 'Update reading progress for a book',
|
|
374
|
+
routing: {
|
|
375
|
+
request: {
|
|
376
|
+
method: 'PUT',
|
|
377
|
+
url: '=/api/v1/books/{{$parameter.bookId}}/progress',
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
],
|
|
382
|
+
default: 'list',
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
...descriptions_1.bookSelect,
|
|
386
|
+
displayOptions: {
|
|
387
|
+
show: {
|
|
388
|
+
...showOnlyForBooks,
|
|
389
|
+
operation: [
|
|
390
|
+
'analyze',
|
|
391
|
+
'analyzeUnanalyzed',
|
|
392
|
+
'deleteProgress',
|
|
393
|
+
'generateThumbnail',
|
|
394
|
+
'get',
|
|
395
|
+
'getAdjacent',
|
|
396
|
+
'getFile',
|
|
397
|
+
'getPage',
|
|
398
|
+
'getProgress',
|
|
399
|
+
'getThumbnail',
|
|
400
|
+
'markAsRead',
|
|
401
|
+
'markAsUnread',
|
|
402
|
+
'retry',
|
|
403
|
+
'updateMetadata',
|
|
404
|
+
'updateProgress',
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
displayName: 'Page Number',
|
|
411
|
+
name: 'pageNumber',
|
|
412
|
+
type: 'number',
|
|
413
|
+
default: 1,
|
|
414
|
+
required: true,
|
|
415
|
+
typeOptions: {
|
|
416
|
+
minValue: 1,
|
|
417
|
+
},
|
|
418
|
+
displayOptions: {
|
|
419
|
+
show: {
|
|
420
|
+
resource: ['book'],
|
|
421
|
+
operation: ['getPage'],
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
description: 'The page number to retrieve (1-indexed)',
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
displayName: 'Search Query',
|
|
428
|
+
name: 'bookSearchQuery',
|
|
429
|
+
type: 'string',
|
|
430
|
+
default: '',
|
|
431
|
+
displayOptions: {
|
|
432
|
+
show: {
|
|
433
|
+
resource: ['book'],
|
|
434
|
+
operation: ['search'],
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
description: 'Optional search query for book titles',
|
|
438
|
+
routing: {
|
|
439
|
+
send: {
|
|
440
|
+
type: 'body',
|
|
441
|
+
property: 'query',
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
...list_1.bookListDescription,
|
|
446
|
+
...get_1.bookGetDescription,
|
|
447
|
+
...updateMetadata_1.bookUpdateMetadataDescription,
|
|
448
|
+
...updateProgress_1.bookUpdateProgressDescription,
|
|
449
|
+
];
|
|
450
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Codex/resources/book/index.ts"],"names":[],"mappings":";;;AACA,4DAAuD;AACvD,iCAA6C;AAC7C,+BAA2C;AAC3C,qDAAiE;AACjE,qDAAiE;AAEjE,MAAM,gBAAgB,GAAG;IACxB,QAAQ,EAAE,CAAC,MAAM,CAAC;CAClB,CAAC;AAEW,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE,gBAAgB;SACtB;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,SAAS;gBAChB,MAAM,EAAE,gBAAgB;gBACxB,WAAW,EAAE,4BAA4B;gBACzC,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,8CAA8C;qBACnD;iBACD;aACD;YACD;gBACC,IAAI,EAAE,uBAAuB;gBAC7B,KAAK,EAAE,mBAAmB;gBAC1B,MAAM,EAAE,uBAAuB;gBAC/B,WAAW,EAAE,yDAAyD;gBACtE,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,yDAAyD;qBAC9D;iBACD;aACD;YACD;gBACC,IAAI,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ACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,SAAS,CAAC;aACtB;SACD;QACD,WAAW,EAAE,yCAAyC;KACtD;IAED;QACC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,OAAO;aACjB;SACD;KACD;IACD,GAAG,0BAAmB;IACtB,GAAG,wBAAkB;IACrB,GAAG,8CAA6B;IAChC,GAAG,8CAA6B;CAChC,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bookListDescription = void 0;
|
|
4
|
+
const showOnlyForBookList = {
|
|
5
|
+
operation: ['list'],
|
|
6
|
+
resource: ['book'],
|
|
7
|
+
};
|
|
8
|
+
exports.bookListDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Filters',
|
|
11
|
+
name: 'filters',
|
|
12
|
+
type: 'collection',
|
|
13
|
+
placeholder: 'Add Filter',
|
|
14
|
+
default: {},
|
|
15
|
+
displayOptions: {
|
|
16
|
+
show: showOnlyForBookList,
|
|
17
|
+
},
|
|
18
|
+
options: [
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Series ID',
|
|
21
|
+
name: 'seriesId',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: '',
|
|
24
|
+
description: 'Filter by series ID',
|
|
25
|
+
routing: {
|
|
26
|
+
send: {
|
|
27
|
+
type: 'query',
|
|
28
|
+
property: 'series_id',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Library ID',
|
|
34
|
+
name: 'libraryId',
|
|
35
|
+
type: 'string',
|
|
36
|
+
default: '',
|
|
37
|
+
description: 'Filter by library ID',
|
|
38
|
+
routing: {
|
|
39
|
+
send: {
|
|
40
|
+
type: 'query',
|
|
41
|
+
property: 'library_id',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Page',
|
|
47
|
+
name: 'page',
|
|
48
|
+
type: 'number',
|
|
49
|
+
typeOptions: {
|
|
50
|
+
minValue: 0,
|
|
51
|
+
},
|
|
52
|
+
default: 0,
|
|
53
|
+
description: 'Page number (0-indexed)',
|
|
54
|
+
routing: {
|
|
55
|
+
send: {
|
|
56
|
+
type: 'query',
|
|
57
|
+
property: 'page',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
displayName: 'Page Size',
|
|
63
|
+
name: 'pageSize',
|
|
64
|
+
type: 'number',
|
|
65
|
+
typeOptions: {
|
|
66
|
+
minValue: 1,
|
|
67
|
+
maxValue: 100,
|
|
68
|
+
},
|
|
69
|
+
default: 20,
|
|
70
|
+
description: 'Number of items per page (max 100)',
|
|
71
|
+
routing: {
|
|
72
|
+
send: {
|
|
73
|
+
type: 'query',
|
|
74
|
+
property: 'pageSize',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../nodes/Codex/resources/book/list.ts"],"names":[],"mappings":";;;AAEA,MAAM,mBAAmB,GAAG;IAC3B,SAAS,EAAE,CAAC,MAAM,CAAC;IACnB,QAAQ,EAAE,CAAC,MAAM,CAAC;CA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L,IAAI,EAAE,OAAO;wBACb,QAAQ,EAAE,UAAU;qBACpB;iBACD;aACD;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bookUpdateMetadataDescription = void 0;
|
|
4
|
+
const showOnlyForBookUpdateMetadata = {
|
|
5
|
+
operation: ['updateMetadata'],
|
|
6
|
+
resource: ['book'],
|
|
7
|
+
};
|
|
8
|
+
exports.bookUpdateMetadataDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Metadata Fields',
|
|
11
|
+
name: 'metadataFields',
|
|
12
|
+
type: 'collection',
|
|
13
|
+
placeholder: 'Add Field',
|
|
14
|
+
default: {},
|
|
15
|
+
displayOptions: {
|
|
16
|
+
show: showOnlyForBookUpdateMetadata,
|
|
17
|
+
},
|
|
18
|
+
options: [
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Authors',
|
|
21
|
+
name: 'authors',
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: '',
|
|
24
|
+
description: 'Comma-separated list of authors',
|
|
25
|
+
routing: {
|
|
26
|
+
send: {
|
|
27
|
+
type: 'body',
|
|
28
|
+
property: 'authors',
|
|
29
|
+
preSend: [
|
|
30
|
+
async function (requestOptions) {
|
|
31
|
+
const metadataFields = this.getNodeParameter('metadataFields', 0);
|
|
32
|
+
if (metadataFields.authors) {
|
|
33
|
+
const authors = metadataFields.authors.split(',').map((a) => a.trim());
|
|
34
|
+
requestOptions.body.authors = authors;
|
|
35
|
+
}
|
|
36
|
+
return requestOptions;
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Number',
|
|
44
|
+
name: 'number',
|
|
45
|
+
type: 'string',
|
|
46
|
+
default: '',
|
|
47
|
+
description: 'Book/issue number within the series',
|
|
48
|
+
routing: {
|
|
49
|
+
send: {
|
|
50
|
+
type: 'body',
|
|
51
|
+
property: 'number',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Release Date',
|
|
57
|
+
name: 'releaseDate',
|
|
58
|
+
type: 'string',
|
|
59
|
+
default: '',
|
|
60
|
+
description: 'Release date in YYYY-MM-DD format',
|
|
61
|
+
routing: {
|
|
62
|
+
send: {
|
|
63
|
+
type: 'body',
|
|
64
|
+
property: 'release_date',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Summary',
|
|
70
|
+
name: 'summary',
|
|
71
|
+
type: 'string',
|
|
72
|
+
typeOptions: {
|
|
73
|
+
rows: 4,
|
|
74
|
+
},
|
|
75
|
+
default: '',
|
|
76
|
+
routing: {
|
|
77
|
+
send: {
|
|
78
|
+
type: 'body',
|
|
79
|
+
property: 'summary',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
displayName: 'Title',
|
|
85
|
+
name: 'title',
|
|
86
|
+
type: 'string',
|
|
87
|
+
default: '',
|
|
88
|
+
routing: {
|
|
89
|
+
send: {
|
|
90
|
+
type: 'body',
|
|
91
|
+
property: 'title',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
];
|
|
98
|
+
//# sourceMappingURL=updateMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateMetadata.js","sourceRoot":"","sources":["../../../../../nodes/Codex/resources/book/updateMetadata.ts"],"names":[],"mappings":";;;AAEA,MAAM,6BAA6B,GAAG;IACrC,SAAS,EAAE,CAAC,gBAAgB,CAAC;IAC7B,QAAQ,EAAE,CAAC,MAAM,CAAC;CAClB,CAAC;AAEW,QAAA,6BAA6B,GAAsB;IAC/D;QACC,WAAW,EAAE,iB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