@tstdl/base 0.91.51 → 0.91.52

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.
@@ -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
- import { defineApi } from '../../api/index.js';
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 };
@@ -1,2 +1,5 @@
1
+ export * from './api/index.js';
1
2
  export * from './localizations/index.js';
2
3
  export * from './models/index.js';
4
+ export * from './module.js';
5
+ export * from './services/index.js';
@@ -1,2 +1,5 @@
1
+ export * from './api/index.js';
1
2
  export * from './localizations/index.js';
2
3
  export * from './models/index.js';
4
+ export * from './module.js';
5
+ export * from './services/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.91.51",
3
+ "version": "0.91.52",
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/",