Skip to content

Commit 19dceaf

Browse files
authored
feat: Sync with Seam API via 7bffb6fbc78bc82d67546d82203637a7ea9663f4 (#2704)
1 parent 24fb38d commit 19dceaf

4 files changed

Lines changed: 412 additions & 0 deletions

File tree

src/lib/seam/connect/models/acs/acs-access-groups/pending-mutations.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,27 @@ const updating_entrance_membership = common_pending_mutation
135135
'Seam is in the process of pushing an entrance membership update to the integrated access system.',
136136
)
137137

138+
const deferring_user_membership_update = common_pending_mutation
139+
.extend({
140+
mutation_code: z
141+
.literal('deferring_user_membership_update')
142+
.describe(
143+
'Mutation code to indicate that a scheduled user membership change is pending for this access group.',
144+
),
145+
acs_user_id: z
146+
.string()
147+
.uuid()
148+
.describe('ID of the user involved in the scheduled change.'),
149+
variant: z
150+
.enum(['adding', 'removing'])
151+
.describe(
152+
'Whether the user is scheduled to be added to or removed from this access group.',
153+
),
154+
})
155+
.describe(
156+
'A scheduled user membership change is pending for this access group.',
157+
)
158+
138159
export const acs_access_group_pending_mutations = z.discriminatedUnion(
139160
'mutation_code',
140161
[
@@ -144,6 +165,7 @@ export const acs_access_group_pending_mutations = z.discriminatedUnion(
144165
updating_access_schedule,
145166
updating_user_membership,
146167
updating_entrance_membership,
168+
deferring_user_membership_update,
147169
],
148170
)
149171

@@ -164,6 +186,10 @@ const _acs_access_group_pending_mutations_map = z.object({
164186
.record(z.string().uuid(), updating_entrance_membership)
165187
.optional()
166188
.nullable(),
189+
deferring_user_membership_update: z
190+
.record(z.string().uuid(), deferring_user_membership_update)
191+
.optional()
192+
.nullable(),
167193
})
168194

169195
export type AcsAccessGroupPendingMutationsMap = z.infer<

src/lib/seam/connect/models/acs/acs-users/pending-mutations.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,27 @@ const updating_group_membership_mutation = common_pending_mutation
158158
'Seam is in the process of pushing an access group membership update to the integrated access system.',
159159
)
160160

