zenodo 3.0.0 → 4.1.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.
Files changed (96) hide show
  1. package/lib/Zenodo.d.ts +22 -31
  2. package/lib/Zenodo.d.ts.map +1 -1
  3. package/lib/Zenodo.js +39 -45
  4. package/lib/Zenodo.js.map +1 -1
  5. package/lib/ZenodoAuthenticationStates.d.ts +6 -5
  6. package/lib/ZenodoAuthenticationStates.d.ts.map +1 -1
  7. package/lib/ZenodoAuthenticationStates.js +3 -5
  8. package/lib/ZenodoAuthenticationStates.js.map +1 -1
  9. package/lib/ZenodoFile.d.ts +26 -1
  10. package/lib/ZenodoFile.d.ts.map +1 -1
  11. package/lib/ZenodoFile.js +2 -3
  12. package/lib/ZenodoFile.js.map +1 -1
  13. package/lib/fetchZenodo.d.ts +2 -2
  14. package/lib/fetchZenodo.d.ts.map +1 -1
  15. package/lib/fetchZenodo.js +94 -11
  16. package/lib/fetchZenodo.js.map +1 -1
  17. package/lib/index.d.ts +0 -1
  18. package/lib/index.d.ts.map +1 -1
  19. package/lib/index.js +0 -1
  20. package/lib/index.js.map +1 -1
  21. package/lib/records/ListDepositionsOptions.d.ts.map +1 -0
  22. package/lib/records/ListDepositionsOptions.js.map +1 -0
  23. package/lib/records/Record.d.ts +36 -0
  24. package/lib/records/Record.d.ts.map +1 -0
  25. package/lib/records/Record.js +231 -0
  26. package/lib/records/Record.js.map +1 -0
  27. package/lib/records/RecordType.d.ts +518 -0
  28. package/lib/records/RecordType.d.ts.map +1 -0
  29. package/lib/records/RecordType.js +2 -0
  30. package/lib/records/RecordType.js.map +1 -0
  31. package/lib/records/RequestType.d.ts +37 -0
  32. package/lib/records/RequestType.d.ts.map +1 -0
  33. package/lib/records/RequestType.js +2 -0
  34. package/lib/records/RequestType.js.map +1 -0
  35. package/lib/utilities/zipFiles.js +1 -1
  36. package/lib/utilities/zipFiles.js.map +1 -1
  37. package/package.json +23 -22
  38. package/src/Zenodo.ts +59 -59
  39. package/src/ZenodoAuthenticationStates.ts +6 -5
  40. package/src/ZenodoFile.ts +24 -4
  41. package/src/fetchZenodo.ts +105 -18
  42. package/src/index.ts +0 -2
  43. package/src/records/Record.ts +311 -0
  44. package/src/records/RecordType.ts +485 -0
  45. package/src/records/RequestType.ts +37 -0
  46. package/src/utilities/zipFiles.ts +1 -1
  47. package/lib/depositions/Deposition.d.ts +0 -98
  48. package/lib/depositions/Deposition.d.ts.map +0 -1
  49. package/lib/depositions/Deposition.js +0 -224
  50. package/lib/depositions/Deposition.js.map +0 -1
  51. package/lib/depositions/ListDepositionsOptions.d.ts.map +0 -1
  52. package/lib/depositions/ListDepositionsOptions.js.map +0 -1
  53. package/lib/depositions/Record.d.ts +0 -10
  54. package/lib/depositions/Record.d.ts.map +0 -1
  55. package/lib/depositions/Record.js +0 -19
  56. package/lib/depositions/Record.js.map +0 -1
  57. package/lib/utilities/ZenodoDepositionSchema.d.ts +0 -473
  58. package/lib/utilities/ZenodoDepositionSchema.d.ts.map +0 -1
  59. package/lib/utilities/ZenodoDepositionSchema.js +0 -80
  60. package/lib/utilities/ZenodoDepositionSchema.js.map +0 -1
  61. package/lib/utilities/ZenodoFileSchema.d.ts +0 -39
  62. package/lib/utilities/ZenodoFileSchema.d.ts.map +0 -1
  63. package/lib/utilities/ZenodoFileSchema.js +0 -37
  64. package/lib/utilities/ZenodoFileSchema.js.map +0 -1
  65. package/lib/utilities/ZenodoMetadataSchema.d.ts +0 -400
  66. package/lib/utilities/ZenodoMetadataSchema.d.ts.map +0 -1
  67. package/lib/utilities/ZenodoMetadataSchema.js +0 -602
  68. package/lib/utilities/ZenodoMetadataSchema.js.map +0 -1
  69. package/lib/utilities/ZenodoRecordSchema.d.ts +0 -544
  70. package/lib/utilities/ZenodoRecordSchema.d.ts.map +0 -1
  71. package/lib/utilities/ZenodoRecordSchema.js +0 -70
  72. package/lib/utilities/ZenodoRecordSchema.js.map +0 -1
  73. package/lib/utilities/ZenodoReviewSchema.d.ts +0 -112
  74. package/lib/utilities/ZenodoReviewSchema.d.ts.map +0 -1
  75. package/lib/utilities/ZenodoReviewSchema.js +0 -80
  76. package/lib/utilities/ZenodoReviewSchema.js.map +0 -1
  77. package/lib/utilities/licensesEnum.d.ts +0 -4
  78. package/lib/utilities/licensesEnum.d.ts.map +0 -1
  79. package/lib/utilities/licensesEnum.js +0 -449
  80. package/lib/utilities/licensesEnum.js.map +0 -1
  81. package/lib/utilities/schemaValidation.d.ts +0 -50
  82. package/lib/utilities/schemaValidation.d.ts.map +0 -1
  83. package/lib/utilities/schemaValidation.js +0 -124
  84. package/lib/utilities/schemaValidation.js.map +0 -1
  85. package/src/depositions/Deposition.ts +0 -272
  86. package/src/depositions/Record.ts +0 -25
  87. package/src/utilities/ZenodoDepositionSchema.ts +0 -90
  88. package/src/utilities/ZenodoFileSchema.ts +0 -40
  89. package/src/utilities/ZenodoMetadataSchema.ts +0 -608
  90. package/src/utilities/ZenodoRecordSchema.ts +0 -75
  91. package/src/utilities/ZenodoReviewSchema.ts +0 -84
  92. package/src/utilities/licensesEnum.ts +0 -448
  93. package/src/utilities/schemaValidation.ts +0 -150
  94. /package/lib/{depositions → records}/ListDepositionsOptions.d.ts +0 -0
  95. /package/lib/{depositions → records}/ListDepositionsOptions.js +0 -0
  96. /package/src/{depositions → records}/ListDepositionsOptions.ts +0 -0
