@seamapi/types 1.263.1 → 1.264.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 CHANGED
@@ -1214,6 +1214,29 @@ var unmanaged_acs_credential = common_acs_credential.merge(
1214
1214
  is_managed: zod.z.literal(false)
1215
1215
  })
1216
1216
  );
1217
+ var acs_credential_on_encoder = zod.z.object({
1218
+ created_at: zod.z.string().datetime().describe("Date and time the credential was created."),
1219
+ is_issued: zod.z.boolean().nullable(),
1220
+ starts_at: zod.z.string().datetime().nullable().describe("Date and time the credential will become useable."),
1221
+ ends_at: zod.z.string().datetime().nullable().describe("Date and time the credential will stop being useable."),
1222
+ card_number: zod.z.string().nullable().describe("A number or string that physically identifies this card."),
1223
+ visionline_metadata: zod.z.object({
1224
+ card_id: zod.z.string(),
1225
+ card_function_type: zod.z.enum(["guest", "staff"]),
1226
+ // computed, looks at door ops, and checks is guest op is present.
1227
+ cancelled: zod.z.boolean(),
1228
+ discarded: zod.z.boolean(),
1229
+ expired: zod.z.boolean(),
1230
+ overwritten: zod.z.boolean(),
1231
+ overridden: zod.z.boolean().optional(),
1232
+ pending_auto_update: zod.z.boolean(),
1233
+ card_format: zod.z.enum(["TLCode", "rfid48"]),
1234
+ card_holder: zod.z.string().optional(),
1235
+ number_of_issued_cards: zod.z.number()
1236
+ // guest_acs_entrance_ids: z.array(z.string().uuid()).optional(), // computed
1237
+ // common_acs_entrance_ids: z.array(z.string().uuid()).optional(), // computed
1238
+ }).optional()
1239
+ });
1217
1240
  var acs_entrance = zod.z.object({
1218
1241
  acs_system_id: zod.z.string().uuid().describe("ID of the access control system that contains the entrance."),
1219
1242
  acs_entrance_id: zod.z.string().uuid().describe("ID of the entrance."),
@@ -1698,52 +1721,50 @@ var lock_door_action_attempt = zod.z.discriminatedUnion("status", [
1698
1721
  }).describe("Locking door succeeded."),
1699
1722
  common_failed_action_attempt.extend({ action_type: action_type3, error: error4 }).describe("Locking door failed.")
1700
1723
  ]);
1701
- var action_type4 = zod.z.literal("READ_CARD");
1724
+ var action_type4 = zod.z.literal("RESET_SANDBOX_WORKSPACE");
1702
1725
  var error5 = zod.z.object({
1703
- type: zod.z.literal("no_card_on_encoder"),
1704
- message: zod.z.string()
1705
- });
1706
- var result5 = zod.z.object({
1707
- // TODO acs_credential_id: z
1708
- // .string()
1709
- // .uuid()
1710
- // .nullable()
1711
- // .describe("Matching acs_credential currently encoded on this card."),
1712
- card_number: zod.z.string().nullable().describe("A number or string that physically identifies this card.")
1713
- // TODO visionline_metadata: visionline_credential_metadata,
1714
- });
1715
- var read_card_action_attempt = zod.z.discriminatedUnion("status", [
1716
- common_pending_action_attempt.extend({
1717
- action_type: action_type4
1718
- }).describe("Reading card data from physical encoder."),
1719
- common_succeeded_action_attempt.extend({
1720
- action_type: action_type4,
1721
- result: result5
1722
- }).describe("Reading card data from physical encoder succeeded."),
1723
- common_failed_action_attempt.extend({ action_type: action_type4, error: error5 }).describe("Reading card data from physical encoder failed.")
1724
- ]);
1725
- var action_type5 = zod.z.literal("RESET_SANDBOX_WORKSPACE");
1726
- var error6 = zod.z.object({
1727
1726
  type: zod.z.string(),
1728
1727
  message: zod.z.string()
1729
1728
  });
