@seamapi/types 1.616.0 → 1.618.0

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.
Files changed (29) hide show
  1. package/dist/connect.cjs +77 -14
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +63 -3
  4. package/dist/index.cjs +77 -14
  5. package/dist/index.cjs.map +1 -1
  6. package/lib/seam/connect/models/customer/access-grant-resources.d.ts +6 -6
  7. package/lib/seam/connect/models/customer/access-grant-resources.js +15 -1
  8. package/lib/seam/connect/models/customer/access-grant-resources.js.map +1 -1
  9. package/lib/seam/connect/models/customer/customer-data.d.ts +22 -22
  10. package/lib/seam/connect/models/customer/customer-data.js +7 -1
  11. package/lib/seam/connect/models/customer/customer-data.js.map +1 -1
  12. package/lib/seam/connect/models/customer/location-resources.d.ts +26 -26
  13. package/lib/seam/connect/models/customer/location-resources.js +76 -8
  14. package/lib/seam/connect/models/customer/location-resources.js.map +1 -1
  15. package/lib/seam/connect/models/customer/user-identity-resources.d.ts +10 -10
  16. package/lib/seam/connect/models/customer/user-identity-resources.js +32 -4
  17. package/lib/seam/connect/models/customer/user-identity-resources.js.map +1 -1
  18. package/lib/seam/connect/openapi.d.ts +62 -2
  19. package/lib/seam/connect/openapi.js +62 -9
  20. package/lib/seam/connect/openapi.js.map +1 -1
  21. package/lib/seam/connect/route-types.d.ts +1 -1
  22. package/lib/seam/devicedb/route-specs.d.ts +2 -2
  23. package/package.json +1 -1
  24. package/src/lib/seam/connect/models/customer/access-grant-resources.ts +15 -1
  25. package/src/lib/seam/connect/models/customer/customer-data.ts +7 -1
  26. package/src/lib/seam/connect/models/customer/location-resources.ts +76 -8
  27. package/src/lib/seam/connect/models/customer/user-identity-resources.ts +32 -4
  28. package/src/lib/seam/connect/openapi.ts +62 -9
  29. package/src/lib/seam/connect/route-types.ts +1 -1
