@seamapi/types 1.345.0 → 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.
@@ -1,20 +1,41 @@
1
1
  import { z } from 'zod';
2
2
  import { device } from './device.js';
3
+ import { phone_device_type } from './device-type.js';
3
4
  import { phone_specific_properties } from './phone-properties.js';
4
5
  export { phone_specific_properties } from './phone-properties.js';
5
- export const phone = device
6
- .omit({
7
- connected_account_id: true,
8
- })
9
- .extend({
10
- device_type: z
11
- .enum(['android_phone', 'ios_phone'])
12
- .describe('Type of phone.'),
13
- })
14
- .merge(z.object({ properties: phone_specific_properties })).describe(`
15
- ---
16
- route_path: /phones
17
- ---
18
- Properties of the phone.
19
- `);
6
+ const basePhoneDeviceSchema = device.pick({
7
+ device_id: true,
8
+ nickname: true,
9
+ display_name: true,
10
+ workspace_id: true,
11
+ created_at: true,
12
+ custom_metadata: true,
13
+ });
14
+ export const phone = z.object({
15
+ device_id: basePhoneDeviceSchema.shape.device_id.describe('ID of the `phone`.'),
16
+ nickname: basePhoneDeviceSchema.shape.nickname.describe('Optional nickname to describe the phone, settable through Seam.'),
17
+ display_name: basePhoneDeviceSchema.shape.display_name.describe('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.'),
18
+ workspace_id: basePhoneDeviceSchema.shape.workspace_id.describe('ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the `phone`.'),
19
+ created_at: basePhoneDeviceSchema.shape.created_at.describe('Date and time at which the `phone` was created.'),
20
+ custom_metadata: basePhoneDeviceSchema.shape.custom_metadata.describe('Optional [custom metadata](https://docs.seam.co/latest/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone.'),
21
+ errors: z
22
+ .array(z.object({
23
+ error_code: z.string(),
24
+ message: z.string(),
25
+ }))
26
+ .describe('Errors associated with the `phone`.'),
27
+ warnings: z
28
+ .array(z.object({
29
+ warning_code: z.string(),
30
+ message: z.string(),
31
+ }))
32
+ .describe('Warnings associated with the `phone`.'),
33
+ device_type: phone_device_type,
34
+ properties: phone_specific_properties,
35
+ }).describe(`
36
+ ---
37
+ route_path: /phones
38
+ ---
39
+ Represents an app user's mobile phone.
40
+ `);
20
41
  //# sourceMappingURL=phone.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"phone.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/devices/phone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM;KACxB,IAAI,CAAC;IACJ,oBAAoB,EAAE,IAAI;CAC3B,CAAC;KACD,MAAM,CAAC;IACN,WAAW,EAAE,CAAC;SACX,IAAI,CAAC,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;SACpC,QAAQ,CAAC,gBAAgB,CAAC;CAC9B,CAAC;KACD,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,yBAAyB,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;;;;;GAKpE,CAAC,CAAA"}
