@seamapi/http 1.4.0 → 1.5.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 +55 -28
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +113 -34
- package/lib/seam/connect/resolve-action-attempt.d.ts +84 -0
- 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 +39 -6
- 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 +3 -3
- 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 +101 -13
- 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
|
@@ -3889,8 +3889,8 @@ var SeamHttpPhones = class _SeamHttpPhones {
|
|
|
3889
3889
|
}
|
|
3890
3890
|
};
|
|
3891
3891
|
|
|
3892
|
-
// src/lib/seam/connect/routes/thermostats-
|
|
3893
|
-
var
|
|
3892
|
+
// src/lib/seam/connect/routes/thermostats-schedules.ts
|
|
3893
|
+
var SeamHttpThermostatsSchedules = class _SeamHttpThermostatsSchedules {
|
|
3894
3894
|
constructor(apiKeyOrOptions = {}) {
|
|
3895
3895
|
const options = parseOptions(apiKeyOrOptions);
|
|
3896
3896
|
this.client = "client" in options ? options.client : createClient(options);
|
|
@@ -3901,21 +3901,21 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3901
3901
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
3902
3902
|
throw new SeamHttpInvalidOptionsError("Missing client");
|
|
3903
3903
|
}
|
|
3904
|
-
return new
|
|
3904
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3905
3905
|
}
|
|
3906
3906
|
static fromApiKey(apiKey, options = {}) {
|
|
3907
3907
|
const constructorOptions = { ...options, apiKey };
|
|
3908
3908
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
3909
3909
|
throw new SeamHttpInvalidOptionsError("Missing apiKey");
|
|
3910
3910
|
}
|
|
3911
|
-
return new
|
|
3911
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3912
3912
|
}
|
|
3913
3913
|
static fromClientSessionToken(clientSessionToken, options = {}) {
|
|
3914
3914
|
const constructorOptions = { ...options, clientSessionToken };
|
|
3915
3915
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
3916
3916
|
throw new SeamHttpInvalidOptionsError("Missing clientSessionToken");
|
|
3917
3917
|
}
|
|
3918
|
-
return new
|
|
3918
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3919
3919
|
}
|
|
3920
3920
|
static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
|
|
3921
3921
|
warnOnInsecureuserIdentifierKey(userIdentifierKey);
|
|
@@ -3930,10 +3930,7 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3930
3930
|
const { token } = await clientSessions.getOrCreate({
|
|
3931
3931
|
user_identifier_key: userIdentifierKey
|
|
3932
3932
|
});
|
|
3933
|
-
return
|
|
3934
|
-
token,
|
|
3935
|
-
options
|
|
3936
|
-
);
|
|
3933
|
+
return _SeamHttpThermostatsSchedules.fromClientSessionToken(token, options);
|
|
3937
3934
|
}
|
|
3938
3935
|
static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
|
|
3939
3936
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId };
|
|
@@ -3942,7 +3939,7 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3942
3939
|
"Missing consoleSessionToken or workspaceId"
|
|
3943
3940
|
);
|
|
3944
3941
|
}
|
|
3945
|
-
return new
|
|
3942
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3946
3943
|
}
|
|
3947
3944
|
static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
|
|
3948
3945
|
const constructorOptions = { ...options, personalAccessToken, workspaceId };
|
|
@@ -3951,7 +3948,7 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3951
3948
|
"Missing personalAccessToken or workspaceId"
|
|
3952
3949
|
);
|
|
3953
3950
|
}
|
|
3954
|
-
return new
|
|
3951
|
+
return new _SeamHttpThermostatsSchedules(constructorOptions);
|
|
3955
3952
|
}
|
|
3956
3953
|
async updateClientSessionToken(clientSessionToken) {
|
|
3957
3954
|
const { headers } = this.client.defaults;
|
|
@@ -3971,15 +3968,15 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3971
3968
|
}
|
|
3972
3969
|
create(body) {
|
|
3973
3970
|
return new SeamHttpRequest(this, {
|
|
3974
|
-
path: "/thermostats/
|
|
3971
|
+
path: "/thermostats/schedules/create",
|
|
3975
3972
|
method: "post",
|
|
3976
3973
|
body,
|
|
3977
|
-
responseKey: "
|
|
3974
|
+
responseKey: "thermostat_schedule"
|
|
3978
3975
|
});
|
|
3979
3976
|
}
|
|
3980
3977
|
delete(body) {
|
|
3981
3978
|
return new SeamHttpRequest(this, {
|
|
3982
|
-
path: "/thermostats/
|
|
3979
|
+
path: "/thermostats/schedules/delete",
|
|
3983
3980
|
method: "post",
|
|
3984
3981
|
body,
|
|
3985
3982
|
responseKey: void 0
|
|
@@ -3987,23 +3984,23 @@ var SeamHttpThermostatsClimateSettingSchedules = class _SeamHttpThermostatsClima
|
|
|
3987
3984
|
}
|
|
3988
3985
|
get(body) {
|
|
3989
3986
|
return new SeamHttpRequest(this, {
|
|
3990
|
-
path: "/thermostats/
|
|
3987
|
+
path: "/thermostats/schedules/get",
|
|
3991
3988
|
method: "post",
|
|
3992
3989
|
body,
|
|
3993
|
-
responseKey: "
|
|
3990
|
+
responseKey: "thermostat_schedule"
|
|
3994
3991
|
});
|
|
3995
3992
|
}
|
|
3996
3993
|
list(body) {
|
|
3997
3994
|
return new SeamHttpRequest(this, {
|
|
3998
|
-
path: "/thermostats/
|
|
3995
|
+
path: "/thermostats/schedules/list",
|
|
3999
3996
|
method: "post",
|
|
4000
3997
|
body,
|
|
4001
|
-
responseKey: "
|
|
3998
|
+
responseKey: "thermostat_schedules"
|
|
4002
3999
|
});
|
|
4003
4000
|
}
|
|
4004
4001
|
update(body) {
|
|
4005
4002
|
return new SeamHttpRequest(this, {
|
|
4006
|
-
path: "/thermostats/
|
|
4003
|
+
path: "/thermostats/schedules/update",
|
|
4007
4004
|
method: "post",
|
|
4008
4005
|
body,
|
|
4009
4006
|
responseKey: void 0
|
|
@@ -4088,11 +4085,17 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4088
4085
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client);
|
|
4089
4086
|
await clientSessions.get();
|
|
4090
4087
|
}
|
|
4091
|
-
get
|
|
4092
|
-
return
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4088
|
+
get schedules() {
|
|
4089
|
+
return SeamHttpThermostatsSchedules.fromClient(this.client, this.defaults);
|
|
4090
|
+
}
|
|
4091
|
+
activateClimatePreset(body, options = {}) {
|
|
4092
|
+
return new SeamHttpRequest(this, {
|
|
4093
|
+
path: "/thermostats/activate_climate_preset",
|
|
4094
|
+
method: "post",
|
|
4095
|
+
body,
|
|
4096
|
+
responseKey: "action_attempt",
|
|
4097
|
+
options
|
|
4098
|
+
});
|
|
4096
4099
|
}
|
|
4097
4100
|
cool(body, options = {}) {
|
|
4098
4101
|
return new SeamHttpRequest(this, {
|
|
@@ -4103,6 +4106,22 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4103
4106
|
options
|
|
4104
4107
|
});
|
|
4105
4108
|
}
|
|
4109
|
+
createClimatePreset(body) {
|
|
4110
|
+
return new SeamHttpRequest(this, {
|
|
4111
|
+
path: "/thermostats/create_climate_preset",
|
|
4112
|
+
method: "post",
|
|
4113
|
+
body,
|
|
4114
|
+
responseKey: void 0
|
|
4115
|
+
});
|
|
4116
|
+
}
|
|
4117
|
+
deleteClimatePreset(body) {
|
|
4118
|
+
return new SeamHttpRequest(this, {
|
|
4119
|
+
path: "/thermostats/delete_climate_preset",
|
|
4120
|
+
method: "post",
|
|
4121
|
+
body,
|
|
4122
|
+
responseKey: void 0
|
|
4123
|
+
});
|
|
4124
|
+
}
|
|
4106
4125
|
get(body) {
|
|
4107
4126
|
return new SeamHttpRequest(this, {
|
|
4108
4127
|
path: "/thermostats/get",
|
|
@@ -4146,6 +4165,14 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4146
4165
|
options
|
|
4147
4166
|
});
|
|
4148
4167
|
}
|
|
4168
|
+
setFallbackClimatePreset(body) {
|
|
4169
|
+
return new SeamHttpRequest(this, {
|
|
4170
|
+
path: "/thermostats/set_fallback_climate_preset",
|
|
4171
|
+
method: "post",
|
|
4172
|
+
body,
|
|
4173
|
+
responseKey: void 0
|
|
4174
|
+
});
|
|
4175
|
+
}
|
|
4149
4176
|
setFanMode(body, options = {}) {
|
|
4150
4177
|
return new SeamHttpRequest(this, {
|
|
4151
4178
|
path: "/thermostats/set_fan_mode",
|
|
@@ -4155,12 +4182,12 @@ var SeamHttpThermostats = class _SeamHttpThermostats {
|
|
|
4155
4182
|
options
|
|
4156
4183
|
});
|
|
4157
4184
|
}
|
|
4158
|
-
|
|
4185
|
+
updateClimatePreset(body) {
|
|
4159
4186
|
return new SeamHttpRequest(this, {
|
|
4160
|
-
path: "/thermostats/
|
|
4187
|
+
path: "/thermostats/update_climate_preset",
|
|
4161
4188
|
method: "post",
|
|
4162
4189
|
body,
|
|
4163
|
-
responseKey:
|
|
4190
|
+
responseKey: "climate_preset"
|
|
4164
4191
|
});
|
|
4165
4192
|
}
|
|
4166
4193
|
};
|
|
@@ -4903,7 +4930,7 @@ exports.SeamHttpPhones = SeamHttpPhones;
|
|
|
4903
4930
|
exports.SeamHttpPhonesSimulate = SeamHttpPhonesSimulate;
|
|
4904
4931
|
exports.SeamHttpRequest = SeamHttpRequest;
|
|
4905
4932
|
exports.SeamHttpThermostats = SeamHttpThermostats;
|
|
4906
|
-
exports.
|
|
4933
|
+
exports.SeamHttpThermostatsSchedules = SeamHttpThermostatsSchedules;
|
|
4907
4934
|
exports.SeamHttpUnauthorizedError = SeamHttpUnauthorizedError;
|
|
4908
4935
|
exports.SeamHttpUserIdentities = SeamHttpUserIdentities;
|
|
4909
4936
|
exports.SeamHttpUserIdentitiesEnrollmentAutomations = SeamHttpUserIdentitiesEnrollmentAutomations;
|