Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Update field names
Browse files Browse the repository at this point in the history
  • Loading branch information
domdomegg committed Jul 21, 2023
1 parent c7a5907 commit d020537
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Airtable: https://support.airtable.com/docs/creating-and-using-api-keys-and-access-tokens
AIRTABLE_PERSONAL_ACCESS_TOKEN=
AIRTABLE_BASE_ID=appnNmNoNMB6crg6I
AIRTABLE_INSTALLATIONS_TABLE_ID=tbllthJ2YSPDsKWCt
AIRTABLE_MEETINGS_TABLE_ID=tblzo9A4hjnxs8ezd
AIRTABLE_MEETING_FEEDBACKS_TABLE_ID=tblS9TLx7ybXozveU
AIRTABLE_GLOBAL_SETTINGS_TABLE_ID=tbldUWzEoJoTG4d45
AIRTABLE_INSTALLATION_TABLE_ID=tbllthJ2YSPDsKWCt
AIRTABLE_MEETING_TABLE_ID=tblzo9A4hjnxs8ezd
AIRTABLE_MEETING_FEEDBACK_TABLE_ID=tblS9TLx7ybXozveU
AIRTABLE_GLOBAL_SETTING_TABLE_ID=tbldUWzEoJoTG4d45

# Slack
# local: https://api.slack.com/apps/A04PEDW8K3R/
Expand Down
8 changes: 4 additions & 4 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Airtable: https://support.airtable.com/docs/creating-and-using-api-keys-and-access-tokens
AIRTABLE_PERSONAL_ACCESS_TOKEN=FAKE_TOKEN
AIRTABLE_BASE_ID=appnNmNoNMB6crg6I
AIRTABLE_INSTALLATIONS_TABLE_ID=tbllthJ2YSPDsKWCt
AIRTABLE_MEETINGS_TABLE_ID=tblzo9A4hjnxs8ezd
AIRTABLE_MEETING_FEEDBACKS_TABLE_ID=tblS9TLx7ybXozveU
AIRTABLE_GLOBAL_SETTINGS_TABLE_ID=tbldUWzEoJoTG4d45
AIRTABLE_INSTALLATION_TABLE_ID=tbllthJ2YSPDsKWCt
AIRTABLE_MEETING_TABLE_ID=tblzo9A4hjnxs8ezd
AIRTABLE_MEETING_FEEDBACK_TABLE_ID=tblS9TLx7ybXozveU
AIRTABLE_GLOBAL_SETTING_TABLE_ID=tbldUWzEoJoTG4d45

# Slack
# local: https://api.slack.com/apps/A04PEDW8K3R/
Expand Down
40 changes: 36 additions & 4 deletions src/lib/api/db/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface Installation extends Item {
export const installationsTable: Table<Installation> = {
name: 'installation',
baseId: env.AIRTABLE_BASE_ID,
tableId: env.AIRTABLE_INSTALLATIONS_TABLE_ID,
tableId: env.AIRTABLE_INSTALLATION_TABLE_ID,
schema: {
name: 'string',
slackTeamId: 'string',
Expand All @@ -53,6 +53,18 @@ export const installationsTable: Table<Installation> = {
participantsDimensionFieldNamesJson: 'string',
introMessage: 'string',
},
mappings: {
name: 'Name',
slackTeamId: 'Slack team ID',
slackInstallationJson: 'Slack installation JSON',
participantsBaseId: 'Participants base ID',
participantsTableId: 'Participants table ID',
participantsViewId: 'Participants view ID',
participantsSlackEmailFieldName: 'Participants Slack email field name',
participantsBiographyFieldName: 'Participants biography field name',
participantsDimensionFieldNamesJson: 'Participants dimension field names JSON',
introMessage: 'Intro message',
}
};

export interface Meeting extends Item {
Expand All @@ -68,7 +80,7 @@ export interface Meeting extends Item {
export const meetingsTable: Table<Meeting> = {
name: 'meeting',
baseId: env.AIRTABLE_BASE_ID,
tableId: env.AIRTABLE_MEETINGS_TABLE_ID,
tableId: env.AIRTABLE_MEETING_TABLE_ID,
schema: {
slackMpim: 'string',
installationId: 'string',
Expand All @@ -78,6 +90,15 @@ export const meetingsTable: Table<Meeting> = {
state: 'string',
participantLinks: 'string',
},
mappings: {
slackMpim: 'Slack MPIM',
installationId: 'Installation ID',
participantIdsJson: 'Participant IDs JSON',
createdAt: 'Created at',
lastModifiedAt: 'Last modified at',
state: 'State',
participantLinks: 'Participant links',
}
};

export interface MeetingFeedback extends Item {
Expand All @@ -91,14 +112,21 @@ export interface MeetingFeedback extends Item {
export const meetingFeedbacksTable: Table<MeetingFeedback> = {
name: 'meetingFeedback',
baseId: env.AIRTABLE_BASE_ID,
tableId: env.AIRTABLE_MEETING_FEEDBACKS_TABLE_ID,
tableId: env.AIRTABLE_MEETING_FEEDBACK_TABLE_ID,
schema: {
participantId: 'string',
meetingId: 'string',
value: 'number',
createdAt: 'number',
participantLinks: 'string',
},
mappings: {
participantId: 'Participant ID',
meetingId: 'Meeting ID',
value: 'Value',
createdAt: 'Created at',
participantLinks: 'Participant links',
}
};

export interface GlobalSetting extends Item {
Expand All @@ -109,9 +137,13 @@ export interface GlobalSetting extends Item {
export const globalSettingsTable: Table<GlobalSetting> = {
name: 'globalSetting',
baseId: env.AIRTABLE_BASE_ID,
tableId: env.AIRTABLE_GLOBAL_SETTINGS_TABLE_ID,
tableId: env.AIRTABLE_GLOBAL_SETTING_TABLE_ID,
schema: {
name: 'string',
value: 'string',
},
mappings: {
name: 'Name',
value: 'Value',
}
};
8 changes: 4 additions & 4 deletions src/lib/api/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { validateEnv } from '../validateEnv';

const envVars = [
'AIRTABLE_BASE_ID',
'AIRTABLE_INSTALLATIONS_TABLE_ID',
'AIRTABLE_MEETINGS_TABLE_ID',
'AIRTABLE_MEETING_FEEDBACKS_TABLE_ID',
'AIRTABLE_GLOBAL_SETTINGS_TABLE_ID',
'AIRTABLE_INSTALLATION_TABLE_ID',
'AIRTABLE_MEETING_TABLE_ID',
'AIRTABLE_MEETING_FEEDBACK_TABLE_ID',
'AIRTABLE_GLOBAL_SETTING_TABLE_ID',
'AIRTABLE_PERSONAL_ACCESS_TOKEN',

'SLACK_CLIENT_ID',
Expand Down

0 comments on commit d020537

Please sign in to comment.