Skip to content

Commit 820468e

Browse files
committed
Add v1 meeting RSVP mock data for board members
Added a new playbook step to create meeting RSVP (invite response) mock data for board member registrants. This publishes RSVP events to the lfx.index.v1_meeting_rsvp NATS subject for indexing in OpenSearch. The RSVP data includes: - Unique ID and registrant association - Meeting and occurrence references - User information (name, email, username, org, job title) - Response status (accepted/declined/maybe) with random selection - Scope set to "all" for applying to all meeting occurrences - Response date, SES message ID, and email details - Creation and modification timestamps All fields match the inviteResponseInput Go struct schema to ensure compatibility with the indexer service. Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Andres Tobon <[email protected]>
1 parent 3ebc66d commit 820468e

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

playbooks/v1_meetings/umbrella_board_meeting/board_meeting.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,50 @@ buf_board_meeting_committee_participants_access_update:
217217
{% endif %}
218218
{% endfor %}
219219

220+
buf_board_meeting_committee_participants_rsvps_create:
221+
type: nats-publish
222+
params:
223+
# Create the meeting registrant's RSVP in OpenSearch (via indexer).
224+
subject: lfx.index.v1_meeting_rsvp
225+
steps:
226+
# Count matches the count in buf_board_members.
227+
{% for i in range(board_member_count) %}
228+
{% set rsvp_response_date = fake.date_time_between(start_date='-30d', end_date='now') %}
229+
- json:
230+
action: created
231+
headers:
232+
authorization: !jwt bearer=true,aud=lfx-v2-project-service,principal={{ fake.user_name() }},email={{ fake.email() }}
233+
x-on-behalf-of: !jwt bearer=true,aud=lfx-v2-project-service,principal=clients@m2m_helper
234+
data:
235+
id: "{{ fake.uuid4() }}"
236+
meeting_and_occurrence_id: ""
237+
meeting_id: "{{ meeting_id }}"
238+
occurrence_id: ""
239+
registrant_id: !ref "buf_board_meeting_committee_participants_create.steps[{{ i }}].json.data.id"
240+
email: !ref "buf_board_members.steps[{{ i }}].json.email"
241+
name: !sub "${buf_board_members.steps[{{ i }}].json.first_name} ${buf_board_members.steps[{{ i }}].json.last_name}"
242+
user_id: ""
243+
{% if member_has_username[i] %}
244+
username: {{ fake.user_name() }}
245+
{% else %}
246+
username: ""
247+
{% endif %}
248+
org: !ref "buf_board_members.steps[{{ i }}].json.organization.name"
249+
{% if fake.pybool() %}
250+
job_title: ""
251+
{% else %}
252+
job_title: "{{ fake.job() }}"
253+
{% endif %}
254+
response: "{{ fake.random_element(elements=('accepted', 'declined', 'maybe')) }}"
255+
scope: "all" # There are three scopes: single, all, this_and_following. However, "all" is the easiest to support.
256+
response_date: "{{ rsvp_response_date.isoformat() }}Z"
257+
ses_message_id: "{{ fake.uuid4().replace('-', '')[0:40] }}"
258+
email_subject: "Re: Invitation to Monthly Board Meeting"
259+
email_text: "{{ fake.sentence() }}"
260+
created_at: "{{ rsvp_response_date.isoformat() }}Z"
261+
modified_at: "{{ rsvp_response_date.isoformat() }}Z"
262+
{% endfor %}
263+
220264
#
221265
# Loop over each past meeting.
222266
#

0 commit comments

Comments
 (0)