@seamapi/http 0.2.1 → 0.4.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.
- package/dist/connect.cjs +106 -1
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +157 -124
- package/lib/seam/connect/api-error-type.d.ts +8 -0
- package/lib/seam/connect/api-error-type.js +3 -0
- package/lib/seam/connect/api-error-type.js.map +1 -0
- package/lib/seam/connect/client.js +6 -0
- package/lib/seam/connect/client.js.map +1 -1
- package/lib/seam/connect/error-interceptor.d.ts +1 -0
- package/lib/seam/connect/error-interceptor.js +43 -0
- package/lib/seam/connect/error-interceptor.js.map +1 -0
- package/lib/seam/connect/index.d.ts +4 -1
- package/lib/seam/connect/index.js +4 -1
- package/lib/seam/connect/index.js.map +1 -1
- package/lib/seam/connect/parse-options.js +6 -0
- package/lib/seam/connect/parse-options.js.map +1 -1
- package/lib/seam/connect/routes/access-codes-unmanaged.d.ts +7 -7
- package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/access-codes.d.ts +10 -10
- package/lib/seam/connect/routes/access-codes.js.map +1 -1
- package/lib/seam/connect/routes/acs-access-groups.d.ts +11 -11
- package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
- package/lib/seam/connect/routes/acs-credentials.d.ts +6 -6
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-systems.d.ts +4 -4
- package/lib/seam/connect/routes/acs-systems.js.map +1 -1
- package/lib/seam/connect/routes/acs-users.d.ts +11 -11
- package/lib/seam/connect/routes/acs-users.js.map +1 -1
- package/lib/seam/connect/routes/action-attempts.d.ts +4 -4
- package/lib/seam/connect/routes/action-attempts.js.map +1 -1
- package/lib/seam/connect/routes/client-sessions.d.ts +8 -8
- package/lib/seam/connect/routes/client-sessions.js.map +1 -1
- package/lib/seam/connect/routes/connect-webviews.d.ts +6 -6
- package/lib/seam/connect/routes/connect-webviews.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +3 -3
- package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
- package/lib/seam/connect/routes/devices-unmanaged.d.ts +5 -5
- package/lib/seam/connect/routes/devices-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/devices.d.ts +8 -8
- package/lib/seam/connect/routes/devices.js.map +1 -1
- package/lib/seam/connect/routes/events.d.ts +4 -4
- package/lib/seam/connect/routes/events.js.map +1 -1
- package/lib/seam/connect/routes/locks.d.ts +6 -6
- package/lib/seam/connect/routes/locks.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +7 -7
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.d.ts +7 -7
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +1 -1
- package/lib/seam/connect/routes/thermostats.d.ts +10 -10
- package/lib/seam/connect/routes/thermostats.js.map +1 -1
- package/lib/seam/connect/routes/webhooks.d.ts +4 -4
- package/lib/seam/connect/routes/webhooks.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.d.ts +1 -1
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/seam/connect/seam-http-error.d.ts +20 -0
- package/lib/seam/connect/seam-http-error.js +43 -0
- package/lib/seam/connect/seam-http-error.js.map +1 -0
- package/lib/version.d.ts +2 -0
- package/lib/version.js +3 -0
- package/lib/version.js.map +1 -0
- package/package.json +5 -2
- package/src/lib/seam/connect/api-error-type.ts +11 -0
- package/src/lib/seam/connect/client.ts +9 -0
- package/src/lib/seam/connect/error-interceptor.ts +61 -0
- package/src/lib/seam/connect/index.ts +4 -1
- package/src/lib/seam/connect/parse-options.ts +8 -0
- package/src/lib/seam/connect/routes/access-codes-unmanaged.ts +7 -7
- package/src/lib/seam/connect/routes/access-codes.ts +10 -10
- package/src/lib/seam/connect/routes/acs-access-groups.ts +12 -11
- package/src/lib/seam/connect/routes/acs-credentials.ts +6 -6
- package/src/lib/seam/connect/routes/acs-systems.ts +4 -4
- package/src/lib/seam/connect/routes/acs-users.ts +13 -11
- package/src/lib/seam/connect/routes/action-attempts.ts +4 -4
- package/src/lib/seam/connect/routes/client-sessions.ts +8 -8
- package/src/lib/seam/connect/routes/connect-webviews.ts +7 -6
- package/src/lib/seam/connect/routes/connected-accounts.ts +3 -3
- package/src/lib/seam/connect/routes/devices-unmanaged.ts +6 -5
- package/src/lib/seam/connect/routes/devices.ts +10 -8
- package/src/lib/seam/connect/routes/events.ts +4 -4
- package/src/lib/seam/connect/routes/locks.ts +6 -6
- package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +7 -7
- package/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts +7 -7
- package/src/lib/seam/connect/routes/thermostats.ts +10 -10
- package/src/lib/seam/connect/routes/webhooks.ts +4 -4
- package/src/lib/seam/connect/routes/workspaces.ts +1 -1
- package/src/lib/seam/connect/seam-http-error.ts +64 -0
- package/src/lib/version.ts +3 -0
package/dist/connect.d.cts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
1
|
+
import { AxiosInstance, AxiosRequestConfig, CustomParamsSerializer } from 'axios';
|
|
2
2
|
import { AxiosRetry } from 'axios-retry';
|
|
3
3
|
import { RouteRequestBody, RouteResponse, RouteRequestParams } from '@seamapi/types/connect';
|
|
4
4
|
import { SetNonNullable } from 'type-fest';
|
|
5
5
|
|
|
6
|
+
declare const errorInterceptor: (err: unknown) => Promise<void>;
|
|
7
|
+
|
|
6
8
|
type Client = AxiosInstance;
|
|
7
9
|
interface ClientOptions {
|
|
8
10
|
axiosOptions?: AxiosRequestConfig;
|
|
@@ -42,19 +44,19 @@ declare class SeamHttpAccessCodesUnmanaged {
|
|
|
42
44
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAccessCodesUnmanaged;
|
|
43
45
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAccessCodesUnmanaged;
|
|
44
46
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAccessCodesUnmanaged>;
|
|
45
|
-
convertToManaged(body
|
|
46
|
-
delete(body
|
|
47
|
-
get(body
|
|
48
|
-
list(body
|
|
49
|
-
update(body
|
|
47
|
+
convertToManaged(body?: AccessCodesUnmanagedConvertToManagedBody): Promise<void>;
|
|
48
|
+
delete(body?: AccessCodesUnmanagedDeleteBody): Promise<void>;
|
|
49
|
+
get(body?: AccessCodesUnmanagedGetParams): Promise<AccessCodesUnmanagedGetResponse['access_code']>;
|
|
50
|
+
list(body?: AccessCodesUnmanagedListParams): Promise<AccessCodesUnmanagedListResponse['access_codes']>;
|
|
51
|
+
update(body?: AccessCodesUnmanagedUpdateBody): Promise<void>;
|
|
50
52
|
}
|
|
51
53
|
type AccessCodesUnmanagedConvertToManagedBody = RouteRequestBody<'/access_codes/unmanaged/convert_to_managed'>;
|
|
52
54
|
type AccessCodesUnmanagedConvertToManagedResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/convert_to_managed'>>>;
|
|
53
55
|
type AccessCodesUnmanagedDeleteBody = RouteRequestBody<'/access_codes/unmanaged/delete'>;
|
|
54
56
|
type AccessCodesUnmanagedDeleteResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/delete'>>>;
|
|
55
|
-
type
|
|
57
|
+
type AccessCodesUnmanagedGetParams = RouteRequestBody<'/access_codes/unmanaged/get'>;
|
|
56
58
|
type AccessCodesUnmanagedGetResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/get'>>>;
|
|
57
|
-
type
|
|
59
|
+
type AccessCodesUnmanagedListParams = RouteRequestBody<'/access_codes/unmanaged/list'>;
|
|
58
60
|
type AccessCodesUnmanagedListResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/list'>>>;
|
|
59
61
|
type AccessCodesUnmanagedUpdateBody = RouteRequestBody<'/access_codes/unmanaged/update'>;
|
|
60
62
|
type AccessCodesUnmanagedUpdateResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/update'>>>;
|
|
@@ -67,14 +69,14 @@ declare class SeamHttpAccessCodes {
|
|
|
67
69
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAccessCodes;
|
|
68
70
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAccessCodes>;
|
|
69
71
|
get unmanaged(): SeamHttpAccessCodesUnmanaged;
|
|
70
|
-
create(body
|
|
71
|
-
createMultiple(body
|
|
72
|
-
delete(body
|
|
73
|
-
generateCode(body
|
|
74
|
-
get(body
|
|
75
|
-
list(body
|
|
76
|
-
pullBackupAccessCode(body
|
|
77
|
-
update(body
|
|
72
|
+
create(body?: AccessCodesCreateBody): Promise<AccessCodesCreateResponse['access_code']>;
|
|
73
|
+
createMultiple(body?: AccessCodesCreateMultipleBody): Promise<AccessCodesCreateMultipleResponse['access_codes']>;
|
|
74
|
+
delete(body?: AccessCodesDeleteBody): Promise<void>;
|
|
75
|
+
generateCode(body?: AccessCodesGenerateCodeBody): Promise<AccessCodesGenerateCodeResponse['generated_code']>;
|
|
76
|
+
get(body?: AccessCodesGetParams): Promise<AccessCodesGetResponse['access_code']>;
|
|
77
|
+
list(body?: AccessCodesListParams): Promise<AccessCodesListResponse['access_codes']>;
|
|
78
|
+
pullBackupAccessCode(body?: AccessCodesPullBackupAccessCodeBody): Promise<AccessCodesPullBackupAccessCodeResponse['backup_access_code']>;
|
|
79
|
+
update(body?: AccessCodesUpdateBody): Promise<void>;
|
|
78
80
|
}
|
|
79
81
|
type AccessCodesCreateBody = RouteRequestBody<'/access_codes/create'>;
|
|
80
82
|
type AccessCodesCreateResponse = SetNonNullable<Required<RouteResponse<'/access_codes/create'>>>;
|
|
@@ -84,9 +86,9 @@ type AccessCodesDeleteBody = RouteRequestBody<'/access_codes/delete'>;
|
|
|
84
86
|
type AccessCodesDeleteResponse = SetNonNullable<Required<RouteResponse<'/access_codes/delete'>>>;
|
|
85
87
|
type AccessCodesGenerateCodeBody = RouteRequestBody<'/access_codes/generate_code'>;
|
|
86
88
|
type AccessCodesGenerateCodeResponse = SetNonNullable<Required<RouteResponse<'/access_codes/generate_code'>>>;
|
|
87
|
-
type
|
|
89
|
+
type AccessCodesGetParams = RouteRequestBody<'/access_codes/get'>;
|
|
88
90
|
type AccessCodesGetResponse = SetNonNullable<Required<RouteResponse<'/access_codes/get'>>>;
|
|
89
|
-
type
|
|
91
|
+
type AccessCodesListParams = RouteRequestBody<'/access_codes/list'>;
|
|
90
92
|
type AccessCodesListResponse = SetNonNullable<Required<RouteResponse<'/access_codes/list'>>>;
|
|
91
93
|
type AccessCodesPullBackupAccessCodeBody = RouteRequestBody<'/access_codes/pull_backup_access_code'>;
|
|
92
94
|
type AccessCodesPullBackupAccessCodeResponse = SetNonNullable<Required<RouteResponse<'/access_codes/pull_backup_access_code'>>>;
|
|
@@ -100,14 +102,14 @@ declare class SeamHttpAcsAccessGroups {
|
|
|
100
102
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsAccessGroups;
|
|
101
103
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsAccessGroups;
|
|
102
104
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsAccessGroups>;
|
|
103
|
-
addUser(body
|
|
104
|
-
create(body
|
|
105
|
-
delete(body
|
|
106
|
-
get(body
|
|
107
|
-
list(body
|
|
108
|
-
listUsers(body
|
|
109
|
-
removeUser(body
|
|
110
|
-
update(body
|
|
105
|
+
addUser(body?: AcsAccessGroupsAddUserBody): Promise<void>;
|
|
106
|
+
create(body?: AcsAccessGroupsCreateBody): Promise<AcsAccessGroupsCreateResponse['acs_access_group']>;
|
|
107
|
+
delete(body?: AcsAccessGroupsDeleteBody): Promise<void>;
|
|
108
|
+
get(body?: AcsAccessGroupsGetParams): Promise<AcsAccessGroupsGetResponse['acs_access_group']>;
|
|
109
|
+
list(body?: AcsAccessGroupsListParams): Promise<AcsAccessGroupsListResponse['acs_access_groups']>;
|
|
110
|
+
listUsers(body?: AcsAccessGroupsListUsersParams): Promise<AcsAccessGroupsListUsersResponse['acs_users']>;
|
|
111
|
+
removeUser(body?: AcsAccessGroupsRemoveUserBody): Promise<void>;
|
|
112
|
+
update(body?: AcsAccessGroupsUpdateBody): Promise<void>;
|
|
111
113
|
}
|
|
112
114
|
type AcsAccessGroupsAddUserBody = RouteRequestBody<'/acs/access_groups/add_user'>;
|
|
113
115
|
type AcsAccessGroupsAddUserResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/add_user'>>>;
|
|
@@ -115,11 +117,11 @@ type AcsAccessGroupsCreateBody = RouteRequestBody<'/acs/access_groups/create'>;
|
|
|
115
117
|
type AcsAccessGroupsCreateResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/create'>>>;
|
|
116
118
|
type AcsAccessGroupsDeleteBody = RouteRequestBody<'/acs/access_groups/delete'>;
|
|
117
119
|
type AcsAccessGroupsDeleteResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/delete'>>>;
|
|
118
|
-
type
|
|
120
|
+
type AcsAccessGroupsGetParams = RouteRequestBody<'/acs/access_groups/get'>;
|
|
119
121
|
type AcsAccessGroupsGetResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/get'>>>;
|
|
120
|
-
type
|
|
122
|
+
type AcsAccessGroupsListParams = RouteRequestBody<'/acs/access_groups/list'>;
|
|
121
123
|
type AcsAccessGroupsListResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/list'>>>;
|
|
122
|
-
type
|
|
124
|
+
type AcsAccessGroupsListUsersParams = RouteRequestBody<'/acs/access_groups/list_users'>;
|
|
123
125
|
type AcsAccessGroupsListUsersResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/list_users'>>>;
|
|
124
126
|
type AcsAccessGroupsRemoveUserBody = RouteRequestBody<'/acs/access_groups/remove_user'>;
|
|
125
127
|
type AcsAccessGroupsRemoveUserResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/remove_user'>>>;
|
|
@@ -133,18 +135,18 @@ declare class SeamHttpAcsCredentials {
|
|
|
133
135
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsCredentials;
|
|
134
136
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsCredentials;
|
|
135
137
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsCredentials>;
|
|
136
|
-
create(body
|
|
137
|
-
delete(body
|
|
138
|
-
get(body
|
|
139
|
-
list(body
|
|
138
|
+
create(body?: AcsCredentialsCreateBody): Promise<AcsCredentialsCreateResponse['acs_credential']>;
|
|
139
|
+
delete(body?: AcsCredentialsDeleteBody): Promise<void>;
|
|
140
|
+
get(body?: AcsCredentialsGetParams): Promise<AcsCredentialsGetResponse['acs_credential']>;
|
|
141
|
+
list(body?: AcsCredentialsListParams): Promise<AcsCredentialsListResponse['acs_credentials']>;
|
|
140
142
|
}
|
|
141
143
|
type AcsCredentialsCreateBody = RouteRequestBody<'/acs/credentials/create'>;
|
|
142
144
|
type AcsCredentialsCreateResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/create'>>>;
|
|
143
145
|
type AcsCredentialsDeleteBody = RouteRequestBody<'/acs/credentials/delete'>;
|
|
144
146
|
type AcsCredentialsDeleteResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/delete'>>>;
|
|
145
|
-
type
|
|
147
|
+
type AcsCredentialsGetParams = RouteRequestBody<'/acs/credentials/get'>;
|
|
146
148
|
type AcsCredentialsGetResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/get'>>>;
|
|
147
|
-
type
|
|
149
|
+
type AcsCredentialsListParams = RouteRequestBody<'/acs/credentials/list'>;
|
|
148
150
|
type AcsCredentialsListResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/list'>>>;
|
|
149
151
|
|
|
150
152
|
declare class SeamHttpAcsSystems {
|
|
@@ -154,12 +156,12 @@ declare class SeamHttpAcsSystems {
|
|
|
154
156
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsSystems;
|
|
155
157
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsSystems;
|
|
156
158
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsSystems>;
|
|
157
|
-
get(body
|
|
158
|
-
list(body
|
|
159
|
+
get(body?: AcsSystemsGetParams): Promise<AcsSystemsGetResponse['acs_system']>;
|
|
160
|
+
list(body?: AcsSystemsListParams): Promise<AcsSystemsListResponse['acs_systems']>;
|
|
159
161
|
}
|
|
160
|
-
type
|
|
162
|
+
type AcsSystemsGetParams = RouteRequestBody<'/acs/systems/get'>;
|
|
161
163
|
type AcsSystemsGetResponse = SetNonNullable<Required<RouteResponse<'/acs/systems/get'>>>;
|
|
162
|
-
type
|
|
164
|
+
type AcsSystemsListParams = RouteRequestBody<'/acs/systems/list'>;
|
|
163
165
|
type AcsSystemsListResponse = SetNonNullable<Required<RouteResponse<'/acs/systems/list'>>>;
|
|
164
166
|
|
|
165
167
|
declare class SeamHttpAcsUsers {
|
|
@@ -169,15 +171,15 @@ declare class SeamHttpAcsUsers {
|
|
|
169
171
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsUsers;
|
|
170
172
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsUsers;
|
|
171
173
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpAcsUsers>;
|
|
172
|
-
addToAccessGroup(body
|
|
173
|
-
create(body
|
|
174
|
-
delete(body
|
|
175
|
-
get(body
|
|
176
|
-
list(body
|
|
177
|
-
removeFromAccessGroup(body
|
|
178
|
-
suspend(body
|
|
179
|
-
unsuspend(body
|
|
180
|
-
update(body
|
|
174
|
+
addToAccessGroup(body?: AcsUsersAddToAccessGroupBody): Promise<void>;
|
|
175
|
+
create(body?: AcsUsersCreateBody): Promise<AcsUsersCreateResponse['acs_user']>;
|
|
176
|
+
delete(body?: AcsUsersDeleteBody): Promise<void>;
|
|
177
|
+
get(body?: AcsUsersGetParams): Promise<AcsUsersGetResponse['acs_user']>;
|
|
178
|
+
list(body?: AcsUsersListParams): Promise<AcsUsersListResponse['acs_users']>;
|
|
179
|
+
removeFromAccessGroup(body?: AcsUsersRemoveFromAccessGroupBody): Promise<void>;
|
|
180
|
+
suspend(body?: AcsUsersSuspendBody): Promise<void>;
|
|
181
|
+
unsuspend(body?: AcsUsersUnsuspendBody): Promise<void>;
|
|
182
|
+
update(body?: AcsUsersUpdateBody): Promise<void>;
|
|
181
183
|
}
|
|
182
184
|
type AcsUsersAddToAccessGroupBody = RouteRequestBody<'/acs/users/add_to_access_group'>;
|
|
183
185
|
type AcsUsersAddToAccessGroupResponse = SetNonNullable<Required<RouteResponse<'/acs/users/add_to_access_group'>>>;
|
|
@@ -185,9 +187,9 @@ type AcsUsersCreateBody = RouteRequestBody<'/acs/users/create'>;
|
|
|
185
187
|
type AcsUsersCreateResponse = SetNonNullable<Required<RouteResponse<'/acs/users/create'>>>;
|
|
186
188
|
type AcsUsersDeleteBody = RouteRequestBody<'/acs/users/delete'>;
|
|
187
189
|
type AcsUsersDeleteResponse = SetNonNullable<Required<RouteResponse<'/acs/users/delete'>>>;
|
|
188
|
-
type
|
|
190
|
+
type AcsUsersGetParams = RouteRequestBody<'/acs/users/get'>;
|
|
189
191
|
type AcsUsersGetResponse = SetNonNullable<Required<RouteResponse<'/acs/users/get'>>>;
|
|
190
|
-
type
|
|
192
|
+
type AcsUsersListParams = RouteRequestBody<'/acs/users/list'>;
|
|
191
193
|
type AcsUsersListResponse = SetNonNullable<Required<RouteResponse<'/acs/users/list'>>>;
|
|
192
194
|
type AcsUsersRemoveFromAccessGroupBody = RouteRequestBody<'/acs/users/remove_from_access_group'>;
|
|
193
195
|
type AcsUsersRemoveFromAccessGroupResponse = SetNonNullable<Required<RouteResponse<'/acs/users/remove_from_access_group'>>>;
|
|
@@ -218,12 +220,12 @@ declare class SeamHttpActionAttempts {
|
|
|
218
220
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpActionAttempts;
|
|
219
221
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpActionAttempts;
|
|
220
222
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpActionAttempts>;
|
|
221
|
-
get(body
|
|
222
|
-
list(body
|
|
223
|
+
get(body?: ActionAttemptsGetParams): Promise<ActionAttemptsGetResponse['action_attempt']>;
|
|
224
|
+
list(body?: ActionAttemptsListParams): Promise<ActionAttemptsListResponse['action_attempts']>;
|
|
223
225
|
}
|
|
224
|
-
type
|
|
226
|
+
type ActionAttemptsGetParams = RouteRequestBody<'/action_attempts/get'>;
|
|
225
227
|
type ActionAttemptsGetResponse = SetNonNullable<Required<RouteResponse<'/action_attempts/get'>>>;
|
|
226
|
-
type
|
|
228
|
+
type ActionAttemptsListParams = RouteRequestBody<'/action_attempts/list'>;
|
|
227
229
|
type ActionAttemptsListResponse = SetNonNullable<Required<RouteResponse<'/action_attempts/list'>>>;
|
|
228
230
|
|
|
229
231
|
declare class SeamHttpClientSessions {
|
|
@@ -233,24 +235,24 @@ declare class SeamHttpClientSessions {
|
|
|
233
235
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpClientSessions;
|
|
234
236
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpClientSessions;
|
|
235
237
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpClientSessions>;
|
|
236
|
-
create(body
|
|
237
|
-
delete(body
|
|
238
|
-
get(body
|
|
239
|
-
getOrCreate(body
|
|
240
|
-
grantAccess(body
|
|
241
|
-
list(body
|
|
238
|
+
create(body?: ClientSessionsCreateBody): Promise<ClientSessionsCreateResponse['client_session']>;
|
|
239
|
+
delete(body?: ClientSessionsDeleteBody): Promise<void>;
|
|
240
|
+
get(body?: ClientSessionsGetParams): Promise<ClientSessionsGetResponse['client_session']>;
|
|
241
|
+
getOrCreate(body?: ClientSessionsGetOrCreateBody): Promise<ClientSessionsGetOrCreateResponse['client_session']>;
|
|
242
|
+
grantAccess(body?: ClientSessionsGrantAccessBody): Promise<ClientSessionsGrantAccessResponse['client_session']>;
|
|
243
|
+
list(body?: ClientSessionsListParams): Promise<ClientSessionsListResponse['client_sessions']>;
|
|
242
244
|
}
|
|
243
245
|
type ClientSessionsCreateBody = RouteRequestBody<'/client_sessions/create'>;
|
|
244
246
|
type ClientSessionsCreateResponse = SetNonNullable<Required<RouteResponse<'/client_sessions/create'>>>;
|
|
245
247
|
type ClientSessionsDeleteBody = RouteRequestBody<'/client_sessions/delete'>;
|
|
246
248
|
type ClientSessionsDeleteResponse = SetNonNullable<Required<RouteResponse<'/client_sessions/delete'>>>;
|
|
247
|
-
type
|
|
249
|
+
type ClientSessionsGetParams = RouteRequestBody<'/client_sessions/get'>;
|
|
248
250
|
type ClientSessionsGetResponse = SetNonNullable<Required<RouteResponse<'/client_sessions/get'>>>;
|
|
249
251
|
type ClientSessionsGetOrCreateBody = RouteRequestBody<'/client_sessions/get_or_create'>;
|
|
250
252
|
type ClientSessionsGetOrCreateResponse = SetNonNullable<Required<RouteResponse<'/client_sessions/get_or_create'>>>;
|
|
251
253
|
type ClientSessionsGrantAccessBody = RouteRequestBody<'/client_sessions/grant_access'>;
|
|
252
254
|
type ClientSessionsGrantAccessResponse = SetNonNullable<Required<RouteResponse<'/client_sessions/grant_access'>>>;
|
|
253
|
-
type
|
|
255
|
+
type ClientSessionsListParams = RouteRequestBody<'/client_sessions/list'>;
|
|
254
256
|
type ClientSessionsListResponse = SetNonNullable<Required<RouteResponse<'/client_sessions/list'>>>;
|
|
255
257
|
|
|
256
258
|
declare class SeamHttpConnectWebviews {
|
|
@@ -260,19 +262,19 @@ declare class SeamHttpConnectWebviews {
|
|
|
260
262
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpConnectWebviews;
|
|
261
263
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpConnectWebviews;
|
|
262
264
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpConnectWebviews>;
|
|
263
|
-
create(body
|
|
264
|
-
delete(body
|
|
265
|
-
get(body
|
|
266
|
-
list(body
|
|
265
|
+
create(body?: ConnectWebviewsCreateBody): Promise<ConnectWebviewsCreateResponse['connect_webview']>;
|
|
266
|
+
delete(body?: ConnectWebviewsDeleteBody): Promise<void>;
|
|
267
|
+
get(body?: ConnectWebviewsGetParams): Promise<ConnectWebviewsGetResponse['connect_webview']>;
|
|
268
|
+
list(body?: ConnectWebviewsListParams): Promise<ConnectWebviewsListResponse['connect_webviews']>;
|
|
267
269
|
view(params?: ConnectWebviewsViewParams): Promise<void>;
|
|
268
270
|
}
|
|
269
271
|
type ConnectWebviewsCreateBody = RouteRequestBody<'/connect_webviews/create'>;
|
|
270
272
|
type ConnectWebviewsCreateResponse = SetNonNullable<Required<RouteResponse<'/connect_webviews/create'>>>;
|
|
271
273
|
type ConnectWebviewsDeleteBody = RouteRequestBody<'/connect_webviews/delete'>;
|
|
272
274
|
type ConnectWebviewsDeleteResponse = SetNonNullable<Required<RouteResponse<'/connect_webviews/delete'>>>;
|
|
273
|
-
type
|
|
275
|
+
type ConnectWebviewsGetParams = RouteRequestBody<'/connect_webviews/get'>;
|
|
274
276
|
type ConnectWebviewsGetResponse = SetNonNullable<Required<RouteResponse<'/connect_webviews/get'>>>;
|
|
275
|
-
type
|
|
277
|
+
type ConnectWebviewsListParams = RouteRequestBody<'/connect_webviews/list'>;
|
|
276
278
|
type ConnectWebviewsListResponse = SetNonNullable<Required<RouteResponse<'/connect_webviews/list'>>>;
|
|
277
279
|
type ConnectWebviewsViewParams = RouteRequestParams<'/connect_webviews/view'>;
|
|
278
280
|
type ConnectWebviewsViewResponse = SetNonNullable<Required<RouteResponse<'/connect_webviews/view'>>>;
|
|
@@ -284,13 +286,13 @@ declare class SeamHttpConnectedAccounts {
|
|
|
284
286
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpConnectedAccounts;
|
|
285
287
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpConnectedAccounts;
|
|
286
288
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpConnectedAccounts>;
|
|
287
|
-
delete(body
|
|
288
|
-
get(body
|
|
289
|
+
delete(body?: ConnectedAccountsDeleteBody): Promise<void>;
|
|
290
|
+
get(body?: ConnectedAccountsGetParams): Promise<ConnectedAccountsGetResponse['connected_account']>;
|
|
289
291
|
list(params?: ConnectedAccountsListParams): Promise<ConnectedAccountsListResponse['connected_accounts']>;
|
|
290
292
|
}
|
|
291
293
|
type ConnectedAccountsDeleteBody = RouteRequestBody<'/connected_accounts/delete'>;
|
|
292
294
|
type ConnectedAccountsDeleteResponse = SetNonNullable<Required<RouteResponse<'/connected_accounts/delete'>>>;
|
|
293
|
-
type
|
|
295
|
+
type ConnectedAccountsGetParams = RouteRequestBody<'/connected_accounts/get'>;
|
|
294
296
|
type ConnectedAccountsGetResponse = SetNonNullable<Required<RouteResponse<'/connected_accounts/get'>>>;
|
|
295
297
|
type ConnectedAccountsListParams = RouteRequestParams<'/connected_accounts/list'>;
|
|
296
298
|
type ConnectedAccountsListResponse = SetNonNullable<Required<RouteResponse<'/connected_accounts/list'>>>;
|
|
@@ -302,13 +304,13 @@ declare class SeamHttpDevicesUnmanaged {
|
|
|
302
304
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpDevicesUnmanaged;
|
|
303
305
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpDevicesUnmanaged;
|
|
304
306
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpDevicesUnmanaged>;
|
|
305
|
-
get(body
|
|
306
|
-
list(body
|
|
307
|
-
update(body
|
|
307
|
+
get(body?: DevicesUnmanagedGetParams): Promise<DevicesUnmanagedGetResponse['device']>;
|
|
308
|
+
list(body?: DevicesUnmanagedListParams): Promise<DevicesUnmanagedListResponse['devices']>;
|
|
309
|
+
update(body?: DevicesUnmanagedUpdateBody): Promise<void>;
|
|
308
310
|
}
|
|
309
|
-
type
|
|
311
|
+
type DevicesUnmanagedGetParams = RouteRequestBody<'/devices/unmanaged/get'>;
|
|
310
312
|
type DevicesUnmanagedGetResponse = SetNonNullable<Required<RouteResponse<'/devices/unmanaged/get'>>>;
|
|
311
|
-
type
|
|
313
|
+
type DevicesUnmanagedListParams = RouteRequestBody<'/devices/unmanaged/list'>;
|
|
312
314
|
type DevicesUnmanagedListResponse = SetNonNullable<Required<RouteResponse<'/devices/unmanaged/list'>>>;
|
|
313
315
|
type DevicesUnmanagedUpdateBody = RouteRequestBody<'/devices/unmanaged/update'>;
|
|
314
316
|
type DevicesUnmanagedUpdateResponse = SetNonNullable<Required<RouteResponse<'/devices/unmanaged/update'>>>;
|
|
@@ -321,19 +323,19 @@ declare class SeamHttpDevices {
|
|
|
321
323
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpDevices;
|
|
322
324
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpDevices>;
|
|
323
325
|
get unmanaged(): SeamHttpDevicesUnmanaged;
|
|
324
|
-
delete(body
|
|
325
|
-
get(body
|
|
326
|
-
list(body
|
|
327
|
-
listDeviceProviders(body
|
|
328
|
-
update(body
|
|
326
|
+
delete(body?: DevicesDeleteBody): Promise<void>;
|
|
327
|
+
get(body?: DevicesGetParams): Promise<DevicesGetResponse['device']>;
|
|
328
|
+
list(body?: DevicesListParams): Promise<DevicesListResponse['devices']>;
|
|
329
|
+
listDeviceProviders(body?: DevicesListDeviceProvidersParams): Promise<DevicesListDeviceProvidersResponse['device_providers']>;
|
|
330
|
+
update(body?: DevicesUpdateBody): Promise<void>;
|
|
329
331
|
}
|
|
330
332
|
type DevicesDeleteBody = RouteRequestBody<'/devices/delete'>;
|
|
331
333
|
type DevicesDeleteResponse = SetNonNullable<Required<RouteResponse<'/devices/delete'>>>;
|
|
332
|
-
type
|
|
334
|
+
type DevicesGetParams = RouteRequestBody<'/devices/get'>;
|
|
333
335
|
type DevicesGetResponse = SetNonNullable<Required<RouteResponse<'/devices/get'>>>;
|
|
334
|
-
type
|
|
336
|
+
type DevicesListParams = RouteRequestBody<'/devices/list'>;
|
|
335
337
|
type DevicesListResponse = SetNonNullable<Required<RouteResponse<'/devices/list'>>>;
|
|
336
|
-
type
|
|
338
|
+
type DevicesListDeviceProvidersParams = RouteRequestBody<'/devices/list_device_providers'>;
|
|
337
339
|
type DevicesListDeviceProvidersResponse = SetNonNullable<Required<RouteResponse<'/devices/list_device_providers'>>>;
|
|
338
340
|
type DevicesUpdateBody = RouteRequestBody<'/devices/update'>;
|
|
339
341
|
type DevicesUpdateResponse = SetNonNullable<Required<RouteResponse<'/devices/update'>>>;
|
|
@@ -345,12 +347,12 @@ declare class SeamHttpEvents {
|
|
|
345
347
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpEvents;
|
|
346
348
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpEvents;
|
|
347
349
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpEvents>;
|
|
348
|
-
get(body
|
|
349
|
-
list(body
|
|
350
|
+
get(body?: EventsGetParams): Promise<EventsGetResponse['event']>;
|
|
351
|
+
list(body?: EventsListParams): Promise<EventsListResponse['events']>;
|
|
350
352
|
}
|
|
351
|
-
type
|
|
353
|
+
type EventsGetParams = RouteRequestBody<'/events/get'>;
|
|
352
354
|
type EventsGetResponse = SetNonNullable<Required<RouteResponse<'/events/get'>>>;
|
|
353
|
-
type
|
|
355
|
+
type EventsListParams = RouteRequestBody<'/events/list'>;
|
|
354
356
|
type EventsListResponse = SetNonNullable<Required<RouteResponse<'/events/list'>>>;
|
|
355
357
|
|
|
356
358
|
declare class SeamHttpLocks {
|
|
@@ -360,14 +362,14 @@ declare class SeamHttpLocks {
|
|
|
360
362
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpLocks;
|
|
361
363
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpLocks;
|
|
362
364
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpLocks>;
|
|
363
|
-
get(body
|
|
364
|
-
list(body
|
|
365
|
-
lockDoor(body
|
|
366
|
-
unlockDoor(body
|
|
365
|
+
get(body?: LocksGetParams): Promise<LocksGetResponse['device']>;
|
|
366
|
+
list(body?: LocksListParams): Promise<LocksListResponse['devices']>;
|
|
367
|
+
lockDoor(body?: LocksLockDoorBody): Promise<LocksLockDoorResponse['action_attempt']>;
|
|
368
|
+
unlockDoor(body?: LocksUnlockDoorBody): Promise<LocksUnlockDoorResponse['action_attempt']>;
|
|
367
369
|
}
|
|
368
|
-
type
|
|
370
|
+
type LocksGetParams = RouteRequestBody<'/locks/get'>;
|
|
369
371
|
type LocksGetResponse = SetNonNullable<Required<RouteResponse<'/locks/get'>>>;
|
|
370
|
-
type
|
|
372
|
+
type LocksListParams = RouteRequestBody<'/locks/list'>;
|
|
371
373
|
type LocksListResponse = SetNonNullable<Required<RouteResponse<'/locks/list'>>>;
|
|
372
374
|
type LocksLockDoorBody = RouteRequestBody<'/locks/lock_door'>;
|
|
373
375
|
type LocksLockDoorResponse = SetNonNullable<Required<RouteResponse<'/locks/lock_door'>>>;
|
|
@@ -381,19 +383,19 @@ declare class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
381
383
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpNoiseSensorsNoiseThresholds;
|
|
382
384
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpNoiseSensorsNoiseThresholds;
|
|
383
385
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpNoiseSensorsNoiseThresholds>;
|
|
384
|
-
create(body
|
|
385
|
-
delete(body
|
|
386
|
-
get(body
|
|
387
|
-
list(body
|
|
388
|
-
update(body
|
|
386
|
+
create(body?: NoiseSensorsNoiseThresholdsCreateBody): Promise<void>;
|
|
387
|
+
delete(body?: NoiseSensorsNoiseThresholdsDeleteBody): Promise<void>;
|
|
388
|
+
get(body?: NoiseSensorsNoiseThresholdsGetParams): Promise<NoiseSensorsNoiseThresholdsGetResponse['noise_threshold']>;
|
|
389
|
+
list(body?: NoiseSensorsNoiseThresholdsListParams): Promise<NoiseSensorsNoiseThresholdsListResponse['noise_thresholds']>;
|
|
390
|
+
update(body?: NoiseSensorsNoiseThresholdsUpdateBody): Promise<void>;
|
|
389
391
|
}
|
|
390
392
|
type NoiseSensorsNoiseThresholdsCreateBody = RouteRequestBody<'/noise_sensors/noise_thresholds/create'>;
|
|
391
393
|
type NoiseSensorsNoiseThresholdsCreateResponse = SetNonNullable<Required<RouteResponse<'/noise_sensors/noise_thresholds/create'>>>;
|
|
392
394
|
type NoiseSensorsNoiseThresholdsDeleteBody = RouteRequestBody<'/noise_sensors/noise_thresholds/delete'>;
|
|
393
395
|
type NoiseSensorsNoiseThresholdsDeleteResponse = SetNonNullable<Required<RouteResponse<'/noise_sensors/noise_thresholds/delete'>>>;
|
|
394
|
-
type
|
|
396
|
+
type NoiseSensorsNoiseThresholdsGetParams = RouteRequestBody<'/noise_sensors/noise_thresholds/get'>;
|
|
395
397
|
type NoiseSensorsNoiseThresholdsGetResponse = SetNonNullable<Required<RouteResponse<'/noise_sensors/noise_thresholds/get'>>>;
|
|
396
|
-
type
|
|
398
|
+
type NoiseSensorsNoiseThresholdsListParams = RouteRequestBody<'/noise_sensors/noise_thresholds/list'>;
|
|
397
399
|
type NoiseSensorsNoiseThresholdsListResponse = SetNonNullable<Required<RouteResponse<'/noise_sensors/noise_thresholds/list'>>>;
|
|
398
400
|
type NoiseSensorsNoiseThresholdsUpdateBody = RouteRequestBody<'/noise_sensors/noise_thresholds/update'>;
|
|
399
401
|
type NoiseSensorsNoiseThresholdsUpdateResponse = SetNonNullable<Required<RouteResponse<'/noise_sensors/noise_thresholds/update'>>>;
|
|
@@ -415,19 +417,19 @@ declare class SeamHttpThermostatsClimateSettingSchedules {
|
|
|
415
417
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpThermostatsClimateSettingSchedules;
|
|
416
418
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpThermostatsClimateSettingSchedules;
|
|
417
419
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpThermostatsClimateSettingSchedules>;
|
|
418
|
-
create(body
|
|
419
|
-
delete(body
|
|
420
|
-
get(body
|
|
421
|
-
list(body
|
|
422
|
-
update(body
|
|
420
|
+
create(body?: ThermostatsClimateSettingSchedulesCreateBody): Promise<ThermostatsClimateSettingSchedulesCreateResponse['climate_setting_schedule']>;
|
|
421
|
+
delete(body?: ThermostatsClimateSettingSchedulesDeleteBody): Promise<void>;
|
|
422
|
+
get(body?: ThermostatsClimateSettingSchedulesGetParams): Promise<ThermostatsClimateSettingSchedulesGetResponse['climate_setting_schedule']>;
|
|
423
|
+
list(body?: ThermostatsClimateSettingSchedulesListParams): Promise<ThermostatsClimateSettingSchedulesListResponse['climate_setting_schedules']>;
|
|
424
|
+
update(body?: ThermostatsClimateSettingSchedulesUpdateBody): Promise<void>;
|
|
423
425
|
}
|
|
424
426
|
type ThermostatsClimateSettingSchedulesCreateBody = RouteRequestBody<'/thermostats/climate_setting_schedules/create'>;
|
|
425
427
|
type ThermostatsClimateSettingSchedulesCreateResponse = SetNonNullable<Required<RouteResponse<'/thermostats/climate_setting_schedules/create'>>>;
|
|
426
428
|
type ThermostatsClimateSettingSchedulesDeleteBody = RouteRequestBody<'/thermostats/climate_setting_schedules/delete'>;
|
|
427
429
|
type ThermostatsClimateSettingSchedulesDeleteResponse = SetNonNullable<Required<RouteResponse<'/thermostats/climate_setting_schedules/delete'>>>;
|
|
428
|
-
type
|
|
430
|
+
type ThermostatsClimateSettingSchedulesGetParams = RouteRequestBody<'/thermostats/climate_setting_schedules/get'>;
|
|
429
431
|
type ThermostatsClimateSettingSchedulesGetResponse = SetNonNullable<Required<RouteResponse<'/thermostats/climate_setting_schedules/get'>>>;
|
|
430
|
-
type
|
|
432
|
+
type ThermostatsClimateSettingSchedulesListParams = RouteRequestBody<'/thermostats/climate_setting_schedules/list'>;
|
|
431
433
|
type ThermostatsClimateSettingSchedulesListResponse = SetNonNullable<Required<RouteResponse<'/thermostats/climate_setting_schedules/list'>>>;
|
|
432
434
|
type ThermostatsClimateSettingSchedulesUpdateBody = RouteRequestBody<'/thermostats/climate_setting_schedules/update'>;
|
|
433
435
|
type ThermostatsClimateSettingSchedulesUpdateResponse = SetNonNullable<Required<RouteResponse<'/thermostats/climate_setting_schedules/update'>>>;
|
|
@@ -440,24 +442,24 @@ declare class SeamHttpThermostats {
|
|
|
440
442
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpThermostats;
|
|
441
443
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpThermostats>;
|
|
442
444
|
get climateSettingSchedules(): SeamHttpThermostatsClimateSettingSchedules;
|
|
443
|
-
cool(body
|
|
444
|
-
get(body
|
|
445
|
-
heat(body
|
|
446
|
-
heatCool(body
|
|
447
|
-
list(body
|
|
448
|
-
off(body
|
|
449
|
-
setFanMode(body
|
|
450
|
-
update(body
|
|
445
|
+
cool(body?: ThermostatsCoolBody): Promise<void>;
|
|
446
|
+
get(body?: ThermostatsGetParams): Promise<ThermostatsGetResponse['thermostat']>;
|
|
447
|
+
heat(body?: ThermostatsHeatBody): Promise<void>;
|
|
448
|
+
heatCool(body?: ThermostatsHeatCoolBody): Promise<void>;
|
|
449
|
+
list(body?: ThermostatsListParams): Promise<ThermostatsListResponse['thermostats']>;
|
|
450
|
+
off(body?: ThermostatsOffBody): Promise<void>;
|
|
451
|
+
setFanMode(body?: ThermostatsSetFanModeBody): Promise<void>;
|
|
452
|
+
update(body?: ThermostatsUpdateBody): Promise<void>;
|
|
451
453
|
}
|
|
452
454
|
type ThermostatsCoolBody = RouteRequestBody<'/thermostats/cool'>;
|
|
453
455
|
type ThermostatsCoolResponse = SetNonNullable<Required<RouteResponse<'/thermostats/cool'>>>;
|
|
454
|
-
type
|
|
456
|
+
type ThermostatsGetParams = RouteRequestBody<'/thermostats/get'>;
|
|
455
457
|
type ThermostatsGetResponse = SetNonNullable<Required<RouteResponse<'/thermostats/get'>>>;
|
|
456
458
|
type ThermostatsHeatBody = RouteRequestBody<'/thermostats/heat'>;
|
|
457
459
|
type ThermostatsHeatResponse = SetNonNullable<Required<RouteResponse<'/thermostats/heat'>>>;
|
|
458
460
|
type ThermostatsHeatCoolBody = RouteRequestBody<'/thermostats/heat_cool'>;
|
|
459
461
|
type ThermostatsHeatCoolResponse = SetNonNullable<Required<RouteResponse<'/thermostats/heat_cool'>>>;
|
|
460
|
-
type
|
|
462
|
+
type ThermostatsListParams = RouteRequestBody<'/thermostats/list'>;
|
|
461
463
|
type ThermostatsListResponse = SetNonNullable<Required<RouteResponse<'/thermostats/list'>>>;
|
|
462
464
|
type ThermostatsOffBody = RouteRequestBody<'/thermostats/off'>;
|
|
463
465
|
type ThermostatsOffResponse = SetNonNullable<Required<RouteResponse<'/thermostats/off'>>>;
|
|
@@ -473,16 +475,16 @@ declare class SeamHttpWebhooks {
|
|
|
473
475
|
static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpWebhooks;
|
|
474
476
|
static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpWebhooks;
|
|
475
477
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpWebhooks>;
|
|
476
|
-
create(body
|
|
477
|
-
delete(body
|
|
478
|
-
get(body
|
|
478
|
+
create(body?: WebhooksCreateBody): Promise<WebhooksCreateResponse['webhook']>;
|
|
479
|
+
delete(body?: WebhooksDeleteBody): Promise<void>;
|
|
480
|
+
get(body?: WebhooksGetParams): Promise<WebhooksGetResponse['webhook']>;
|
|
479
481
|
list(params?: WebhooksListParams): Promise<WebhooksListResponse['webhooks']>;
|
|
480
482
|
}
|
|
481
483
|
type WebhooksCreateBody = RouteRequestBody<'/webhooks/create'>;
|
|
482
484
|
type WebhooksCreateResponse = SetNonNullable<Required<RouteResponse<'/webhooks/create'>>>;
|
|
483
485
|
type WebhooksDeleteBody = RouteRequestBody<'/webhooks/delete'>;
|
|
484
486
|
type WebhooksDeleteResponse = SetNonNullable<Required<RouteResponse<'/webhooks/delete'>>>;
|
|
485
|
-
type
|
|
487
|
+
type WebhooksGetParams = RouteRequestBody<'/webhooks/get'>;
|
|
486
488
|
type WebhooksGetResponse = SetNonNullable<Required<RouteResponse<'/webhooks/get'>>>;
|
|
487
489
|
type WebhooksListParams = RouteRequestParams<'/webhooks/list'>;
|
|
488
490
|
type WebhooksListResponse = SetNonNullable<Required<RouteResponse<'/webhooks/list'>>>;
|
|
@@ -496,7 +498,7 @@ declare class SeamHttpWorkspaces {
|
|
|
496
498
|
static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpWorkspaces>;
|
|
497
499
|
get(params?: WorkspacesGetParams): Promise<WorkspacesGetResponse['workspace']>;
|
|
498
500
|
list(params?: WorkspacesListParams): Promise<WorkspacesListResponse['workspaces']>;
|
|
499
|
-
resetSandbox(body
|
|
501
|
+
resetSandbox(body?: WorkspacesResetSandboxBody): Promise<void>;
|
|
500
502
|
}
|
|
501
503
|
type WorkspacesGetParams = RouteRequestParams<'/workspaces/get'>;
|
|
502
504
|
type WorkspacesGetResponse = SetNonNullable<Required<RouteResponse<'/workspaces/get'>>>;
|
|
@@ -527,4 +529,35 @@ declare class SeamHttp {
|
|
|
527
529
|
get workspaces(): SeamHttpWorkspaces;
|
|
528
530
|
}
|
|
529
531
|
|
|
530
|
-
|
|
532
|
+
interface ApiError {
|
|
533
|
+
type: string;
|
|
534
|
+
message: string;
|
|
535
|
+
data?: unknown;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
declare class SeamHttpApiError extends Error {
|
|
539
|
+
code: string;
|
|
540
|
+
statusCode: number;
|
|
541
|
+
requestId: string;
|
|
542
|
+
data?: unknown;
|
|
543
|
+
constructor(error: ApiError, statusCode: number, requestId: string);
|
|
544
|
+
}
|
|
545
|
+
declare const isSeamHttpApiError: (error: unknown) => error is SeamHttpApiError;
|
|
546
|
+
declare class SeamHttpUnauthorizedError extends SeamHttpApiError {
|
|
547
|
+
code: 'unauthorized';
|
|
548
|
+
statusCode: 401;
|
|
549
|
+
constructor(requestId: string);
|
|
550
|
+
}
|
|
551
|
+
declare const isSeamHttpUnauthorizedError: (error: unknown) => error is SeamHttpUnauthorizedError;
|
|
552
|
+
declare class SeamHttpInvalidInputError extends SeamHttpApiError {
|
|
553
|
+
code: 'invalid_input';
|
|
554
|
+
constructor(error: ApiError, statusCode: number, requestId: string);
|
|
555
|
+
}
|
|
556
|
+
declare const isSeamHttpInvalidInputError: (error: unknown) => error is SeamHttpInvalidInputError;
|
|
557
|
+
|
|
558
|
+
declare const paramsSerializer: CustomParamsSerializer;
|
|
559
|
+
declare class UnserializableParamError extends Error {
|
|
560
|
+
constructor(name: string, message: string);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export { AccessCodesCreateBody, AccessCodesCreateMultipleBody, AccessCodesCreateMultipleResponse, AccessCodesCreateResponse, AccessCodesDeleteBody, AccessCodesDeleteResponse, AccessCodesGenerateCodeBody, AccessCodesGenerateCodeResponse, AccessCodesGetParams, AccessCodesGetResponse, AccessCodesListParams, AccessCodesListResponse, AccessCodesPullBackupAccessCodeBody, AccessCodesPullBackupAccessCodeResponse, AccessCodesUnmanagedConvertToManagedBody, AccessCodesUnmanagedConvertToManagedResponse, AccessCodesUnmanagedDeleteBody, AccessCodesUnmanagedDeleteResponse, AccessCodesUnmanagedGetParams, AccessCodesUnmanagedGetResponse, AccessCodesUnmanagedListParams, AccessCodesUnmanagedListResponse, AccessCodesUnmanagedUpdateBody, AccessCodesUnmanagedUpdateResponse, AccessCodesUpdateBody, AccessCodesUpdateResponse, AcsAccessGroupsAddUserBody, AcsAccessGroupsAddUserResponse, AcsAccessGroupsCreateBody, AcsAccessGroupsCreateResponse, AcsAccessGroupsDeleteBody, AcsAccessGroupsDeleteResponse, AcsAccessGroupsGetParams, AcsAccessGroupsGetResponse, AcsAccessGroupsListParams, AcsAccessGroupsListResponse, AcsAccessGroupsListUsersParams, AcsAccessGroupsListUsersResponse, AcsAccessGroupsRemoveUserBody, AcsAccessGroupsRemoveUserResponse, AcsAccessGroupsUpdateBody, AcsAccessGroupsUpdateResponse, AcsCredentialsCreateBody, AcsCredentialsCreateResponse, AcsCredentialsDeleteBody, AcsCredentialsDeleteResponse, AcsCredentialsGetParams, AcsCredentialsGetResponse, AcsCredentialsListParams, AcsCredentialsListResponse, AcsSystemsGetParams, AcsSystemsGetResponse, AcsSystemsListParams, AcsSystemsListResponse, AcsUsersAddToAccessGroupBody, AcsUsersAddToAccessGroupResponse, AcsUsersCreateBody, AcsUsersCreateResponse, AcsUsersDeleteBody, AcsUsersDeleteResponse, AcsUsersGetParams, AcsUsersGetResponse, AcsUsersListParams, AcsUsersListResponse, AcsUsersRemoveFromAccessGroupBody, AcsUsersRemoveFromAccessGroupResponse, AcsUsersSuspendBody, AcsUsersSuspendResponse, AcsUsersUnsuspendBody, AcsUsersUnsuspendResponse, AcsUsersUpdateBody, AcsUsersUpdateResponse, ActionAttemptsGetParams, ActionAttemptsGetResponse, ActionAttemptsListParams, ActionAttemptsListResponse, ClientSessionsCreateBody, ClientSessionsCreateResponse, ClientSessionsDeleteBody, ClientSessionsDeleteResponse, ClientSessionsGetOrCreateBody, ClientSessionsGetOrCreateResponse, ClientSessionsGetParams, ClientSessionsGetResponse, ClientSessionsGrantAccessBody, ClientSessionsGrantAccessResponse, ClientSessionsListParams, ClientSessionsListResponse, ConnectWebviewsCreateBody, ConnectWebviewsCreateResponse, ConnectWebviewsDeleteBody, ConnectWebviewsDeleteResponse, ConnectWebviewsGetParams, ConnectWebviewsGetResponse, ConnectWebviewsListParams, ConnectWebviewsListResponse, ConnectWebviewsViewParams, ConnectWebviewsViewResponse, ConnectedAccountsDeleteBody, ConnectedAccountsDeleteResponse, ConnectedAccountsGetParams, ConnectedAccountsGetResponse, ConnectedAccountsListParams, ConnectedAccountsListResponse, DevicesDeleteBody, DevicesDeleteResponse, DevicesGetParams, DevicesGetResponse, DevicesListDeviceProvidersParams, DevicesListDeviceProvidersResponse, DevicesListParams, DevicesListResponse, DevicesUnmanagedGetParams, DevicesUnmanagedGetResponse, DevicesUnmanagedListParams, DevicesUnmanagedListResponse, DevicesUnmanagedUpdateBody, DevicesUnmanagedUpdateResponse, DevicesUpdateBody, DevicesUpdateResponse, EventsGetParams, EventsGetResponse, EventsListParams, EventsListResponse, LocksGetParams, LocksGetResponse, LocksListParams, LocksListResponse, LocksLockDoorBody, LocksLockDoorResponse, LocksUnlockDoorBody, LocksUnlockDoorResponse, NoiseSensorsNoiseThresholdsCreateBody, NoiseSensorsNoiseThresholdsCreateResponse, NoiseSensorsNoiseThresholdsDeleteBody, NoiseSensorsNoiseThresholdsDeleteResponse, NoiseSensorsNoiseThresholdsGetParams, NoiseSensorsNoiseThresholdsGetResponse, NoiseSensorsNoiseThresholdsListParams, NoiseSensorsNoiseThresholdsListResponse, NoiseSensorsNoiseThresholdsUpdateBody, NoiseSensorsNoiseThresholdsUpdateResponse, SeamHttp, SeamHttpAccessCodes, SeamHttpAccessCodesUnmanaged, SeamHttpAcs, SeamHttpAcsAccessGroups, SeamHttpAcsCredentials, SeamHttpAcsSystems, SeamHttpAcsUsers, SeamHttpActionAttempts, SeamHttpApiError, SeamHttpClientSessions, SeamHttpConnectWebviews, SeamHttpConnectedAccounts, SeamHttpDevices, SeamHttpDevicesUnmanaged, SeamHttpEvents, SeamHttpFromPublishableKeyOptions, SeamHttpInvalidInputError, SeamHttpInvalidOptionsError, SeamHttpLocks, SeamHttpNoiseSensors, SeamHttpNoiseSensorsNoiseThresholds, SeamHttpOptions, SeamHttpOptionsFromEnv, SeamHttpOptionsWithApiKey, SeamHttpOptionsWithClient, SeamHttpOptionsWithClientSessionToken, SeamHttpThermostats, SeamHttpThermostatsClimateSettingSchedules, SeamHttpUnauthorizedError, SeamHttpWebhooks, SeamHttpWorkspaces, ThermostatsClimateSettingSchedulesCreateBody, ThermostatsClimateSettingSchedulesCreateResponse, ThermostatsClimateSettingSchedulesDeleteBody, ThermostatsClimateSettingSchedulesDeleteResponse, ThermostatsClimateSettingSchedulesGetParams, ThermostatsClimateSettingSchedulesGetResponse, ThermostatsClimateSettingSchedulesListParams, ThermostatsClimateSettingSchedulesListResponse, ThermostatsClimateSettingSchedulesUpdateBody, ThermostatsClimateSettingSchedulesUpdateResponse, ThermostatsCoolBody, ThermostatsCoolResponse, ThermostatsGetParams, ThermostatsGetResponse, ThermostatsHeatBody, ThermostatsHeatCoolBody, ThermostatsHeatCoolResponse, ThermostatsHeatResponse, ThermostatsListParams, ThermostatsListResponse, ThermostatsOffBody, ThermostatsOffResponse, ThermostatsSetFanModeBody, ThermostatsSetFanModeResponse, ThermostatsUpdateBody, ThermostatsUpdateResponse, UnserializableParamError, WebhooksCreateBody, WebhooksCreateResponse, WebhooksDeleteBody, WebhooksDeleteResponse, WebhooksGetParams, WebhooksGetResponse, WebhooksListParams, WebhooksListResponse, WorkspacesGetParams, WorkspacesGetResponse, WorkspacesListParams, WorkspacesListResponse, WorkspacesResetSandboxBody, WorkspacesResetSandboxResponse, errorInterceptor, isSeamHttpApiError, isSeamHttpInvalidInputError, isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpUnauthorizedError, paramsSerializer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-error-type.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/api-error-type.ts"],"names":[],"mappings":"AAAA,sEAAsE"}
|