Skip to content

Commit da9f427

Browse files
authored
feat: Add needs_to_be_reissued warning (#1445)
1 parent 63108fa commit da9f427

File tree

4 files changed

+1059
-0
lines changed

4 files changed

+1059
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,24 @@ export const unknown_issue_with_acs_credential = common_acs_credential_warning
8181
'This issue may affect the proper functioning of this credential.',
8282
)
8383

84+
const needs_to_be_reissued = common_acs_credential_warning
85+
.extend({
86+
warning_code: z
87+
.literal('needs_to_be_reissued')
88+
.describe(warning_code_description),
89+
})
90+
.describe(
91+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
92+
)
93+
8494
const acs_credential_warning = z
8595
.union([
8696
waiting_to_be_issued,
8797
schedule_externally_modified,
8898
schedule_modified,
8999
being_deleted,
90100
unknown_issue_with_acs_credential,
101+
needs_to_be_reissued,
91102
])
92103
.describe('Warning associated with the `acs_credential`.')
93104

@@ -101,6 +112,7 @@ const acs_credential_warning_map = z.object({
101112
unknown_issue_with_acs_credential: unknown_issue_with_acs_credential
102113
.optional()
103114
.nullable(),
115+
needs_to_be_reissued: needs_to_be_reissued.optional().nullable(),
104116
})
105117

106118
export type AcsCredentialWarningMap = z.infer<typeof acs_credential_warning_map>