@@ -60028,7 +60028,7 @@ export type Routes = {
60028
60028
  parent_partner_resource_key?: string | undefined;
60029
60029
  devices: {
60030
60030
  device_id: string;
60031
- device_type: 'lock' | 'thermostat' | 'sensor';
60031
+ device_type: string;
60032
60032
  name: string;
60033
60033
  }[];
60034
60034
  acs_entrances: {
@@ -855,7 +855,7 @@ export declare const routes: {
855
855
  include_if?: string[] | undefined;
856
856
  exclude_if?: string[] | undefined;
857
857
  manufacturer_id?: string | undefined;
858
- main_category?: "thermostat" | "sensor" | "smartlock" | "relay" | "intercom" | "accessory" | undefined;
858
+ main_category?: "thermostat" | "smartlock" | "sensor" | "relay" | "intercom" | "accessory" | undefined;
859
859
  manufacturer_ids?: string[] | undefined;
860
860
  integration_status?: "stable" | "beta" | "planned" | "unsupported" | "inquire" | undefined;
861
861
  integration_support_levels?: ("stable" | "beta" | "planned" | "unsupported" | "inquire")[] | undefined;
@@ -864,7 +864,7 @@ export declare const routes: {
864
864
  include_if?: string[] | undefined;
865
865
  exclude_if?: string[] | undefined;
866
866
  manufacturer_id?: string | undefined;
867
- main_category?: "thermostat" | "sensor" | "smartlock" | "relay" | "intercom" | "accessory" | undefined;
867
+ main_category?: "thermostat" | "smartlock" | "sensor" | "relay" | "intercom" | "accessory" | undefined;
868
868
  manufacturer_ids?: string[] | undefined;
869
869
  integration_status?: "stable" | "beta" | "planned" | "unsupported" | "inquire" | undefined;
870
870
  integration_support_levels?: ("stable" | "beta" | "planned" | "unsupported" | "inquire")[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.616.0",
3
+ "version": "1.618.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -89,6 +89,10 @@ export const reservation_resource = base_access_grant_resource
89
89
  .extend({
90
90
  reservation_key: z
91
91
  .string()
92
+ .min(1)
93
+ .refine((val) => val === val.trim(), {
94
+ message: 'Must not have leading or trailing whitespace',
95
+ })
92
96
  .describe('Your unique identifier for the reservation.'),
93
97
  })
94
98
  .merge(user_identity_reference)
@@ -96,7 +100,13 @@ export const reservation_resource = base_access_grant_resource
96
100
 
97
101
  export const booking_resource = base_access_grant_resource
98
102
  .extend({
99
- booking_key: z.string().describe('Your unique identifier for the booking.'),
103
+ booking_key: z
104
+ .string()
105
+ .min(1)
106
+ .refine((val) => val === val.trim(), {
107
+ message: 'Must not have leading or trailing whitespace',
108
+ })
109
+ .describe('Your unique identifier for the booking.'),
100
110
  })
101
111
  .merge(user_identity_reference)
102
112
  .merge(location_references)
@@ -105,6 +115,10 @@ export const access_grant_resource = base_access_grant_resource
105
115
  .extend({
106
116
  access_grant_key: z
107
117
  .string()
118
+ .min(1)
119
+ .refine((val) => val === val.trim(), {
120
+ message: 'Must not have leading or trailing whitespace',
121
+ })
108
122
  .describe('Your unique identifier for the access grant.'),
109
123
  })
110
124
  .merge(user_identity_reference)
@@ -27,7 +27,13 @@ import {
27
27
  } from './user-identity-resources.js'
28
28
 
29
29
  export const customer_data = z.object({
30
- customer_key: z.string().describe('Your unique identifier for the customer.'),
30
+ customer_key: z
31
+ .string()
32
+ .min(1)
33
+ .refine((val) => val === val.trim(), {
34
+ message: 'Must not have leading or trailing whitespace',
35
+ })
36
+ .describe('Your unique identifier for the customer.'),
31
37
 
32
38
  // Location resources
33
39
  spaces: z
@@ -7,17 +7,39 @@ const base_location_resource = z.object({
7
7
 
8
8
  // Location resource types with their key aliases
9
9
  export const neutral_resource = base_location_resource.extend({
10
- space_key: z.string().describe('Your unique identifier for the space.'),
10
+ space_key: z
11
+ .string()
12
+ .min(1)
13
+ .refine((val) => val === val.trim(), {
14
+ message: 'Must not have leading or trailing whitespace',
15
+ })
16
+ .describe('Your unique identifier for the space.'),
11
17
  })
12
18
 
13
19
  export const property_resource = base_location_resource.extend({
14
- property_key: z.string().describe('Your unique identifier for the property.'),
20
+ property_key: z
21
+ .string()
22
+ .min(1)
23
+ .refine((val) => val === val.trim(), {
24
+ message: 'Must not have leading or trailing whitespace',
25
+ })
26
+ .describe('Your unique identifier for the property.'),
15
27
  })
16
28
 
17
29
  export const room_resource = base_location_resource.extend({
18
- room_key: z.string().describe('Your unique identifier for the room.'),
30
+ room_key: z
31
+ .string()
32
+ .min(1)
33
+ .refine((val) => val === val.trim(), {
34
+ message: 'Must not have leading or trailing whitespace',
35
+ })
36
+ .describe('Your unique identifier for the room.'),
19
37
  parent_site_key: z
20
38
  .string()
39
+ .min(1)
40
+ .refine((val) => val === val.trim(), {
41
+ message: 'Must not have leading or trailing whitespace',
42
+ })
21
43
  .optional()
22
44
  .describe('Your unique identifier for the site.'),
23
45
  })
@@ -25,41 +47,87 @@ export const room_resource = base_location_resource.extend({
25
47
  export const common_area_resource = base_location_resource.extend({
26
48
  common_area_key: z
27
49
  .string()
50
+ .min(1)
51
+ .refine((val) => val === val.trim(), {
52
+ message: 'Must not have leading or trailing whitespace',
53
+ })
28
54
  .describe('Your unique identifier for the common area.'),
29
55
  parent_site_key: z
30
56
  .string()
57
+ .min(1)
58
+ .refine((val) => val === val.trim(), {
59
+ message: 'Must not have leading or trailing whitespace',
60
+ })
31
61
  .optional()
32
62
  .describe('Your unique identifier for the site.'),
33
63
  })
34
64
 
35
65
  export const unit_resource = base_location_resource.extend({
36
- unit_key: z.string().describe('Your unique identifier for the unit.'),
66
+ unit_key: z
67
+ .string()
68
+ .min(1)
69
+ .refine((val) => val === val.trim(), {
70
+ message: 'Must not have leading or trailing whitespace',
71
+ })
72
+ .describe('Your unique identifier for the unit.'),
37
73
  parent_site_key: z
38
74
  .string()
75
+ .min(1)
76
+ .refine((val) => val === val.trim(), {
77
+ message: 'Must not have leading or trailing whitespace',
78
+ })
39
79
  .optional()
40
80
  .describe('Your unique identifier for the site.'),
41
81
  })
42
82
 
43
83
  export const facility_resource = base_location_resource.extend({
44
- facility_key: z.string().describe('Your unique identifier for the facility.'),
84
+ facility_key: z
85
+ .string()
86
+ .min(1)
87
+ .refine((val) => val === val.trim(), {
88
+ message: 'Must not have leading or trailing whitespace',
89
+ })
90
+ .describe('Your unique identifier for the facility.'),
45
91
  })
46
92
 
47
93
  export const building_resource = base_location_resource.extend({
48
- building_key: z.string().describe('Your unique identifier for the building.'),
94
+ building_key: z
95
+ .string()
96
+ .min(1)
97
+ .refine((val) => val === val.trim(), {
98
+ message: 'Must not have leading or trailing whitespace',
99
+ })
100
+ .describe('Your unique identifier for the building.'),
49
101
  })
50
102
 
51
103
  export const listing_resource = base_location_resource.extend({
52
- listing_key: z.string().describe('Your unique identifier for the listing.'),
104
+ listing_key: z
105
+ .string()
106
+ .min(1)
107
+ .refine((val) => val === val.trim(), {
108
+ message: 'Must not have leading or trailing whitespace',
109
+ })
110
+ .describe('Your unique identifier for the listing.'),
53
111
  })
54
112
 
55
113
  export const property_listing_resource = base_location_resource.extend({
56
114
  property_listing_key: z
57
115
  .string()
116
+ .min(1)
117
+ .refine((val) => val === val.trim(), {
118
+ message: 'Must not have leading or trailing whitespace',
119
+ })
58
120
  .describe('Your unique identifier for the property listing.'),
59
121
  })
60
122
 
61
123
  export const site_resource = base_location_resource.extend({
62
- site_key: z.string().describe('Your unique identifier for the site.'),
124
+ site_key: z
125
+ .string()
126
+ .min(1)
127
+ .refine((val) => val === val.trim(), {
128
+ message: 'Must not have leading or trailing whitespace',
129
+ })
130
+ .describe('Your unique identifier for the site.'),
63
131
  })
64
132
 
65
133
  // Union of all location resource types
@@ -17,19 +17,43 @@ const base_user_identity_resource = z.object({
17
17
 
18
18
  // User identity resource types with their key aliases
19
19
  export const guest_resource = base_user_identity_resource.extend({
20
- guest_key: z.string().describe('Your unique identifier for the guest.'),
20
+ guest_key: z
21
+ .string()
22
+ .min(1)
23
+ .refine((val) => val === val.trim(), {
24
+ message: 'Must not have leading or trailing whitespace',
25
+ })
26
+ .describe('Your unique identifier for the guest.'),
21
27
  })
22
28
 
23
29
  export const tenant_resource = base_user_identity_resource.extend({
24
- tenant_key: z.string().describe('Your unique identifier for the tenant.'),
30
+ tenant_key: z
31
+ .string()
32
+ .min(1)
33
+ .refine((val) => val === val.trim(), {
34
+ message: 'Must not have leading or trailing whitespace',
35
+ })
36
+ .describe('Your unique identifier for the tenant.'),
25
37
  })
26
38
 
27
39
  export const resident_resource = base_user_identity_resource.extend({
28
- resident_key: z.string().describe('Your unique identifier for the resident.'),
40
+ resident_key: z
41
+ .string()
42
+ .min(1)
43
+ .refine((val) => val === val.trim(), {
44
+ message: 'Must not have leading or trailing whitespace',
45
+ })
46
+ .describe('Your unique identifier for the resident.'),
29
47
  })
30
48
 
31
49
  export const user_resource = base_user_identity_resource.extend({
32
- user_key: z.string().describe('Your unique identifier for the user.'),
50
+ user_key: z
51
+ .string()
52
+ .min(1)
53
+ .refine((val) => val === val.trim(), {
54
+ message: 'Must not have leading or trailing whitespace',
55
+ })
56
+ .describe('Your unique identifier for the user.'),
33
57
  })
34
58
 
35
59
  // staff resource
@@ -52,6 +76,10 @@ export const staff_member_resource = base_user_identity_resource.extend({
52
76
  export const user_identity_resource = base_user_identity_resource.extend({
53
77
  user_identity_key: z
54
78
  .string()
79
+ .min(1)
80
+ .refine((val) => val === val.trim(), {
81
+ message: 'Must not have leading or trailing whitespace',
82
+ })
55
83
  .describe('Your unique identifier for the user identity.'),
56
84
  })
57
85