1730
- var result6 = zod.z.object({});
1729
+ var result5 = zod.z.object({});
1731
1730
  var reset_sandbox_workspace_action_attempt = zod.z.discriminatedUnion(
1732
1731
  "status",
1733
1732
  [
1734
1733
  common_pending_action_attempt.extend({
1735
- action_type: action_type5
1734
+ action_type: action_type4
1736
1735
  }).describe("Resetting sandbox workspace."),
1737
1736
  common_succeeded_action_attempt.extend({
1738
- action_type: action_type5,
1739
- result: result6
1737
+ action_type: action_type4,
1738
+ result: result5
1740
1739
  }).describe("Resetting sandbox workspace succeeded."),
1741
1740
  common_failed_action_attempt.extend({
1742
- action_type: action_type5,
1743
- error: error6
1741
+ action_type: action_type4,
1742
+ error: error5
1744
1743
  }).describe("Resetting sandbox workspace failed.")
1745
1744
  ]
1746
1745
  );
1746
+ var action_type5 = zod.z.literal("SCAN_CARD");
1747
+ var error6 = zod.z.object({
1748
+ type: zod.z.literal("no_card_on_encoder"),
1749
+ message: zod.z.string()
1750
+ });
1751
+ var acs_credential_on_seam = acs_credential.or(unmanaged_acs_credential);
1752
+ var result6 = zod.z.object({
1753
+ acs_credential_on_encoder: acs_credential_on_encoder.describe(
1754
+ "Snapshot of the card data read from the physical encoder."
1755
+ ),
1756
+ acs_credential_on_seam: acs_credential_on_seam.nullable().describe("Matching acs_credential currently encoded on this card.")
1757
+ });
1758
+ var scan_card_action_attempt = zod.z.discriminatedUnion("status", [
1759
+ common_pending_action_attempt.extend({
1760
+ action_type: action_type5
1761
+ }).describe("Reading card data from physical encoder."),
1762
+ common_succeeded_action_attempt.extend({
1763
+ action_type: action_type5,
1764
+ result: result6
1765
+ }).describe("Reading card data from physical encoder succeeded."),
1766
+ common_failed_action_attempt.extend({ action_type: action_type5, error: error6 }).describe("Reading card data from physical encoder failed.")
1767
+ ]);
1747
1768
  var action_type6 = zod.z.literal("SET_COOL");
