@moredrive/cli 1.3.0 → 1.4.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.
@@ -5,6 +5,725 @@
5
5
  "$defs": {
6
6
  "successOutput": {
7
7
  "oneOf": [
8
+ {
9
+ "type": "object",
10
+ "properties": {
11
+ "schemaVersion": {
12
+ "const": "moredrive.cli.v2"
13
+ },
14
+ "ok": {
15
+ "const": true
16
+ },
17
+ "command": {
18
+ "const": "stream"
19
+ },
20
+ "data": {
21
+ "type": "object",
22
+ "properties": {
23
+ "fsId": {
24
+ "type": "string"
25
+ },
26
+ "bytesServed": {
27
+ "type": "integer",
28
+ "minimum": 0
29
+ },
30
+ "status": {
31
+ "const": "stopped"
32
+ }
33
+ },
34
+ "required": [
35
+ "fsId",
36
+ "bytesServed",
37
+ "status"
38
+ ],
39
+ "additionalProperties": false
40
+ },
41
+ "warnings": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "object",
45
+ "properties": {
46
+ "code": {
47
+ "type": "string"
48
+ },
49
+ "message": {
50
+ "type": "string"
51
+ },
52
+ "details": {
53
+ "type": "object",
54
+ "properties": {
55
+ "idempotencyKey": {
56
+ "type": "string"
57
+ },
58
+ "operationId": {
59
+ "type": "string"
60
+ },
61
+ "causeCode": {
62
+ "type": "string"
63
+ },
64
+ "maxFileSizeBytes": {
65
+ "type": "integer"
66
+ },
67
+ "actualFileSizeBytes": {
68
+ "type": "integer"
69
+ },
70
+ "capabilityRevision": {
71
+ "type": "string"
72
+ },
73
+ "reason": {
74
+ "type": "string"
75
+ },
76
+ "attempt": {
77
+ "type": "integer"
78
+ },
79
+ "status": {
80
+ "type": "integer"
81
+ },
82
+ "errno": {
83
+ "type": "integer"
84
+ },
85
+ "path": {
86
+ "type": "string"
87
+ },
88
+ "target": {
89
+ "type": "string"
90
+ }
91
+ },
92
+ "required": [],
93
+ "additionalProperties": false
94
+ }
95
+ },
96
+ "required": [
97
+ "code",
98
+ "message"
99
+ ],
100
+ "additionalProperties": false
101
+ }
102
+ },
103
+ "meta": {
104
+ "type": "object",
105
+ "properties": {
106
+ "requestId": {
107
+ "type": "string"
108
+ },
109
+ "durationMs": {
110
+ "type": "number"
111
+ },
112
+ "baseUrl": {
113
+ "type": "string"
114
+ }
115
+ },
116
+ "required": [
117
+ "durationMs",
118
+ "baseUrl"
119
+ ],
120
+ "additionalProperties": false
121
+ }
122
+ },
123
+ "required": [
124
+ "schemaVersion",
125
+ "ok",
126
+ "command",
127
+ "data",
128
+ "warnings",
129
+ "meta"
130
+ ],
131
+ "additionalProperties": false
132
+ },
133
+ {
134
+ "type": "object",
135
+ "properties": {
136
+ "schemaVersion": {
137
+ "const": "moredrive.cli.v2"
138
+ },
139
+ "ok": {
140
+ "const": true
141
+ },
142
+ "command": {
143
+ "const": "media.thumbnails"
144
+ },
145
+ "data": {
146
+ "type": "object",
147
+ "properties": {
148
+ "operation": {
149
+ "const": "thumbnails"
150
+ },
151
+ "account": {
152
+ "type": "string"
153
+ },
154
+ "remoteDirectory": {
155
+ "type": "string"
156
+ },
157
+ "output": {
158
+ "type": [
159
+ "string",
160
+ "null"
161
+ ]
162
+ },
163
+ "uploaded": {
164
+ "const": false
165
+ },
166
+ "status": {
167
+ "enum": [
168
+ "completed",
169
+ "partial",
170
+ "failed",
171
+ "no-op"
172
+ ]
173
+ },
174
+ "generated": {
175
+ "type": "integer",
176
+ "minimum": 0
177
+ },
178
+ "reused": {
179
+ "type": "integer",
180
+ "minimum": 0
181
+ },
182
+ "failed": {
183
+ "type": "integer",
184
+ "minimum": 0
185
+ },
186
+ "bytesRead": {
187
+ "type": "integer",
188
+ "minimum": 0
189
+ },
190
+ "packBytesRead": {
191
+ "type": "integer",
192
+ "minimum": 0
193
+ },
194
+ "items": {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "object",
198
+ "properties": {
199
+ "fsId": {
200
+ "type": "string"
201
+ },
202
+ "name": {
203
+ "type": "string"
204
+ },
205
+ "status": {
206
+ "enum": [
207
+ "generated",
208
+ "reused",
209
+ "failed"
210
+ ]
211
+ },
212
+ "reason": {
213
+ "type": "string"
214
+ },
215
+ "bytesRead": {
216
+ "type": "integer",
217
+ "minimum": 0
218
+ },
219
+ "requests": {
220
+ "type": "integer",
221
+ "minimum": 0
222
+ }
223
+ },
224
+ "required": [
225
+ "fsId",
226
+ "name",
227
+ "status",
228
+ "bytesRead",
229
+ "requests"
230
+ ],
231
+ "additionalProperties": false
232
+ }
233
+ }
234
+ },
235
+ "required": [
236
+ "operation",
237
+ "account",
238
+ "remoteDirectory",
239
+ "output",
240
+ "uploaded",
241
+ "status",
242
+ "generated",
243
+ "reused",
244
+ "failed",
245
+ "bytesRead",
246
+ "packBytesRead",
247
+ "items"
248
+ ],
249
+ "additionalProperties": false
250
+ },
251
+ "warnings": {
252
+ "type": "array",
253
+ "items": {
254
+ "type": "object",
255
+ "properties": {
256
+ "code": {
257
+ "type": "string"
258
+ },
259
+ "message": {
260
+ "type": "string"
261
+ },
262
+ "details": {
263
+ "type": "object",
264
+ "properties": {
265
+ "idempotencyKey": {
266
+ "type": "string"
267
+ },
268
+ "operationId": {
269
+ "type": "string"
270
+ },
271
+ "causeCode": {
272
+ "type": "string"
273
+ },
274
+ "maxFileSizeBytes": {
275
+ "type": "integer"
276
+ },
277
+ "actualFileSizeBytes": {
278
+ "type": "integer"
279
+ },
280
+ "capabilityRevision": {
281
+ "type": "string"
282
+ },
283
+ "reason": {
284
+ "type": "string"
285
+ },
286
+ "attempt": {
287
+ "type": "integer"
288
+ },
289
+ "status": {
290
+ "type": "integer"
291
+ },
292
+ "errno": {
293
+ "type": "integer"
294
+ },
295
+ "path": {
296
+ "type": "string"
297
+ },
298
+ "target": {
299
+ "type": "string"
300
+ }
301
+ },
302
+ "required": [],
303
+ "additionalProperties": false
304
+ }
305
+ },
306
+ "required": [
307
+ "code",
308
+ "message"
309
+ ],
310
+ "additionalProperties": false
311
+ }
312
+ },
313
+ "meta": {
314
+ "type": "object",
315
+ "properties": {
316
+ "requestId": {
317
+ "type": "string"
318
+ },
319
+ "durationMs": {
320
+ "type": "number"
321
+ },
322
+ "baseUrl": {
323
+ "type": "string"
324
+ }
325
+ },
326
+ "required": [
327
+ "durationMs",
328
+ "baseUrl"
329
+ ],
330
+ "additionalProperties": false
331
+ }
332
+ },
333
+ "required": [
334
+ "schemaVersion",
335
+ "ok",
336
+ "command",
337
+ "data",
338
+ "warnings",
339
+ "meta"
340
+ ],
341
+ "additionalProperties": false
342
+ },
343
+ {
344
+ "type": "object",
345
+ "properties": {
346
+ "schemaVersion": {
347
+ "const": "moredrive.cli.v2"
348
+ },
349
+ "ok": {
350
+ "const": true
351
+ },
352
+ "command": {
353
+ "const": "media.encrypt"
354
+ },
355
+ "data": {
356
+ "type": "object",
357
+ "properties": {
358
+ "operation": {
359
+ "enum": [
360
+ "encrypt",
361
+ "decrypt"
362
+ ]
363
+ },
364
+ "input": {
365
+ "type": "string"
366
+ },
367
+ "output": {
368
+ "type": "string"
369
+ },
370
+ "status": {
371
+ "enum": [
372
+ "completed",
373
+ "partial",
374
+ "failed",
375
+ "cancelled",
376
+ "no-op"
377
+ ]
378
+ },
379
+ "completed": {
380
+ "type": "integer",
381
+ "minimum": 0
382
+ },
383
+ "failed": {
384
+ "type": "integer",
385
+ "minimum": 0
386
+ },
387
+ "skipped": {
388
+ "type": "integer",
389
+ "minimum": 0
390
+ },
391
+ "bytesRead": {
392
+ "type": "integer",
393
+ "minimum": 0
394
+ },
395
+ "items": {
396
+ "type": "array",
397
+ "items": {
398
+ "type": "object",
399
+ "properties": {
400
+ "input": {
401
+ "type": "string"
402
+ },
403
+ "output": {
404
+ "type": "string"
405
+ },
406
+ "status": {
407
+ "enum": [
408
+ "completed",
409
+ "skipped",
410
+ "failed"
411
+ ]
412
+ },
413
+ "reason": {
414
+ "type": "string"
415
+ },
416
+ "bytesRead": {
417
+ "type": "integer",
418
+ "minimum": 0
419
+ }
420
+ },
421
+ "required": [
422
+ "input",
423
+ "status",
424
+ "bytesRead"
425
+ ],
426
+ "additionalProperties": false
427
+ }
428
+ }
429
+ },
430
+ "required": [
431
+ "operation",
432
+ "input",
433
+ "output",
434
+ "status",
435
+ "completed",
436
+ "failed",
437
+ "skipped",
438
+ "bytesRead",
439
+ "items"
440
+ ],
441
+ "additionalProperties": false
442
+ },
443
+ "warnings": {
444
+ "type": "array",
445
+ "items": {
446
+ "type": "object",
447
+ "properties": {
448
+ "code": {
449
+ "type": "string"
450
+ },
451
+ "message": {
452
+ "type": "string"
453
+ },
454
+ "details": {
455
+ "type": "object",
456
+ "properties": {
457
+ "idempotencyKey": {
458
+ "type": "string"
459
+ },
460
+ "operationId": {
461
+ "type": "string"
462
+ },
463
+ "causeCode": {
464
+ "type": "string"
465
+ },
466
+ "maxFileSizeBytes": {
467
+ "type": "integer"
468
+ },
469
+ "actualFileSizeBytes": {
470
+ "type": "integer"
471
+ },
472
+ "capabilityRevision": {
473
+ "type": "string"
474
+ },
475
+ "reason": {
476
+ "type": "string"
477
+ },
478
+ "attempt": {
479
+ "type": "integer"
480
+ },
481
+ "status": {
482
+ "type": "integer"
483
+ },
484
+ "errno": {
485
+ "type": "integer"
486
+ },
487
+ "path": {
488
+ "type": "string"
489
+ },
490
+ "target": {
491
+ "type": "string"
492
+ }
493
+ },
494
+ "required": [],
495
+ "additionalProperties": false
496
+ }
497
+ },
498
+ "required": [
499
+ "code",
500
+ "message"
501
+ ],
502
+ "additionalProperties": false
503
+ }
504
+ },
505
+ "meta": {
506
+ "type": "object",
507
+ "properties": {
508
+ "requestId": {
509
+ "type": "string"
510
+ },
511
+ "durationMs": {
512
+ "type": "number"
513
+ },
514
+ "baseUrl": {
515
+ "type": "string"
516
+ }
517
+ },
518
+ "required": [
519
+ "durationMs",
520
+ "baseUrl"
521
+ ],
522
+ "additionalProperties": false
523
+ }
524
+ },
525
+ "required": [
526
+ "schemaVersion",
527
+ "ok",
528
+ "command",
529
+ "data",
530
+ "warnings",
531
+ "meta"
532
+ ],
533
+ "additionalProperties": false
534
+ },
535
+ {
536
+ "type": "object",
537
+ "properties": {
538
+ "schemaVersion": {
539
+ "const": "moredrive.cli.v2"
540
+ },
541
+ "ok": {
542
+ "const": true
543
+ },
544
+ "command": {
545
+ "const": "media.decrypt"
546
+ },
547
+ "data": {
548
+ "type": "object",
549
+ "properties": {
550
+ "operation": {
551
+ "enum": [
552
+ "encrypt",
553
+ "decrypt"
554
+ ]
555
+ },
556
+ "input": {
557
+ "type": "string"
558
+ },
559
+ "output": {
560
+ "type": "string"
561
+ },
562
+ "status": {
563
+ "enum": [
564
+ "completed",
565
+ "partial",
566
+ "failed",
567
+ "cancelled",
568
+ "no-op"
569
+ ]
570
+ },
571
+ "completed": {
572
+ "type": "integer",
573
+ "minimum": 0
574
+ },
575
+ "failed": {
576
+ "type": "integer",
577
+ "minimum": 0
578
+ },
579
+ "skipped": {
580
+ "type": "integer",
581
+ "minimum": 0
582
+ },
583
+ "bytesRead": {
584
+ "type": "integer",
585
+ "minimum": 0
586
+ },
587
+ "items": {
588
+ "type": "array",
589
+ "items": {
590
+ "type": "object",
591
+ "properties": {
592
+ "input": {
593
+ "type": "string"
594
+ },
595
+ "output": {
596
+ "type": "string"
597
+ },
598
+ "status": {
599
+ "enum": [
600
+ "completed",
601
+ "skipped",
602
+ "failed"
603
+ ]
604
+ },
605
+ "reason": {
606
+ "type": "string"
607
+ },
608
+ "bytesRead": {
609
+ "type": "integer",
610
+ "minimum": 0
611
+ }
612
+ },
613
+ "required": [
614
+ "input",
615
+ "status",
616
+ "bytesRead"
617
+ ],
618
+ "additionalProperties": false
619
+ }
620
+ }
621
+ },
622
+ "required": [
623
+ "operation",
624
+ "input",
625
+ "output",
626
+ "status",
627
+ "completed",
628
+ "failed",
629
+ "skipped",
630
+ "bytesRead",
631
+ "items"
632
+ ],
633
+ "additionalProperties": false
634
+ },
635
+ "warnings": {
636
+ "type": "array",
637
+ "items": {
638
+ "type": "object",
639
+ "properties": {
640
+ "code": {
641
+ "type": "string"
642
+ },
643
+ "message": {
644
+ "type": "string"
645
+ },
646
+ "details": {
647
+ "type": "object",
648
+ "properties": {
649
+ "idempotencyKey": {
650
+ "type": "string"
651
+ },
652
+ "operationId": {
653
+ "type": "string"
654
+ },
655
+ "causeCode": {
656
+ "type": "string"
657
+ },
658
+ "maxFileSizeBytes": {
659
+ "type": "integer"
660
+ },
661
+ "actualFileSizeBytes": {
662
+ "type": "integer"
663
+ },
664
+ "capabilityRevision": {
665
+ "type": "string"
666
+ },
667
+ "reason": {
668
+ "type": "string"
669
+ },
670
+ "attempt": {
671
+ "type": "integer"
672
+ },
673
+ "status": {
674
+ "type": "integer"
675
+ },
676
+ "errno": {
677
+ "type": "integer"
678
+ },
679
+ "path": {
680
+ "type": "string"
681
+ },
682
+ "target": {
683
+ "type": "string"
684
+ }
685
+ },
686
+ "required": [],
687
+ "additionalProperties": false
688
+ }
689
+ },
690
+ "required": [
691
+ "code",
692
+ "message"
693
+ ],
694
+ "additionalProperties": false
695
+ }
696
+ },
697
+ "meta": {
698
+ "type": "object",
699
+ "properties": {
700
+ "requestId": {
701
+ "type": "string"
702
+ },
703
+ "durationMs": {
704
+ "type": "number"
705
+ },
706
+ "baseUrl": {
707
+ "type": "string"
708
+ }
709
+ },
710
+ "required": [
711
+ "durationMs",
712
+ "baseUrl"
713
+ ],
714
+ "additionalProperties": false
715
+ }
716
+ },
717
+ "required": [
718
+ "schemaVersion",
719
+ "ok",
720
+ "command",
721
+ "data",
722
+ "warnings",
723
+ "meta"
724
+ ],
725
+ "additionalProperties": false
726
+ },
8
727
  {
9
728
  "type": "object",
10
729
  "properties": {
@@ -299,12 +1018,6 @@
299
1018
  "baidu": {
300
1019
  "type": "object",
301
1020
  "properties": {
302
- "username": {
303
- "type": "string"
304
- },
305
- "netdisk_name": {
306
- "type": "string"
307
- },
308
1021
  "avatar_url": {
309
1022
  "type": "string"
310
1023
  },
@@ -5838,6 +6551,40 @@
5838
6551
  }
5839
6552
  },
5840
6553
  "oneOf": [
6554
+ {
6555
+ "type": "object",
6556
+ "properties": {
6557
+ "event": {
6558
+ "const": "ready"
6559
+ },
6560
+ "command": {
6561
+ "const": "stream"
6562
+ },
6563
+ "url": {
6564
+ "type": "string",
6565
+ "pattern": "^http://127\\.0\\.0\\.1:[0-9]+/[a-f0-9]{64}$"
6566
+ },
6567
+ "fsId": {
6568
+ "type": "string"
6569
+ },
6570
+ "size": {
6571
+ "type": "integer",
6572
+ "minimum": 0
6573
+ },
6574
+ "decrypted": {
6575
+ "type": "boolean"
6576
+ }
6577
+ },
6578
+ "required": [
6579
+ "event",
6580
+ "command",
6581
+ "url",
6582
+ "fsId",
6583
+ "size",
6584
+ "decrypted"
6585
+ ],
6586
+ "additionalProperties": false
6587
+ },
5841
6588
  {
5842
6589
  "type": "object",
5843
6590
  "properties": {