@nest-yalc-2/omnikernel-module 2.2.1 → 2.2.4
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/package.json +22 -14
- package/src/__tests__/omni-collection.entity.spec.ts +49 -49
- package/src/__tests__/omni-collection.service.spec.ts +83 -83
- package/src/__tests__/omni-document.entity.spec.ts +55 -55
- package/src/__tests__/omni-document.service.spec.ts +83 -83
- package/src/__tests__/omni-extension-projection-constraints.spec.ts +518 -518
- package/src/__tests__/omni-extension-projection.registration.spec.ts +947 -946
- package/src/__tests__/omni-extension-projection.service.spec.ts +806 -806
- package/src/__tests__/omni-external-ref.entity.spec.ts +36 -36
- package/src/__tests__/omni-external-ref.service.spec.ts +252 -252
- package/src/__tests__/omni-named.entity.spec.ts +33 -33
- package/src/__tests__/omni-record.entity.spec.ts +32 -32
- package/src/__tests__/omni-record.service.spec.ts +107 -107
- package/src/__tests__/omni-relation-semantics.spec.ts +102 -102
- package/src/__tests__/omni-relation.entity.spec.ts +38 -38
- package/src/__tests__/omni-scope-substrate.spec.ts +81 -81
- package/src/__tests__/omni-scoped.backend.spec.ts +115 -115
- package/src/__tests__/omni-scoped.service.spec.ts +354 -354
- package/src/__tests__/omnikernel.diagnostics.spec.ts +94 -94
- package/src/__tests__/omnikernel.module.spec.ts +38 -40
- package/src/__tests__/omnikernel.persistence.spec.ts +154 -154
- package/src/__tests__/omnikernel.public-api.spec.ts +238 -238
- package/src/__tests__/omnikernel.query.service.spec.ts +155 -155
- package/src/base/omni-base.entity.ts +41 -41
- package/src/base/omni-external-ref.entity.ts +53 -53
- package/src/base/omni-named.entity.ts +16 -16
- package/src/base/omni-record.entity.ts +51 -51
- package/src/base/omni-relation.entity.ts +72 -72
- package/src/index.ts +49 -49
- package/src/omni-collection-kind.enum.ts +10 -10
- package/src/omni-collection.backend.ts +16 -16
- package/src/omni-collection.dto.ts +170 -170
- package/src/omni-collection.entity.ts +21 -21
- package/src/omni-collection.service.ts +75 -75
- package/src/omni-document-kind.enum.ts +12 -12
- package/src/omni-document.backend.ts +16 -16
- package/src/omni-document.dto.ts +198 -198
- package/src/omni-document.entity.ts +30 -30
- package/src/omni-document.service.ts +75 -75
- package/src/omni-dto.helpers.ts +21 -21
- package/src/omni-extension-projection.definition.ts +294 -294
- package/src/omni-extension-projection.resource.ts +274 -274
- package/src/omni-extension-projection.service.ts +452 -452
- package/src/omni-external-ref-binding.validator.ts +53 -53
- package/src/omni-external-ref-internal-type.enum.ts +11 -11
- package/src/omni-external-ref.backend.ts +25 -25
- package/src/omni-external-ref.dto.ts +128 -128
- package/src/omni-external-ref.service.ts +255 -255
- package/src/omni-migration.ts +365 -365
- package/src/omni-named.backend.ts +11 -11
- package/src/omni-named.dto.ts +86 -86
- package/src/omni-projection.catalog.ts +345 -345
- package/src/omni-projection.lifecycle.ts +53 -53
- package/src/omni-record-status.enum.ts +11 -11
- package/src/omni-record.backend.ts +19 -19
- package/src/omni-record.dto.ts +157 -157
- package/src/omni-record.service.ts +113 -113
- package/src/omni-relation-kind.contract.ts +49 -49
- package/src/omni-relation-kind.enum.ts +12 -12
- package/src/omni-relation-projection.definition.ts +166 -166
- package/src/omni-relation-projection.resource.ts +360 -360
- package/src/omni-relation-projection.service.ts +610 -610
- package/src/omni-relation-semantics.ts +52 -52
- package/src/omni-relation-status.enum.ts +11 -11
- package/src/omni-relation.backend.ts +21 -21
- package/src/omni-relation.dto.ts +142 -142
- package/src/omni-relation.service.ts +159 -159
- package/src/omni-scope.ts +161 -161
- package/src/omni-scoped.backend.ts +110 -110
- package/src/omni-scoped.repository.ts +34 -34
- package/src/omni-scoped.service.ts +338 -338
- package/src/omnikernel.diagnostics.ts +83 -83
- package/src/omnikernel.module.ts +97 -97
- package/src/omnikernel.query.service.ts +108 -108
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { OmniNamedEntity } from './base/omni-named.entity.js';
|
|
2
|
-
import { omniScopedBackendProvidersFactory } from './omni-scoped.backend.js';
|
|
3
|
-
import { OmniScopedService } from './omni-scoped.service.js';
|
|
4
|
-
|
|
5
|
-
export const omniNamedBackendProvidersFactory = (dbConnection: string) =>
|
|
6
|
-
omniScopedBackendProvidersFactory<OmniNamedEntity>({
|
|
7
|
-
entityModel: OmniNamedEntity,
|
|
8
|
-
dbConnection,
|
|
9
|
-
createService: (repository, scope, options) =>
|
|
10
|
-
new OmniScopedService(repository, scope, options.deletion.named),
|
|
11
|
-
});
|
|
1
|
+
import { OmniNamedEntity } from './base/omni-named.entity.js';
|
|
2
|
+
import { omniScopedBackendProvidersFactory } from './omni-scoped.backend.js';
|
|
3
|
+
import { OmniScopedService } from './omni-scoped.service.js';
|
|
4
|
+
|
|
5
|
+
export const omniNamedBackendProvidersFactory = (dbConnection: string) =>
|
|
6
|
+
omniScopedBackendProvidersFactory<OmniNamedEntity>({
|
|
7
|
+
entityModel: OmniNamedEntity,
|
|
8
|
+
dbConnection,
|
|
9
|
+
createService: (repository, scope, options) =>
|
|
10
|
+
new OmniScopedService(repository, scope, options.deletion.named),
|
|
11
|
+
});
|
package/src/omni-named.dto.ts
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InputType,
|
|
3
|
-
Int,
|
|
4
|
-
ObjectType,
|
|
5
|
-
OmitType,
|
|
6
|
-
PartialType,
|
|
7
|
-
} from '@nestjs/graphql';
|
|
8
|
-
import {
|
|
9
|
-
ModelField,
|
|
10
|
-
ModelObject,
|
|
11
|
-
} from '@nest-yalc-2/crud-gen/object.decorator.js';
|
|
12
|
-
import { UUIDScalar } from '@nest-yalc-2/graphql/scalars/uuid.scalar.js';
|
|
13
|
-
import returnValue from '@node-yalc/utils/returnValue.js';
|
|
14
|
-
import {
|
|
15
|
-
IsInt,
|
|
16
|
-
IsOptional,
|
|
17
|
-
IsString,
|
|
18
|
-
IsUUID,
|
|
19
|
-
MaxLength,
|
|
20
|
-
} from 'class-validator';
|
|
21
|
-
import { OmniNamedEntity } from './base/omni-named.entity.js';
|
|
22
|
-
import { assignOmniPublicDto } from './omni-dto.helpers.js';
|
|
23
|
-
|
|
24
|
-
@ObjectType()
|
|
25
|
-
@ModelObject()
|
|
26
|
-
export class OmniNamedType extends OmniNamedEntity {
|
|
27
|
-
constructor(data?: Partial<OmniNamedType>) {
|
|
28
|
-
super();
|
|
29
|
-
if (data) {
|
|
30
|
-
assignOmniPublicDto(this, data);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@ModelField({ gqlType: returnValue(UUIDScalar), isRequired: true })
|
|
35
|
-
@IsUUID()
|
|
36
|
-
guid!: string;
|
|
37
|
-
|
|
38
|
-
@ModelField({ gqlType: returnValue(Int) })
|
|
39
|
-
@IsInt()
|
|
40
|
-
revision!: number;
|
|
41
|
-
|
|
42
|
-
@ModelField({
|
|
43
|
-
gqlType: returnValue(String),
|
|
44
|
-
gqlOptions: { nullable: true },
|
|
45
|
-
})
|
|
46
|
-
@IsOptional()
|
|
47
|
-
@IsString()
|
|
48
|
-
@MaxLength(128)
|
|
49
|
-
externalId?: string | null;
|
|
50
|
-
|
|
51
|
-
@ModelField({ gqlType: returnValue(String) })
|
|
52
|
-
@IsString()
|
|
53
|
-
@MaxLength(255)
|
|
54
|
-
title!: string;
|
|
55
|
-
|
|
56
|
-
@ModelField({
|
|
57
|
-
gqlType: returnValue(String),
|
|
58
|
-
gqlOptions: { nullable: true },
|
|
59
|
-
})
|
|
60
|
-
@IsOptional()
|
|
61
|
-
@IsString()
|
|
62
|
-
@MaxLength(255)
|
|
63
|
-
slug?: string | null;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@InputType()
|
|
67
|
-
@ModelObject()
|
|
68
|
-
export class OmniNamedCreateInput extends OmitType(
|
|
69
|
-
OmniNamedType,
|
|
70
|
-
['createdAt', 'updatedAt', 'revision'] as const,
|
|
71
|
-
InputType,
|
|
72
|
-
) {}
|
|
73
|
-
|
|
74
|
-
@InputType()
|
|
75
|
-
@ModelObject({ copyFrom: OmniNamedType })
|
|
76
|
-
export class OmniNamedCondition extends PartialType(
|
|
77
|
-
OmniNamedCreateInput,
|
|
78
|
-
InputType,
|
|
79
|
-
) {}
|
|
80
|
-
|
|
81
|
-
@InputType()
|
|
82
|
-
@ModelObject({ copyFrom: OmniNamedType })
|
|
83
|
-
export class OmniNamedUpdateInput extends PartialType(
|
|
84
|
-
OmniNamedCreateInput,
|
|
85
|
-
InputType,
|
|
86
|
-
) {}
|
|
1
|
+
import {
|
|
2
|
+
InputType,
|
|
3
|
+
Int,
|
|
4
|
+
ObjectType,
|
|
5
|
+
OmitType,
|
|
6
|
+
PartialType,
|
|
7
|
+
} from '@nestjs/graphql';
|
|
8
|
+
import {
|
|
9
|
+
ModelField,
|
|
10
|
+
ModelObject,
|
|
11
|
+
} from '@nest-yalc-2/crud-gen/object.decorator.js';
|
|
12
|
+
import { UUIDScalar } from '@nest-yalc-2/graphql/scalars/uuid.scalar.js';
|
|
13
|
+
import returnValue from '@node-yalc/utils/returnValue.js';
|
|
14
|
+
import {
|
|
15
|
+
IsInt,
|
|
16
|
+
IsOptional,
|
|
17
|
+
IsString,
|
|
18
|
+
IsUUID,
|
|
19
|
+
MaxLength,
|
|
20
|
+
} from 'class-validator';
|
|
21
|
+
import { OmniNamedEntity } from './base/omni-named.entity.js';
|
|
22
|
+
import { assignOmniPublicDto } from './omni-dto.helpers.js';
|
|
23
|
+
|
|
24
|
+
@ObjectType()
|
|
25
|
+
@ModelObject()
|
|
26
|
+
export class OmniNamedType extends OmniNamedEntity {
|
|
27
|
+
constructor(data?: Partial<OmniNamedType>) {
|
|
28
|
+
super();
|
|
29
|
+
if (data) {
|
|
30
|
+
assignOmniPublicDto(this, data);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@ModelField({ gqlType: returnValue(UUIDScalar), isRequired: true })
|
|
35
|
+
@IsUUID()
|
|
36
|
+
guid!: string;
|
|
37
|
+
|
|
38
|
+
@ModelField({ gqlType: returnValue(Int) })
|
|
39
|
+
@IsInt()
|
|
40
|
+
revision!: number;
|
|
41
|
+
|
|
42
|
+
@ModelField({
|
|
43
|
+
gqlType: returnValue(String),
|
|
44
|
+
gqlOptions: { nullable: true },
|
|
45
|
+
})
|
|
46
|
+
@IsOptional()
|
|
47
|
+
@IsString()
|
|
48
|
+
@MaxLength(128)
|
|
49
|
+
externalId?: string | null;
|
|
50
|
+
|
|
51
|
+
@ModelField({ gqlType: returnValue(String) })
|
|
52
|
+
@IsString()
|
|
53
|
+
@MaxLength(255)
|
|
54
|
+
title!: string;
|
|
55
|
+
|
|
56
|
+
@ModelField({
|
|
57
|
+
gqlType: returnValue(String),
|
|
58
|
+
gqlOptions: { nullable: true },
|
|
59
|
+
})
|
|
60
|
+
@IsOptional()
|
|
61
|
+
@IsString()
|
|
62
|
+
@MaxLength(255)
|
|
63
|
+
slug?: string | null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@InputType()
|
|
67
|
+
@ModelObject()
|
|
68
|
+
export class OmniNamedCreateInput extends OmitType(
|
|
69
|
+
OmniNamedType,
|
|
70
|
+
['createdAt', 'updatedAt', 'revision'] as const,
|
|
71
|
+
InputType,
|
|
72
|
+
) {}
|
|
73
|
+
|
|
74
|
+
@InputType()
|
|
75
|
+
@ModelObject({ copyFrom: OmniNamedType })
|
|
76
|
+
export class OmniNamedCondition extends PartialType(
|
|
77
|
+
OmniNamedCreateInput,
|
|
78
|
+
InputType,
|
|
79
|
+
) {}
|
|
80
|
+
|
|
81
|
+
@InputType()
|
|
82
|
+
@ModelObject({ copyFrom: OmniNamedType })
|
|
83
|
+
export class OmniNamedUpdateInput extends PartialType(
|
|
84
|
+
OmniNamedCreateInput,
|
|
85
|
+
InputType,
|
|
86
|
+
) {}
|