@tstdl/base 0.91.51 → 0.92.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/ai/data-extracting.d.ts +35 -0
- package/ai/data-extracting.js +195 -41
- package/document-management/api/document-management.api.d.ts +377 -0
- package/document-management/api/document-management.api.js +15 -1
- package/document-management/index.d.ts +3 -0
- package/document-management/index.js +3 -0
- package/file/mime-type.d.ts +1 -1
- package/file/mime-type.js +8 -6
- package/file/mime-types.js +5 -32
- package/orm/schemas/numeric-date.d.ts +1 -1
- package/orm/schemas/timestamp.d.ts +1 -1
- package/package.json +2 -1
- package/schema/converters/index.d.ts +1 -0
- package/schema/converters/index.js +1 -0
- package/schema/converters/openapi-converter.d.ts +3 -0
- package/schema/converters/openapi-converter.js +113 -0
- package/schema/decorators/description.d.ts +3 -0
- package/schema/decorators/description.js +10 -0
- package/schema/decorators/property.d.ts +3 -1
- package/schema/decorators/property.js +13 -5
- package/schema/decorators/types.d.ts +5 -5
- package/schema/schema.d.ts +7 -0
- package/schema/schema.js +6 -0
- package/schema/schemas/any.d.ts +4 -3
- package/schema/schemas/any.js +4 -4
- package/schema/schemas/array.d.ts +10 -5
- package/schema/schemas/array.js +7 -3
- package/schema/schemas/bigint.d.ts +6 -6
- package/schema/schemas/bigint.js +30 -13
- package/schema/schemas/boolean.d.ts +1 -1
- package/schema/schemas/boolean.js +2 -2
- package/schema/schemas/date.d.ts +1 -1
- package/schema/schemas/date.js +2 -2
- package/schema/schemas/defaulted.d.ts +5 -4
- package/schema/schemas/defaulted.js +6 -6
- package/schema/schemas/deferred.d.ts +1 -1
- package/schema/schemas/deferred.js +2 -2
- package/schema/schemas/enumeration.d.ts +5 -4
- package/schema/schemas/enumeration.js +4 -2
- package/schema/schemas/function.d.ts +3 -3
- package/schema/schemas/function.js +5 -4
- package/schema/schemas/instance.d.ts +5 -4
- package/schema/schemas/instance.js +6 -6
- package/schema/schemas/literal.d.ts +5 -4
- package/schema/schemas/literal.js +6 -6
- package/schema/schemas/never.d.ts +3 -2
- package/schema/schemas/never.js +2 -2
- package/schema/schemas/nullable.d.ts +1 -1
- package/schema/schemas/nullable.js +1 -1
- package/schema/schemas/number.d.ts +4 -2
- package/schema/schemas/number.js +6 -3
- package/schema/schemas/object.d.ts +2 -2
- package/schema/schemas/object.js +12 -7
- package/schema/schemas/one-or-many.d.ts +5 -4
- package/schema/schemas/one-or-many.js +6 -6
- package/schema/schemas/optional.d.ts +1 -1
- package/schema/schemas/optional.js +1 -1
- package/schema/schemas/readable-stream.d.ts +1 -1
- package/schema/schemas/readable-stream.js +2 -2
- package/schema/schemas/regexp.d.ts +1 -1
- package/schema/schemas/regexp.js +2 -2
- package/schema/schemas/simple.d.ts +3 -3
- package/schema/schemas/simple.js +1 -1
- package/schema/schemas/string.d.ts +1 -1
- package/schema/schemas/string.js +2 -2
- package/schema/schemas/symbol.d.ts +6 -6
- package/schema/schemas/symbol.js +8 -13
- package/schema/schemas/uint8-array.d.ts +1 -1
- package/schema/schemas/uint8-array.js +2 -2
- package/schema/schemas/union.js +3 -3
- package/schema/schemas/unknown.d.ts +4 -3
- package/schema/schemas/unknown.js +4 -4
- package/search-index/memory/memory-search-index.js +1 -1
- package/types.d.ts +1 -1
- package/utils/helpers.d.ts +0 -40
- package/utils/helpers.js +0 -29
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/string/index.d.ts +1 -0
- package/utils/string/index.js +1 -0
- package/utils/string/normalize.d.ts +50 -0
- package/utils/string/normalize.js +39 -0
- package/utils/try-ignore.d.ts +2 -0
- package/utils/try-ignore.js +12 -0
|
@@ -374,3 +374,380 @@ export declare const documentManagementApiDefinition: {
|
|
|
374
374
|
};
|
|
375
375
|
};
|
|
376
376
|
};
|
|
377
|
+
declare const _DocumentManagementApi: import("../../api/index.js").ApiClient<{
|
|
378
|
+
resource: string;
|
|
379
|
+
endpoints: {
|
|
380
|
+
loadData: {
|
|
381
|
+
resource: string;
|
|
382
|
+
method: "GET";
|
|
383
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
384
|
+
readonly collectionIds: string | string[];
|
|
385
|
+
readonly collectionsMetadata: Partial<import("../../schema/index.js").Record<string, {
|
|
386
|
+
readonly name?: string | null | undefined;
|
|
387
|
+
readonly group?: string | null | undefined;
|
|
388
|
+
}>>;
|
|
389
|
+
}>;
|
|
390
|
+
result: typeof DocumentManagementData;
|
|
391
|
+
credentials: true;
|
|
392
|
+
};
|
|
393
|
+
loadDocumentRequestsTemplateData: {
|
|
394
|
+
resource: string;
|
|
395
|
+
method: "GET";
|
|
396
|
+
result: typeof DocumentRequestsTemplateData;
|
|
397
|
+
credentials: true;
|
|
398
|
+
};
|
|
399
|
+
loadAvailableCategoriesAndTypes: {
|
|
400
|
+
resource: string;
|
|
401
|
+
method: "GET";
|
|
402
|
+
result: typeof CategoryAndTypesView;
|
|
403
|
+
credentials: true;
|
|
404
|
+
};
|
|
405
|
+
loadFileContent: {
|
|
406
|
+
resource: string;
|
|
407
|
+
method: "GET";
|
|
408
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
409
|
+
readonly title: string | null;
|
|
410
|
+
readonly id: string;
|
|
411
|
+
readonly download?: boolean | undefined;
|
|
412
|
+
}>;
|
|
413
|
+
result: Uint8ArrayConstructor;
|
|
414
|
+
credentials: true;
|
|
415
|
+
};
|
|
416
|
+
getFileContentUrl: {
|
|
417
|
+
resource: string;
|
|
418
|
+
method: "GET";
|
|
419
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
420
|
+
readonly title: string | null;
|
|
421
|
+
readonly id: string;
|
|
422
|
+
readonly download?: boolean | undefined;
|
|
423
|
+
}>;
|
|
424
|
+
result: import("../../schema/index.js").StringSchema;
|
|
425
|
+
credentials: true;
|
|
426
|
+
};
|
|
427
|
+
createCategory: {
|
|
428
|
+
resource: string;
|
|
429
|
+
method: "POST";
|
|
430
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
431
|
+
label: string;
|
|
432
|
+
readonly metadata?: Partial<{
|
|
433
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
434
|
+
}> | undefined;
|
|
435
|
+
}>;
|
|
436
|
+
result: typeof DocumentCategory;
|
|
437
|
+
credentials: true;
|
|
438
|
+
};
|
|
439
|
+
createType: {
|
|
440
|
+
resource: string;
|
|
441
|
+
method: "POST";
|
|
442
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
443
|
+
group: string | null;
|
|
444
|
+
label: string;
|
|
445
|
+
categoryId: import("../../orm/schemas/uuid.js").Uuid;
|
|
446
|
+
readonly metadata?: Partial<{
|
|
447
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
448
|
+
}> | undefined;
|
|
449
|
+
}>;
|
|
450
|
+
result: typeof DocumentType;
|
|
451
|
+
credentials: true;
|
|
452
|
+
};
|
|
453
|
+
createCollection: {
|
|
454
|
+
resource: string;
|
|
455
|
+
method: "POST";
|
|
456
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
457
|
+
readonly metadata?: Partial<{
|
|
458
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
459
|
+
}> | undefined;
|
|
460
|
+
}>;
|
|
461
|
+
result: typeof DocumentCollection;
|
|
462
|
+
credentials: true;
|
|
463
|
+
};
|
|
464
|
+
createDocument: {
|
|
465
|
+
resource: string;
|
|
466
|
+
method: "POST";
|
|
467
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
468
|
+
date: import("../../orm/schemas/numeric-date.js").NumericDate | null;
|
|
469
|
+
expiration: import("../../orm/schemas/numeric-date.js").NumericDate | null;
|
|
470
|
+
typeId: import("../../orm/schemas/uuid.js").Uuid | null;
|
|
471
|
+
addition: string | null;
|
|
472
|
+
originalFileName: string | null;
|
|
473
|
+
readonly collectionIds: string | string[];
|
|
474
|
+
readonly properties?: {
|
|
475
|
+
readonly value: unknown;
|
|
476
|
+
readonly metadata?: Partial<{
|
|
477
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
478
|
+
}> | undefined;
|
|
479
|
+
propertyId: import("../../orm/schemas/uuid.js").Uuid;
|
|
480
|
+
}[] | undefined;
|
|
481
|
+
readonly metadata?: Partial<{
|
|
482
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
483
|
+
}> | undefined;
|
|
484
|
+
}>;
|
|
485
|
+
body: Uint8ArrayConstructor;
|
|
486
|
+
maxBytes: number;
|
|
487
|
+
result: typeof Document;
|
|
488
|
+
credentials: true;
|
|
489
|
+
};
|
|
490
|
+
createDocumentRequestsTemplate: {
|
|
491
|
+
resource: string;
|
|
492
|
+
method: "POST";
|
|
493
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
494
|
+
description: string | null;
|
|
495
|
+
label: string;
|
|
496
|
+
readonly metadata?: Partial<{
|
|
497
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
498
|
+
}> | undefined;
|
|
499
|
+
}>;
|
|
500
|
+
result: typeof DocumentRequestsTemplate;
|
|
501
|
+
credentials: true;
|
|
502
|
+
};
|
|
503
|
+
updateDocumentRequestsTemplate: {
|
|
504
|
+
resource: string;
|
|
505
|
+
method: "PATCH";
|
|
506
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
507
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
508
|
+
description?: string | null | undefined;
|
|
509
|
+
label?: string | undefined;
|
|
510
|
+
readonly metadata?: Partial<{
|
|
511
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
512
|
+
}> | undefined;
|
|
513
|
+
}>;
|
|
514
|
+
result: typeof DocumentRequestsTemplate;
|
|
515
|
+
credentials: true;
|
|
516
|
+
};
|
|
517
|
+
applyDocumentRequestsTemplate: {
|
|
518
|
+
resource: string;
|
|
519
|
+
method: "POST";
|
|
520
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
521
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
522
|
+
readonly collectionIds: string[];
|
|
523
|
+
readonly metadata?: Partial<{
|
|
524
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
525
|
+
}> | undefined;
|
|
526
|
+
}>;
|
|
527
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
528
|
+
credentials: true;
|
|
529
|
+
};
|
|
530
|
+
deleteDocumentRequestsTemplate: {
|
|
531
|
+
resource: string;
|
|
532
|
+
method: "DELETE";
|
|
533
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
534
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
535
|
+
readonly metadata?: Partial<{
|
|
536
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
537
|
+
}> | undefined;
|
|
538
|
+
}>;
|
|
539
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
540
|
+
credentials: true;
|
|
541
|
+
};
|
|
542
|
+
createDocumentRequestTemplate: {
|
|
543
|
+
resource: string;
|
|
544
|
+
method: "POST";
|
|
545
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
546
|
+
comment: string | null;
|
|
547
|
+
typeId: import("../../orm/schemas/uuid.js").Uuid | null;
|
|
548
|
+
requiredFilesCount: number;
|
|
549
|
+
requestsTemplateId: import("../../orm/schemas/uuid.js").Uuid;
|
|
550
|
+
readonly metadata?: Partial<{
|
|
551
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
552
|
+
}> | undefined;
|
|
553
|
+
}>;
|
|
554
|
+
result: typeof DocumentRequestTemplate;
|
|
555
|
+
credentials: true;
|
|
556
|
+
};
|
|
557
|
+
updateDocumentRequestTemplate: {
|
|
558
|
+
resource: string;
|
|
559
|
+
method: "PATCH";
|
|
560
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
561
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
562
|
+
comment?: string | null | undefined;
|
|
563
|
+
typeId?: import("../../orm/types.js").Uuid | null | undefined;
|
|
564
|
+
requiredFilesCount?: number | undefined;
|
|
565
|
+
readonly metadata?: Partial<{
|
|
566
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
567
|
+
}> | undefined;
|
|
568
|
+
}>;
|
|
569
|
+
result: typeof DocumentRequestTemplate;
|
|
570
|
+
credentials: true;
|
|
571
|
+
};
|
|
572
|
+
deleteDocumentRequestTemplate: {
|
|
573
|
+
resource: string;
|
|
574
|
+
method: "DELETE";
|
|
575
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
576
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
577
|
+
readonly metadata?: Partial<{
|
|
578
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
579
|
+
}> | undefined;
|
|
580
|
+
}>;
|
|
581
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
582
|
+
credentials: true;
|
|
583
|
+
};
|
|
584
|
+
createDocumentRequestFile: {
|
|
585
|
+
resource: string;
|
|
586
|
+
method: "POST";
|
|
587
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
588
|
+
readonly requestId: string;
|
|
589
|
+
addition: string | null;
|
|
590
|
+
originalFileName: string | null;
|
|
591
|
+
readonly metadata?: Partial<{
|
|
592
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
593
|
+
}> | undefined;
|
|
594
|
+
}>;
|
|
595
|
+
body: Uint8ArrayConstructor;
|
|
596
|
+
result: typeof DocumentRequestFile;
|
|
597
|
+
maxBytes: number;
|
|
598
|
+
credentials: true;
|
|
599
|
+
};
|
|
600
|
+
approveDocumentRequestFile: {
|
|
601
|
+
resource: string;
|
|
602
|
+
method: "POST";
|
|
603
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
604
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
605
|
+
approvalComment: string | null;
|
|
606
|
+
readonly documentMetadata?: Partial<{
|
|
607
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
608
|
+
}> | undefined;
|
|
609
|
+
readonly requestFileMetadata?: Partial<{
|
|
610
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
611
|
+
}> | undefined;
|
|
612
|
+
}>;
|
|
613
|
+
result: typeof Document;
|
|
614
|
+
credentials: true;
|
|
615
|
+
};
|
|
616
|
+
rejectDocumentRequestFile: {
|
|
617
|
+
resource: string;
|
|
618
|
+
method: "POST";
|
|
619
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
620
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
621
|
+
approvalComment: string | null;
|
|
622
|
+
readonly metadata?: Partial<{
|
|
623
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
624
|
+
}> | undefined;
|
|
625
|
+
}>;
|
|
626
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
627
|
+
credentials: true;
|
|
628
|
+
};
|
|
629
|
+
updateDocumentRequestFile: {
|
|
630
|
+
resource: string;
|
|
631
|
+
method: "PATCH";
|
|
632
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
633
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
634
|
+
addition?: string | null | undefined;
|
|
635
|
+
approvalComment?: string | null | undefined;
|
|
636
|
+
approvalTimestamp?: import("../../orm/types.js").Timestamp | null | undefined;
|
|
637
|
+
readonly metadata?: Partial<{
|
|
638
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
639
|
+
}> | undefined;
|
|
640
|
+
}>;
|
|
641
|
+
result: typeof DocumentRequestFile;
|
|
642
|
+
credentials: true;
|
|
643
|
+
};
|
|
644
|
+
deleteDocumentRequestFile: {
|
|
645
|
+
resource: string;
|
|
646
|
+
method: "DELETE";
|
|
647
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
648
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
649
|
+
readonly metadata?: Partial<{
|
|
650
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
651
|
+
}> | undefined;
|
|
652
|
+
}>;
|
|
653
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
654
|
+
credentials: true;
|
|
655
|
+
};
|
|
656
|
+
createDocumentRequest: {
|
|
657
|
+
resource: string;
|
|
658
|
+
method: "POST";
|
|
659
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
660
|
+
comment: string | null;
|
|
661
|
+
typeId: import("../../orm/schemas/uuid.js").Uuid | null;
|
|
662
|
+
requiredFilesCount: number;
|
|
663
|
+
readonly collectionIds: string[];
|
|
664
|
+
readonly metadata?: Partial<{
|
|
665
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
666
|
+
}> | undefined;
|
|
667
|
+
}>;
|
|
668
|
+
result: typeof DocumentRequest;
|
|
669
|
+
credentials: true;
|
|
670
|
+
};
|
|
671
|
+
updateDocumentRequest: {
|
|
672
|
+
resource: string;
|
|
673
|
+
method: "PATCH";
|
|
674
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
675
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
676
|
+
comment?: string | null | undefined;
|
|
677
|
+
typeId?: import("../../orm/types.js").Uuid | null | undefined;
|
|
678
|
+
requiredFilesCount?: number | undefined;
|
|
679
|
+
completed?: boolean | undefined;
|
|
680
|
+
readonly metadata?: Partial<{
|
|
681
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
682
|
+
}> | undefined;
|
|
683
|
+
}>;
|
|
684
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
685
|
+
credentials: true;
|
|
686
|
+
};
|
|
687
|
+
deleteDocumentRequest: {
|
|
688
|
+
resource: string;
|
|
689
|
+
method: "DELETE";
|
|
690
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
691
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
692
|
+
readonly metadata?: Partial<{
|
|
693
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
694
|
+
}> | undefined;
|
|
695
|
+
}>;
|
|
696
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
697
|
+
credentials: true;
|
|
698
|
+
};
|
|
699
|
+
addDocumentToCollection: {
|
|
700
|
+
resource: string;
|
|
701
|
+
method: "PUT";
|
|
702
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
703
|
+
collectionId: import("../../orm/schemas/uuid.js").Uuid;
|
|
704
|
+
documentId: import("../../orm/schemas/uuid.js").Uuid;
|
|
705
|
+
readonly metadata?: Partial<{
|
|
706
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
707
|
+
}> | undefined;
|
|
708
|
+
}>;
|
|
709
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
710
|
+
credentials: true;
|
|
711
|
+
};
|
|
712
|
+
archiveDocument: {
|
|
713
|
+
resource: string;
|
|
714
|
+
method: "DELETE";
|
|
715
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
716
|
+
collectionId: import("../../orm/schemas/uuid.js").Uuid;
|
|
717
|
+
documentId: import("../../orm/schemas/uuid.js").Uuid;
|
|
718
|
+
readonly metadata?: Partial<{
|
|
719
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
720
|
+
}> | undefined;
|
|
721
|
+
}>;
|
|
722
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
723
|
+
credentials: true;
|
|
724
|
+
};
|
|
725
|
+
updateDocument: {
|
|
726
|
+
resource: string;
|
|
727
|
+
method: "PATCH";
|
|
728
|
+
parameters: import("../../schema/index.js").ObjectSchema<{
|
|
729
|
+
id: import("../../orm/types.js").IsPrimaryKey<import("../../orm/types.js").HasDefault<import("../../orm/schemas/uuid.js").Uuid>>;
|
|
730
|
+
date?: import("../../orm/types.js").NumericDate | null | undefined;
|
|
731
|
+
expiration?: import("../../orm/types.js").NumericDate | null | undefined;
|
|
732
|
+
fileId?: import("../../orm/types.js").Uuid | undefined;
|
|
733
|
+
typeId?: import("../../orm/types.js").Uuid | null | undefined;
|
|
734
|
+
addition?: string | null | undefined;
|
|
735
|
+
readonly properties?: {
|
|
736
|
+
readonly value: unknown;
|
|
737
|
+
readonly metadata?: Partial<{
|
|
738
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
739
|
+
}> | undefined;
|
|
740
|
+
propertyId: import("../../orm/schemas/uuid.js").Uuid;
|
|
741
|
+
}[] | undefined;
|
|
742
|
+
readonly metadata?: Partial<{
|
|
743
|
+
attributes: import("../../orm/types.js").HasDefault<import("../../orm/schemas/json.js").Json<import("../../orm/entity.js").EntityMetadataAttributes>>;
|
|
744
|
+
}> | undefined;
|
|
745
|
+
}>;
|
|
746
|
+
result: import("../../schema/index.js").LiteralSchema<"ok">;
|
|
747
|
+
credentials: true;
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
}>;
|
|
751
|
+
export declare class DocumentManagementApi extends _DocumentManagementApi {
|
|
752
|
+
}
|
|
753
|
+
export {};
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { compileClient, defineApi } from '../../api/index.js';
|
|
8
|
+
import { ReplaceClass } from '../../injector/decorators.js';
|
|
2
9
|
import { boolean, literal, nullable, object, optional, string } from '../../schema/index.js';
|
|
3
10
|
import { megabyte } from '../../utils/units.js';
|
|
4
11
|
import { CategoryAndTypesView, Document, DocumentCategory, DocumentCollection, DocumentManagementData, DocumentRequest, DocumentRequestFile, DocumentRequestTemplate, DocumentRequestsTemplate, DocumentRequestsTemplateData, DocumentType, addOrArchiveDocumentToOrFromCollectionParametersSchema, applyDocumentRequestsTemplateParametersSchema, approveDocumentRequestFileParametersSchema, createCollectionParametersSchema, createDocumentCategoryParametersSchema, createDocumentParametersSchema, createDocumentRequestFileParametersSchema, createDocumentRequestParametersSchema, createDocumentRequestTemplateParametersSchema, createDocumentRequestsTemplateParametersSchema, createDocumentTypeParametersSchema, deleteDocumentRequestFileParametersSchema, deleteDocumentRequestParametersSchema, deleteDocumentRequestTemplateParametersSchema, deleteDocumentRequestsTemplateParametersSchema, loadDataParametersSchema, rejectDocumentRequestFileParametersSchema, updateDocumentParametersSchema, updateDocumentRequestFileParametersSchema, updateDocumentRequestParametersSchema, updateDocumentRequestTemplateParametersSchema, updateDocumentRequestsTemplateParametersSchema } from '../models/index.js';
|
|
@@ -206,3 +213,10 @@ export const documentManagementApiDefinition = defineApi({
|
|
|
206
213
|
}
|
|
207
214
|
}
|
|
208
215
|
});
|
|
216
|
+
const _DocumentManagementApi = compileClient(documentManagementApiDefinition);
|
|
217
|
+
let DocumentManagementApi = class DocumentManagementApi extends _DocumentManagementApi {
|
|
218
|
+
};
|
|
219
|
+
DocumentManagementApi = __decorate([
|
|
220
|
+
ReplaceClass(_DocumentManagementApi)
|
|
221
|
+
], DocumentManagementApi);
|
|
222
|
+
export { DocumentManagementApi };
|
package/file/mime-type.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function getMimeType(file: Uint8Array | ReadableStream<Uint8Array>): Promise<string>;
|
|
1
|
+
export declare function getMimeType(file: string | Uint8Array | ReadableStream<Uint8Array>): Promise<string>;
|
|
2
2
|
export declare function getMimeTypeExtensions(mimeType: string): string[];
|
package/file/mime-type.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { dynamicImport } from '../import.js';
|
|
2
2
|
import { decodeTextStream } from '../utils/encoding.js';
|
|
3
3
|
import { readTextStream } from '../utils/stream/stream-reader.js';
|
|
4
|
-
import { isUint8Array } from '../utils/type-guards.js';
|
|
4
|
+
import { isReadableStream, isString, isUint8Array } from '../utils/type-guards.js';
|
|
5
5
|
import { mimeTypesMap } from './mime-types.js';
|
|
6
6
|
export async function getMimeType(file) {
|
|
7
|
-
|
|
7
|
+
const path = isString(file) ? file : '-';
|
|
8
|
+
const data = isString(file) ? undefined : file;
|
|
9
|
+
return spawnFileCommand(['--brief', '--mime-type', path], data);
|
|
8
10
|
}
|
|
9
11
|
export function getMimeTypeExtensions(mimeType) {
|
|
10
12
|
return mimeTypesMap.get(mimeType) ?? [];
|
|
@@ -15,7 +17,10 @@ async function spawnFileCommand(args, file) {
|
|
|
15
17
|
const process = spawn('file', args, { stdio: 'pipe' });
|
|
16
18
|
const stdin = Writable.toWeb(process.stdin);
|
|
17
19
|
const stdout = Readable.toWeb(process.stdout).pipeThrough(decodeTextStream());
|
|
18
|
-
if (
|
|
20
|
+
if (isReadableStream(file)) {
|
|
21
|
+
await file.pipeTo(stdin);
|
|
22
|
+
}
|
|
23
|
+
else if (isUint8Array(file)) {
|
|
19
24
|
const writer = stdin.getWriter();
|
|
20
25
|
try {
|
|
21
26
|
await writer.write(file);
|
|
@@ -23,9 +28,6 @@ async function spawnFileCommand(args, file) {
|
|
|
23
28
|
}
|
|
24
29
|
catch { /* File command closes stream as soon as it has the required data */ }
|
|
25
30
|
}
|
|
26
|
-
else {
|
|
27
|
-
await file.pipeTo(stdin);
|
|
28
|
-
}
|
|
29
31
|
const output = await readTextStream(stdout);
|
|
30
32
|
return output.trim();
|
|
31
33
|
}
|
package/file/mime-types.js
CHANGED
|
@@ -51,14 +51,7 @@ export const mimeTypes = {
|
|
|
51
51
|
'application/mp4': ['mp4s'],
|
|
52
52
|
'application/msword': ['doc', 'dot'],
|
|
53
53
|
'application/mxf': ['mxf'],
|
|
54
|
-
'application/octet-stream': [
|
|
55
|
-
'bin', 'dms',
|
|
56
|
-
'lrf', 'mar',
|
|
57
|
-
'so', 'dist',
|
|
58
|
-
'distz', 'pkg',
|
|
59
|
-
'bpk', 'dump',
|
|
60
|
-
'elc', 'deploy'
|
|
61
|
-
],
|
|
54
|
+
'application/octet-stream': ['bin', 'dms', 'lrf', 'mar', 'so', 'dist', 'distz', 'pkg', 'bpk', 'dump', 'elc', 'deploy'],
|
|
62
55
|
'application/oda': ['oda'],
|
|
63
56
|
'application/oebps-package+xml': ['opf'],
|
|
64
57
|
'application/ogg': ['ogx'],
|
|
@@ -499,13 +492,7 @@ export const mimeTypes = {
|
|
|
499
492
|
'application/x-csh': ['csh'],
|
|
500
493
|
'application/x-debian-package': ['deb', 'udeb'],
|
|
501
494
|
'application/x-dgc-compressed': ['dgc'],
|
|
502
|
-
'application/x-director': [
|
|
503
|
-
'dir', 'dcr',
|
|
504
|
-
'dxr', 'cst',
|
|
505
|
-
'cct', 'cxt',
|
|
506
|
-
'w3d', 'fgd',
|
|
507
|
-
'swa'
|
|
508
|
-
],
|
|
495
|
+
'application/x-director': ['dir', 'dcr', 'dxr', 'cst', 'cct', 'cxt', 'w3d', 'fgd', 'swa'],
|
|
509
496
|
'application/x-doom': ['wad'],
|
|
510
497
|
'application/x-dtbncx+xml': ['ncx'],
|
|
511
498
|
'application/x-dtbook+xml': ['dtb'],
|
|
@@ -583,11 +570,7 @@ export const mimeTypes = {
|
|
|
583
570
|
'application/x-xliff+xml': ['xlf'],
|
|
584
571
|
'application/x-xpinstall': ['xpi'],
|
|
585
572
|
'application/x-xz': ['xz'],
|
|
586
|
-
'application/x-zmachine': [
|
|
587
|
-
'z1', 'z2', 'z3',
|
|
588
|
-
'z4', 'z5', 'z6',
|
|
589
|
-
'z7', 'z8'
|
|
590
|
-
],
|
|
573
|
+
'application/x-zmachine': ['z1', 'z2', 'z3', 'z4', 'z5', 'z6', 'z7', 'z8'],
|
|
591
574
|
'application/xaml+xml': ['xaml'],
|
|
592
575
|
'application/xcap-diff+xml': ['xdf'],
|
|
593
576
|
'application/xenc+xml': ['xenc'],
|
|
@@ -710,12 +693,7 @@ export const mimeTypes = {
|
|
|
710
693
|
'text/html': ['html', 'htm'],
|
|
711
694
|
'text/javascript': ['js', 'mjs'],
|
|
712
695
|
'text/n3': ['n3'],
|
|
713
|
-
'text/plain': [
|
|
714
|
-
'txt', 'text',
|
|
715
|
-
'conf', 'def',
|
|
716
|
-
'list', 'log',
|
|
717
|
-
'in'
|
|
718
|
-
],
|
|
696
|
+
'text/plain': ['txt', 'text', 'conf', 'def', 'list', 'log', 'in'],
|
|
719
697
|
'text/prs.lines.tag': ['dsc'],
|
|
720
698
|
'text/richtext': ['rtx'],
|
|
721
699
|
'text/sgml': ['sgml', 'sgm'],
|
|
@@ -738,12 +716,7 @@ export const mimeTypes = {
|
|
|
738
716
|
'text/vnd.wap.wml': ['wml'],
|
|
739
717
|
'text/vnd.wap.wmlscript': ['wmls'],
|
|
740
718
|
'text/x-asm': ['s', 'asm'],
|
|
741
|
-
'text/x-c': [
|
|
742
|
-
'c', 'cc',
|
|
743
|
-
'cxx', 'cpp',
|
|
744
|
-
'h', 'hh',
|
|
745
|
-
'dic'
|
|
746
|
-
],
|
|
719
|
+
'text/x-c': ['c', 'cc', 'cxx', 'cpp', 'h', 'hh', 'dic'],
|
|
747
720
|
'text/x-fortran': ['f', 'for', 'f77', 'f90'],
|
|
748
721
|
'text/x-java-source': ['java'],
|
|
749
722
|
'text/x-nfo': ['nfo'],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NumberSchema, type NumberSchemaOptions, type SchemaPropertyDecorator, type SchemaPropertyDecoratorOptions, type SimpleSchemaOptions } from '../../schema/index.js';
|
|
2
|
-
export type NumericDateSchemaOptions = SimpleSchemaOptions & Pick<NumberSchemaOptions, 'minimum' | 'maximum'>;
|
|
2
|
+
export type NumericDateSchemaOptions = SimpleSchemaOptions<number> & Pick<NumberSchemaOptions, 'minimum' | 'maximum'>;
|
|
3
3
|
export declare class NumericDateSchema extends NumberSchema {
|
|
4
4
|
readonly name = "NumericDate";
|
|
5
5
|
constructor(options?: NumericDateSchemaOptions);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonPath } from '../../json-path/json-path.js';
|
|
2
2
|
import { NumberSchema, type NumberSchemaOptions, type SchemaPropertyDecorator, type SchemaPropertyDecoratorOptions, type SchemaTestOptions, type SchemaTestResult, type SimpleSchemaOptions } from '../../schema/index.js';
|
|
3
|
-
export type TimestampSchemaOptions = SimpleSchemaOptions & Pick<NumberSchemaOptions, 'minimum' | 'maximum'>;
|
|
3
|
+
export type TimestampSchemaOptions = SimpleSchemaOptions<number> & Pick<NumberSchemaOptions, 'minimum' | 'maximum'>;
|
|
4
4
|
export declare class TimestampSchema extends NumberSchema {
|
|
5
5
|
readonly name = "Timestamp";
|
|
6
6
|
constructor(options?: TimestampSchemaOptions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tstdl/base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.92.0",
|
|
4
4
|
"author": "Patrick Hein",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"build:production:copy-files": "cp package.json .eslintrc.json tsconfig.server.json dist/ && cp tsconfig.base.json dist/tsconfig.json && npm run copy:document-management",
|
|
14
14
|
"build:docs": "typedoc",
|
|
15
15
|
"build:docs:watch": "typedoc --watch",
|
|
16
|
+
"generate:drizzle": "drizzle-kit generate --config dist/document-management/drizzle.config.js",
|
|
16
17
|
"copy:document-management": "rm -rf ./dist/document-management/drizzle && cp -r ./source/document-management/drizzle ./dist/document-management/",
|
|
17
18
|
"lint": "eslint --config .eslintrc.json --cache source/",
|
|
18
19
|
"pub": "npm run build:production && rm -vf dist/test* && rm -vrf dist/tools/ && npm publish dist/",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './openapi-converter.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './openapi-converter.js';
|