src/lib/seam/connect/models/events/acs/credentials.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,16 @@ export const acs_credential_issued = acs_credential_event.extend({
2828
An [ACS credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was issued.
2929
`)
3030

31+
export const acs_credential_reissued = acs_credential_event
32+
.extend({
33+
event_type: z.literal('acs_credential.reissued'),
34+
})
35+
.describe(
36+
'An [ACS credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was reissued.',
37+
)
38+
3139
export const acs_credential_events = [
3240
acs_credential_deleted_event,
3341
acs_credential_issued,
42+
acs_credential_reissued,
3443
] as const

src/lib/seam/connect/openapi.ts

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,31 @@ export default {
757757
required: ['created_at', 'message', 'warning_code'],
758758
type: 'object',
759759
},
760+
{
761+
description:
762+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
763+
properties: {
764+
created_at: {
765+
description:
766+
'Date and time at which Seam created the warning.',
767+
format: 'date-time',
768+
type: 'string',
769+
},
770+
message: {
771+
description:
772+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
773+
type: 'string',
774+
},
775+
warning_code: {
776+
description:
777+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
778+
enum: ['needs_to_be_reissued'],
779+
type: 'string',
780+
},
781+
},
782+
required: ['created_at', 'message', 'warning_code'],
783+
type: 'object',
784+
},
760785
],
761786
},
762787
type: 'array',
@@ -2246,6 +2271,35 @@ export default {
22462271
],
22472272
type: 'object',
22482273
},
2274+
{
2275+
description:
2276+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
2277+
properties: {
2278+
created_at: {
2279+
description:
2280+
'Date and time at which Seam created the warning.',
2281+
format: 'date-time',
2282+
type: 'string',
2283+
},
2284+
message: {
2285+
description:
2286+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
2287+
type: 'string',
2288+
},
2289+
warning_code: {
2290+
description:
2291+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
2292+
enum: ['needs_to_be_reissued'],
2293+
type: 'string',
2294+
},
2295+
},
2296+
required: [
2297+
'created_at',
2298+
'message',
2299+
'warning_code',
2300+
],
2301+
type: 'object',
2302+
},
22492303
],
22502304
},
22512305
type: 'array',
@@ -2577,6 +2631,35 @@ export default {
25772631
],
25782632
type: 'object',
25792633
},
2634+
{
2635+
description:
2636+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
2637+
properties: {
2638+
created_at: {
2639+
description:
2640+
'Date and time at which Seam created the warning.',
2641+
format: 'date-time',
2642+
type: 'string',
2643+
},
2644+
message: {
2645+
description:
2646+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
2647+
type: 'string',
2648+
},
2649+
warning_code: {
2650+
description:
2651+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
2652+
enum: ['needs_to_be_reissued'],
2653+
type: 'string',
2654+
},
2655+
},
2656+
required: [
2657+
'created_at',
2658+
'message',
2659+
'warning_code',
2660+
],
2661+
type: 'object',
2662+
},
25802663
],
25812664
},
25822665
type: 'array',
@@ -3039,6 +3122,35 @@ export default {
30393122
],
30403123
type: 'object',
30413124
},
3125+
{
3126+
description:
3127+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
3128+
properties: {
3129+
created_at: {
3130+
description:
3131+
'Date and time at which Seam created the warning.',
3132+
format: 'date-time',
3133+
type: 'string',
3134+
},
3135+
message: {
3136+
description:
3137+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
3138+
type: 'string',
3139+
},
3140+
warning_code: {
3141+
description:
3142+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
3143+
enum: ['needs_to_be_reissued'],
3144+
type: 'string',
3145+
},
3146+
},
3147+
required: [
3148+
'created_at',
3149+
'message',
3150+
'warning_code',
3151+
],
3152+
type: 'object',
3153+
},
30423154
],
30433155
},
30443156
type: 'array',
@@ -3367,6 +3479,35 @@ export default {
33673479
],
33683480
type: 'object',
33693481
},
3482+
{
3483+
description:
3484+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
3485+
properties: {
3486+
created_at: {
3487+
description:
3488+
'Date and time at which Seam created the warning.',
3489+
format: 'date-time',
3490+
type: 'string',
3491+
},
3492+
message: {
3493+
description:
3494+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
3495+
type: 'string',
3496+
},
3497+
warning_code: {
3498+
description:
3499+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
3500+
enum: ['needs_to_be_reissued'],
3501+
type: 'string',
3502+
},
3503+
},
3504+
required: [
3505+
'created_at',
3506+
'message',
3507+
'warning_code',
3508+
],
3509+
type: 'object',
3510+
},
33703511
],
33713512
},
33723513
type: 'array',
@@ -7599,6 +7740,57 @@ export default {
75997740
type: 'object',
76007741
'x-route-path': '/acs/credentials',
76017742
},
7743+
{
7744+
description:
7745+
'An [ACS credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was reissued.',
7746+
properties: {
7747+
acs_credential_id: { format: 'uuid', type: 'string' },
7748+
acs_system_id: {
7749+
description:
7750+
'ID of the [ACS system](https://docs.seam.co/latest/capability-guides/access-systems).',
7751+
format: 'uuid',
7752+
type: 'string',
7753+
},
7754+
connected_account_id: {
7755+
description:
7756+
'ID of the [connected account](https://docs.seam.co/latest/core-concepts/connected-accounts).',
7757+
format: 'uuid',
7758+
type: 'string',
7759+
},
7760+
created_at: {
7761+
description: 'Date and time at which the event was created.',
7762+
format: 'date-time',
7763+
type: 'string',
7764+
},
7765+
event_id: {
7766+
description: 'ID of the event.',
7767+
format: 'uuid',
7768+
type: 'string',
7769+
},
7770+
event_type: { enum: ['acs_credential.reissued'], type: 'string' },
7771+
occurred_at: {
7772+
description: 'Date and time at which the event occurred.',
7773+
format: 'date-time',
7774+
type: 'string',
7775+
},
7776+
workspace_id: {
7777+
description:
7778+
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces).',
7779+
format: 'uuid',
7780+
type: 'string',
7781+
},
7782+
},
7783+
required: [
7784+
'event_id',
7785+
'workspace_id',
7786+
'created_at',
7787+
'occurred_at',
7788+
'acs_system_id',
7789+
'acs_credential_id',
7790+
'event_type',
7791+
],
7792+
type: 'object',
7793+
},
76027794
{
76037795
description:
76047796
'An [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) was deleted.',
@@ -15210,6 +15402,35 @@ export default {
1521015402
],
1521115403
type: 'object',
1521215404
},
15405+
{
15406+
description:
15407+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
15408+
properties: {
15409+
created_at: {
15410+
description:
15411+
'Date and time at which Seam created the warning.',
15412+
format: 'date-time',
15413+
type: 'string',
15414+
},
15415+
message: {
15416+
description:
15417+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
15418+
type: 'string',
15419+
},
15420+
warning_code: {
15421+
description:
15422+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
15423+
enum: ['needs_to_be_reissued'],
15424+
type: 'string',
15425+
},
15426+
},
15427+
required: [
15428+
'created_at',
15429+
'message',
15430+
'warning_code',
15431+
],
15432+
type: 'object',
15433+
},
1521315434
],
1521415435
},
1521515436
type: 'array',
@@ -15644,6 +15865,35 @@ export default {
1564415865
],
1564515866
type: 'object',
1564615867
},
15868+
{
15869+
description:
15870+
'Access permissions for this [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/latest/capability-guides/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) this credential. This issue may affect the proper functioning of the credential.',
15871+
properties: {
15872+
created_at: {
15873+
description:
15874+
'Date and time at which Seam created the warning.',
15875+
format: 'date-time',
15876+
type: 'string',
15877+
},
15878+
message: {
15879+
description:
15880+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
15881+
type: 'string',
15882+
},
15883+
warning_code: {
15884+
description:
15885+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
15886+
enum: ['needs_to_be_reissued'],
15887+
type: 'string',
15888+
},
15889+
},
15890+
required: [
15891+
'created_at',
15892+
'message',
15893+
'warning_code',
15894+
],
15895+
type: 'object',
15896+
},
1564715897
],
1564815898
},
1564915899
type: 'array',
@@ -20855,6 +21105,7 @@ export default {
2085521105
'acs_user.deleted',
2085621106
'acs_credential.deleted',
2085721107
'acs_credential.issued',
21108+
'acs_credential.reissued',
2085821109
'acs_encoder.added',
2085921110
'acs_encoder.removed',
2086021111
'enrollment_automation.deleted',
@@ -20934,6 +21185,7 @@ export default {
2093421185
'acs_user.deleted',
2093521186
'acs_credential.deleted',
2093621187
'acs_credential.issued',
21188+
'acs_credential.reissued',
2093721189
'acs_encoder.added',
2093821190
'acs_encoder.removed',
2093921191
'enrollment_automation.deleted',

0 commit comments

Comments
 (0)