Skip to content

Commit a136138

Browse files
authored
feat: Add time_zone_does_not_match_location warning (#1343)
1 parent 4a30919 commit a136138

File tree

3 files changed

+132
-56
lines changed

3 files changed

+132
-56
lines changed

src/lib/seam/connect/models/acs/acs-system.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,20 @@ const salto_ks_subscription_limit_almost_reached =
172172
),
173173
})
174174

175-
const acs_system_warning =
176-
// z.union([
177-
salto_ks_subscription_limit_almost_reached
178-
// ])
179-
.describe('Warning associated with the `acs_system`.')
175+
const time_zone_does_not_match_location = common_acs_system_warning.extend({
176+
warning_code: z
177+
.literal('time_zone_does_not_match_location')
178+
.describe(
179+
'Indicates the ACS system time zone could not be determined because the reported physical location does not match the time zone configured on the physical ACS entrances.',
180+
),
181+
})
182+
183+
const acs_system_warning = z
184+
.union([
185+
salto_ks_subscription_limit_almost_reached,
186+
time_zone_does_not_match_location,
187+
])
188+
.describe('Warning associated with the `acs_system`.')
180189

181190
export const acs_system_warning_map = z.object({
182191
salto_ks_subscription_limit_almost_reached:

src/lib/seam/connect/openapi.ts

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,27 +1005,54 @@ export default {
10051005
description: 'Warnings associated with the `acs_system`.',
10061006
items: {
10071007
description: 'Warning associated with the `acs_system`.',
1008-
properties: {
1009-
created_at: {
1010-
description:
1011-
'Date and time at which Seam created the warning.',
1012-
format: 'date-time',
1013-
type: 'string',
1014-
},
1015-
message: {
1016-
description:
1017-
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
1018-
type: 'string',
1008+
oneOf: [
1009+
{
1010+
properties: {
1011+
created_at: {
1012+
description:
1013+
'Date and time at which Seam created the warning.',
1014+
format: 'date-time',
1015+
type: 'string',
1016+
},
1017+
message: {
1018+
description:
1019+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
1020+
type: 'string',
1021+
},
1022+
warning_code: {
1023+
description:
1024+
'Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this.',
1025+
enum: ['salto_ks_subscription_limit_almost_reached'],
1026+
type: 'string',
1027+
},
1028+
},
1029+
required: ['created_at', 'message', 'warning_code'],
1030+
type: 'object',
10191031
},
1020-
warning_code: {
1021-
description:
1022-
'Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this.',
1023-
enum: ['salto_ks_subscription_limit_almost_reached'],
1024-
type: 'string',
1032+
{
1033+
properties: {
1034+
created_at: {
1035+
description:
1036+
'Date and time at which Seam created the warning.',
1037+
format: 'date-time',
1038+
type: 'string',
1039+
},
1040+
message: {
1041+
description:
1042+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
1043+
type: 'string',
1044+
},
1045+
warning_code: {
1046+
description:
1047+
'Indicates the ACS system time zone could not be determined because the reported physical location does not match the time zone configured on the physical ACS entrances.',
1048+
enum: ['time_zone_does_not_match_location'],
1049+
type: 'string',
1050+
},
1051+
},
1052+
required: ['created_at', 'message', 'warning_code'],
1053+
type: 'object',
10251054
},
1026-
},
1027-
required: ['created_at', 'message', 'warning_code'],
1028-
type: 'object',
1055+
],
10291056
},
10301057
type: 'array',
10311058
},

src/lib/seam/connect/route-types.ts

Lines changed: 72 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9042,14 +9042,24 @@ export interface Routes {
90429042
}
90439043
>
90449044
/** Warnings associated with the `acs_system`. */
9045-
warnings: Array<{
9046-
/** Date and time at which Seam created the warning. */
9047-
created_at: string
9048-
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9049-
message: string
9050-
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
9051-
warning_code: 'salto_ks_subscription_limit_almost_reached'
9052-
}>
9045+
warnings: Array<
9046+
| {
9047+
/** Date and time at which Seam created the warning. */
9048+
created_at: string
9049+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9050+
message: string
9051+
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
9052+
warning_code: 'salto_ks_subscription_limit_almost_reached'
9053+
}
9054+
| {
9055+
/** Date and time at which Seam created the warning. */
9056+
created_at: string
9057+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9058+
message: string
9059+
/** Indicates the ACS system time zone could not be determined because the reported physical location does not match the time zone configured on the physical ACS entrances. */
9060+
warning_code: 'time_zone_does_not_match_location'
9061+
}
9062+
>
90539063
/** Indicates whether it is possible to [launch enrollment automations](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/issuing-mobile-credentials-from-an-access-control-system#prepare-the-phones-for-a-user-identity-to-start-receiving-mobile-credentials-using-an-enrollment-aut) for the `acs_system`. */
90549064
can_automate_enrollment?: boolean | undefined
90559065
/** Indicates whether the `acs_system` supports creating [access groups](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups). See also [Access Group-based Access Control Systems](https://docs.seam.co/latest/capability-guides/access-systems/understanding-access-control-system-differences#access-group-based-access-control-systems). */
@@ -9199,14 +9209,24 @@ export interface Routes {
91999209
}
92009210
>
92019211
/** Warnings associated with the `acs_system`. */
9202-
warnings: Array<{
9203-
/** Date and time at which Seam created the warning. */
9204-
created_at: string
9205-
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9206-
message: string
9207-
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
9208-
warning_code: 'salto_ks_subscription_limit_almost_reached'
9209-
}>
9212+
warnings: Array<
9213+
| {
9214+
/** Date and time at which Seam created the warning. */
9215+
created_at: string
9216+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9217+
message: string
9218+
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
9219+
warning_code: 'salto_ks_subscription_limit_almost_reached'
9220+
}
9221+
| {
9222+
/** Date and time at which Seam created the warning. */
9223+
created_at: string
9224+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9225+
message: string
9226+
/** Indicates the ACS system time zone could not be determined because the reported physical location does not match the time zone configured on the physical ACS entrances. */
9227+
warning_code: 'time_zone_does_not_match_location'
9228+
}
9229+
>
92109230
/** Indicates whether it is possible to [launch enrollment automations](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/issuing-mobile-credentials-from-an-access-control-system#prepare-the-phones-for-a-user-identity-to-start-receiving-mobile-credentials-using-an-enrollment-aut) for the `acs_system`. */
92119231
can_automate_enrollment?: boolean | undefined
92129232
/** Indicates whether the `acs_system` supports creating [access groups](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups). See also [Access Group-based Access Control Systems](https://docs.seam.co/latest/capability-guides/access-systems/understanding-access-control-system-differences#access-group-based-access-control-systems). */
@@ -9356,14 +9376,24 @@ export interface Routes {
93569376
}
93579377
>
93589378
/** Warnings associated with the `acs_system`. */
9359-
warnings: Array<{
9360-
/** Date and time at which Seam created the warning. */
9361-
created_at: string
9362-
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9363-
message: string
9364-
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
9365-
warning_code: 'salto_ks_subscription_limit_almost_reached'
9366-
}>
9379+
warnings: Array<
9380+
| {
9381+
/** Date and time at which Seam created the warning. */
9382+
created_at: string
9383+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9384+
message: string
9385+
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
9386+
warning_code: 'salto_ks_subscription_limit_almost_reached'
9387+
}
9388+
| {
9389+
/** Date and time at which Seam created the warning. */
9390+
created_at: string
9391+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
9392+
message: string
9393+
/** Indicates the ACS system time zone could not be determined because the reported physical location does not match the time zone configured on the physical ACS entrances. */
9394+
warning_code: 'time_zone_does_not_match_location'
9395+
}
9396+
>
93679397
/** Indicates whether it is possible to [launch enrollment automations](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/issuing-mobile-credentials-from-an-access-control-system#prepare-the-phones-for-a-user-identity-to-start-receiving-mobile-credentials-using-an-enrollment-aut) for the `acs_system`. */
93689398
can_automate_enrollment?: boolean | undefined
93699399
/** Indicates whether the `acs_system` supports creating [access groups](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups). See also [Access Group-based Access Control Systems](https://docs.seam.co/latest/capability-guides/access-systems/understanding-access-control-system-differences#access-group-based-access-control-systems). */
@@ -36847,14 +36877,24 @@ export interface Routes {
3684736877
}
3684836878
>
3684936879
/** Warnings associated with the `acs_system`. */
36850-
warnings: Array<{
36851-
/** Date and time at which Seam created the warning. */
36852-
created_at: string
36853-
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
36854-
message: string
36855-
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
36856-
warning_code: 'salto_ks_subscription_limit_almost_reached'
36857-
}>
36880+
warnings: Array<
36881+
| {
36882+
/** Date and time at which Seam created the warning. */
36883+
created_at: string
36884+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
36885+
message: string
36886+
/** Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this. */
36887+
warning_code: 'salto_ks_subscription_limit_almost_reached'
36888+
}
36889+
| {
36890+
/** Date and time at which Seam created the warning. */
36891+
created_at: string
36892+
/** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
36893+
message: string
36894+
/** Indicates the ACS system time zone could not be determined because the reported physical location does not match the time zone configured on the physical ACS entrances. */
36895+
warning_code: 'time_zone_does_not_match_location'
36896+
}
36897+
>
3685836898
/** Indicates whether it is possible to [launch enrollment automations](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/issuing-mobile-credentials-from-an-access-control-system#prepare-the-phones-for-a-user-identity-to-start-receiving-mobile-credentials-using-an-enrollment-aut) for the `acs_system`. */
3685936899
can_automate_enrollment?: boolean | undefined
3686036900
/** Indicates whether the `acs_system` supports creating [access groups](https://docs.seam.co/latest/capability-guides/access-systems/assigning-users-to-access-groups). See also [Access Group-based Access Control Systems](https://docs.seam.co/latest/capability-guides/access-systems/understanding-access-control-system-differences#access-group-based-access-control-systems). */

0 commit comments

Comments
 (0)