@atomic-ehr/codegen 0.0.1-canary.20251001075906.44a8bb9 → 0.0.1-canary.20251001154933.613f6c7
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/dist/api/index.d.ts +1 -1
- package/dist/cli/index.js +34 -34
- package/dist/typeschema/core/binding.d.ts +7 -7
- package/dist/typeschema/core/binding.js +10 -14
- package/dist/typeschema/core/field-builder.d.ts +5 -11
- package/dist/typeschema/core/field-builder.js +25 -32
- package/dist/typeschema/core/identifier.d.ts +3 -3
- package/dist/typeschema/core/nested-types.d.ts +4 -13
- package/dist/typeschema/core/nested-types.js +13 -31
- package/dist/typeschema/core/transformer.d.ts +2 -2
- package/dist/typeschema/core/transformer.js +35 -15
- package/dist/typeschema/profile/processor.js +6 -4
- package/dist/typeschema/register.d.ts +2 -0
- package/dist/typeschema/register.js +16 -4
- package/dist/typeschema/types.d.ts +7 -14
- package/package.json +1 -1
|
@@ -62,13 +62,13 @@ interface TypeSchemaForPrimitiveType {
|
|
|
62
62
|
export interface NestedType {
|
|
63
63
|
identifier: NestedIdentifier;
|
|
64
64
|
base: Identifier;
|
|
65
|
-
fields: Record<string,
|
|
65
|
+
fields: Record<string, Field>;
|
|
66
66
|
}
|
|
67
67
|
export interface TypeSchemaForProfile {
|
|
68
68
|
identifier: ProfileIdentifier;
|
|
69
69
|
base: Identifier;
|
|
70
70
|
description?: string;
|
|
71
|
-
fields?: Record<string,
|
|
71
|
+
fields?: Record<string, Field>;
|
|
72
72
|
constraints?: Record<string, ProfileConstraint>;
|
|
73
73
|
extensions?: ProfileExtension[];
|
|
74
74
|
validation?: ValidationRule[];
|
|
@@ -121,21 +121,14 @@ export interface ProfileMetadata {
|
|
|
121
121
|
jurisdiction?: any[];
|
|
122
122
|
package?: string;
|
|
123
123
|
}
|
|
124
|
-
export interface TypeSchemaNestedType {
|
|
125
|
-
identifier: NestedIdentifier;
|
|
126
|
-
base: Identifier;
|
|
127
|
-
fields?: {
|
|
128
|
-
[k: string]: RegularField | PolymorphicValueXFieldDeclaration | PolymorphicValueXFieldInstance;
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
124
|
export interface TypeSchemaForResourceComplexTypeLogical {
|
|
132
125
|
identifier: Identifier;
|
|
133
126
|
base?: Identifier;
|
|
134
127
|
description?: string;
|
|
135
128
|
fields?: {
|
|
136
|
-
[k: string]:
|
|
129
|
+
[k: string]: Field;
|
|
137
130
|
};
|
|
138
|
-
nested?:
|
|
131
|
+
nested?: NestedType[];
|
|
139
132
|
dependencies?: Identifier[];
|
|
140
133
|
}
|
|
141
134
|
export interface RegularField {
|
|
@@ -149,7 +142,7 @@ export interface RegularField {
|
|
|
149
142
|
min?: number;
|
|
150
143
|
max?: number;
|
|
151
144
|
}
|
|
152
|
-
export interface
|
|
145
|
+
export interface PolymorphicDeclarationField {
|
|
153
146
|
choices: string[];
|
|
154
147
|
required?: boolean;
|
|
155
148
|
excluded?: boolean;
|
|
@@ -157,7 +150,7 @@ export interface PolymorphicValueXFieldDeclaration {
|
|
|
157
150
|
min?: number;
|
|
158
151
|
max?: number;
|
|
159
152
|
}
|
|
160
|
-
export interface
|
|
153
|
+
export interface PolymorphicInstanceField {
|
|
161
154
|
choiceOf: string;
|
|
162
155
|
type: Identifier;
|
|
163
156
|
required?: boolean;
|
|
@@ -190,7 +183,7 @@ export interface TypeSchemaForBinding {
|
|
|
190
183
|
valueset?: ValueSetIdentifier;
|
|
191
184
|
dependencies?: Identifier[];
|
|
192
185
|
}
|
|
193
|
-
export type
|
|
186
|
+
export type Field = RegularField | PolymorphicDeclarationField | PolymorphicInstanceField;
|
|
194
187
|
export interface TypeschemaGeneratorOptions {
|
|
195
188
|
verbose?: boolean;
|
|
196
189
|
logger?: import("../utils/codegen-logger").CodegenLogger;
|
package/package.json
CHANGED