shinkansen-transmission 2.2.235 → 2.3.1
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/babel.config.cjs +1 -0
- package/eslint.config.mjs +28 -30
- package/index.d.mts +321 -16
- package/package.json +6 -6
- package/src/index.cjs +2 -0
- package/src/index.d.mts +10 -9
- package/src/transmission/common/index.d.mts +153 -87
- package/src/transmission/common/index.mjs +670 -175
- package/src/transmission/from-document-to-hash/array/index.mjs +20 -4
- package/src/transmission/from-document-to-hash/boolean/index.mjs +25 -9
- package/src/transmission/from-document-to-hash/index.d.mts +8 -19
- package/src/transmission/from-document-to-hash/index.mjs +102 -16
- package/src/transmission/from-document-to-hash/null/index.mjs +25 -9
- package/src/transmission/from-document-to-hash/number/index.mjs +25 -9
- package/src/transmission/from-document-to-hash/object/index.mjs +22 -6
- package/src/transmission/from-document-to-hash/string/index.mjs +25 -9
- package/src/transmission/from-hash-to-document/array/index.mjs +22 -5
- package/src/transmission/from-hash-to-document/boolean/index.mjs +21 -4
- package/src/transmission/from-hash-to-document/index.d.mts +24 -26
- package/src/transmission/from-hash-to-document/index.mjs +264 -142
- package/src/transmission/from-hash-to-document/null/index.mjs +21 -4
- package/src/transmission/from-hash-to-document/number/index.mjs +21 -4
- package/src/transmission/from-hash-to-document/object/index.mjs +22 -5
- package/src/transmission/from-hash-to-document/string/index.mjs +26 -4
- package/src/transmission/index.d.mts +4 -10
- package/src/transmission/to-zashiki/index.d.mts +5 -13
- package/src/transmission/to-zashiki/params/index.mjs +430 -0
- package/src/transmission/to-zashiki/render/array/index.mjs +737 -0
- package/src/transmission/to-zashiki/render/boolean/index.mjs +794 -0
- package/src/transmission/to-zashiki/render/index.mjs +157 -0
- package/src/transmission/to-zashiki/render/null/index.mjs +796 -0
- package/src/transmission/to-zashiki/render/number/index.mjs +940 -0
- package/src/transmission/to-zashiki/render/object/index.mjs +653 -0
- package/src/transmission/to-zashiki/render/string/index.mjs +910 -0
- package/src/transmission/to-zashiki/render-params/root-schema/index.mjs +212 -0
- package/src/transmission/to-zashiki/render-params/schema/index.mjs +731 -0
- package/src/transmission/to-zashiki/transform-root-schema.mjs +485 -421
- package/src/transmission/to-zashiki/transform-schema.mjs +1988 -4663
@@ -1,123 +1,189 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
type ObjectLiteralType = TransmissionTypes.ObjectLiteralType
|
2
|
+
type ObjectType = TransmissionTypes.ObjectType
|
3
|
+
|
4
|
+
type ItemsType = TransmissionTypes.ItemsType
|
5
|
+
|
6
|
+
type TransmissionStringMetaType = TransmissionTypes.Transmission.StringMetaType
|
7
|
+
type TransmissionNumberMetaType = TransmissionTypes.Transmission.NumberMetaType
|
8
|
+
type TransmissionArrayMetaType = TransmissionTypes.Transmission.ArrayMetaType
|
9
|
+
type TransmissionObjectMetaType = TransmissionTypes.Transmission.ObjectMetaType
|
10
|
+
type TransmissionBooleanMetaType = TransmissionTypes.Transmission.BooleanMetaType
|
11
|
+
type TransmissionNullMetaType = TransmissionTypes.Transmission.NullMetaType
|
12
|
+
|
13
|
+
type TransmissionStringElementsType = TransmissionTypes.Transmission.StringElementsType
|
14
|
+
type TransmissionNumberElementsType = TransmissionTypes.Transmission.NumberElementsType
|
15
|
+
type TransmissionArrayElementsType = TransmissionTypes.Transmission.ArrayElementsType
|
16
|
+
type TransmissionObjectElementsType = TransmissionTypes.Transmission.ObjectElementsType
|
17
|
+
type TransmissionBooleanElementsType = TransmissionTypes.Transmission.BooleanElementsType
|
18
|
+
type TransmissionNullElementsType = TransmissionTypes.Transmission.NullElementsType
|
19
|
+
|
20
|
+
type EnumType = TransmissionTypes.EnumType
|
21
|
+
type OneOfType = TransmissionTypes.OneOfType
|
22
|
+
type AnyOfType = TransmissionTypes.AnyOfType
|
23
|
+
type FieldType = TransmissionTypes.FieldType
|
24
|
+
|
25
|
+
type SchemaType = TransmissionTypes.SchemaType
|
26
|
+
|
27
|
+
type StringSchemaType = TransmissionTypes.StringSchemaType
|
28
|
+
type NumberSchemaType = TransmissionTypes.NumberSchemaType
|
29
|
+
type ArraySchemaType = TransmissionTypes.ArraySchemaType
|
30
|
+
type ObjectSchemaType = TransmissionTypes.ObjectSchemaType
|
31
|
+
type BooleanSchemaType = TransmissionTypes.BooleanSchemaType
|
32
|
+
type NullSchemaType = TransmissionTypes.NullSchemaType
|
6
33
|
|
7
|
-
|
34
|
+
type ValuesType = TransmissionTypes.ValuesType
|
35
|
+
type ParamsType = TransmissionTypes.ParamsType
|
8
36
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
export function isSchema (v: SchemaType | undefined): boolean
|
13
|
-
export function isStringSchema (schema: SchemaType | undefined): boolean
|
14
|
-
export function isNumberSchema (schema: SchemaType | undefined): boolean
|
15
|
-
export function isArraySchema (schema: SchemaType | undefined): boolean
|
16
|
-
export function isObjectSchema (schema: SchemaType | undefined): boolean
|
17
|
-
export function isBooleanSchema (schema: SchemaType | undefined): boolean
|
18
|
-
export function isNullSchema (schema: SchemaType | undefined): boolean
|
37
|
+
export function isObject (v?: unknown): v is (Record<PropertyKey, string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]> | Record<PropertyKey, never>)
|
38
|
+
export function isArray (v?: unknown): v is (string[] | number[] | object[] | boolean[] | null[])
|
39
|
+
export function isPrimitive (v?: unknown): v is string | number | boolean | null
|
19
40
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
41
|
+
export function isSchema (v?: SchemaType | object): v is SchemaType
|
42
|
+
export function isStringSchema (schema?: SchemaType): schema is StringSchemaType
|
43
|
+
export function isNumberSchema (schema?: SchemaType): schema is NumberSchemaType
|
44
|
+
export function isArraySchema (schema?: SchemaType): schema is ArraySchemaType
|
45
|
+
export function isObjectSchema (schema?: SchemaType): schema is ObjectSchemaType
|
46
|
+
export function isBooleanSchema (schema?: SchemaType): schema is BooleanSchemaType
|
47
|
+
export function isNullSchema (schema?: SchemaType): schema is NullSchemaType
|
24
48
|
|
25
|
-
|
49
|
+
export function getTitle (schema?: SchemaType): { title: string } | ObjectLiteralType
|
50
|
+
export function getDescription (schema?: SchemaType): { description: string } | ObjectLiteralType
|
51
|
+
export function getIsReadOnly (schema?: SchemaType): { readOnly: boolean } | ObjectLiteralType
|
52
|
+
export function getIsWriteOnly (schema?: SchemaType): { writeOnly: boolean } | ObjectLiteralType
|
26
53
|
|
27
|
-
|
54
|
+
export function getSelectedItems (values?: ValuesType, uri?: string): Array<string | number | boolean | null>
|
28
55
|
|
29
|
-
|
30
|
-
export function getMetaDefaultValue (schema: SchemaType | undefined): { defaultValue: string } | ObjectLiteralType
|
31
|
-
export function hasMetaValue (values: ObjectType | ObjectLiteralType, uri: string | undefined, schema: SchemaType | undefined): boolean
|
32
|
-
export function getMetaValue (values: ObjectType | ObjectLiteralType, uri: string | undefined, schema: SchemaType | undefined): { value: string } | ObjectLiteralType
|
56
|
+
export function isParentUri (parentUri?: string, uri?: string): boolean
|
33
57
|
|
34
|
-
|
58
|
+
export function getMetaProps (params?: ParamsType, uri?: string): TransmissionStringMetaType | TransmissionNumberMetaType | TransmissionArrayMetaType | TransmissionObjectMetaType | TransmissionBooleanMetaType | TransmissionNullMetaType | Record<string, never>
|
59
|
+
export function hasMetaDefaultValue (schema?: SchemaType): boolean
|
60
|
+
export function getMetaDefaultValue (schema?: SchemaType): { defaultValue: string } | ObjectLiteralType
|
61
|
+
export function hasMetaValue (values?: ValuesType, uri?: string, schema?: SchemaType): boolean
|
62
|
+
export function getMetaValue (values?: ValuesType, uri?: string, schema?: SchemaType): { value: string } | ObjectLiteralType
|
35
63
|
|
36
|
-
|
37
|
-
export function findByIndex (parentUri: string | undefined, uri: string | undefined): (schema: SchemaType, index: number) => boolean
|
38
|
-
export function findByValue (value: unknown): (schema: SchemaType) => boolean
|
39
|
-
export function findByEqual (value: unknown): (schema: SchemaType) => boolean
|
64
|
+
export function transformToValue (schema?: string | number | object | boolean | null): string | number | object | boolean | null | undefined
|
40
65
|
|
41
|
-
|
66
|
+
export function findByKey (parentUri: string, uri: string): (key: string | number) => boolean
|
67
|
+
export function findByIndex (parentUri: string, uri: string): (item: SchemaType, index: number) => boolean
|
68
|
+
export function findByValue (value?: string | number | object | boolean | null): (item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean
|
69
|
+
export function findByEqual (value?: string | number | object | boolean | null): (item?: string | number | object | boolean | null | string[] | number[] | object[] | boolean[] | null[]) => boolean
|
42
70
|
|
43
|
-
|
44
|
-
export function getArray (value: { items: ObjectType | ObjectLiteralType | ArrayType | ArrayLiteralType /* object or array */ }, parentUri: string | undefined, uri: string | undefined): ArrayType
|
45
|
-
export function getSchema (schema: SchemaType | ObjectType, parentUri: string | undefined, uri: string | undefined): ObjectType | ObjectLiteralType | ArrayType | ArrayLiteralType | SchemaType
|
71
|
+
export function toString (value?: string | number | object | boolean | null): string
|
46
72
|
|
47
|
-
|
48
|
-
|
73
|
+
export function getArray (schema?: { items?: SchemaType | SchemaType[] }, parentUri?: string, uri?: string): SchemaType | undefined
|
74
|
+
export function getObject (schema?: { properties?: Record<string, SchemaType> }, parentUri?: string, uri?: string): SchemaType | undefined
|
49
75
|
|
50
|
-
|
51
|
-
|
76
|
+
declare function getSchema (
|
77
|
+
schema: (
|
78
|
+
StringSchemaType |
|
79
|
+
NumberSchemaType |
|
80
|
+
ArraySchemaType |
|
81
|
+
ObjectSchemaType |
|
82
|
+
BooleanSchemaType |
|
83
|
+
NullSchemaType
|
84
|
+
),
|
85
|
+
parentUri?: string,
|
86
|
+
uri?: string
|
87
|
+
): SchemaType | undefined
|
52
88
|
|
53
|
-
|
54
|
-
|
89
|
+
declare function getSchema (
|
90
|
+
schema?: ObjectLiteralType | ObjectType,
|
91
|
+
parentUri?: string,
|
92
|
+
uri?: string
|
93
|
+
): SchemaType | undefined
|
55
94
|
|
56
|
-
|
57
|
-
export function getIndexForAnyOf (values: ObjectType | ObjectLiteralType, parentUri: string | undefined, uri: string | undefined, schema: SchemaType | undefined): number
|
95
|
+
export { getSchema }
|
58
96
|
|
59
|
-
|
60
|
-
|
97
|
+
export function transformValueIndexFor (array: string[] | number[] | object[] | boolean[] | null[], value?: string | number | object | boolean | null): string
|
98
|
+
export function transformEqualIndexFor (array: string[] | number[] | object[] | boolean[] | null[], value?: string | number | object | boolean | null): string
|
61
99
|
|
62
|
-
|
63
|
-
|
64
|
-
export function getElementsDescriptionProps (params: ObjectType | ObjectLiteralType, uri: string | undefined): ObjectType | ObjectLiteralType
|
100
|
+
export function hasValue (values?: ValuesType, uri?: string, schema?: SchemaType): boolean
|
101
|
+
export function getValue (values?: ValuesType, uri?: string, schema?: SchemaType): string
|
65
102
|
|
66
|
-
|
67
|
-
|
68
|
-
export function getElementsFieldPropsForAnyOf (params: ObjectType | ObjectLiteralType, uri: string | undefined): ObjectType | ObjectLiteralType
|
69
|
-
export function getElementsFieldPropsForAllOf (params: ObjectType | ObjectLiteralType, uri: string | undefined): ObjectType | ObjectLiteralType
|
103
|
+
export function getValueForEnum (v: string | number, schema?: { enum?: ItemsType }): string
|
104
|
+
export function getIndexForEnum (values?: ValuesType, parentUri?: string, uri?: string, schema?: SchemaType): number
|
70
105
|
|
71
|
-
|
72
|
-
|
106
|
+
export function getValueForAnyOf (v: string | number, schema?: { anyOf?: ItemsType }): string
|
107
|
+
export function getIndexForAnyOf (values?: ValuesType, parentUri?: string, uri?: string, schema?: SchemaType): number
|
73
108
|
|
74
|
-
|
75
|
-
|
109
|
+
export function getValueForOneOf (v: string | number, schema?: { oneOf?: ItemsType }): string
|
110
|
+
export function getIndexForOneOf (values: ValuesType, parentUri?: string, uri?: string, schema?: SchemaType): number
|
76
111
|
|
77
|
-
|
78
|
-
export function getConst (schema: SchemaType | undefined): unknown
|
112
|
+
export function getElementsProps (params?: ParamsType, uri?: string): TransmissionStringElementsType | TransmissionNumberElementsType | TransmissionArrayElementsType | TransmissionObjectElementsType | TransmissionBooleanElementsType | TransmissionNullElementsType | Record<string, never>
|
79
113
|
|
80
|
-
|
81
|
-
|
114
|
+
export function getElementsFieldPropsForEnum (params?: ParamsType, uri?: string): EnumType | ObjectLiteralType
|
115
|
+
export function getElementsFieldPropsForOneOf (params?: ParamsType, uri?: string): OneOfType | ObjectLiteralType
|
116
|
+
export function getElementsFieldPropsForAnyOf (params?: ParamsType, uri?: string): AnyOfType | ObjectLiteralType
|
117
|
+
export function getElementsFieldPropsForAllOf (params?: ParamsType, uri?: string): FieldType | ObjectLiteralType
|
118
|
+
export function getElementsFieldProps (params?: ParamsType, uri?: string): FieldType | ObjectLiteralType
|
119
|
+
export function getElementsFieldValue (values?: ValuesType, uri?: string, schema?: SchemaType): { value: string } | ObjectLiteralType
|
82
120
|
|
83
|
-
|
84
|
-
export function getAnyOf (schema: SchemaType | undefined): ObjectType | ObjectLiteralType | ArrayType | ArrayLiteralType
|
121
|
+
export function hasEnum (schema?: { enum?: ItemsType }): schema is { enum: ItemsType }
|
85
122
|
|
86
|
-
|
87
|
-
|
123
|
+
declare function getEnum (schema: { enum: ItemsType }): ItemsType
|
124
|
+
declare function getEnum (schema?: { enum?: ItemsType }): ItemsType | undefined
|
88
125
|
|
89
|
-
|
90
|
-
export function getAllOf (schema: SchemaType | undefined): ObjectType | ObjectLiteralType | ArrayType | ArrayLiteralType
|
126
|
+
export { getEnum }
|
91
127
|
|
92
|
-
|
128
|
+
export function hasConst (schema?: { const?: string | number | object | boolean | null }): schema is { const: string | number | object | boolean | null }
|
93
129
|
|
94
|
-
|
130
|
+
declare function getConst (schema: { const: string | number | object | boolean | null }): string | number | object | boolean | null
|
131
|
+
declare function getConst (schema?: { const?: string | number | object | boolean | null }): string | number | object | boolean | null | undefined
|
95
132
|
|
96
|
-
|
97
|
-
export function getMax (schema: SchemaType | undefined): { max: number } | ObjectLiteralType
|
133
|
+
export { getConst }
|
98
134
|
|
99
|
-
|
100
|
-
export function getMaxLength (schema: SchemaType | undefined): { maxLength: number } | ObjectLiteralType
|
135
|
+
export function hasDefault (schema?: { default?: string | number | object | boolean | null }): schema is { default: string | number | object | boolean | null }
|
101
136
|
|
102
|
-
|
103
|
-
|
137
|
+
declare function getDefault (schema: { default: string | number | object | boolean | null }): string | number | object | boolean | null
|
138
|
+
declare function getDefault (schema?: { default?: string | number | object | boolean | null }): string | number | object | boolean | null | undefined
|
104
139
|
|
105
|
-
|
140
|
+
export { getDefault }
|
106
141
|
|
107
|
-
|
108
|
-
export function getMaxContains (schema: SchemaType | undefined): { maxContains: number } | ObjectLiteralType
|
142
|
+
export function hasAnyOf (schema?: { anyOf?: ItemsType }): schema is { anyOf: ItemsType }
|
109
143
|
|
110
|
-
|
111
|
-
|
144
|
+
declare function getAnyOf (schema: { anyOf: ItemsType }): ItemsType
|
145
|
+
declare function getAnyOf (schema?: { anyOf?: ItemsType }): ItemsType | undefined
|
112
146
|
|
113
|
-
|
114
|
-
export function getIsExclusiveMax (schema: SchemaType | undefined): { isExclusiveMax: boolean } | ObjectLiteralType
|
147
|
+
export { getAnyOf }
|
115
148
|
|
116
|
-
|
149
|
+
export function hasOneOf (schema?: { oneOf?: ItemsType }): schema is { oneOf: ItemsType }
|
117
150
|
|
118
|
-
|
119
|
-
}
|
151
|
+
declare function getOneOf (schema: { oneOf: ItemsType }): ItemsType
|
152
|
+
declare function getOneOf (schema?: { oneOf?: ItemsType }): ItemsType | undefined
|
120
153
|
|
121
|
-
|
122
|
-
|
123
|
-
}
|
154
|
+
export { getOneOf }
|
155
|
+
|
156
|
+
export function hasAllOf (schema?: { allOf?: ItemsType }): schema is { allOf: ItemsType }
|
157
|
+
|
158
|
+
declare function getAllOf (schema: { allOf: ItemsType }): ItemsType
|
159
|
+
declare function getAllOf (schema?: { allOf?: ItemsType }): ItemsType | undefined
|
160
|
+
|
161
|
+
export { getAllOf }
|
162
|
+
|
163
|
+
export function getUri (uri?: string, resource?: string | number): string
|
164
|
+
|
165
|
+
export function normaliseUri (uri?: string): string
|
166
|
+
|
167
|
+
export function getMin (schema?: { minimum?: number }): { min: number } | ObjectLiteralType
|
168
|
+
export function getMax (schema?: { maximum?: number }): { max: number } | ObjectLiteralType
|
169
|
+
|
170
|
+
export function getMinLength (schema?: { minLength?: number }): { minLength: number } | ObjectLiteralType
|
171
|
+
export function getMaxLength (schema?: { maxLength?: number }): { maxLength: number } | ObjectLiteralType
|
172
|
+
|
173
|
+
export function getMinItems (schema?: { minItems?: number }): { minItems: number } | ObjectLiteralType
|
174
|
+
export function getMaxItems (schema?: { maxItems?: number }): { maxItems: number } | ObjectLiteralType
|
175
|
+
|
176
|
+
export function getHasUniqueItems (schema?: { uniqueItems?: boolean }): { hasUniqueItems: boolean } | ObjectLiteralType
|
177
|
+
|
178
|
+
export function getMinContains (schema?: { minContains?: number }): { minContains: number } | ObjectLiteralType
|
179
|
+
export function getMaxContains (schema?: { maxContains?: number }): { maxContains: number } | ObjectLiteralType
|
180
|
+
|
181
|
+
export function getMinProperties (schema?: { minProperties?: number }): { minProperties: number } | ObjectLiteralType
|
182
|
+
export function getMaxProperties (schema?: { maxProperties?: number }): { maxProperties: number } | ObjectLiteralType
|
183
|
+
|
184
|
+
export function getIsExclusiveMin (schema?: { exclusiveMinimum?: boolean }): { isExclusiveMin: boolean } | ObjectLiteralType
|
185
|
+
export function getIsExclusiveMax (schema?: { exclusiveMaximum?: boolean }): { isExclusiveMax: boolean } | ObjectLiteralType
|
186
|
+
|
187
|
+
export function getPattern (schema?: { pattern?: RegExp }): { pattern: RegExp } | ObjectLiteralType
|
188
|
+
|
189
|
+
export function getStep (schema?: { multipleOf?: number }): { step: number } | ObjectLiteralType
|