@seamapi/types 1.345.1 → 1.345.2
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 +262 -689
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +149 -482
- package/lib/seam/connect/models/devices/device-type.js +3 -1
- package/lib/seam/connect/models/devices/device-type.js.map +1 -1
- package/lib/seam/connect/models/devices/phone-properties.js +7 -3
- package/lib/seam/connect/models/devices/phone-properties.js.map +1 -1
- package/lib/seam/connect/models/devices/phone.d.ts +29 -2450
- package/lib/seam/connect/models/devices/phone.js +36 -15
- package/lib/seam/connect/models/devices/phone.js.map +1 -1
- package/lib/seam/connect/openapi.d.ts +104 -141
- package/lib/seam/connect/openapi.js +70 -495
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +45 -341
- package/package.json +2 -2
- package/src/lib/seam/connect/models/devices/device-type.ts +3 -3
- package/src/lib/seam/connect/models/devices/phone-properties.ts +36 -32
- package/src/lib/seam/connect/models/devices/phone.ts +53 -15
- package/src/lib/seam/connect/openapi.ts +254 -717
- package/src/lib/seam/connect/route-types.ts +45 -419
|
@@ -25898,16 +25898,31 @@ export interface Routes {
|
|
|
25898
25898
|
formData: {};
|
|
25899
25899
|
jsonResponse: {
|
|
25900
25900
|
phones: Array<{
|
|
25901
|
-
/**
|
|
25901
|
+
/** ID of the `phone`. */
|
|
25902
25902
|
device_id: string;
|
|
25903
|
-
/**
|
|
25904
|
-
device_type: 'android_phone' | 'ios_phone';
|
|
25905
|
-
/** Optional nickname to describe the device, settable through Seam */
|
|
25903
|
+
/** Optional nickname to describe the phone, settable through Seam. */
|
|
25906
25904
|
nickname?: string | undefined;
|
|
25907
|
-
/** Display name of the
|
|
25905
|
+
/** Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name` otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones. */
|
|
25908
25906
|
display_name: string;
|
|
25909
|
-
/**
|
|
25910
|
-
|
|
25907
|
+
/** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the `phone`. */
|
|
25908
|
+
workspace_id: string;
|
|
25909
|
+
/** Date and time at which the `phone` was created. */
|
|
25910
|
+
created_at: string;
|
|
25911
|
+
/** Optional [custom metadata](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. */
|
|
25912
|
+
custom_metadata: Record<string, string | boolean>;
|
|
25913
|
+
/** Errors associated with the `phone`. */
|
|
25914
|
+
errors: Array<{
|
|
25915
|
+
error_code: string;
|
|
25916
|
+
message: string;
|
|
25917
|
+
}>;
|
|
25918
|
+
/** Warnings associated with the `phone`. */
|
|
25919
|
+
warnings: Array<{
|
|
25920
|
+
warning_code: string;
|
|
25921
|
+
message: string;
|
|
25922
|
+
}>;
|
|
25923
|
+
/** Type of phone. */
|
|
25924
|
+
device_type: 'ios_phone' | 'android_phone';
|
|
25925
|
+
/** Properties of the phone. */
|
|
25911
25926
|
properties: {
|
|
25912
25927
|
/** ASSA ABLOY Credential Service metadata for the phone. */
|
|
25913
25928
|
assa_abloy_credential_service_metadata?: {
|
|
@@ -25927,169 +25942,6 @@ export interface Routes {
|
|
|
25927
25942
|
has_active_phone: boolean;
|
|
25928
25943
|
} | undefined;
|
|
25929
25944
|
};
|
|
25930
|
-
/** Location information for the device. */
|
|
25931
|
-
location: {
|
|
25932
|
-
/** Name of the device location. */
|
|
25933
|
-
location_name?: string | undefined;
|
|
25934
|
-
/** Time zone of the device location. */
|
|
25935
|
-
timezone?: string | undefined;
|
|
25936
|
-
} | null;
|
|
25937
|
-
/** Unique identifier for the Seam workspace associated with the device. */
|
|
25938
|
-
workspace_id: string;
|
|
25939
|
-
/** Array of errors associated with the device. Each error object within the array contains two fields: "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */
|
|
25940
|
-
errors: Array<{
|
|
25941
|
-
message: string;
|
|
25942
|
-
is_device_error: true;
|
|
25943
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25944
|
-
error_code: 'device_offline';
|
|
25945
|
-
} | {
|
|
25946
|
-
message: string;
|
|
25947
|
-
is_device_error: true;
|
|
25948
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25949
|
-
error_code: 'device_removed';
|
|
25950
|
-
} | {
|
|
25951
|
-
message: string;
|
|
25952
|
-
is_device_error: true;
|
|
25953
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25954
|
-
error_code: 'hub_disconnected';
|
|
25955
|
-
} | {
|
|
25956
|
-
message: string;
|
|
25957
|
-
is_device_error: true;
|
|
25958
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25959
|
-
error_code: 'device_disconnected';
|
|
25960
|
-
} | {
|
|
25961
|
-
message: string;
|
|
25962
|
-
is_device_error: true;
|
|
25963
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25964
|
-
error_code: 'empty_backup_access_code_pool';
|
|
25965
|
-
} | {
|
|
25966
|
-
message: string;
|
|
25967
|
-
is_device_error: true;
|
|
25968
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25969
|
-
error_code: 'august_lock_not_authorized';
|
|
25970
|
-
} | {
|
|
25971
|
-
message: string;
|
|
25972
|
-
is_device_error: true;
|
|
25973
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25974
|
-
error_code: 'august_lock_missing_bridge';
|
|
25975
|
-
} | {
|
|
25976
|
-
message: string;
|
|
25977
|
-
is_device_error: true;
|
|
25978
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25979
|
-
error_code: 'salto_site_user_limit_reached';
|
|
25980
|
-
} | {
|
|
25981
|
-
message: string;
|
|
25982
|
-
is_device_error: true;
|
|
25983
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25984
|
-
error_code: 'ttlock_lock_not_paired_to_gateway';
|
|
25985
|
-
} | {
|
|
25986
|
-
message: string;
|
|
25987
|
-
is_device_error: true;
|
|
25988
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25989
|
-
error_code: 'missing_device_credentials';
|
|
25990
|
-
} | {
|
|
25991
|
-
message: string;
|
|
25992
|
-
is_device_error: true;
|
|
25993
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25994
|
-
error_code: 'auxiliary_heat_running';
|
|
25995
|
-
} | {
|
|
25996
|
-
message: string;
|
|
25997
|
-
is_device_error: true;
|
|
25998
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
25999
|
-
error_code: 'subscription_required';
|
|
26000
|
-
} | {
|
|
26001
|
-
message: string;
|
|
26002
|
-
is_connected_account_error: true;
|
|
26003
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26004
|
-
error_code: 'account_disconnected';
|
|
26005
|
-
} | {
|
|
26006
|
-
message: string;
|
|
26007
|
-
is_connected_account_error: true;
|
|
26008
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26009
|
-
error_code: 'invalid_credentials';
|
|
26010
|
-
}>;
|
|
26011
|
-
/** Array of warnings associated with the device. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. */
|
|
26012
|
-
warnings: Array<{
|
|
26013
|
-
message: string;
|
|
26014
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26015
|
-
warning_code: 'partial_backup_access_code_pool';
|
|
26016
|
-
} | {
|
|
26017
|
-
message: string;
|
|
26018
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26019
|
-
warning_code: 'many_active_backup_codes';
|
|
26020
|
-
} | {
|
|
26021
|
-
message: string;
|
|
26022
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26023
|
-
warning_code: 'salto_unknown_device_type';
|
|
26024
|
-
} | {
|
|
26025
|
-
message: string;
|
|
26026
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26027
|
-
warning_code: 'wyze_device_missing_gateway';
|
|
26028
|
-
} | {
|
|
26029
|
-
message: string;
|
|
26030
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26031
|
-
warning_code: 'functional_offline_device';
|
|
26032
|
-
} | {
|
|
26033
|
-
message: string;
|
|
26034
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26035
|
-
warning_code: 'third_party_integration_detected';
|
|
26036
|
-
} | {
|
|
26037
|
-
message: string;
|
|
26038
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26039
|
-
warning_code: 'nest_thermostat_in_manual_eco_mode';
|
|
26040
|
-
} | {
|
|
26041
|
-
message: string;
|
|
26042
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26043
|
-
warning_code: 'ttlock_lock_gateway_unlocking_not_enabled';
|
|
26044
|
-
} | {
|
|
26045
|
-
message: string;
|
|
26046
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26047
|
-
warning_code: 'ttlock_weak_gateway_signal';
|
|
26048
|
-
} | {
|
|
26049
|
-
message: string;
|
|
26050
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26051
|
-
warning_code: 'temperature_threshold_exceeded';
|
|
26052
|
-
} | {
|
|
26053
|
-
message: string;
|
|
26054
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26055
|
-
warning_code: 'device_communication_degraded';
|
|
26056
|
-
} | {
|
|
26057
|
-
message: string;
|
|
26058
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26059
|
-
warning_code: 'scheduled_maintenance_window';
|
|
26060
|
-
} | {
|
|
26061
|
-
message: string;
|
|
26062
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26063
|
-
warning_code: 'device_has_flaky_connection';
|
|
26064
|
-
} | {
|
|
26065
|
-
message: string;
|
|
26066
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26067
|
-
warning_code: 'salto_office_mode';
|
|
26068
|
-
} | {
|
|
26069
|
-
message: string;
|
|
26070
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26071
|
-
warning_code: 'salto_privacy_mode';
|
|
26072
|
-
} | {
|
|
26073
|
-
message: string;
|
|
26074
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26075
|
-
warning_code: 'unknown_issue_with_phone';
|
|
26076
|
-
}>;
|
|
26077
|
-
/** Date and time at which the device object was created. */
|
|
26078
|
-
created_at: string;
|
|
26079
|
-
/** Indicates whether Seam manages the device. */
|
|
26080
|
-
is_managed: true;
|
|
26081
|
-
custom_metadata: Record<string, string | boolean>;
|
|
26082
|
-
can_remotely_unlock?: boolean | undefined;
|
|
26083
|
-
can_remotely_lock?: boolean | undefined;
|
|
26084
|
-
can_program_offline_access_codes?: boolean | undefined;
|
|
26085
|
-
can_program_online_access_codes?: boolean | undefined;
|
|
26086
|
-
can_hvac_heat?: boolean | undefined;
|
|
26087
|
-
can_hvac_cool?: boolean | undefined;
|
|
26088
|
-
can_hvac_heat_cool?: boolean | undefined;
|
|
26089
|
-
can_turn_off_hvac?: boolean | undefined;
|
|
26090
|
-
can_simulate_removal?: boolean | undefined;
|
|
26091
|
-
can_simulate_connection?: boolean | undefined;
|
|
26092
|
-
can_simulate_disconnection?: boolean | undefined;
|
|
26093
25945
|
}>;
|
|
26094
25946
|
};
|
|
26095
25947
|
};
|
|
@@ -26132,18 +25984,33 @@ export interface Routes {
|
|
|
26132
25984
|
commonParams: {};
|
|
26133
25985
|
formData: {};
|
|
26134
25986
|
jsonResponse: {
|
|
26135
|
-
/**
|
|
25987
|
+
/** Represents an app user's mobile phone. */
|
|
26136
25988
|
phone: {
|
|
26137
|
-
/**
|
|
25989
|
+
/** ID of the `phone`. */
|
|
26138
25990
|
device_id: string;
|
|
26139
|
-
/**
|
|
26140
|
-
device_type: 'android_phone' | 'ios_phone';
|
|
26141
|
-
/** Optional nickname to describe the device, settable through Seam */
|
|
25991
|
+
/** Optional nickname to describe the phone, settable through Seam. */
|
|
26142
25992
|
nickname?: string | undefined;
|
|
26143
|
-
/** Display name of the
|
|
25993
|
+
/** Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name` otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones. */
|
|
26144
25994
|
display_name: string;
|
|
26145
|
-
/**
|
|
26146
|
-
|
|
25995
|
+
/** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the `phone`. */
|
|
25996
|
+
workspace_id: string;
|
|
25997
|
+
/** Date and time at which the `phone` was created. */
|
|
25998
|
+
created_at: string;
|
|
25999
|
+
/** Optional [custom metadata](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. */
|
|
26000
|
+
custom_metadata: Record<string, string | boolean>;
|
|
26001
|
+
/** Errors associated with the `phone`. */
|
|
26002
|
+
errors: Array<{
|
|
26003
|
+
error_code: string;
|
|
26004
|
+
message: string;
|
|
26005
|
+
}>;
|
|
26006
|
+
/** Warnings associated with the `phone`. */
|
|
26007
|
+
warnings: Array<{
|
|
26008
|
+
warning_code: string;
|
|
26009
|
+
message: string;
|
|
26010
|
+
}>;
|
|
26011
|
+
/** Type of phone. */
|
|
26012
|
+
device_type: 'ios_phone' | 'android_phone';
|
|
26013
|
+
/** Properties of the phone. */
|
|
26147
26014
|
properties: {
|
|
26148
26015
|
/** ASSA ABLOY Credential Service metadata for the phone. */
|
|
26149
26016
|
assa_abloy_credential_service_metadata?: {
|
|
@@ -26163,169 +26030,6 @@ export interface Routes {
|
|
|
26163
26030
|
has_active_phone: boolean;
|
|
26164
26031
|
} | undefined;
|
|
26165
26032
|
};
|
|
26166
|
-
/** Location information for the device. */
|
|
26167
|
-
location: {
|
|
26168
|
-
/** Name of the device location. */
|
|
26169
|
-
location_name?: string | undefined;
|
|
26170
|
-
/** Time zone of the device location. */
|
|
26171
|
-
timezone?: string | undefined;
|
|
26172
|
-
} | null;
|
|
26173
|
-
/** Unique identifier for the Seam workspace associated with the device. */
|
|
26174
|
-
workspace_id: string;
|
|
26175
|
-
/** Array of errors associated with the device. Each error object within the array contains two fields: "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. */
|
|
26176
|
-
errors: Array<{
|
|
26177
|
-
message: string;
|
|
26178
|
-
is_device_error: true;
|
|
26179
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26180
|
-
error_code: 'device_offline';
|
|
26181
|
-
} | {
|
|
26182
|
-
message: string;
|
|
26183
|
-
is_device_error: true;
|
|
26184
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26185
|
-
error_code: 'device_removed';
|
|
26186
|
-
} | {
|
|
26187
|
-
message: string;
|
|
26188
|
-
is_device_error: true;
|
|
26189
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26190
|
-
error_code: 'hub_disconnected';
|
|
26191
|
-
} | {
|
|
26192
|
-
message: string;
|
|
26193
|
-
is_device_error: true;
|
|
26194
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26195
|
-
error_code: 'device_disconnected';
|
|
26196
|
-
} | {
|
|
26197
|
-
message: string;
|
|
26198
|
-
is_device_error: true;
|
|
26199
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26200
|
-
error_code: 'empty_backup_access_code_pool';
|
|
26201
|
-
} | {
|
|
26202
|
-
message: string;
|
|
26203
|
-
is_device_error: true;
|
|
26204
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26205
|
-
error_code: 'august_lock_not_authorized';
|
|
26206
|
-
} | {
|
|
26207
|
-
message: string;
|
|
26208
|
-
is_device_error: true;
|
|
26209
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26210
|
-
error_code: 'august_lock_missing_bridge';
|
|
26211
|
-
} | {
|
|
26212
|
-
message: string;
|
|
26213
|
-
is_device_error: true;
|
|
26214
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26215
|
-
error_code: 'salto_site_user_limit_reached';
|
|
26216
|
-
} | {
|
|
26217
|
-
message: string;
|
|
26218
|
-
is_device_error: true;
|
|
26219
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26220
|
-
error_code: 'ttlock_lock_not_paired_to_gateway';
|
|
26221
|
-
} | {
|
|
26222
|
-
message: string;
|
|
26223
|
-
is_device_error: true;
|
|
26224
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26225
|
-
error_code: 'missing_device_credentials';
|
|
26226
|
-
} | {
|
|
26227
|
-
message: string;
|
|
26228
|
-
is_device_error: true;
|
|
26229
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26230
|
-
error_code: 'auxiliary_heat_running';
|
|
26231
|
-
} | {
|
|
26232
|
-
message: string;
|
|
26233
|
-
is_device_error: true;
|
|
26234
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26235
|
-
error_code: 'subscription_required';
|
|
26236
|
-
} | {
|
|
26237
|
-
message: string;
|
|
26238
|
-
is_connected_account_error: true;
|
|
26239
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26240
|
-
error_code: 'account_disconnected';
|
|
26241
|
-
} | {
|
|
26242
|
-
message: string;
|
|
26243
|
-
is_connected_account_error: true;
|
|
26244
|
-
/** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
|
|
26245
|
-
error_code: 'invalid_credentials';
|
|
26246
|
-
}>;
|
|
26247
|
-
/** Array of warnings associated with the device. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. */
|
|
26248
|
-
warnings: Array<{
|
|
26249
|
-
message: string;
|
|
26250
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26251
|
-
warning_code: 'partial_backup_access_code_pool';
|
|
26252
|
-
} | {
|
|
26253
|
-
message: string;
|
|
26254
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26255
|
-
warning_code: 'many_active_backup_codes';
|
|
26256
|
-
} | {
|
|
26257
|
-
message: string;
|
|
26258
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26259
|
-
warning_code: 'salto_unknown_device_type';
|
|
26260
|
-
} | {
|
|
26261
|
-
message: string;
|
|
26262
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26263
|
-
warning_code: 'wyze_device_missing_gateway';
|
|
26264
|
-
} | {
|
|
26265
|
-
message: string;
|
|
26266
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26267
|
-
warning_code: 'functional_offline_device';
|
|
26268
|
-
} | {
|
|
26269
|
-
message: string;
|
|
26270
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26271
|
-
warning_code: 'third_party_integration_detected';
|
|
26272
|
-
} | {
|
|
26273
|
-
message: string;
|
|
26274
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26275
|
-
warning_code: 'nest_thermostat_in_manual_eco_mode';
|
|
26276
|
-
} | {
|
|
26277
|
-
message: string;
|
|
26278
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26279
|
-
warning_code: 'ttlock_lock_gateway_unlocking_not_enabled';
|
|
26280
|
-
} | {
|
|
26281
|
-
message: string;
|
|
26282
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26283
|
-
warning_code: 'ttlock_weak_gateway_signal';
|
|
26284
|
-
} | {
|
|
26285
|
-
message: string;
|
|
26286
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26287
|
-
warning_code: 'temperature_threshold_exceeded';
|
|
26288
|
-
} | {
|
|
26289
|
-
message: string;
|
|
26290
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26291
|
-
warning_code: 'device_communication_degraded';
|
|
26292
|
-
} | {
|
|
26293
|
-
message: string;
|
|
26294
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26295
|
-
warning_code: 'scheduled_maintenance_window';
|
|
26296
|
-
} | {
|
|
26297
|
-
message: string;
|
|
26298
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26299
|
-
warning_code: 'device_has_flaky_connection';
|
|
26300
|
-
} | {
|
|
26301
|
-
message: string;
|
|
26302
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26303
|
-
warning_code: 'salto_office_mode';
|
|
26304
|
-
} | {
|
|
26305
|
-
message: string;
|
|
26306
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26307
|
-
warning_code: 'salto_privacy_mode';
|
|
26308
|
-
} | {
|
|
26309
|
-
message: string;
|
|
26310
|
-
/** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
|
|
26311
|
-
warning_code: 'unknown_issue_with_phone';
|
|
26312
|
-
}>;
|
|
26313
|
-
/** Date and time at which the device object was created. */
|
|
26314
|
-
created_at: string;
|
|
26315
|
-
/** Indicates whether Seam manages the device. */
|
|
26316
|
-
is_managed: true;
|
|
26317
|
-
custom_metadata: Record<string, string | boolean>;
|
|
26318
|
-
can_remotely_unlock?: boolean | undefined;
|
|
26319
|
-
can_remotely_lock?: boolean | undefined;
|
|
26320
|
-
can_program_offline_access_codes?: boolean | undefined;
|
|
26321
|
-
can_program_online_access_codes?: boolean | undefined;
|
|
26322
|
-
can_hvac_heat?: boolean | undefined;
|
|
26323
|
-
can_hvac_cool?: boolean | undefined;
|
|
26324
|
-
can_hvac_heat_cool?: boolean | undefined;
|
|
26325
|
-
can_turn_off_hvac?: boolean | undefined;
|
|
26326
|
-
can_simulate_removal?: boolean | undefined;
|
|
26327
|
-
can_simulate_connection?: boolean | undefined;
|
|
26328
|
-
can_simulate_disconnection?: boolean | undefined;
|
|
26329
26033
|
};
|
|
26330
26034
|
};
|
|
26331
26035
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamapi/types",
|
|
3
|
-
"version": "1.345.
|
|
3
|
+
"version": "1.345.2",
|
|
4
4
|
"description": "TypeScript types for the Seam API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"zod": "^3.21.4"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@seamapi/blueprint": "^0.
|
|
95
|
+
"@seamapi/blueprint": "^0.35.0",
|
|
96
96
|
"@types/node": "^20.8.10",
|
|
97
97
|
"concurrently": "^8.2.0",
|
|
98
98
|
"del-cli": "^5.0.0",
|
|
@@ -97,9 +97,9 @@ export const PHONE_DEVICE_TYPE_LIST = Object.values(
|
|
|
97
97
|
PHONE_DEVICE_TYPE,
|
|
98
98
|
) as PhoneDeviceTypeFromMapping[]
|
|
99
99
|
|
|
100
|
-
export const phone_device_type = z
|
|
101
|
-
Object.values(PHONE_DEVICE_TYPE_LIST) as [PhoneDeviceTypeFromMapping]
|
|
102
|
-
)
|
|
100
|
+
export const phone_device_type = z
|
|
101
|
+
.enum(Object.values(PHONE_DEVICE_TYPE_LIST) as [PhoneDeviceTypeFromMapping])
|
|
102
|
+
.describe('Type of phone.')
|
|
103
103
|
|
|
104
104
|
export type PhoneDeviceType = z.infer<typeof phone_device_type>
|
|
105
105
|
|
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
export const phone_specific_properties = z
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
3
|
+
export const phone_specific_properties = z
|
|
4
|
+
.object({
|
|
5
|
+
assa_abloy_credential_service_metadata: z
|
|
6
|
+
.object({
|
|
7
|
+
has_active_endpoint: z
|
|
8
|
+
.boolean()
|
|
9
|
+
.describe(
|
|
10
|
+
'Indicates whether the credential service has active endpoints associated with the phone.',
|
|
11
|
+
),
|
|
12
|
+
endpoints: z
|
|
13
|
+
.array(
|
|
14
|
+
z.object({
|
|
15
|
+
endpoint_id: z
|
|
16
|
+
.string()
|
|
17
|
+
.describe('ID of the associated endpoint.'),
|
|
18
|
+
is_active: z
|
|
19
|
+
.boolean()
|
|
20
|
+
.describe('Indicated whether the endpoint is active.'),
|
|
21
|
+
}),
|
|
22
|
+
)
|
|
23
|
+
.describe('Endpoints associated with the phone.'),
|
|
24
|
+
})
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('ASSA ABLOY Credential Service metadata for the phone.'),
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})
|
|
28
|
+
salto_space_credential_service_metadata: z
|
|
29
|
+
.object({
|
|
30
|
+
has_active_phone: z
|
|
31
|
+
.boolean()
|
|
32
|
+
.describe(
|
|
33
|
+
'Indicates whether the credential service has an active associated phone.',
|
|
34
|
+
),
|
|
35
|
+
})
|
|
36
|
+
.optional()
|
|
37
|
+
.describe('Salto Space credential service metadata for the phone.'),
|
|
38
|
+
})
|
|
39
|
+
.describe('Properties of the phone.')
|
|
@@ -1,22 +1,60 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
3
|
import { device } from './device.js'
|
|
4
|
+
import { phone_device_type } from './device-type.js'
|
|
4
5
|
import { phone_specific_properties } from './phone-properties.js'
|
|
5
6
|
|
|
6
7
|
export { phone_specific_properties } from './phone-properties.js'
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
const basePhoneDeviceSchema = device.pick({
|
|
10
|
+
device_id: true,
|
|
11
|
+
nickname: true,
|
|
12
|
+
display_name: true,
|
|
13
|
+
workspace_id: true,
|
|
14
|
+
created_at: true,
|
|
15
|
+
custom_metadata: true,
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
export const phone = z.object({
|
|
19
|
+
device_id:
|
|
20
|
+
basePhoneDeviceSchema.shape.device_id.describe('ID of the `phone`.'),
|
|
21
|
+
nickname: basePhoneDeviceSchema.shape.nickname.describe(
|
|
22
|
+
'Optional nickname to describe the phone, settable through Seam.',
|
|
23
|
+
),
|
|
24
|
+
display_name: basePhoneDeviceSchema.shape.display_name.describe(
|
|
25
|
+
'Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name` otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones.',
|
|
26
|
+
),
|
|
27
|
+
workspace_id: basePhoneDeviceSchema.shape.workspace_id.describe(
|
|
28
|
+
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the `phone`.',
|
|
29
|
+
),
|
|
30
|
+
created_at: basePhoneDeviceSchema.shape.created_at.describe(
|
|
31
|
+
'Date and time at which the `phone` was created.',
|
|
32
|
+
),
|
|
33
|
+
custom_metadata: basePhoneDeviceSchema.shape.custom_metadata.describe(
|
|
34
|
+
'Optional [custom metadata](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone.',
|
|
35
|
+
),
|
|
36
|
+
|
|
37
|
+
errors: z
|
|
38
|
+
.array(
|
|
39
|
+
z.object({
|
|
40
|
+
error_code: z.string(),
|
|
41
|
+
message: z.string(),
|
|
42
|
+
}),
|
|
43
|
+
)
|
|
44
|
+
.describe('Errors associated with the `phone`.'),
|
|
45
|
+
warnings: z
|
|
46
|
+
.array(
|
|
47
|
+
z.object({
|
|
48
|
+
warning_code: z.string(),
|
|
49
|
+
message: z.string(),
|
|
50
|
+
}),
|
|
51
|
+
)
|
|
52
|
+
.describe('Warnings associated with the `phone`.'),
|
|
53
|
+
device_type: phone_device_type,
|
|
54
|
+
properties: phone_specific_properties,
|
|
55
|
+
}).describe(`
|
|
56
|
+
---
|
|
57
|
+
route_path: /phones
|
|
58
|
+
---
|
|
59
|
+
Represents an app user's mobile phone.
|
|
60
|
+
`)
|