@seamapi/types
Advanced tools
Comparing version 0.20.1 to 0.21.0
import { z } from 'zod'; | ||
export declare const access_code_code_constraint: z.ZodObject<{ | ||
constraint_type: z.ZodEnum<["no_zeros", "cannot_start_with_12", "no_triple_consecutive_ints", "cannot_specify_pin_code", "pin_code_matches_existing_set", "start_date_in_future"]>; | ||
}, "strip", z.ZodTypeAny, { | ||
constraint_type: "no_zeros" | "cannot_start_with_12" | "no_triple_consecutive_ints" | "cannot_specify_pin_code" | "pin_code_matches_existing_set" | "start_date_in_future"; | ||
}, { | ||
constraint_type: "no_zeros" | "cannot_start_with_12" | "no_triple_consecutive_ints" | "cannot_specify_pin_code" | "pin_code_matches_existing_set" | "start_date_in_future"; | ||
}>; | ||
export declare const access_code_name_constraint: z.ZodObject<{ | ||
constraint_type: z.ZodLiteral<"name_length">; | ||
min_length: z.ZodOptional<z.ZodNumber>; | ||
max_length: z.ZodOptional<z.ZodNumber>; | ||
}, "strip", z.ZodTypeAny, { | ||
constraint_type: "name_length"; | ||
min_length?: number | undefined; | ||
max_length?: number | undefined; | ||
}, { | ||
constraint_type: "name_length"; | ||
min_length?: number | undefined; | ||
max_length?: number | undefined; | ||
}>; | ||
export declare const access_code_constraint: z.ZodUnion<[z.ZodObject<{ | ||
@@ -9,3 +29,3 @@ constraint_type: z.ZodEnum<["no_zeros", "cannot_start_with_12", "no_triple_consecutive_ints", "cannot_specify_pin_code", "pin_code_matches_existing_set", "start_date_in_future"]>; | ||
}>, z.ZodObject<{ | ||
constraint_type: z.ZodEnum<["name_length"]>; | ||
constraint_type: z.ZodLiteral<"name_length">; | ||
min_length: z.ZodOptional<z.ZodNumber>; | ||
@@ -31,3 +51,3 @@ max_length: z.ZodOptional<z.ZodNumber>; | ||
}>, z.ZodObject<{ | ||
constraint_type: z.ZodEnum<["name_length"]>; | ||
constraint_type: z.ZodLiteral<"name_length">; | ||
min_length: z.ZodOptional<z.ZodNumber>; | ||
@@ -34,0 +54,0 @@ max_length: z.ZodOptional<z.ZodNumber>; |
import { z } from 'zod'; | ||
const simple_access_code_constraint = z.object({ | ||
export const access_code_code_constraint = z.object({ | ||
constraint_type: z.enum([ | ||
@@ -12,4 +12,4 @@ 'no_zeros', | ||
}); | ||
const complex_access_code_constraint = z.object({ | ||
constraint_type: z.enum(['name_length']), | ||
export const access_code_name_constraint = z.object({ | ||
constraint_type: z.literal('name_length'), | ||
min_length: z.number().optional(), | ||
@@ -19,4 +19,4 @@ max_length: z.number().optional(), | ||
export const access_code_constraint = z.union([ | ||
simple_access_code_constraint, | ||
complex_access_code_constraint, | ||
access_code_code_constraint, | ||
access_code_name_constraint, | ||
]); | ||
@@ -23,0 +23,0 @@ export const access_code_capability_properties = z.object({ |
@@ -1,5 +0,5 @@ | ||
import { access_code_capability_properties } from './access-code.js'; | ||
import { access_code_capability_properties, access_code_code_constraint } from './access-code.js'; | ||
import { lock_capability_properties } from './lock.js'; | ||
import { climate_setting, climate_setting_schedule, hvac_mode_setting, thermostat_capability_properties } from './thermostat.js'; | ||
export { access_code_capability_properties, climate_setting, climate_setting_schedule, hvac_mode_setting, lock_capability_properties, thermostat_capability_properties, }; | ||
export { access_code_capability_properties, access_code_code_constraint, climate_setting, climate_setting_schedule, hvac_mode_setting, lock_capability_properties, thermostat_capability_properties, }; | ||
export declare const capability_properties: import("zod").ZodObject<{ | ||
@@ -13,3 +13,3 @@ code_constraints: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{ | ||
}>, import("zod").ZodObject<{ | ||
constraint_type: import("zod").ZodEnum<["name_length"]>; | ||
constraint_type: import("zod").ZodLiteral<"name_length">; | ||
min_length: import("zod").ZodOptional<import("zod").ZodNumber>; | ||
@@ -16,0 +16,0 @@ max_length: import("zod").ZodOptional<import("zod").ZodNumber>; |
@@ -1,5 +0,5 @@ | ||
import { access_code_capability_properties } from './access-code.js'; | ||
import { access_code_capability_properties, access_code_code_constraint, } from './access-code.js'; | ||
import { lock_capability_properties } from './lock.js'; | ||
import { climate_setting, climate_setting_schedule, hvac_mode_setting, thermostat_capability_properties, } from './thermostat.js'; | ||
export { access_code_capability_properties, climate_setting, climate_setting_schedule, hvac_mode_setting, lock_capability_properties, thermostat_capability_properties, }; | ||
export { access_code_capability_properties, access_code_code_constraint, climate_setting, climate_setting_schedule, hvac_mode_setting, lock_capability_properties, thermostat_capability_properties, }; | ||
// todo: discriminate based on capability and remove intersection type | ||
@@ -6,0 +6,0 @@ export const capability_properties = access_code_capability_properties |
@@ -1,1 +0,1 @@ | ||
export { any_device_type, battery_status, capabilities, climate_setting, climate_setting_schedule, common_device_properties, lock_device_type, managed_device, noise_sensor_device_type, thermostat_device_type, unmanaged_device, } from './models/index.js'; | ||
export { access_code_code_constraint, any_device_type, battery_status, capabilities, climate_setting, climate_setting_schedule, common_device_properties, lock_device_type, managed_device, noise_sensor_device_type, thermostat_device_type, unmanaged_device, } from './models/index.js'; |
@@ -1,2 +0,2 @@ | ||
export { any_device_type, battery_status, capabilities, climate_setting, climate_setting_schedule, common_device_properties, lock_device_type, managed_device, noise_sensor_device_type, thermostat_device_type, unmanaged_device, } from './models/index.js'; | ||
export { access_code_code_constraint, any_device_type, battery_status, capabilities, climate_setting, climate_setting_schedule, common_device_properties, lock_device_type, managed_device, noise_sensor_device_type, thermostat_device_type, unmanaged_device, } from './models/index.js'; | ||
//# sourceMappingURL=schemas.js.map |
{ | ||
"name": "@seamapi/types", | ||
"version": "0.20.1", | ||
"version": "0.21.0", | ||
"description": "TypeScript types for the Seam API.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
import { z } from 'zod' | ||
const simple_access_code_constraint = z.object({ | ||
export const access_code_code_constraint = z.object({ | ||
constraint_type: z.enum([ | ||
@@ -14,4 +14,4 @@ 'no_zeros', // Nuki | ||
const complex_access_code_constraint = z.object({ | ||
constraint_type: z.enum(['name_length']), // Nuki, Kwikset | ||
export const access_code_name_constraint = z.object({ | ||
constraint_type: z.literal('name_length'), // Nuki, Kwikset | ||
min_length: z.number().optional(), | ||
@@ -22,4 +22,4 @@ max_length: z.number().optional(), | ||
export const access_code_constraint = z.union([ | ||
simple_access_code_constraint, | ||
complex_access_code_constraint, | ||
access_code_code_constraint, | ||
access_code_name_constraint, | ||
]) | ||
@@ -26,0 +26,0 @@ |
@@ -1,2 +0,5 @@ | ||
import { access_code_capability_properties } from './access-code.js' | ||
import { | ||
access_code_capability_properties, | ||
access_code_code_constraint, | ||
} from './access-code.js' | ||
import { lock_capability_properties } from './lock.js' | ||
@@ -12,2 +15,3 @@ import { | ||
access_code_capability_properties, | ||
access_code_code_constraint, | ||
climate_setting, | ||
@@ -14,0 +18,0 @@ climate_setting_schedule, |
export { | ||
access_code_code_constraint, | ||
any_device_type, | ||
@@ -3,0 +4,0 @@ battery_status, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
423129
10577
0