@@ -0,0 +1,485 @@
1
+ /**
2
+ * An identifier.
3
+ */
4
+ export type Identifier = string | number;
5
+ /**
6
+ * Type of name.
7
+ */
8
+ export type NameType = 'personal' | 'organizational';
9
+ /**
10
+ * A scheme.
11
+ */
12
+ export type Scheme = string;
13
+ export type Affiliations = Affiliation[];
14
+ export type Subjects = Subject[];
15
+ export type GeoJSONGeometry =
16
+ | GeoJSONPoint
17
+ | GeoJSONLineString
18
+ | GeoJSONPolygon
19
+ | GeoJSONMultiPoint
20
+ | GeoJSONMultiLineString
21
+ | GeoJSONMultiPolygon;
22
+ /**
23
+ * An agent (user, software process, community, ...).
24
+ */
25
+ export type Agent = User | null;
26
+
27
+ export interface ZenodoRecord {
28
+ $schema?: string;
29
+ id?: Identifier;
30
+ pid?: InternalPid;
31
+ /**
32
+ * External persistent identifiers for a record including e.g. OAI-PMH identifier, minted DOIs and more. PIDs are registered in the PIDStore.
33
+ */
34
+ pids?: Record<string, ExternalPid>;
35
+ links?: {
36
+ self?: string;
37
+ self_html?: string;
38
+ preview_html?: string;
39
+ reserve_doi?: string;
40
+ doi?: string;
41
+ doi_html?: string;
42
+ parent_doi?: string;
43
+ parent_doi_html?: string;
44
+ self_iiif_manifest?: string;
45
+ self_iiif_sequence?: string;
46
+ files?: string;
47
+ media_files?: string;
48
+ archive?: string;
49
+ archive_media?: string;
50
+ versions?: string;
51
+ record?: string;
52
+ record_html?: string;
53
+ publish?: string;
54
+ review?: string;
55
+ access_links?: string;
56
+ access_grants?: string;
57
+ access_users?: string;
58
+ access_request?: string;
59
+ access?: string;
60
+ communities?: string;
61
+ communities_suggestions?: string;
62
+ requests?: string;
63
+ };
64
+ metadata?: ZenodoMetadata;
65
+ /**
66
+ * Configured additional metadata
67
+ */
68
+ custom_fields?: Record<string, unknown>;
69
+ /**
70
+ * Tombstone information for the record.
71
+ */
72
+ tombstone?: {
73
+ /**
74
+ * Reason for record removal.
75
+ */
76
+ removal_reason?: {
77
+ id?: Identifier;
78
+ };
79
+ /**
80
+ * Public note about the removal.
81
+ */
82
+ note?: string;
83
+ removed_by?: Agent;
84
+ /**
85
+ * ISO8601 formatted timestamp in UTC.
86
+ */
87
+ removal_date?: string;
88
+ /**
89
+ * The record citation text to be displayed on the tombstone page.
90
+ */
91
+ citation_text?: string;
92
+ /**
93
+ * Whether or not the tombstone page is publicly visible.
94
+ */
95
+ is_visible?: boolean;
96
+ };
97
+ internal_notes?: Array<{
98
+ id?: string;
99
+ note?: string;
100
+ /**
101
+ * ISO8601 formatted timestamp in UTC.
102
+ */
103
+ timestamp?: string;
104
+ added_by?: Agent;
105
+ [k: string]: unknown;
106
+ }>;
107
+ /**
108
+ * Record provenance.
109
+ */
110
+ provenance?: {
111
+ created_by?: Agent;
112
+ on_behalf_of?: Agent;
113
+ };
114
+ /**
115
+ * Record access control and ownership.
116
+ */
117
+ access?: ZenodoRecordAccess;
118
+ files?: FilesSimple;
119
+ media_files?: FilesSimple;
120
+ notes?: string[];
121
+ status?: string;
122
+ }
123
+ /**
124
+ * An internal persistent identifier object.
125
+ */
126
+ export interface InternalPid {
127
+ /**
128
+ * Primary key of the PID object.
129
+ */
130
+ pk: number;
131
+ /**
132
+ * The status of the PID (from Invenio-PIDStore).
133
+ */
134
+ status: 'N' | 'K' | 'R' | 'M' | 'D';
135
+ /**
136
+ * The type of the persistent identifier.
137
+ */
138
+ pid_type?: string;
139
+ /**
140
+ * The type of the associated object.
141
+ */
142
+ obj_type?: string;
143
+ }
144
+ /**
145
+ * An external persistent identifier object.
146
+ */
147
+ export interface ExternalPid {
148
+ identifier?: Identifier;
149
+ /**
150
+ * The provider of the persistent identifier.
151
+ */
152
+ provider?: string;
153
+ /**
154
+ * Client identifier for the specific PID.
155
+ */
156
+ client?: string;
157
+ }
158
+ /**
159
+ * Record access control and ownership.
160
+ */
161
+ export interface ZenodoRecordAccess {
162
+ /**
163
+ * Record metadata visibility. Zenodo only exposes the public value —
164
+ * fully private records are not an option the platform supports.
165
+ */
166
+ record?: 'public';
167
+ /**
168
+ * Files visibility (public or restricted).
169
+ */
170
+ files?: 'public' | 'restricted';
171
+ /**
172
+ * Description of the embargo on the record.
173
+ */
174
+ embargo?: {
175
+ /**
176
+ * Whether or not the embargo is (still) active.
177
+ */
178
+ active?: boolean | null;
179
+ /**
180
+ * Embargo date of record (ISO8601 formatted date time in UTC). At this time both metadata and files will be made public.
181
+ */
182
+ until?: string | null;
183
+ /**
184
+ * The reason why the record is under embargo.
185
+ */
186
+ reason?: string | null;
187
+ };
188
+ }
189
+
190
+ /**
191
+ * Resource metadata.
192
+ */
193
+ export interface ZenodoMetadata {
194
+ resource_type?: ResourceType;
195
+ /**
196
+ * Creators of the resource.
197
+ */
198
+ creators?: Array<{
199
+ person_or_org?: PersonOrOrg;
200
+ role?: Role;
201
+ affiliations?: Affiliations;
202
+ }>;
203
+ /**
204
+ * Primary title of the record.
205
+ */
206
+ title?: string;
207
+ /**
208
+ * Additional record titles.
209
+ */
210
+ additional_titles?: Array<{
211
+ /**
212
+ * Additional title of the record.
213
+ */
214
+ title?: string;
215
+ type?: TitleType;
216
+ lang?: Language;
217
+ }>;
218
+ publisher?: string;
219
+ /**
220
+ * Record publication date (EDTF level 0 format).
221
+ */
222
+ publication_date?: string;
223
+ subjects?: Subjects;
224
+ /**
225
+ * Contributors in order of importance.
226
+ */
227
+ contributors?: Array<{
228
+ person_or_org?: PersonOrOrg;
229
+ role?: Role;
230
+ affiliations?: Affiliations;
231
+ }>;
232
+ /**
233
+ * Date, datetime or date interval.
234
+ */
235
+ dates?: Array<{
236
+ /**
237
+ * Date, datetime or date interval in EDTF level 0 format
238
+ */
239
+ date?: string;
240
+ type?: DateType;
241
+ /**
242
+ * Description of the date, datetime or date interval e.g. 'Accepted' or 'Available' (CV).
243
+ */
244
+ description?: string;
245
+ }>;
246
+ /**
247
+ * The primary languages of the resource. ISO 639-3 language code.
248
+ */
249
+ languages?: Language[];
250
+ /**
251
+ * Alternate identifiers for the record.
252
+ */
253
+ identifiers?: IdentifiersWithScheme[];
254
+ related_identifiers?: Array<{
255
+ identifier?: Identifier;
256
+ scheme?: Scheme;
257
+ relation_type?: RelationType;
258
+ resource_type?: ResourceType;
259
+ }>;
260
+ sizes?: string[];
261
+ formats?: string[];
262
+ /**
263
+ * Record version tag.
264
+ */
265
+ version?: string;
266
+ /**
267
+ * Any license or copyright information for this resource.
268
+ */
269
+ rights?: Array<{
270
+ id?: Identifier;
271
+ /**
272
+ * The license name or license itself. Free text.
273
+ */
274
+ title?: Record<string, unknown>;
275
+ /**
276
+ * The license description Free text.
277
+ */
278
+ description?: Record<string, unknown>;
279
+ link?: string;
280
+ }>;
281
+ /**
282
+ * Copyright for record (may contain HTML).
283
+ */
284
+ copyright?: string;
285
+ /**
286
+ * Description for record (may contain HTML).
287
+ */
288
+ description?: string;
289
+ additional_descriptions?: Array<{
290
+ /**
291
+ * Description for record.
292
+ */
293
+ description?: string;
294
+ type?: DescriptionType;
295
+ lang?: Language;
296
+ }>;
297
+ /**
298
+ * Geographical locations relevant to this record.
299
+ */
300
+ locations?: {
301
+ features?: [
302
+ {
303
+ geometry?: GeoJSONGeometry & {
304
+ type?: unknown;
305
+ coordinates?: unknown;
306
+ };
307
+ identifiers?: IdentifiersWithScheme[];
308
+ /**
309
+ * Place of the location
310
+ */
311
+ place?: string;
312
+ /**
313
+ * Description of the location
314
+ */
315
+ description?: string;
316
+ },
317
+ ...Array<{
318
+ geometry?: GeoJSONGeometry & {
319
+ type?: unknown;
320
+ coordinates?: unknown;
321
+ };
322
+ identifiers?: IdentifiersWithScheme[];
323
+ /**
324
+ * Place of the location
325
+ */
326
+ place?: string;
327
+ /**
328
+ * Description of the location
329
+ */
330
+ description?: string;
331
+ }>,
332
+ ];
333
+ };
334
+ funding?: Array<{
335
+ funder?: {
336
+ name?: string;
337
+ id?: Identifier;
338
+ };
339
+ award?: {
340
+ title?: Record<string, unknown>;
341
+ number?: string;
342
+ id?: Identifier;
343
+ identifiers?: IdentifiersWithScheme[];
344
+ };
345
+ }>;
346
+ references?: Array<{
347
+ /**
348
+ * A reference string.
349
+ */
350
+ reference?: string;
351
+ identifier?: Identifier;
352
+ scheme?: Scheme;
353
+ }>;
354
+ }
355
+ /**
356
+ * A resource type.
357
+ */
358
+ export interface ResourceType {
359
+ id?: Identifier;
360
+ }
361
+ export interface PersonOrOrg {
362
+ name?: string;
363
+ type?: NameType;
364
+ given_name?: string;
365
+ family_name?: string;
366
+ identifiers?: IdentifiersWithScheme[];
367
+ }
368
+ /**
369
+ * Identifiers object with identifier value and scheme in separate keys.
370
+ */
371
+ export interface IdentifiersWithScheme {
372
+ identifier?: Identifier;
373
+ scheme?: Scheme;
374
+ }
375
+ /**
376
+ * Role of creator/contributor.
377
+ */
378
+ export interface Role {
379
+ id?: Identifier;
380
+ }
381
+ export interface Affiliation {
382
+ id?: Identifier;
383
+ name?: string;
384
+ }
385
+ /**
386
+ * Type of title.
387
+ */
388
+ export interface TitleType {
389
+ id?: Identifier;
390
+ }
391
+ export interface Language {
392
+ id?: string;
393
+ }
394
+ /**
395
+ * Term related to entry.
396
+ */
397
+ export interface Subject {
398
+ id?: Identifier;
399
+ subject?: string;
400
+ }
401
+ /**
402
+ * Type of the date.
403
+ */
404
+ export interface DateType {
405
+ id?: Identifier;
406
+ }
407
+ /**
408
+ * A relation type.
409
+ */
410
+ export interface RelationType {
411
+ id?: Identifier;
412
+ }
413
+ /**
414
+ * A description type.
415
+ */
416
+ export interface DescriptionType {
417
+ id?: string;
418
+ }
419
+ export interface GeoJSONPoint {
420
+ type: 'Point';
421
+ coordinates: [number, number, ...number[]];
422
+ }
423
+ export interface GeoJSONLineString {
424
+ type: 'LineString';
425
+ coordinates: [
426
+ [number, number, ...number[]],
427
+ [number, number, ...number[]],
428
+ ...Array<[number, number, ...number[]]>,
429
+ ];
430
+ }
431
+ export interface GeoJSONPolygon {
432
+ type: 'Polygon';
433
+ coordinates: Array<
434
+ [
435
+ [number, number, ...number[]],
436
+ [number, number, ...number[]],
437
+ [number, number, ...number[]],
438
+ [number, number, ...number[]],
439
+ ...Array<[number, number, ...number[]]>,
440
+ ]
441
+ >;
442
+ }
443
+ export interface GeoJSONMultiPoint {
444
+ type: 'MultiPoint';
445
+ coordinates: Array<[number, number, ...number[]]>;
446
+ }
447
+ export interface GeoJSONMultiLineString {
448
+ type: 'MultiLineString';
449
+ coordinates: Array<
450
+ [
451
+ [number, number, ...number[]],
452
+ [number, number, ...number[]],
453
+ ...Array<[number, number, ...number[]]>,
454
+ ]
455
+ >;
456
+ }
457
+ export interface GeoJSONMultiPolygon {
458
+ type: 'MultiPolygon';
459
+ coordinates: Array<
460
+ Array<
461
+ [
462
+ [number, number, ...number[]],
463
+ [number, number, ...number[]],
464
+ [number, number, ...number[]],
465
+ [number, number, ...number[]],
466
+ ...Array<[number, number, ...number[]]>,
467
+ ]
468
+ >
469
+ >;
470
+ }
471
+ /**
472
+ * User object.
473
+ */
474
+ export interface User {
475
+ user?: string | number;
476
+ }
477
+ /**
478
+ * Files associated with the object.
479
+ */
480
+ export interface FilesSimple {
481
+ /**
482
+ * Set to false for metadata only records.
483
+ */
484
+ enabled?: boolean;
485
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * An identifier.
3
+ */
4
+ export type Identifier = string;
5
+
6
+ export interface ZenodoReview {
7
+ $schema?: string;
8
+ id?: Identifier;
9
+ created?: string;
10
+ created_by?: {
11
+ user?: Identifier;
12
+ };
13
+ expires_at?: string;
14
+ is_closed?: boolean;
15
+ is_expired?: boolean;
16
+ is_open?: boolean;
17
+ links?: {
18
+ actions?: {
19
+ submit?: string;
20
+ };
21
+ comments?: string;
22
+ self?: string;
23
+ self_html?: string;
24
+ timeline?: string;
25
+ };
26
+ number: string;
27
+ receiver?: {
28
+ community?: Identifier;
29
+ };
30
+ revision_id?: number;
31
+ status?: string;
32
+ topic?: {
33
+ record?: Identifier;
34
+ };
35
+ type?: string;
36
+ updated?: string;
37
+ }
@@ -18,7 +18,7 @@ export async function zipFiles(files: File[], zipName: string): Promise<File> {
18
18
  const zipWriter = new ZipWriter(zipFileStream.writable);
19
19
 
20
20
  const attachmentPromises = files.map((file) =>
21
- zipWriter.add(file.name, file.stream()),
21
+ zipWriter.add(`${zipName}/${file.name}`, file.stream()),
22
22
  );
23
23
 
24
24
  await Promise.all(attachmentPromises);
@@ -1,98 +0,0 @@
1
- import type { Zenodo } from '../Zenodo.ts';
2
- import { ZenodoFile } from '../ZenodoFile.ts';
3
- import type { ZenodoDeposition } from '../utilities/ZenodoDepositionSchema.ts';
4
- import type { ZenodoMetadata } from '../utilities/ZenodoMetadataSchema.ts';
5
- import type { ZenodoReview } from '../utilities/ZenodoReviewSchema.ts';
6
- export declare class Deposition {
7
- private zenodo;
8
- value: ZenodoDeposition;
9
- constructor(zenodo: Zenodo, deposition: unknown);
10
- /**
11
- * This method creates a new file in the deposition. If the file is already it will first
12
- * delete the existing file and then create a new one.
13
- * @param file - the file to create in the deposition
14
- * @returns the created file object
15
- */
16
- createFile(file: File): Promise<ZenodoFile>;
17
- /**
18
- * Creates multiple files in the deposition. It will attempt to create each file
19
- * multiple times with delays in between until all files are successfully created or
20
- * the maximum number of attempts is reached.
21
- * @param filesAndNames - an array of File objects to be created in the deposition
22
- * @returns an array of the created ZenodoFile objects
23
- */
24
- createFiles(filesAndNames: File[]): Promise<ZenodoFile[]>;
25
- /**
26
- * Creates a zip file from multiple files and uploads it to the deposition.
27
- * @param filesAndNames - an array of File objects to be created in the deposition
28
- * @param zipName - the name of the zip file to be created
29
- * @returns an array of the created ZenodoFile objects
30
- */
31
- createFilesAsZip(filesAndNames: File[], zipName: string): Promise<ZenodoFile[]>;
32
- /**
33
- * List all files in the deposition
34
- * @returns an array of ZenodoFile objects
35
- */
36
- listFiles(): Promise<ZenodoFile[]>;
37
- /**
38
- * Delete a file from the deposition
39
- * @param id - the ID or the name of the file to delete
40
- */
41
- deleteFile(id: string): Promise<void>;
42
- /**
43
- * delete all files from the deposition
44
- */
45
- deleteAllFiles(): Promise<void>;
46
- /**
47
- * Retrieve a file from the deposition
48
- * @param id - the ID or the name of the file to retrieve
49
- * @returns the file object
50
- */
51
- retrieveFile(id: string): Promise<ZenodoFile>;
52
- /**
53
- * Update the metadata of the deposition
54
- * @param metadata - the new metadata to update the deposition with
55
- * @returns the updated deposition object
56
- */
57
- update(metadata: ZenodoMetadata): Promise<Deposition>;
58
- /**
59
- * Publish the deposition. This will make it publicly available.
60
- * !!! Note that the deposition cannot be deleted after it is published.
61
- * @returns the updated deposition object after publishing
62
- */
63
- publish(): Promise<Deposition>;
64
- /**
65
- * Creates a new version of a published deposition.
66
- * This is useful for updating the deposition with new files or metadata.
67
- * The new version will have a new ID and will not overwrite the existing deposition.
68
- * @returns a new deposition object that is a new version of the current deposition
69
- */
70
- newVersion(): Promise<Deposition>;
71
- /**
72
- * Upload a file to the deposition
73
- * @param file - the file to upload to the deposition
74
- * @returns the created file object
75
- */
76
- uploadFile(file: File): Promise<ZenodoFile>;
77
- /**
78
- * Submits the deposition for review via browser.
79
- * CORS request won't work from the other endpoint when using a browser.
80
- * If a URL is provided, it will use that URL to submit the request.
81
- * Otherwise, it will find the request for the current deposition and submit it.
82
- * This is not the intended endpoint for submitting requests via browser.
83
- * But the base endpoint is not CORS enabled.
84
- * You can find the method with the right endpoint at:
85
- * https://github.com/cheminfo/zenodo/blob/7fbf3e8bb44246b3465b94b68c21cd3f4fee3bf6/src/depositions/Deposition.ts#L286-L301
86
- * @param url - optional URL to submit the request
87
- * @returns The submitted Zenodo request object
88
- */
89
- submitForReview(url?: string): Promise<ZenodoReview>;
90
- /**
91
- * Adds the deposition to a community.
92
- * This method adds the deposition to a community by creating a review request.
93
- * @param communityId - the ID of the community to add the deposition to
94
- * @returns the response from the Zenodo API
95
- */
96
- addToCommunity(communityId: string): Promise<unknown>;
97
- }
98
- //# sourceMappingURL=Deposition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Deposition.d.ts","sourceRoot":"","sources":["../../src/depositions/Deposition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAIvE,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAS;IAChB,KAAK,EAAE,gBAAgB,CAAC;gBAEnB,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO;IAK/C;;;;;OAKG;IACG,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC;IAQjD;;;;;;OAMG;IACG,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAK/D;;;;;OAKG;IACG,gBAAgB,CACpB,aAAa,EAAE,IAAI,EAAE,EACrB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,EAAE,CAAC;IAKxB;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;IAWxC;;;OAGG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW3C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAUrC;;;;OAIG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAWnD;;;;OAIG;IACG,MAAM,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAW3D;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAWpC;;;;;OAKG;IACG,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC;IAsBvC;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC;IAiBjD;;;;;;;;;;;OAWG;IACG,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAqC1D;;;;;OAKG;IACG,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAgB5D"}