1
+ {"version":3,"file":"phone.js","sourceRoot":"","sources":["../../../../../src/lib/seam/connect/models/devices/phone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,MAA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C,QAAQ,CAAC;;;;;CAKX,CAAC,CAAA"}
@@ -2534,10 +2534,15 @@ declare const _default: {
2534
2534
  };
2535
2535
  device_type: {
2536
2536
  description: string;
2537
- oneOf: {
2537
+ oneOf: ({
2538
2538
  enum: string[];
2539
2539
  type: string;
2540
- }[];
2540
+ description?: never;
2541
+ } | {
2542
+ description: string;
2543
+ enum: string[];
2544
+ type: string;
2545
+ })[];
2541
2546
  };
2542
2547
  display_name: {
2543
2548
  description: string;
@@ -2779,7 +2784,9 @@ declare const _default: {
2779
2784
  };
2780
2785
  required: string[];
2781
2786
  type: string;
2787
+ description?: never;
2782
2788
  } | {
2789
+ description: string;
2783
2790
  properties: {
2784
2791
  assa_abloy_credential_service_metadata: {
2785
2792
  description: string;
@@ -6785,47 +6792,6 @@ declare const _default: {
6785
6792
  phone: {
6786
6793
  description: string;
6787
6794
  properties: {
6788
- can_hvac_cool: {
6789
- type: string;
6790
- };
6791
- can_hvac_heat: {
6792
- type: string;
6793
- };
6794
- can_hvac_heat_cool: {
6795
- type: string;
6796
- };
6797
- can_program_offline_access_codes: {
6798
- type: string;
6799
- };
6800
- can_program_online_access_codes: {
6801
- type: string;
6802
- };
6803
- can_remotely_lock: {
6804
- type: string;
6805
- };
6806
- can_remotely_unlock: {
6807
- type: string;
6808
- };
6809
- can_simulate_connection: {
6810
- type: string;
6811
- };
6812
- can_simulate_disconnection: {
6813
- type: string;
6814
- };
6815
- can_simulate_removal: {
6816
- type: string;
6817
- };
6818
- can_turn_off_hvac: {
6819
- type: string;
6820
- };
6821
- capabilities_supported: {
6822
- description: string;
6823
- items: {
6824
- enum: string[];
6825
- type: string;
6826
- };
6827
- type: string;
6828
- };
6829
6795
  created_at: {
6830
6796
  description: string;
6831
6797
  format: string;
@@ -6837,6 +6803,7 @@ declare const _default: {
6837
6803
  type: string;
6838
6804
  }[];
6839
6805
  };
6806
+ description: string;
6840
6807
  type: string;
6841
6808
  };
6842
6809
  device_id: {
@@ -6856,68 +6823,16 @@ declare const _default: {
6856
6823
  errors: {
6857
6824
  description: string;
6858
6825
  items: {
6859
- discriminator: {
6860
- propertyName: string;
6861
- };
6862
- oneOf: ({
6863
- description: string;
6864
- properties: {
6865
- error_code: {
6866
- description: string;
6867
- enum: string[];
6868
- type: string;
6869
- };
6870
- is_device_error: {
6871
- enum: boolean[];
6872
- type: string;
6873
- };
6874
- message: {
6875
- type: string;
6876
- };
6877
- is_connected_account_error?: never;
6826
+ properties: {
6827
+ error_code: {
6828
+ type: string;
6878
6829
  };
6879
- required: string[];
6880
- type: string;
6881
- } | {
6882
- description: string;
6883
- properties: {
6884
- error_code: {
6885
- description: string;
6886
- enum: string[];
6887
- type: string;
6888
- };
6889
- is_connected_account_error: {
6890
- enum: boolean[];
6891
- type: string;
6892
- };
6893
- message: {
6894
- type: string;
6895
- };
6896
- is_device_error?: never;
6830
+ message: {
6831
+ type: string;
6897
6832
  };
6898
- required: string[];
6899
- type: string;
6900
- })[];
6901
- };
6902
- type: string;
6903
- };
6904
- is_managed: {
6905
- description: string;
6906
- enum: boolean[];
6907
- type: string;
6908
- };
6909
- location: {
6910
- description: string;
6911
- nullable: boolean;
6912
- properties: {
6913
- location_name: {
6914
- description: string;
6915
- type: string;
6916
- };
6917
- timezone: {
6918
- description: string;
6919
- type: string;
6920
6833
  };
6834
+ required: string[];
6835
+ type: string;
6921
6836
  };
6922
6837
  type: string;
6923
6838
  };
@@ -6926,6 +6841,7 @@ declare const _default: {
6926
6841
  type: string;
6927
6842
  };
6928
6843
  properties: {
6844
+ description: string;
6929
6845
  properties: {
6930
6846
  assa_abloy_credential_service_metadata: {
6931
6847
  description: string;
@@ -6973,24 +6889,16 @@ declare const _default: {
6973
6889
  warnings: {
6974
6890
  description: string;
6975
6891
  items: {
6976
- discriminator: {
6977
- propertyName: string;
6978
- };
6979
- oneOf: {
6980
- description: string;
6981
- properties: {
6982
- message: {
6983
- type: string;
6984
- };
6985
- warning_code: {
6986
- description: string;
6987
- enum: string[];
6988
- type: string;
6989
- };
6892
+ properties: {
6893
+ message: {
6894
+ type: string;
6990
6895
  };
6991
- required: string[];
6992
- type: string;
6993
- }[];
6896
+ warning_code: {
6897
+ type: string;
6898
+ };
6899
+ };
6900
+ required: string[];
6901
+ type: string;
6994
6902
  };
6995
6903
  type: string;
6996
6904
  };
@@ -7004,23 +6912,6 @@ declare const _default: {
7004
6912
  type: string;
7005
6913
  'x-route-path': string;
7006
6914
  };
7007
- service_health: {
7008
- properties: {
7009
- description: {
7010
- type: string;
7011
- };
7012
- service: {
7013
- type: string;
7014
- };
7015
- status: {
7016
- enum: string[];
7017
- type: string;
7018
- };
7019
- };
7020
- required: string[];
7021
- type: string;
7022
- 'x-route-path': string;
7023
- };
7024
6915
  thermostat_schedule: {
7025
6916
  description: string;
7026
6917
  properties: {
@@ -7787,10 +7678,15 @@ declare const _default: {
7787
7678
  };
7788
7679
  device_type: {
7789
7680
  description: string;
7790
- oneOf: {
7681
+ oneOf: ({
7791
7682
  enum: string[];
7792
7683
  type: string;
7793
- }[];
7684
+ description?: never;
7685
+ } | {
7686
+ description: string;
7687
+ enum: string[];
7688
+ type: string;
7689
+ })[];
7794
7690
  };
7795
7691
  errors: {
7796
7692
  description: string;
@@ -16379,18 +16275,28 @@ declare const _default: {
16379
16275
  };
16380
16276
  device_type: {
16381
16277
  description: string;
16382
- oneOf: {
16278
+ oneOf: ({
16279
+ enum: string[];
16280
+ type: string;
16281
+ description?: never;
16282
+ } | {
16283
+ description: string;
16383
16284
  enum: string[];
16384
16285
  type: string;
16385
- }[];
16286
+ })[];
16386
16287
  };
16387
16288
  device_types: {
16388
16289
  description: string;
16389
16290
  items: {
16390
- oneOf: {
16291
+ oneOf: ({
16391
16292
  enum: string[];
16392
16293
  type: string;
16393
- }[];
16294
+ description?: never;
16295
+ } | {
16296
+ description: string;
16297
+ enum: string[];
16298
+ type: string;
16299
+ })[];
16394
16300
  };
16395
16301
  type: string;
16396
16302
  };
@@ -16884,18 +16790,28 @@ declare const _default: {
16884
16790
  };
16885
16791
  device_type: {
16886
16792
  description: string;
16887
- oneOf: {
16793
+ oneOf: ({
16888
16794
  enum: string[];
16889
16795
  type: string;
16890
- }[];
16796
+ description?: never;
16797
+ } | {
16798
+ description: string;
16799
+ enum: string[];
16800
+ type: string;
16801
+ })[];
16891
16802
  };
16892
16803
  device_types: {
16893
16804
  description: string;
16894
16805
  items: {
16895
- oneOf: {
16806
+ oneOf: ({
16896
16807
  enum: string[];
16897
16808
  type: string;
16898
- }[];
16809
+ description?: never;
16810
+ } | {
16811
+ description: string;
16812
+ enum: string[];
16813
+ type: string;
16814
+ })[];
16899
16815
  };
16900
16816
  type: string;
16901
16817
  };
@@ -17683,18 +17599,28 @@ declare const _default: {
17683
17599
  };
17684
17600
  device_type: {
17685
17601
  description: string;
17686
- oneOf: {
17602
+ oneOf: ({
17687
17603
  enum: string[];
17688
17604
  type: string;
17689
- }[];
17605
+ description?: never;
17606
+ } | {
17607
+ description: string;
17608
+ enum: string[];
17609
+ type: string;
17610
+ })[];
17690
17611
  };
17691
17612
  device_types: {
17692
17613
  description: string;
17693
17614
  items: {
17694
- oneOf: {
17615
+ oneOf: ({
17695
17616
  enum: string[];
17696
17617
  type: string;
17697
- }[];
17618
+ description?: never;
17619
+ } | {
17620
+ description: string;
17621
+ enum: string[];
17622
+ type: string;
17623
+ })[];
17698
17624
  };
17699
17625
  type: string;
17700
17626
  };
@@ -18141,18 +18067,28 @@ declare const _default: {
18141
18067
  };
18142
18068
  device_type: {
18143
18069
  description: string;
18144
- oneOf: {
18070
+ oneOf: ({
18071
+ enum: string[];
18072
+ type: string;
18073
+ description?: never;
18074
+ } | {
18075
+ description: string;
18145
18076
  enum: string[];
18146
18077
  type: string;
18147
- }[];
18078
+ })[];
18148
18079
  };
18149
18080
  device_types: {
18150
18081
  description: string;
18151
18082
  items: {
18152
- oneOf: {
18083
+ oneOf: ({
18153
18084
  enum: string[];
18154
18085
  type: string;
18155
- }[];
18086
+ description?: never;
18087
+ } | {
18088
+ description: string;
18089
+ enum: string[];
18090
+ type: string;
18091
+ })[];
18156
18092
  };
18157
18093
  type: string;
18158
18094
  };
@@ -19880,18 +19816,28 @@ declare const _default: {
19880
19816
  };
19881
19817
  device_type: {
19882
19818
  description: string;
19883
- oneOf: {
19819
+ oneOf: ({
19884
19820
  enum: string[];
19885
19821
  type: string;
19886
- }[];
19822
+ description?: never;
19823
+ } | {
19824
+ description: string;
19825
+ enum: string[];
19826
+ type: string;
19827
+ })[];
19887
19828
  };
19888
19829
  device_types: {
19889
19830
  description: string;
19890
19831
  items: {
19891
- oneOf: {
19832
+ oneOf: ({
19892
19833
  enum: string[];
19893
19834
  type: string;
19894
- }[];
19835
+ description?: never;
19836
+ } | {
19837
+ description: string;
19838
+ enum: string[];
19839
+ type: string;
19840
+ })[];
19895
19841
  };
19896
19842
  type: string;
19897
19843
  };