Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
891 changes: 889 additions & 2 deletions apps/docs/content/docs/en/tools/hubspot.mdx

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions apps/docs/content/docs/en/tools/rippling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ List all employees in Rippling with optional pagination
| ↳ `endDate` | string | Employment end date |
| ↳ `manager` | string | Manager ID or name |
| ↳ `phone` | string | Phone number |
| `totalCount` | number | Total number of employees returned |
| `totalCount` | number | Number of employees returned on this page |

### `rippling_get_employee`

Expand Down Expand Up @@ -131,7 +131,7 @@ List all employees in Rippling including terminated employees with optional pagi
| ↳ `endDate` | string | Employment end date |
| ↳ `manager` | string | Manager ID or name |
| ↳ `phone` | string | Phone number |
| `totalCount` | number | Total number of employees returned |
| `totalCount` | number | Number of employees returned on this page |

### `rippling_list_departments`

Expand All @@ -153,7 +153,7 @@ List all departments in the Rippling organization
| ↳ `id` | string | Department ID |
| ↳ `name` | string | Department name |
| ↳ `parent` | string | Parent department ID |
| `totalCount` | number | Total number of departments returned |
| `totalCount` | number | Number of departments returned on this page |

### `rippling_list_teams`

Expand All @@ -175,7 +175,7 @@ List all teams in Rippling
| ↳ `id` | string | Team ID |
| ↳ `name` | string | Team name |
| ↳ `parent` | string | Parent team ID |
| `totalCount` | number | Total number of teams returned |
| `totalCount` | number | Number of teams returned on this page |

### `rippling_list_levels`

Expand All @@ -197,7 +197,7 @@ List all position levels in Rippling
| ↳ `id` | string | Level ID |
| ↳ `name` | string | Level name |
| ↳ `parent` | string | Parent level ID |
| `totalCount` | number | Total number of levels returned |
| `totalCount` | number | Number of levels returned on this page |

### `rippling_list_work_locations`

Expand All @@ -223,7 +223,7 @@ List all work locations in Rippling
| ↳ `state` | string | State or province |
| ↳ `zip` | string | ZIP or postal code |
| ↳ `country` | string | Country |
| `totalCount` | number | Total number of work locations returned |
| `totalCount` | number | Number of work locations returned on this page |

### `rippling_get_company`

Expand Down Expand Up @@ -270,7 +270,7 @@ Get activity events for the current company in Rippling
| ↳ `description` | string | Event description |
| ↳ `createdAt` | string | Event creation timestamp |
| ↳ `actor` | json | Actor who triggered the event \(id, name\) |
| `totalCount` | number | Total number of activity events returned |
| `totalCount` | number | Number of activity events returned on this page |
| `nextCursor` | string | Cursor for fetching the next page of results |

### `rippling_list_custom_fields`
Expand All @@ -294,7 +294,7 @@ List all custom fields defined in Rippling
| ↳ `type` | string | Field type |
| ↳ `title` | string | Field title |
| ↳ `mandatory` | boolean | Whether the field is mandatory |
| `totalCount` | number | Total number of custom fields returned |
| `totalCount` | number | Number of custom fields returned on this page |

### `rippling_get_current_user`

Expand Down Expand Up @@ -385,7 +385,7 @@ List leave balances for all employees in Rippling
| ↳ `balances` | array | Leave balance entries |
| ↳ `leaveType` | string | Type of leave |
| ↳ `minutesRemaining` | number | Minutes of leave remaining |
| `totalCount` | number | Total number of leave balances returned |
| `totalCount` | number | Number of leave balances returned on this page |

### `rippling_get_leave_balance`

Expand Down
84 changes: 84 additions & 0 deletions apps/sim/app/(home)/components/demo-request/consts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import { z } from 'zod'
import { NO_EMAIL_HEADER_CONTROL_CHARS_REGEX } from '@/lib/messaging/email/utils'
import { quickValidateEmail } from '@/lib/messaging/email/validation'

export const DEMO_REQUEST_REGION_VALUES = [
'north_america',
'europe',
'asia_pacific',
'latin_america',
'middle_east_africa',
'other',
] as const

export const DEMO_REQUEST_USER_COUNT_VALUES = [
'1_10',
'11_50',
'51_200',
'201_500',
'501_1000',
'1000_plus',
] as const

export const DEMO_REQUEST_REGION_OPTIONS = [
{ value: 'north_america', label: 'North America' },
{ value: 'europe', label: 'Europe' },
{ value: 'asia_pacific', label: 'Asia Pacific' },
{ value: 'latin_america', label: 'Latin America' },
{ value: 'middle_east_africa', label: 'Middle East & Africa' },
{ value: 'other', label: 'Other' },
] as const

export const DEMO_REQUEST_USER_COUNT_OPTIONS = [
{ value: '1_10', label: '1-10' },
{ value: '11_50', label: '11-50' },
{ value: '51_200', label: '51-200' },
{ value: '201_500', label: '201-500' },
{ value: '501_1000', label: '501-1,000' },
{ value: '1000_plus', label: '1,000+' },
] as const

export const demoRequestSchema = z.object({
firstName: z
.string()
.trim()
.min(1, 'First name is required')
.max(100)
.regex(NO_EMAIL_HEADER_CONTROL_CHARS_REGEX, 'Invalid characters'),
lastName: z
.string()
.trim()
.min(1, 'Last name is required')
.max(100)
.regex(NO_EMAIL_HEADER_CONTROL_CHARS_REGEX, 'Invalid characters'),
companyEmail: z
.string()
.trim()
.min(1, 'Company email is required')
.max(320)
.transform((value) => value.toLowerCase())
.refine((value) => quickValidateEmail(value).isValid, 'Enter a valid work email'),
phoneNumber: z
.string()
.trim()
.max(50, 'Phone number must be 50 characters or less')
.optional()
.transform((value) => (value && value.length > 0 ? value : undefined)),
region: z.enum(DEMO_REQUEST_REGION_VALUES, {
errorMap: () => ({ message: 'Please select a region' }),
}),
userCount: z.enum(DEMO_REQUEST_USER_COUNT_VALUES, {
errorMap: () => ({ message: 'Please select the number of users' }),
}),
details: z.string().trim().min(1, 'Details are required').max(2000),
})

export type DemoRequestPayload = z.infer<typeof demoRequestSchema>

export function getDemoRequestRegionLabel(value: DemoRequestPayload['region']): string {
return DEMO_REQUEST_REGION_OPTIONS.find((option) => option.value === value)?.label ?? value
}

export function getDemoRequestUserCountLabel(value: DemoRequestPayload['userCount']): string {
return DEMO_REQUEST_USER_COUNT_OPTIONS.find((option) => option.value === value)?.label ?? value
}
Loading
Loading