161+
const deferring_group_membership_update_mutation = common_pending_mutation
162+
.extend({
163+
mutation_code: z
164+
.literal('deferring_group_membership_update')
165+
.describe(
166+
'Mutation code to indicate that a scheduled access group membership change is pending for this user.',
167+
),
168+
acs_access_group_id: z
169+
.string()
170+
.uuid()
171+
.describe('ID of the access group involved in the scheduled change.'),
172+
variant: z
173+
.enum(['adding', 'removing'])
174+
.describe(
175+
'Whether the user is scheduled to be added to or removed from the access group.',
176+
),
177+
})
178+
.describe(
179+
'A scheduled access group membership change is pending for this user.',
180+
)
181+
161182
export const acs_user_pending_mutations = z.discriminatedUnion(
162183
'mutation_code',
163184
[
@@ -168,6 +189,7 @@ export const acs_user_pending_mutations = z.discriminatedUnion(
168189
updating_access_schedule_mutation,
169190
updating_suspension_state_mutation,
170191
updating_group_membership_mutation,
192+
deferring_group_membership_update_mutation,
171193
],
172194
)
173195

@@ -184,6 +206,10 @@ const _acs_user_pending_mutations_map = z.object({
184206
.record(z.string().uuid(), updating_group_membership_mutation)
185207
.optional()
186208
.nullable(),
209+
deferring_group_membership_update: z
210+
.record(z.string().uuid(), deferring_group_membership_update_mutation)
211+
.optional()
212+
.nullable(),
187213
updating_suspension_state: updating_suspension_state_mutation
188214
.optional()
189215
.nullable(),

src/lib/seam/connect/openapi.ts

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,48 @@ export default {
30543054
],
30553055
type: 'object',
30563056
},
3057+
{
3058+
description:
3059+
'A scheduled user membership change is pending for this access group.',
3060+
properties: {
3061+
acs_user_id: {
3062+
description:
3063+
'ID of the user involved in the scheduled change.',
3064+
format: 'uuid',
3065+
type: 'string',
3066+
},
3067+
created_at: {
3068+
description:
3069+
'Date and time at which the mutation was created.',
3070+
format: 'date-time',
3071+
type: 'string',
3072+
},
3073+
message: {
3074+
description: 'Detailed description of the mutation.',
3075+
type: 'string',
3076+
},
3077+
mutation_code: {
3078+
description:
3079+
'Mutation code to indicate that a scheduled user membership change is pending for this access group.',
3080+
enum: ['deferring_user_membership_update'],
3081+
type: 'string',
3082+
},
3083+
variant: {
3084+
description:
3085+
'Whether the user is scheduled to be added to or removed from this access group.',
3086+
enum: ['adding', 'removing'],
3087+
type: 'string',
3088+
},
3089+
},
3090+
required: [
3091+
'created_at',
3092+
'message',
3093+
'mutation_code',
3094+
'acs_user_id',
3095+
'variant',
3096+
],
3097+
type: 'object',
3098+
},
30573099
],
30583100
},
30593101
type: 'array',
@@ -5060,6 +5102,48 @@ export default {
50605102
],
50615103
type: 'object',
50625104
},
5105+
{
5106+
description:
5107+
'A scheduled access group membership change is pending for this user.',
5108+
properties: {
5109+
acs_access_group_id: {
5110+
description:
5111+
'ID of the access group involved in the scheduled change.',
5112+
format: 'uuid',
5113+
type: 'string',
5114+
},
5115+
created_at: {
5116+
description:
5117+
'Date and time at which the mutation was created.',
5118+
format: 'date-time',
5119+
type: 'string',
5120+
},
5121+
message: {
5122+
description: 'Detailed description of the mutation.',
5123+
type: 'string',
5124+
},
5125+
mutation_code: {
5126+
description:
5127+
'Mutation code to indicate that a scheduled access group membership change is pending for this user.',
5128+
enum: ['deferring_group_membership_update'],
5129+
type: 'string',
5130+
},
5131+
variant: {
5132+
description:
5133+
'Whether the user is scheduled to be added to or removed from the access group.',
5134+
enum: ['adding', 'removing'],
5135+
type: 'string',
5136+
},
5137+
},
5138+
required: [
5139+
'created_at',
5140+
'message',
5141+
'mutation_code',
5142+
'acs_access_group_id',
5143+
'variant',
5144+
],
5145+
type: 'object',
5146+
},
50635147
],
50645148
},
50655149
type: 'array',
@@ -27151,6 +27235,48 @@ export default {
2715127235
],
2715227236
type: 'object',
2715327237
},
27238+
{
27239+
description:
27240+
'A scheduled user membership change is pending for this access group.',
27241+
properties: {
27242+
acs_user_id: {
27243+
description:
27244+
'ID of the user involved in the scheduled change.',
27245+
format: 'uuid',
27246+
type: 'string',
27247+
},
27248+
created_at: {
27249+
description:
27250+
'Date and time at which the mutation was created.',
27251+
format: 'date-time',
27252+
type: 'string',
27253+
},
27254+
message: {
27255+
description: 'Detailed description of the mutation.',
27256+
type: 'string',
27257+
},
27258+
mutation_code: {
27259+
description:
27260+
'Mutation code to indicate that a scheduled user membership change is pending for this access group.',
27261+
enum: ['deferring_user_membership_update'],
27262+
type: 'string',
27263+
},
27264+
variant: {
27265+
description:
27266+
'Whether the user is scheduled to be added to or removed from this access group.',
27267+
enum: ['adding', 'removing'],
27268+
type: 'string',
27269+
},
27270+
},
27271+
required: [
27272+
'created_at',
27273+
'message',
27274+
'mutation_code',
27275+
'acs_user_id',
27276+
'variant',
27277+
],
27278+
type: 'object',
27279+
},
2715427280
],
2715527281
},
2715627282
type: 'array',
@@ -28248,6 +28374,48 @@ export default {
2824828374
],
2824928375
type: 'object',
2825028376
},
28377+
{
28378+
description:
28379+
'A scheduled access group membership change is pending for this user.',
28380+
properties: {
28381+
acs_access_group_id: {
28382+
description:
28383+
'ID of the access group involved in the scheduled change.',
28384+
format: 'uuid',
28385+
type: 'string',
28386+
},
28387+
created_at: {
28388+
description:
28389+
'Date and time at which the mutation was created.',
28390+
format: 'date-time',
28391+
type: 'string',
28392+
},
28393+
message: {
28394+
description: 'Detailed description of the mutation.',
28395+
type: 'string',
28396+
},
28397+
mutation_code: {
28398+
description:
28399+
'Mutation code to indicate that a scheduled access group membership change is pending for this user.',
28400+
enum: ['deferring_group_membership_update'],
28401+
type: 'string',
28402+
},
28403+
variant: {
28404+
description:
28405+
'Whether the user is scheduled to be added to or removed from the access group.',
28406+
enum: ['adding', 'removing'],
28407+
type: 'string',
28408+
},
28409+
},
28410+
required: [
28411+
'created_at',
28412+
'message',
28413+
'mutation_code',
28414+
'acs_access_group_id',
28415+
'variant',
28416+
],
28417+
type: 'object',
28418+
},
2825128419
],
2825228420
},
2825328421
type: 'array',

0 commit comments

Comments
 (0)