1748
1769
  var error7 = zod.z.object({
1749
1770
  type: zod.z.string(),
@@ -1848,7 +1869,7 @@ var unlock_door_action_attempt = zod.z.discriminatedUnion("status", [
1848
1869
  var action_attempt = zod.z.union([
1849
1870
  ...lock_door_action_attempt.options,
1850
1871
  ...unlock_door_action_attempt.options,
1851
- ...read_card_action_attempt.options,
1872
+ ...scan_card_action_attempt.options,
1852
1873
  ...encode_card_action_attempt.options,
1853
1874
  ...reset_sandbox_workspace_action_attempt.options,
1854
1875
  ...set_cool_action_attempt.options,
@@ -3643,7 +3664,7 @@ var openapi_default = {
3643
3664
  type: "string",
3644
3665
  "x-title": "Action Attempt ID"
3645
3666
  },
3646
- action_type: { enum: ["READ_CARD"], type: "string" },
3667
+ action_type: { enum: ["SCAN_CARD"], type: "string" },
3647
3668
  error: { nullable: true },
3648
3669
  result: { nullable: true },
3649
3670
  status: { enum: ["pending"], type: "string" }
@@ -3666,17 +3687,317 @@ var openapi_default = {
3666
3687
  type: "string",
3667
3688
  "x-title": "Action Attempt ID"
3668
3689
  },
3669
- action_type: { enum: ["READ_CARD"], type: "string" },
3690
+ action_type: { enum: ["SCAN_CARD"], type: "string" },
3670
3691
  error: { nullable: true },
3671
3692
  result: {
3672
3693
  properties: {
3673
- card_number: {
3674
- description: "A number or string that physically identifies this card.",
3694
+ acs_credential_on_encoder: {
3695
+ description: "Snapshot of the card data read from the physical encoder.",
3696
+ properties: {
3697
+ card_number: {
3698
+ description: "A number or string that physically identifies this card.",
3699
+ nullable: true,
3700
+ type: "string"
3701
+ },
3702
+ created_at: {
3703
+ description: "Date and time the credential was created.",
3704
+ format: "date-time",
3705
+ type: "string"
3706
+ },
3707
+ ends_at: {
3708
+ description: "Date and time the credential will stop being useable.",
3709
+ format: "date-time",
3710
+ nullable: true,
3711
+ type: "string"
3712
+ },
3713
+ is_issued: { nullable: true, type: "boolean" },
3714
+ starts_at: {
3715
+ description: "Date and time the credential will become useable.",
3716
+ format: "date-time",
3717
+ nullable: true,
3718
+ type: "string"
3719
+ },
3720
+ visionline_metadata: {
3721
+ properties: {
3722
+ cancelled: { type: "boolean" },
3723
+ card_format: {
3724
+ enum: ["TLCode", "rfid48"],
3725
+ type: "string"
3726
+ },
3727
+ card_function_type: {
3728
+ enum: ["guest", "staff"],
3729
+ type: "string"
3730
+ },
3731
+ card_holder: { type: "string" },
3732
+ card_id: { type: "string" },
3733
+ discarded: { type: "boolean" },
3734
+ expired: { type: "boolean" },
3735
+ number_of_issued_cards: {
3736
+ format: "float",
3737
+ type: "number"
3738
+ },
3739
+ overridden: { type: "boolean" },
3740
+ overwritten: { type: "boolean" },
3741
+ pending_auto_update: { type: "boolean" }
3742
+ },
3743
+ required: [
3744
+ "card_id",
3745
+ "card_function_type",
3746
+ "cancelled",
3747
+ "discarded",
3748
+ "expired",
3749
+ "overwritten",
3750
+ "pending_auto_update",
3751
+ "card_format",
3752
+ "number_of_issued_cards"
3753
+ ],
3754
+ type: "object"
3755
+ }
3756
+ },
3757
+ required: [
3758
+ "created_at",
3759
+ "is_issued",
3760
+ "starts_at",
3761
+ "ends_at",
3762
+ "card_number"
3763
+ ],
3764
+ type: "object"
3765
+ },
3766
+ acs_credential_on_seam: {
3767
+ description: "Matching acs_credential currently encoded on this card.",
3675
3768
  nullable: true,
3676
- type: "string"
3769
+ oneOf: [
3770
+ {
3771
+ properties: {
3772
+ access_method: {
3773
+ enum: ["code", "card", "mobile_key"],
3774
+ type: "string"
3775
+ },
3776
+ acs_credential_id: { format: "uuid", type: "string" },
3777
+ acs_credential_pool_id: {
3778
+ format: "uuid",
3779
+ type: "string"
3780
+ },
3781
+ acs_system_id: { format: "uuid", type: "string" },
3782
+ acs_user_id: { format: "uuid", type: "string" },
3783
+ card_number: { nullable: true, type: "string" },
3784
+ code: { nullable: true, type: "string" },
3785
+ created_at: { format: "date-time", type: "string" },
3786
+ display_name: { minLength: 1, type: "string" },
3787
+ ends_at: { type: "string" },
3788
+ errors: {
3789
+ items: {
3790
+ properties: {
3791
+ error_code: { type: "string" },
3792
+ message: { type: "string" }
3793
+ },
3794
+ required: ["error_code", "message"],
3795
+ type: "object"
3796
+ },
3797
+ type: "array"
3798
+ },
3799
+ external_type: {
3800
+ enum: [
3801
+ "pti_card",
3802
+ "brivo_credential",
3803
+ "hid_credential",
3804
+ "visionline_card",
3805
+ "salto_ks_credential"
3806
+ ],
3807
+ type: "string"
3808
+ },
3809
+ external_type_display_name: { type: "string" },
3810
+ is_issued: { type: "boolean" },
3811
+ is_latest_desired_state_synced_with_provider: {
3812
+ type: "boolean"
3813
+ },
3814
+ is_managed: { enum: [true], type: "boolean" },
3815
+ is_multi_phone_sync_credential: { type: "boolean" },
3816
+ issued_at: {
3817
+ format: "date-time",
3818
+ nullable: true,
3819
+ type: "string"
3820
+ },
3821
+ latest_desired_state_synced_with_provider_at: {
3822
+ format: "date-time",
3823
+ type: "string"
3824
+ },
3825
+ parent_acs_credential_id: {
3826
+ format: "uuid",
3827
+ type: "string"
3828
+ },
3829
+ starts_at: { type: "string" },
3830
+ visionline_metadata: {
3831
+ properties: {
3832
+ auto_join: { type: "boolean" },
3833
+ card_function_type: {
3834
+ enum: ["guest", "staff"],
3835
+ type: "string"
3836
+ },
3837
+ card_id: { type: "string" },
3838
+ common_acs_entrance_ids: {
3839
+ items: { format: "uuid", type: "string" },
3840
+ type: "array"
3841
+ },
3842
+ credential_id: { type: "string" },
3843
+ guest_acs_entrance_ids: {
3844
+ items: { format: "uuid", type: "string" },
3845
+ type: "array"
3846
+ },
3847
+ is_valid: { type: "boolean" },
3848
+ joiner_acs_credential_ids: {
3849
+ items: { format: "uuid", type: "string" },
3850
+ type: "array"
3851
+ }
3852
+ },
3853
+ required: ["card_function_type"],
3854
+ type: "object"
3855
+ },
3856
+ warnings: {
3857
+ items: {
3858
+ properties: {
3859
+ message: { type: "string" },
3860
+ warning_code: { type: "string" }
3861
+ },
3862
+ required: ["warning_code", "message"],
3863
+ type: "object"
3864
+ },
3865
+ type: "array"
3866
+ },
3867
+ workspace_id: { format: "uuid", type: "string" }
3868
+ },
3869
+ required: [
3870
+ "acs_credential_id",
3871
+ "acs_system_id",
3872
+ "display_name",
3873
+ "access_method",
3874
+ "created_at",
3875
+ "workspace_id",
3876
+ "errors",
3877
+ "warnings",
3878
+ "is_managed"
3879
+ ],
3880
+ type: "object"
3881
+ },
3882
+ {
3883
+ properties: {
3884
+ access_method: {
3885
+ enum: ["code", "card", "mobile_key"],
3886
+ type: "string"
3887
+ },
3888
+ acs_credential_id: { format: "uuid", type: "string" },
3889
+ acs_credential_pool_id: {
3890
+ format: "uuid",
3891
+ type: "string"
3892
+ },
3893
+ acs_system_id: { format: "uuid", type: "string" },
3894
+ acs_user_id: { format: "uuid", type: "string" },
3895
+ card_number: { nullable: true, type: "string" },
3896
+ code: { nullable: true, type: "string" },
3897
+ created_at: { format: "date-time", type: "string" },
3898
+ display_name: { minLength: 1, type: "string" },
3899
+ ends_at: { type: "string" },
3900
+ errors: {
3901
+ items: {
3902
+ properties: {
3903
+ error_code: { type: "string" },
3904
+ message: { type: "string" }
3905
+ },
3906
+ required: ["error_code", "message"],
3907
+ type: "object"
3908
+ },
3909
+ type: "array"
3910
+ },
3911
+ external_type: {
3912
+ enum: [
3913
+ "pti_card",
3914
+ "brivo_credential",
3915
+ "hid_credential",
3916
+ "visionline_card",
3917
+ "salto_ks_credential"
3918
+ ],
3919
+ type: "string"
3920
+ },
3921
+ external_type_display_name: { type: "string" },
3922
+ is_issued: { type: "boolean" },
3923
+ is_latest_desired_state_synced_with_provider: {
3924
+ type: "boolean"
3925
+ },
3926
+ is_managed: { enum: [false], type: "boolean" },
3927
+ is_multi_phone_sync_credential: { type: "boolean" },
3928
+ issued_at: {
3929
+ format: "date-time",
3930
+ nullable: true,
3931
+ type: "string"
3932
+ },
3933
+ latest_desired_state_synced_with_provider_at: {
3934
+ format: "date-time",
3935
+ type: "string"
3936
+ },
3937
+ parent_acs_credential_id: {
3938
+ format: "uuid",
3939
+ type: "string"
3940
+ },
3941
+ starts_at: { type: "string" },
3942
+ visionline_metadata: {
3943
+ properties: {
3944
+ auto_join: { type: "boolean" },
3945
+ card_function_type: {
3946
+ enum: ["guest", "staff"],
3947
+ type: "string"
3948
+ },
3949
+ card_id: { type: "string" },
3950
+ common_acs_entrance_ids: {
3951
+ items: { format: "uuid", type: "string" },
3952
+ type: "array"
3953
+ },
3954
+ credential_id: { type: "string" },
3955
+ guest_acs_entrance_ids: {
3956
+ items: { format: "uuid", type: "string" },
3957
+ type: "array"
3958
+ },
3959
+ is_valid: { type: "boolean" },
3960
+ joiner_acs_credential_ids: {
3961
+ items: { format: "uuid", type: "string" },
3962
+ type: "array"
3963
+ }
3964
+ },
3965
+ required: ["card_function_type"],
3966
+ type: "object"
3967
+ },
3968
+ warnings: {
3969
+ items: {
3970
+ properties: {
3971
+ message: { type: "string" },
3972
+ warning_code: { type: "string" }
3973
+ },
3974
+ required: ["warning_code", "message"],
3975
+ type: "object"
3976
+ },
3977
+ type: "array"
3978
+ },
3979
+ workspace_id: { format: "uuid", type: "string" }
3980
+ },
3981
+ required: [
3982
+ "acs_credential_id",
3983
+ "acs_system_id",
3984
+ "display_name",
3985
+ "access_method",
3986
+ "created_at",
3987
+ "workspace_id",
3988
+ "errors",
3989
+ "warnings",
3990
+ "is_managed"
3991
+ ],
3992
+ type: "object"
3993
+ }
3994
+ ]
3677
3995
  }
3678
3996
  },
3679
- required: ["card_number"],
3997
+ required: [
3998
+ "acs_credential_on_encoder",
3999
+ "acs_credential_on_seam"
4000
+ ],
3680
4001
  type: "object"
3681
4002
  },
3682
4003
  status: { enum: ["success"], type: "string" }
@@ -3699,7 +4020,7 @@ var openapi_default = {
3699
4020
  type: "string",
3700
4021
  "x-title": "Action Attempt ID"
3701
4022
  },
3702
- action_type: { enum: ["READ_CARD"], type: "string" },
4023
+ action_type: { enum: ["SCAN_CARD"], type: "string" },
3703
4024
  error: {
3704
4025
  properties: {
3705
4026
  message: { type: "string" },
@@ -10126,9 +10447,9 @@ var openapi_default = {
10126
10447
  "x-undocumented": "Encoders are in alpha."
10127
10448
  }
10128
10449
  },
10129
- "/acs/encoders/read_card": {
10450
+ "/acs/encoders/scan_card": {
10130
10451
  post: {
10131
- operationId: "acsEncodersReadCardPost",
10452
+ operationId: "acsEncodersScanCardPost",
10132
10453
  requestBody: {
10133
10454
  content: {
10134
10455
  "application/json": {
@@ -10181,10 +10502,10 @@ var openapi_default = {
10181
10502
  { console_session: [] },
10182
10503
  { api_key: [] }
10183
10504
  ],
10184
- summary: "/acs/encoders/read_card",
10505
+ summary: "/acs/encoders/scan_card",
10185
10506
  tags: ["/acs"],
10186
10507
  "x-fern-sdk-group-name": ["acs", "encoders"],
10187
- "x-fern-sdk-method-name": "read_card",
10508
+ "x-fern-sdk-method-name": "scan_card",
10188
10509
  "x-fern-sdk-return-value": "action_attempt",
10189
10510
  "x-response-key": "action_attempt",
10190
10511
  "x-undocumented": "Reading a card is currently unimplemented."