@seamapi/http 1.4.0 → 1.6.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 +64 -28
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +189 -34
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/lib/seam/connect/resolve-action-attempt.d.ts +180 -0
- package/lib/seam/connect/routes/acs-credentials.d.ts +4 -0
- package/lib/seam/connect/routes/acs-credentials.js +9 -0
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +1 -1
- package/lib/seam/connect/routes/index.js +1 -1
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-schedules.d.ts +37 -0
- package/lib/seam/connect/routes/{thermostats-climate-setting-schedules.js → thermostats-schedules.js} +16 -16
- package/lib/seam/connect/routes/thermostats-schedules.js.map +1 -0
- package/lib/seam/connect/routes/thermostats.d.ts +22 -6
- package/lib/seam/connect/routes/thermostats.js +38 -5
- package/lib/seam/connect/routes/thermostats.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/src/lib/seam/connect/routes/acs-credentials.ts +25 -0
- package/src/lib/seam/connect/routes/index.ts +1 -1
- package/src/lib/seam/connect/routes/{thermostats-climate-setting-schedules.ts → thermostats-schedules.ts} +55 -64
- package/src/lib/seam/connect/routes/thermostats.ts +100 -12
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.d.ts +0 -37
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +0 -1
package/dist/connect.cjs
CHANGED
|
@@ -1847,6 +1847,15 @@ var SeamHttpAcsCredentials = class _SeamHttpAcsCredentials {
|
|
|
1847
1847
|
responseKey: "acs_entrances"
|
|
1848
1848
|
});
|
|
1849
1849
|
}
|
|
1850
|
+
readCard(body, options = {}) {
|
|
1851
|
+
return new SeamHttpRequest(this, {
|
|
1852
|
+
path: "/acs/credentials/read_card",
|
|
1853
|
+
method: "post",
|
|
1854
|
+
body,
|
|
1855
|
+
responseKey: "action_attempt",
|
|
1856
|
+
options
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1850
1859
|
unassign(body) {
|
|
1851
1860
|
return new SeamHttpRequest(this, {
|
|
1852
1861
|
path: "/acs/credentials/unassign",
|
|
@@ -3889,8 +3898,8 @@ var SeamHttpPhones = class _SeamHttpPhones {
|
|
|
3889
3898
|
}
|
|
3890
3899
|
};
|
|
3891
3900
|
|
|
3892
|
-
// src/lib/seam/connect/routes/thermostats-
|
|
3893
|
-
var
|
|
3901
|
+
// src/lib/seam/connect/routes/thermostats-schedules.ts
|
|
3902
|
+
var SeamHttpThermostatsSchedules = class _SeamHttpThermostatsSchedules {
|
|
3894
3903
|
constructor(apiKeyOrOptions = {}) {
|
|
3895
3904
|
const options = parseOptions(apiKeyOrOptions);
|
|
3896
3905
|
this.client = "client" in options ? options.client : createClient(options);
|
|
@@ -3901,21 +3910,21 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3901
3910
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
3902
3911
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
3903
3912
|
}
|
|
3904
|
-
return new
|
|
3913
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3905
3914
|
}
|
|
3906
3915
|
static fromApiKey(apiKey, options = {}) {
|
|
3907
3916
|
const constructorOptions = { ...options, apiKey };
|
|
3908
3917
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
3909
3918
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
3910
3919
|
}
|
|
3911
|
-
return new
|
|
3920
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3912
3921
|
}
|
|
3913
3922
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
3914
3923
|
const constructorOptions = { ...options, clientSessionToken };
|
|
3915
3924
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
3916
3925
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
3917
3926
|
}
|
|
3918
|
-
return new
|
|
3927
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3919
3928
|
}
|
|
3920
3929
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
3921
3930
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
@@ -3930,10 +3939,7 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3930
3939
|
const { token } = await clientSessions.getOrCreate({
|
|
3931
3940
|
user_identifier_key: userIdentifierKey
|
|
3932
3941
|
});
|
|
3933
|
-
return
|
|
3934
|
-
token,
|
|
3935
|
-
options
|
|
3936
|
-
);
|
|
3942
|
+
return _SeamHttpThermostatsSchedules.fromClientSessionToken(token, options);
|
|
3937
3943
|
}
|
|
3938
3944
|
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
3939
3945
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
@@ -3942,7 +3948,7 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3942
3948
|
"Missing consoleSessionToken or workspaceId"
|
|
3943
3949
|
);
|
|
3944
3950
|
}
|
|
3945
|
-
return new
|
|
3951
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3946
3952
|
}
|
|
3947
3953
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
3948
3954
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -3951,7 +3957,7 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3951
3957
|
"Missing personalAccessToken or workspaceId"
|
|
3952
3958
|
);
|
|
3953
3959
|
}
|
|
3954
|
-
return new
|
|
3960
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3955
3961
|
}
|
|
3956
3962
|
async updateClientSessionToken(clientSessionToken) {
|
|
3957
3963
|
const { headers } = this.client.defaults;
|
|
@@ -3971,15 +3977,15 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3971
3977
|
}
|
|
3972
3978
|
create(body) {
|
|
3973
3979
|
return new SeamHttpRequest(this, {
|
|
3974
|
-
path: "/thermostats/
|
|
3980
|
+
path: "/thermostats/schedules/create",
|
|
3975
3981
|
method: "post",
|
|
3976
3982
|
body,
|
|
3977
|
-
responseKey: "
|
|
3983
|
+
responseKey: "thermostat_schedule"
|
|
3978
3984
|
});
|
|
3979
3985
|
}
|
|
3980
3986
|
delete(body) {
|
|
3981
3987
|
return new SeamHttpRequest(this, {
|
|
3982
|
-
path: "/thermostats/
|
|
3988
|
+
path: "/thermostats/schedules/delete",
|
|
3983
3989
|
method: "post",
|
|
3984
3990
|
body,
|
|
3985
3991
|
responseKey: void 0
|
|
@@ -3987,23 +3993,23 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3987
3993
|
}
|
|
3988
3994
|
get(body) {
|
|
3989
3995
|
return new SeamHttpRequest(this, {
|
|
3990
|
-
path: "/thermostats/
|
|
3996
|
+
path: "/thermostats/schedules/get",
|
|
3991
3997
|
method: "post",
|
|
3992
3998
|
body,
|
|
3993
|
-
responseKey: "
|
|
3999
|
+
responseKey: "thermostat_schedule"
|
|
3994
4000
|
});
|
|
3995
4001
|
}
|
|
3996
4002
|
list(body) {
|
|
3997
4003
|
return new SeamHttpRequest(this, {
|
|
3998
|
-
path: "/thermostats/
|
|
4004
|
+
path: "/thermostats/schedules/list",
|
|
3999
4005
|
method: "post",
|
|
4000
4006
|
body,
|
|
4001
|
-
responseKey: "
|
|
4007
|
+
responseKey: "thermostat_schedules"
|
|
4002
4008
|
});
|
|
4003
4009
|
}
|
|
4004
4010
|
update(body) {
|
|
4005
4011
|
return new SeamHttpRequest(this, {
|
|
4006
|
-
path: "/thermostats/
|
|
4012
|
+
path: "/thermostats/schedules/update",
|
|
4007
4013
|
method: "post",
|
|
4008
4014
|
body,
|
|
4009
4015
|
responseKey: void 0
|
|
@@ -4088,11 +4094,17 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4088
4094
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
4089
4095
|
await clientSessions.get();
|
|
4090
4096
|
}
|
|
4091
|
-
get
|
|
4092
|
-
return
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4097
|
+
get schedules() {
|
|
4098
|
+
return SeamHttpThermostatsSchedules.fromClient(this.client, this.defaults);
|
|
4099
|
+
}
|
|
4100
|
+
activateClimatePreset(body, options = {}) {
|
|
4101
|
+
return new SeamHttpRequest(this, {
|
|
4102
|
+
path: "/thermostats/activate_climate_preset",
|
|
4103
|
+
method: "post",
|
|
4104
|
+
body,
|
|
4105
|
+
responseKey: "action_attempt",
|
|
4106
|
+
options
|
|
4107
|
+
});
|
|
4096
4108
|
}
|
|
4097
4109
|
cool(body, options = {}) {
|
|
4098
4110
|
return new SeamHttpRequest(this, {
|
|
@@ -4103,6 +4115,22 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4103
4115
|
options
|
|
4104
4116
|
});
|
|
4105
4117
|
}
|
|
4118
|
+
createClimatePreset(body) {
|
|
4119
|
+
return new SeamHttpRequest(this, {
|
|
4120
|
+
path: "/thermostats/create_climate_preset",
|
|
4121
|
+
method: "post",
|
|
4122
|
+
body,
|
|
4123
|
+
responseKey: "climate_preset"
|
|
4124
|
+
});
|
|
4125
|
+
}
|
|
4126
|
+
deleteClimatePreset(body) {
|
|
4127
|
+
return new SeamHttpRequest(this, {
|
|
4128
|
+
path: "/thermostats/delete_climate_preset",
|
|
4129
|
+
method: "post",
|
|
4130
|
+
body,
|
|
4131
|
+
responseKey: void 0
|
|
4132
|
+
});
|
|
4133
|
+
}
|
|
4106
4134
|
get(body) {
|
|
4107
4135
|
return new SeamHttpRequest(this, {
|
|
4108
4136
|
path: "/thermostats/get",
|
|
@@ -4146,6 +4174,14 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4146
4174
|
options
|
|
4147
4175
|
});
|
|
4148
4176
|
}
|
|
4177
|
+
setFallbackClimatePreset(body) {
|
|
4178
|
+
return new SeamHttpRequest(this, {
|
|
4179
|
+
path: "/thermostats/set_fallback_climate_preset",
|
|
4180
|
+
method: "post",
|
|
4181
|
+
body,
|
|
4182
|
+
responseKey: void 0
|
|
4183
|
+
});
|
|
4184
|
+
}
|
|
4149
4185
|
setFanMode(body, options = {}) {
|
|
4150
4186
|
return new SeamHttpRequest(this, {
|
|
4151
4187
|
path: "/thermostats/set_fan_mode",
|
|
@@ -4155,9 +4191,9 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4155
4191
|
options
|
|
4156
4192
|
});
|
|
4157
4193
|
}
|
|
4158
|
-
|
|
4194
|
+
updateClimatePreset(body) {
|
|
4159
4195
|
return new SeamHttpRequest(this, {
|
|
4160
|
-
path: "/thermostats/
|
|
4196
|
+
path: "/thermostats/update_climate_preset",
|
|
4161
4197
|
method: "post",
|
|
4162
4198
|
body,
|
|
4163
4199
|
responseKey: void 0
|
|
@@ -4903,7 +4939,7 @@ exports.SeamHttpPhones = SeamHttpPhones;
|
|
|
4903
4939
|
exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
4904
4940
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
4905
4941
|
exports.SeamHttpThermostats = SeamHttpThermostats;
|
|
4906
|
-
exports.
|
|
4942
|
+
exports.SeamHttpThermostatsSchedules = SeamHttpThermostatsSchedules;
|
|
4907
4943
|
exports.SeamHttpUnauthorizedError = SeamHttpUnauthorizedError;
|
|
4908
4944
|
exports.SeamHttpUserIdentities = SeamHttpUserIdentities;
|
|
4909
4945
|
exports.SeamHttpUserIdentitiesEnrollmentAutomations = SeamHttpUserIdentitiesEnrollmentAutomations;
|
|
@@ -4936,5 +4972,5 @@ Object.keys(urlSearchParamsSerializer).forEach(function (k) {
|
|
|
4936
4972
|
get: function () { return urlSearchParamsSerializer[k]; }
|
|
4937
4973
|
});
|
|
4938
4974
|
});
|
|
4939
|
-
//# sourceMappingURL=
|
|
4975
|
+
//# sourceMappingURL=connect.cjs.map
|
|
4940
4976
|
//# sourceMappingURL=connect.cjs.map
|