@sprucelabs/schema 32.3.7 → 32.3.9
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/build/esm/fields/RawField.js +1 -1
- package/build/esm/schemas.static.types.d.ts +1 -0
- package/build/esm/types/template.types.d.ts +2 -2
- package/build/fields/RawField.js +1 -1
- package/build/schemas.static.types.d.ts +1 -0
- package/build/types/template.types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -56,6 +56,7 @@ export interface Schema {
|
|
|
56
56
|
};
|
|
57
57
|
fields?: SchemaFieldsByName;
|
|
58
58
|
}
|
|
59
|
+
export type SchemaSupportedLanguages = 'ts' | 'go';
|
|
59
60
|
export interface SchemaFieldValueUnion<V extends Record<string, any> = Record<string, any>, Id extends string = string, Version extends string | undefined = undefined> {
|
|
60
61
|
id: Id;
|
|
61
62
|
version?: Version;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldDefinitions } from '../fields';
|
|
2
|
-
import { Schema } from '../schemas.static.types';
|
|
2
|
+
import { Schema, SchemaSupportedLanguages } from '../schemas.static.types';
|
|
3
3
|
export interface FieldTemplateDetails {
|
|
4
4
|
/** The type literal of value (string, number) */
|
|
5
5
|
valueType: string;
|
|
@@ -15,7 +15,7 @@ export declare enum TemplateRenderAs {
|
|
|
15
15
|
/** We are rendering as the schema's field type (Schema) */
|
|
16
16
|
SchemaType = "schemaType"
|
|
17
17
|
}
|
|
18
|
-
export type TemplateLanguage =
|
|
18
|
+
export type TemplateLanguage = SchemaSupportedLanguages;
|
|
19
19
|
/** The shape of options passed to AbstractField.generateTemplateDetails(options) */
|
|
20
20
|
export interface FieldTemplateDetailOptions<T extends FieldDefinitions> {
|
|
21
21
|
/** The language we're generating to, only TS for now */
|
package/build/fields/RawField.js
CHANGED
|
@@ -56,6 +56,7 @@ export interface Schema {
|
|
|
56
56
|
};
|
|
57
57
|
fields?: SchemaFieldsByName;
|
|
58
58
|
}
|
|
59
|
+
export type SchemaSupportedLanguages = 'ts' | 'go';
|
|
59
60
|
export interface SchemaFieldValueUnion<V extends Record<string, any> = Record<string, any>, Id extends string = string, Version extends string | undefined = undefined> {
|
|
60
61
|
id: Id;
|
|
61
62
|
version?: Version;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldDefinitions } from '../fields';
|
|
2
|
-
import { Schema } from '../schemas.static.types';
|
|
2
|
+
import { Schema, SchemaSupportedLanguages } from '../schemas.static.types';
|
|
3
3
|
export interface FieldTemplateDetails {
|
|
4
4
|
/** The type literal of value (string, number) */
|
|
5
5
|
valueType: string;
|
|
@@ -15,7 +15,7 @@ export declare enum TemplateRenderAs {
|
|
|
15
15
|
/** We are rendering as the schema's field type (Schema) */
|
|
16
16
|
SchemaType = "schemaType"
|
|
17
17
|
}
|
|
18
|
-
export type TemplateLanguage =
|
|
18
|
+
export type TemplateLanguage = SchemaSupportedLanguages;
|
|
19
19
|
/** The shape of options passed to AbstractField.generateTemplateDetails(options) */
|
|
20
20
|
export interface FieldTemplateDetailOptions<T extends FieldDefinitions> {
|
|
21
21
|
/** The language we're generating to, only TS for now */
|