digital-tools 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -0
- package/CHANGELOG.md +9 -0
- package/README.md +1144 -0
- package/dist/define.d.ts +109 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +268 -0
- package/dist/define.js.map +1 -0
- package/dist/entities/advertising.d.ts +79 -0
- package/dist/entities/advertising.d.ts.map +1 -0
- package/dist/entities/advertising.js +1000 -0
- package/dist/entities/advertising.js.map +1 -0
- package/dist/entities/ai.d.ts +69 -0
- package/dist/entities/ai.d.ts.map +1 -0
- package/dist/entities/ai.js +757 -0
- package/dist/entities/ai.js.map +1 -0
- package/dist/entities/analytics.d.ts +83 -0
- package/dist/entities/analytics.d.ts.map +1 -0
- package/dist/entities/analytics.js +1589 -0
- package/dist/entities/analytics.js.map +1 -0
- package/dist/entities/automation.d.ts +61 -0
- package/dist/entities/automation.d.ts.map +1 -0
- package/dist/entities/automation.js +602 -0
- package/dist/entities/automation.js.map +1 -0
- package/dist/entities/communication.d.ts +96 -0
- package/dist/entities/communication.d.ts.map +1 -0
- package/dist/entities/communication.js +1151 -0
- package/dist/entities/communication.js.map +1 -0
- package/dist/entities/crm.d.ts +91 -0
- package/dist/entities/crm.d.ts.map +1 -0
- package/dist/entities/crm.js +1387 -0
- package/dist/entities/crm.js.map +1 -0
- package/dist/entities/design.d.ts +61 -0
- package/dist/entities/design.d.ts.map +1 -0
- package/dist/entities/design.js +547 -0
- package/dist/entities/design.js.map +1 -0
- package/dist/entities/development.d.ts +145 -0
- package/dist/entities/development.d.ts.map +1 -0
- package/dist/entities/development.js +2213 -0
- package/dist/entities/development.js.map +1 -0
- package/dist/entities/document.d.ts +54 -0
- package/dist/entities/document.d.ts.map +1 -0
- package/dist/entities/document.js +875 -0
- package/dist/entities/document.js.map +1 -0
- package/dist/entities/ecommerce.d.ts +93 -0
- package/dist/entities/ecommerce.d.ts.map +1 -0
- package/dist/entities/ecommerce.js +1430 -0
- package/dist/entities/ecommerce.js.map +1 -0
- package/dist/entities/experiment.d.ts +89 -0
- package/dist/entities/experiment.d.ts.map +1 -0
- package/dist/entities/experiment.js +1040 -0
- package/dist/entities/experiment.js.map +1 -0
- package/dist/entities/finance.d.ts +272 -0
- package/dist/entities/finance.d.ts.map +1 -0
- package/dist/entities/finance.js +3479 -0
- package/dist/entities/finance.js.map +1 -0
- package/dist/entities/forms.d.ts +91 -0
- package/dist/entities/forms.d.ts.map +1 -0
- package/dist/entities/forms.js +1893 -0
- package/dist/entities/forms.js.map +1 -0
- package/dist/entities/hr.d.ts +62 -0
- package/dist/entities/hr.d.ts.map +1 -0
- package/dist/entities/hr.js +662 -0
- package/dist/entities/hr.js.map +1 -0
- package/dist/entities/identity.d.ts +90 -0
- package/dist/entities/identity.d.ts.map +1 -0
- package/dist/entities/identity.js +998 -0
- package/dist/entities/identity.js.map +1 -0
- package/dist/entities/index.d.ts +410 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +283 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/infrastructure.d.ts +98 -0
- package/dist/entities/infrastructure.d.ts.map +1 -0
- package/dist/entities/infrastructure.js +1154 -0
- package/dist/entities/infrastructure.js.map +1 -0
- package/dist/entities/knowledge.d.ts +98 -0
- package/dist/entities/knowledge.d.ts.map +1 -0
- package/dist/entities/knowledge.js +1439 -0
- package/dist/entities/knowledge.js.map +1 -0
- package/dist/entities/marketing.d.ts +82 -0
- package/dist/entities/marketing.d.ts.map +1 -0
- package/dist/entities/marketing.js +1611 -0
- package/dist/entities/marketing.js.map +1 -0
- package/dist/entities/media.d.ts +83 -0
- package/dist/entities/media.d.ts.map +1 -0
- package/dist/entities/media.js +1635 -0
- package/dist/entities/media.js.map +1 -0
- package/dist/entities/notification.d.ts +76 -0
- package/dist/entities/notification.d.ts.map +1 -0
- package/dist/entities/notification.js +1200 -0
- package/dist/entities/notification.js.map +1 -0
- package/dist/entities/presentation.d.ts +61 -0
- package/dist/entities/presentation.d.ts.map +1 -0
- package/dist/entities/presentation.js +1275 -0
- package/dist/entities/presentation.js.map +1 -0
- package/dist/entities/productivity.d.ts +92 -0
- package/dist/entities/productivity.d.ts.map +1 -0
- package/dist/entities/productivity.js +1318 -0
- package/dist/entities/productivity.js.map +1 -0
- package/dist/entities/project-management.d.ts +89 -0
- package/dist/entities/project-management.d.ts.map +1 -0
- package/dist/entities/project-management.js +1137 -0
- package/dist/entities/project-management.js.map +1 -0
- package/dist/entities/recruiting.d.ts +54 -0
- package/dist/entities/recruiting.d.ts.map +1 -0
- package/dist/entities/recruiting.js +737 -0
- package/dist/entities/recruiting.js.map +1 -0
- package/dist/entities/shipping.d.ts +52 -0
- package/dist/entities/shipping.d.ts.map +1 -0
- package/dist/entities/shipping.js +510 -0
- package/dist/entities/shipping.js.map +1 -0
- package/dist/entities/signature.d.ts +83 -0
- package/dist/entities/signature.d.ts.map +1 -0
- package/dist/entities/signature.js +1103 -0
- package/dist/entities/signature.js.map +1 -0
- package/dist/entities/site.d.ts +33 -0
- package/dist/entities/site.d.ts.map +1 -0
- package/dist/entities/site.js +223 -0
- package/dist/entities/site.js.map +1 -0
- package/dist/entities/spreadsheet.d.ts +68 -0
- package/dist/entities/spreadsheet.d.ts.map +1 -0
- package/dist/entities/spreadsheet.js +1342 -0
- package/dist/entities/spreadsheet.js.map +1 -0
- package/dist/entities/storage.d.ts +74 -0
- package/dist/entities/storage.d.ts.map +1 -0
- package/dist/entities/storage.js +1199 -0
- package/dist/entities/storage.js.map +1 -0
- package/dist/entities/support.d.ts +83 -0
- package/dist/entities/support.d.ts.map +1 -0
- package/dist/entities/support.js +1167 -0
- package/dist/entities/support.js.map +1 -0
- package/dist/entities/video-conferencing.d.ts +129 -0
- package/dist/entities/video-conferencing.d.ts.map +1 -0
- package/dist/entities/video-conferencing.js +1751 -0
- package/dist/entities/video-conferencing.js.map +1 -0
- package/dist/entities/video.d.ts +76 -0
- package/dist/entities/video.d.ts.map +1 -0
- package/dist/entities/video.js +951 -0
- package/dist/entities/video.js.map +1 -0
- package/dist/entities.d.ts +147 -0
- package/dist/entities.d.ts.map +1 -0
- package/dist/entities.js +1664 -0
- package/dist/entities.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/analytics/index.d.ts +19 -0
- package/dist/providers/analytics/index.d.ts.map +1 -0
- package/dist/providers/analytics/index.js +18 -0
- package/dist/providers/analytics/index.js.map +1 -0
- package/dist/providers/analytics/mixpanel.d.ts +25 -0
- package/dist/providers/analytics/mixpanel.d.ts.map +1 -0
- package/dist/providers/analytics/mixpanel.js +256 -0
- package/dist/providers/analytics/mixpanel.js.map +1 -0
- package/dist/providers/calendar/cal-com.d.ts +26 -0
- package/dist/providers/calendar/cal-com.d.ts.map +1 -0
- package/dist/providers/calendar/cal-com.js +304 -0
- package/dist/providers/calendar/cal-com.js.map +1 -0
- package/dist/providers/calendar/google-calendar.d.ts +25 -0
- package/dist/providers/calendar/google-calendar.d.ts.map +1 -0
- package/dist/providers/calendar/google-calendar.js +336 -0
- package/dist/providers/calendar/google-calendar.js.map +1 -0
- package/dist/providers/calendar/index.d.ts +20 -0
- package/dist/providers/calendar/index.d.ts.map +1 -0
- package/dist/providers/calendar/index.js +21 -0
- package/dist/providers/calendar/index.js.map +1 -0
- package/dist/providers/crm/hubspot.d.ts +25 -0
- package/dist/providers/crm/hubspot.d.ts.map +1 -0
- package/dist/providers/crm/hubspot.js +567 -0
- package/dist/providers/crm/hubspot.js.map +1 -0
- package/dist/providers/crm/index.d.ts +19 -0
- package/dist/providers/crm/index.d.ts.map +1 -0
- package/dist/providers/crm/index.js +18 -0
- package/dist/providers/crm/index.js.map +1 -0
- package/dist/providers/development/github.d.ts +25 -0
- package/dist/providers/development/github.d.ts.map +1 -0
- package/dist/providers/development/github.js +473 -0
- package/dist/providers/development/github.js.map +1 -0
- package/dist/providers/development/index.d.ts +19 -0
- package/dist/providers/development/index.d.ts.map +1 -0
- package/dist/providers/development/index.js +18 -0
- package/dist/providers/development/index.js.map +1 -0
- package/dist/providers/ecommerce/index.d.ts +19 -0
- package/dist/providers/ecommerce/index.d.ts.map +1 -0
- package/dist/providers/ecommerce/index.js +18 -0
- package/dist/providers/ecommerce/index.js.map +1 -0
- package/dist/providers/ecommerce/shopify.d.ts +25 -0
- package/dist/providers/ecommerce/shopify.d.ts.map +1 -0
- package/dist/providers/ecommerce/shopify.js +379 -0
- package/dist/providers/ecommerce/shopify.js.map +1 -0
- package/dist/providers/email/index.d.ts +20 -0
- package/dist/providers/email/index.d.ts.map +1 -0
- package/dist/providers/email/index.js +21 -0
- package/dist/providers/email/index.js.map +1 -0
- package/dist/providers/email/resend.d.ts +25 -0
- package/dist/providers/email/resend.d.ts.map +1 -0
- package/dist/providers/email/resend.js +259 -0
- package/dist/providers/email/resend.js.map +1 -0
- package/dist/providers/email/sendgrid.d.ts +25 -0
- package/dist/providers/email/sendgrid.d.ts.map +1 -0
- package/dist/providers/email/sendgrid.js +162 -0
- package/dist/providers/email/sendgrid.js.map +1 -0
- package/dist/providers/finance/index.d.ts +19 -0
- package/dist/providers/finance/index.d.ts.map +1 -0
- package/dist/providers/finance/index.js +18 -0
- package/dist/providers/finance/index.js.map +1 -0
- package/dist/providers/finance/stripe.d.ts +25 -0
- package/dist/providers/finance/stripe.d.ts.map +1 -0
- package/dist/providers/finance/stripe.js +550 -0
- package/dist/providers/finance/stripe.js.map +1 -0
- package/dist/providers/forms/index.d.ts +19 -0
- package/dist/providers/forms/index.d.ts.map +1 -0
- package/dist/providers/forms/index.js +18 -0
- package/dist/providers/forms/index.js.map +1 -0
- package/dist/providers/forms/typeform.d.ts +25 -0
- package/dist/providers/forms/typeform.d.ts.map +1 -0
- package/dist/providers/forms/typeform.js +501 -0
- package/dist/providers/forms/typeform.js.map +1 -0
- package/dist/providers/index.d.ts +56 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +124 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/knowledge/index.d.ts +19 -0
- package/dist/providers/knowledge/index.d.ts.map +1 -0
- package/dist/providers/knowledge/index.js +18 -0
- package/dist/providers/knowledge/index.js.map +1 -0
- package/dist/providers/knowledge/notion.d.ts +25 -0
- package/dist/providers/knowledge/notion.d.ts.map +1 -0
- package/dist/providers/knowledge/notion.js +390 -0
- package/dist/providers/knowledge/notion.js.map +1 -0
- package/dist/providers/marketing/index.d.ts +19 -0
- package/dist/providers/marketing/index.d.ts.map +1 -0
- package/dist/providers/marketing/index.js +18 -0
- package/dist/providers/marketing/index.js.map +1 -0
- package/dist/providers/marketing/mailchimp.d.ts +25 -0
- package/dist/providers/marketing/mailchimp.d.ts.map +1 -0
- package/dist/providers/marketing/mailchimp.js +444 -0
- package/dist/providers/marketing/mailchimp.js.map +1 -0
- package/dist/providers/media/cloudinary.d.ts +25 -0
- package/dist/providers/media/cloudinary.d.ts.map +1 -0
- package/dist/providers/media/cloudinary.js +319 -0
- package/dist/providers/media/cloudinary.js.map +1 -0
- package/dist/providers/media/index.d.ts +19 -0
- package/dist/providers/media/index.d.ts.map +1 -0
- package/dist/providers/media/index.js +18 -0
- package/dist/providers/media/index.js.map +1 -0
- package/dist/providers/messaging/index.d.ts +24 -0
- package/dist/providers/messaging/index.d.ts.map +1 -0
- package/dist/providers/messaging/index.js +21 -0
- package/dist/providers/messaging/index.js.map +1 -0
- package/dist/providers/messaging/slack.d.ts +25 -0
- package/dist/providers/messaging/slack.d.ts.map +1 -0
- package/dist/providers/messaging/slack.js +394 -0
- package/dist/providers/messaging/slack.js.map +1 -0
- package/dist/providers/messaging/twilio-sms.d.ts +25 -0
- package/dist/providers/messaging/twilio-sms.d.ts.map +1 -0
- package/dist/providers/messaging/twilio-sms.js +250 -0
- package/dist/providers/messaging/twilio-sms.js.map +1 -0
- package/dist/providers/project-management/index.d.ts +19 -0
- package/dist/providers/project-management/index.d.ts.map +1 -0
- package/dist/providers/project-management/index.js +18 -0
- package/dist/providers/project-management/index.js.map +1 -0
- package/dist/providers/project-management/linear.d.ts +25 -0
- package/dist/providers/project-management/linear.d.ts.map +1 -0
- package/dist/providers/project-management/linear.js +576 -0
- package/dist/providers/project-management/linear.js.map +1 -0
- package/dist/providers/registry.d.ts +41 -0
- package/dist/providers/registry.d.ts.map +1 -0
- package/dist/providers/registry.js +87 -0
- package/dist/providers/registry.js.map +1 -0
- package/dist/providers/spreadsheet/google-sheets.d.ts +25 -0
- package/dist/providers/spreadsheet/google-sheets.d.ts.map +1 -0
- package/dist/providers/spreadsheet/google-sheets.js +376 -0
- package/dist/providers/spreadsheet/google-sheets.js.map +1 -0
- package/dist/providers/spreadsheet/index.d.ts +20 -0
- package/dist/providers/spreadsheet/index.d.ts.map +1 -0
- package/dist/providers/spreadsheet/index.js +21 -0
- package/dist/providers/spreadsheet/index.js.map +1 -0
- package/dist/providers/spreadsheet/xlsx.d.ts +26 -0
- package/dist/providers/spreadsheet/xlsx.d.ts.map +1 -0
- package/dist/providers/spreadsheet/xlsx.js +424 -0
- package/dist/providers/spreadsheet/xlsx.js.map +1 -0
- package/dist/providers/storage/index.d.ts +30 -0
- package/dist/providers/storage/index.d.ts.map +1 -0
- package/dist/providers/storage/index.js +25 -0
- package/dist/providers/storage/index.js.map +1 -0
- package/dist/providers/storage/s3.d.ts +25 -0
- package/dist/providers/storage/s3.d.ts.map +1 -0
- package/dist/providers/storage/s3.js +420 -0
- package/dist/providers/storage/s3.js.map +1 -0
- package/dist/providers/support/index.d.ts +19 -0
- package/dist/providers/support/index.d.ts.map +1 -0
- package/dist/providers/support/index.js +18 -0
- package/dist/providers/support/index.js.map +1 -0
- package/dist/providers/support/zendesk.d.ts +25 -0
- package/dist/providers/support/zendesk.d.ts.map +1 -0
- package/dist/providers/support/zendesk.js +374 -0
- package/dist/providers/support/zendesk.js.map +1 -0
- package/dist/providers/tasks/index.d.ts +19 -0
- package/dist/providers/tasks/index.d.ts.map +1 -0
- package/dist/providers/tasks/index.js +18 -0
- package/dist/providers/tasks/index.js.map +1 -0
- package/dist/providers/tasks/todoist.d.ts +25 -0
- package/dist/providers/tasks/todoist.d.ts.map +1 -0
- package/dist/providers/tasks/todoist.js +287 -0
- package/dist/providers/tasks/todoist.js.map +1 -0
- package/dist/providers/types.d.ts +1753 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +10 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/video-conferencing/google-meet.d.ts +26 -0
- package/dist/providers/video-conferencing/google-meet.d.ts.map +1 -0
- package/dist/providers/video-conferencing/google-meet.js +287 -0
- package/dist/providers/video-conferencing/google-meet.js.map +1 -0
- package/dist/providers/video-conferencing/index.d.ts +22 -0
- package/dist/providers/video-conferencing/index.d.ts.map +1 -0
- package/dist/providers/video-conferencing/index.js +32 -0
- package/dist/providers/video-conferencing/index.js.map +1 -0
- package/dist/providers/video-conferencing/jitsi.d.ts +26 -0
- package/dist/providers/video-conferencing/jitsi.d.ts.map +1 -0
- package/dist/providers/video-conferencing/jitsi.js +255 -0
- package/dist/providers/video-conferencing/jitsi.js.map +1 -0
- package/dist/providers/video-conferencing/teams.d.ts +26 -0
- package/dist/providers/video-conferencing/teams.d.ts.map +1 -0
- package/dist/providers/video-conferencing/teams.js +271 -0
- package/dist/providers/video-conferencing/teams.js.map +1 -0
- package/dist/providers/video-conferencing/zoom.d.ts +25 -0
- package/dist/providers/video-conferencing/zoom.d.ts.map +1 -0
- package/dist/providers/video-conferencing/zoom.js +333 -0
- package/dist/providers/video-conferencing/zoom.js.map +1 -0
- package/dist/providers/voice/vapi.d.ts +27 -0
- package/dist/providers/voice/vapi.d.ts.map +1 -0
- package/dist/providers/voice/vapi.js +440 -0
- package/dist/providers/voice/vapi.js.map +1 -0
- package/dist/registry.d.ts +38 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +129 -0
- package/dist/registry.js.map +1 -0
- package/dist/tools/communication.d.ts +94 -0
- package/dist/tools/communication.d.ts.map +1 -0
- package/dist/tools/communication.js +185 -0
- package/dist/tools/communication.js.map +1 -0
- package/dist/tools/data.d.ts +61 -0
- package/dist/tools/data.d.ts.map +1 -0
- package/dist/tools/data.js +206 -0
- package/dist/tools/data.js.map +1 -0
- package/dist/tools/index.d.ts +12 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +12 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/web.d.ts +45 -0
- package/dist/tools/web.d.ts.map +1 -0
- package/dist/tools/web.js +138 -0
- package/dist/tools/web.js.map +1 -0
- package/dist/types.d.ts +330 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +11 -0
- package/dist/types.js.map +1 -0
- package/package.json +45 -0
- package/src/define.ts +321 -0
- package/src/entities/advertising.ts +1086 -0
- package/src/entities/ai.ts +835 -0
- package/src/entities/analytics.ts +1690 -0
- package/src/entities/automation.ts +669 -0
- package/src/entities/communication.ts +1255 -0
- package/src/entities/crm.ts +1481 -0
- package/src/entities/design.ts +606 -0
- package/src/entities/development.ts +2392 -0
- package/src/entities/document.ts +930 -0
- package/src/entities/ecommerce.ts +1539 -0
- package/src/entities/experiment.ts +1139 -0
- package/src/entities/finance.ts +3907 -0
- package/src/entities/forms.ts +2021 -0
- package/src/entities/hr.ts +725 -0
- package/src/entities/identity.ts +1093 -0
- package/src/entities/index.ts +731 -0
- package/src/entities/infrastructure.ts +1254 -0
- package/src/entities/knowledge.ts +1547 -0
- package/src/entities/marketing.ts +1718 -0
- package/src/entities/media.ts +1747 -0
- package/src/entities/notification.ts +1260 -0
- package/src/entities/presentation.ts +1360 -0
- package/src/entities/productivity.ts +1411 -0
- package/src/entities/project-management.ts +1222 -0
- package/src/entities/recruiting.ts +797 -0
- package/src/entities/shipping.ts +566 -0
- package/src/entities/signature.ts +1204 -0
- package/src/entities/site.ts +244 -0
- package/src/entities/spreadsheet.ts +1434 -0
- package/src/entities/storage.ts +1290 -0
- package/src/entities/support.ts +1267 -0
- package/src/entities/video-conferencing.ts +1874 -0
- package/src/entities/video.ts +1035 -0
- package/src/entities.ts +1795 -0
- package/src/index.ts +176 -0
- package/src/providers/analytics/index.ts +21 -0
- package/src/providers/analytics/mixpanel.ts +311 -0
- package/src/providers/calendar/cal-com.ts +435 -0
- package/src/providers/calendar/google-calendar.ts +412 -0
- package/src/providers/calendar/index.ts +24 -0
- package/src/providers/crm/hubspot.ts +667 -0
- package/src/providers/crm/index.ts +21 -0
- package/src/providers/development/github.ts +608 -0
- package/src/providers/development/index.ts +21 -0
- package/src/providers/ecommerce/index.ts +21 -0
- package/src/providers/ecommerce/shopify.ts +451 -0
- package/src/providers/email/index.ts +24 -0
- package/src/providers/email/resend.ts +301 -0
- package/src/providers/email/sendgrid.ts +196 -0
- package/src/providers/finance/index.ts +21 -0
- package/src/providers/finance/stripe.ts +665 -0
- package/src/providers/forms/index.ts +21 -0
- package/src/providers/forms/typeform.ts +598 -0
- package/src/providers/index.ts +281 -0
- package/src/providers/knowledge/index.ts +21 -0
- package/src/providers/knowledge/notion.ts +497 -0
- package/src/providers/marketing/index.ts +21 -0
- package/src/providers/marketing/mailchimp.ts +656 -0
- package/src/providers/media/cloudinary.ts +373 -0
- package/src/providers/media/index.ts +21 -0
- package/src/providers/messaging/index.ts +24 -0
- package/src/providers/messaging/slack.ts +487 -0
- package/src/providers/messaging/twilio-sms.ts +301 -0
- package/src/providers/project-management/index.ts +21 -0
- package/src/providers/project-management/linear.ts +693 -0
- package/src/providers/registry.ts +119 -0
- package/src/providers/spreadsheet/google-sheets.ts +464 -0
- package/src/providers/spreadsheet/index.ts +24 -0
- package/src/providers/spreadsheet/xlsx.ts +542 -0
- package/src/providers/storage/index.ts +35 -0
- package/src/providers/storage/s3.ts +513 -0
- package/src/providers/support/index.ts +21 -0
- package/src/providers/support/zendesk.ts +417 -0
- package/src/providers/tasks/index.ts +21 -0
- package/src/providers/tasks/todoist.ts +407 -0
- package/src/providers/types.ts +2113 -0
- package/src/providers/video-conferencing/google-meet.ts +412 -0
- package/src/providers/video-conferencing/index.ts +35 -0
- package/src/providers/video-conferencing/jitsi.ts +324 -0
- package/src/providers/video-conferencing/teams.ts +408 -0
- package/src/providers/video-conferencing/zoom.ts +451 -0
- package/src/registry.ts +172 -0
- package/src/tools/communication.ts +256 -0
- package/src/tools/data.ts +236 -0
- package/src/tools/index.ts +12 -0
- package/src/tools/web.ts +161 -0
- package/src/types.ts +539 -0
- package/test/define.test.ts +367 -0
- package/test/registry.test.ts +444 -0
- package/test/tools.test.ts +453 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,1893 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Forms and Survey Entity Types (Nouns)
|
|
3
|
+
*
|
|
4
|
+
* Semantic type definitions for forms, surveys, and quizzes that can be used by
|
|
5
|
+
* both remote human workers AND AI agents. Each entity defines:
|
|
6
|
+
* - Properties: The data fields
|
|
7
|
+
* - Actions: Operations that can be performed (Verbs)
|
|
8
|
+
* - Events: State changes that occur
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Form
|
|
14
|
+
// =============================================================================
|
|
15
|
+
/**
|
|
16
|
+
* Form entity
|
|
17
|
+
*
|
|
18
|
+
* Represents a customizable form for collecting structured data from users.
|
|
19
|
+
* Can be used for applications, registrations, feedback, data collection, etc.
|
|
20
|
+
*/
|
|
21
|
+
export const Form = {
|
|
22
|
+
singular: 'form',
|
|
23
|
+
plural: 'forms',
|
|
24
|
+
description: 'A customizable form for collecting structured data from users',
|
|
25
|
+
properties: {
|
|
26
|
+
// Identity
|
|
27
|
+
title: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'Form title',
|
|
30
|
+
},
|
|
31
|
+
description: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
optional: true,
|
|
34
|
+
description: 'Form description or instructions',
|
|
35
|
+
},
|
|
36
|
+
slug: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
optional: true,
|
|
39
|
+
description: 'URL-friendly identifier',
|
|
40
|
+
},
|
|
41
|
+
// Status
|
|
42
|
+
status: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Form status: draft, published, archived, closed',
|
|
45
|
+
examples: ['draft', 'published', 'archived', 'closed'],
|
|
46
|
+
},
|
|
47
|
+
active: {
|
|
48
|
+
type: 'boolean',
|
|
49
|
+
description: 'Whether the form is actively accepting responses',
|
|
50
|
+
},
|
|
51
|
+
// Configuration
|
|
52
|
+
allowMultipleResponses: {
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
optional: true,
|
|
55
|
+
description: 'Whether users can submit multiple times',
|
|
56
|
+
},
|
|
57
|
+
requireAuthentication: {
|
|
58
|
+
type: 'boolean',
|
|
59
|
+
optional: true,
|
|
60
|
+
description: 'Whether users must be logged in to submit',
|
|
61
|
+
},
|
|
62
|
+
collectEmail: {
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
optional: true,
|
|
65
|
+
description: 'Whether to collect respondent email addresses',
|
|
66
|
+
},
|
|
67
|
+
shuffleFields: {
|
|
68
|
+
type: 'boolean',
|
|
69
|
+
optional: true,
|
|
70
|
+
description: 'Whether to randomize field order',
|
|
71
|
+
},
|
|
72
|
+
// Submission settings
|
|
73
|
+
submitButtonText: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
optional: true,
|
|
76
|
+
description: 'Custom text for submit button',
|
|
77
|
+
},
|
|
78
|
+
confirmationMessage: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
optional: true,
|
|
81
|
+
description: 'Message shown after successful submission',
|
|
82
|
+
},
|
|
83
|
+
redirectUrl: {
|
|
84
|
+
type: 'url',
|
|
85
|
+
optional: true,
|
|
86
|
+
description: 'URL to redirect to after submission',
|
|
87
|
+
},
|
|
88
|
+
// Notifications
|
|
89
|
+
notifyOnSubmission: {
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
optional: true,
|
|
92
|
+
description: 'Whether to send notifications on new submissions',
|
|
93
|
+
},
|
|
94
|
+
notificationEmails: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
array: true,
|
|
97
|
+
optional: true,
|
|
98
|
+
description: 'Email addresses to notify on submissions',
|
|
99
|
+
},
|
|
100
|
+
// Limits
|
|
101
|
+
maxResponses: {
|
|
102
|
+
type: 'number',
|
|
103
|
+
optional: true,
|
|
104
|
+
description: 'Maximum number of responses allowed',
|
|
105
|
+
},
|
|
106
|
+
responseCount: {
|
|
107
|
+
type: 'number',
|
|
108
|
+
optional: true,
|
|
109
|
+
description: 'Current number of responses received',
|
|
110
|
+
},
|
|
111
|
+
closesAt: {
|
|
112
|
+
type: 'datetime',
|
|
113
|
+
optional: true,
|
|
114
|
+
description: 'When the form stops accepting responses',
|
|
115
|
+
},
|
|
116
|
+
// Styling
|
|
117
|
+
theme: {
|
|
118
|
+
type: 'json',
|
|
119
|
+
optional: true,
|
|
120
|
+
description: 'Custom theme and styling configuration',
|
|
121
|
+
},
|
|
122
|
+
logo: {
|
|
123
|
+
type: 'url',
|
|
124
|
+
optional: true,
|
|
125
|
+
description: 'Logo URL to display on the form',
|
|
126
|
+
},
|
|
127
|
+
// Integration
|
|
128
|
+
webhookUrl: {
|
|
129
|
+
type: 'url',
|
|
130
|
+
optional: true,
|
|
131
|
+
description: 'Webhook URL to POST submissions to',
|
|
132
|
+
},
|
|
133
|
+
integrations: {
|
|
134
|
+
type: 'json',
|
|
135
|
+
optional: true,
|
|
136
|
+
description: 'Third-party integration configurations',
|
|
137
|
+
},
|
|
138
|
+
// Metadata
|
|
139
|
+
tags: {
|
|
140
|
+
type: 'string',
|
|
141
|
+
array: true,
|
|
142
|
+
optional: true,
|
|
143
|
+
description: 'Tags for categorizing the form',
|
|
144
|
+
},
|
|
145
|
+
folder: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
optional: true,
|
|
148
|
+
description: 'Folder or workspace the form belongs to',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
relationships: {
|
|
152
|
+
fields: {
|
|
153
|
+
type: 'FormField[]',
|
|
154
|
+
backref: 'form',
|
|
155
|
+
description: 'Fields in this form',
|
|
156
|
+
},
|
|
157
|
+
responses: {
|
|
158
|
+
type: 'FormResponse[]',
|
|
159
|
+
backref: 'form',
|
|
160
|
+
description: 'Responses submitted to this form',
|
|
161
|
+
},
|
|
162
|
+
owner: {
|
|
163
|
+
type: 'Contact',
|
|
164
|
+
description: 'Owner of the form',
|
|
165
|
+
},
|
|
166
|
+
collaborators: {
|
|
167
|
+
type: 'Contact[]',
|
|
168
|
+
description: 'People with edit access to the form',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
actions: [
|
|
172
|
+
'create',
|
|
173
|
+
'edit',
|
|
174
|
+
'duplicate',
|
|
175
|
+
'publish',
|
|
176
|
+
'unpublish',
|
|
177
|
+
'archive',
|
|
178
|
+
'delete',
|
|
179
|
+
'addField',
|
|
180
|
+
'removeField',
|
|
181
|
+
'reorderFields',
|
|
182
|
+
'share',
|
|
183
|
+
'export',
|
|
184
|
+
'import',
|
|
185
|
+
'preview',
|
|
186
|
+
'embed',
|
|
187
|
+
'close',
|
|
188
|
+
'reopen',
|
|
189
|
+
],
|
|
190
|
+
events: [
|
|
191
|
+
'created',
|
|
192
|
+
'edited',
|
|
193
|
+
'duplicated',
|
|
194
|
+
'published',
|
|
195
|
+
'unpublished',
|
|
196
|
+
'archived',
|
|
197
|
+
'deleted',
|
|
198
|
+
'fieldAdded',
|
|
199
|
+
'fieldRemoved',
|
|
200
|
+
'fieldsReordered',
|
|
201
|
+
'shared',
|
|
202
|
+
'exported',
|
|
203
|
+
'imported',
|
|
204
|
+
'responseReceived',
|
|
205
|
+
'closed',
|
|
206
|
+
'reopened',
|
|
207
|
+
],
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* FormField entity
|
|
211
|
+
*
|
|
212
|
+
* Represents a single field within a form with validation rules and options.
|
|
213
|
+
*/
|
|
214
|
+
export const FormField = {
|
|
215
|
+
singular: 'form field',
|
|
216
|
+
plural: 'form fields',
|
|
217
|
+
description: 'A field within a form for collecting specific data',
|
|
218
|
+
properties: {
|
|
219
|
+
// Identity
|
|
220
|
+
label: {
|
|
221
|
+
type: 'string',
|
|
222
|
+
description: 'Field label displayed to users',
|
|
223
|
+
},
|
|
224
|
+
name: {
|
|
225
|
+
type: 'string',
|
|
226
|
+
description: 'Internal field name/key for data storage',
|
|
227
|
+
},
|
|
228
|
+
description: {
|
|
229
|
+
type: 'string',
|
|
230
|
+
optional: true,
|
|
231
|
+
description: 'Help text or description for the field',
|
|
232
|
+
},
|
|
233
|
+
placeholder: {
|
|
234
|
+
type: 'string',
|
|
235
|
+
optional: true,
|
|
236
|
+
description: 'Placeholder text shown in the input',
|
|
237
|
+
},
|
|
238
|
+
// Type and configuration
|
|
239
|
+
type: {
|
|
240
|
+
type: 'string',
|
|
241
|
+
description: 'Field type: text, textarea, email, number, phone, select, radio, checkbox, date, file, rating, etc.',
|
|
242
|
+
examples: [
|
|
243
|
+
'text',
|
|
244
|
+
'textarea',
|
|
245
|
+
'email',
|
|
246
|
+
'number',
|
|
247
|
+
'phone',
|
|
248
|
+
'url',
|
|
249
|
+
'select',
|
|
250
|
+
'multiselect',
|
|
251
|
+
'radio',
|
|
252
|
+
'checkbox',
|
|
253
|
+
'date',
|
|
254
|
+
'datetime',
|
|
255
|
+
'time',
|
|
256
|
+
'file',
|
|
257
|
+
'rating',
|
|
258
|
+
'scale',
|
|
259
|
+
'matrix',
|
|
260
|
+
'signature',
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
order: {
|
|
264
|
+
type: 'number',
|
|
265
|
+
description: 'Display order within the form',
|
|
266
|
+
},
|
|
267
|
+
section: {
|
|
268
|
+
type: 'string',
|
|
269
|
+
optional: true,
|
|
270
|
+
description: 'Section or page the field belongs to',
|
|
271
|
+
},
|
|
272
|
+
// Options for select/radio/checkbox fields
|
|
273
|
+
options: {
|
|
274
|
+
type: 'json',
|
|
275
|
+
optional: true,
|
|
276
|
+
description: 'Options for select, radio, or checkbox fields',
|
|
277
|
+
},
|
|
278
|
+
allowOther: {
|
|
279
|
+
type: 'boolean',
|
|
280
|
+
optional: true,
|
|
281
|
+
description: 'Whether to allow "Other" option with text input',
|
|
282
|
+
},
|
|
283
|
+
// Validation
|
|
284
|
+
required: {
|
|
285
|
+
type: 'boolean',
|
|
286
|
+
optional: true,
|
|
287
|
+
description: 'Whether the field is required',
|
|
288
|
+
},
|
|
289
|
+
validation: {
|
|
290
|
+
type: 'json',
|
|
291
|
+
optional: true,
|
|
292
|
+
description: 'Validation rules (regex, min/max, format, etc.)',
|
|
293
|
+
},
|
|
294
|
+
minLength: {
|
|
295
|
+
type: 'number',
|
|
296
|
+
optional: true,
|
|
297
|
+
description: 'Minimum length for text fields',
|
|
298
|
+
},
|
|
299
|
+
maxLength: {
|
|
300
|
+
type: 'number',
|
|
301
|
+
optional: true,
|
|
302
|
+
description: 'Maximum length for text fields',
|
|
303
|
+
},
|
|
304
|
+
minValue: {
|
|
305
|
+
type: 'number',
|
|
306
|
+
optional: true,
|
|
307
|
+
description: 'Minimum value for number fields',
|
|
308
|
+
},
|
|
309
|
+
maxValue: {
|
|
310
|
+
type: 'number',
|
|
311
|
+
optional: true,
|
|
312
|
+
description: 'Maximum value for number fields',
|
|
313
|
+
},
|
|
314
|
+
pattern: {
|
|
315
|
+
type: 'string',
|
|
316
|
+
optional: true,
|
|
317
|
+
description: 'Regex pattern for validation',
|
|
318
|
+
},
|
|
319
|
+
errorMessage: {
|
|
320
|
+
type: 'string',
|
|
321
|
+
optional: true,
|
|
322
|
+
description: 'Custom error message for validation failures',
|
|
323
|
+
},
|
|
324
|
+
// File upload specific
|
|
325
|
+
acceptedFileTypes: {
|
|
326
|
+
type: 'string',
|
|
327
|
+
array: true,
|
|
328
|
+
optional: true,
|
|
329
|
+
description: 'Accepted file types for file upload fields',
|
|
330
|
+
},
|
|
331
|
+
maxFileSize: {
|
|
332
|
+
type: 'number',
|
|
333
|
+
optional: true,
|
|
334
|
+
description: 'Maximum file size in bytes',
|
|
335
|
+
},
|
|
336
|
+
maxFiles: {
|
|
337
|
+
type: 'number',
|
|
338
|
+
optional: true,
|
|
339
|
+
description: 'Maximum number of files allowed',
|
|
340
|
+
},
|
|
341
|
+
// Conditional logic
|
|
342
|
+
conditionalLogic: {
|
|
343
|
+
type: 'json',
|
|
344
|
+
optional: true,
|
|
345
|
+
description: 'Rules for showing/hiding field based on other answers',
|
|
346
|
+
},
|
|
347
|
+
// Display
|
|
348
|
+
width: {
|
|
349
|
+
type: 'string',
|
|
350
|
+
optional: true,
|
|
351
|
+
description: 'Field width: full, half, third, quarter',
|
|
352
|
+
examples: ['full', 'half', 'third', 'quarter'],
|
|
353
|
+
},
|
|
354
|
+
hidden: {
|
|
355
|
+
type: 'boolean',
|
|
356
|
+
optional: true,
|
|
357
|
+
description: 'Whether the field is hidden',
|
|
358
|
+
},
|
|
359
|
+
// Metadata
|
|
360
|
+
metadata: {
|
|
361
|
+
type: 'json',
|
|
362
|
+
optional: true,
|
|
363
|
+
description: 'Additional field configuration and metadata',
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
relationships: {
|
|
367
|
+
form: {
|
|
368
|
+
type: 'Form',
|
|
369
|
+
backref: 'fields',
|
|
370
|
+
description: 'Parent form',
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
actions: [
|
|
374
|
+
'create',
|
|
375
|
+
'edit',
|
|
376
|
+
'delete',
|
|
377
|
+
'duplicate',
|
|
378
|
+
'move',
|
|
379
|
+
'hide',
|
|
380
|
+
'show',
|
|
381
|
+
'setRequired',
|
|
382
|
+
'setOptional',
|
|
383
|
+
'addOption',
|
|
384
|
+
'removeOption',
|
|
385
|
+
'reorderOptions',
|
|
386
|
+
'setValidation',
|
|
387
|
+
],
|
|
388
|
+
events: [
|
|
389
|
+
'created',
|
|
390
|
+
'edited',
|
|
391
|
+
'deleted',
|
|
392
|
+
'duplicated',
|
|
393
|
+
'moved',
|
|
394
|
+
'hidden',
|
|
395
|
+
'shown',
|
|
396
|
+
'requiredChanged',
|
|
397
|
+
'optionAdded',
|
|
398
|
+
'optionRemoved',
|
|
399
|
+
'optionsReordered',
|
|
400
|
+
'validationChanged',
|
|
401
|
+
],
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* FormResponse entity
|
|
405
|
+
*
|
|
406
|
+
* Represents a submission/response to a form.
|
|
407
|
+
*/
|
|
408
|
+
export const FormResponse = {
|
|
409
|
+
singular: 'form response',
|
|
410
|
+
plural: 'form responses',
|
|
411
|
+
description: 'A submitted response to a form',
|
|
412
|
+
properties: {
|
|
413
|
+
// Response data
|
|
414
|
+
answers: {
|
|
415
|
+
type: 'json',
|
|
416
|
+
description: 'Field answers as key-value pairs',
|
|
417
|
+
},
|
|
418
|
+
completionTime: {
|
|
419
|
+
type: 'number',
|
|
420
|
+
optional: true,
|
|
421
|
+
description: 'Time taken to complete the form in seconds',
|
|
422
|
+
},
|
|
423
|
+
// Status
|
|
424
|
+
status: {
|
|
425
|
+
type: 'string',
|
|
426
|
+
description: 'Response status: draft, completed, verified, flagged',
|
|
427
|
+
examples: ['draft', 'completed', 'verified', 'flagged'],
|
|
428
|
+
},
|
|
429
|
+
completed: {
|
|
430
|
+
type: 'boolean',
|
|
431
|
+
description: 'Whether the response is fully completed',
|
|
432
|
+
},
|
|
433
|
+
// Respondent info
|
|
434
|
+
respondentEmail: {
|
|
435
|
+
type: 'string',
|
|
436
|
+
optional: true,
|
|
437
|
+
description: 'Email address of the respondent',
|
|
438
|
+
},
|
|
439
|
+
respondentName: {
|
|
440
|
+
type: 'string',
|
|
441
|
+
optional: true,
|
|
442
|
+
description: 'Name of the respondent',
|
|
443
|
+
},
|
|
444
|
+
respondentId: {
|
|
445
|
+
type: 'string',
|
|
446
|
+
optional: true,
|
|
447
|
+
description: 'ID of authenticated respondent',
|
|
448
|
+
},
|
|
449
|
+
// Metadata
|
|
450
|
+
ipAddress: {
|
|
451
|
+
type: 'string',
|
|
452
|
+
optional: true,
|
|
453
|
+
description: 'IP address of submission',
|
|
454
|
+
},
|
|
455
|
+
userAgent: {
|
|
456
|
+
type: 'string',
|
|
457
|
+
optional: true,
|
|
458
|
+
description: 'Browser user agent string',
|
|
459
|
+
},
|
|
460
|
+
referrer: {
|
|
461
|
+
type: 'url',
|
|
462
|
+
optional: true,
|
|
463
|
+
description: 'Referrer URL',
|
|
464
|
+
},
|
|
465
|
+
source: {
|
|
466
|
+
type: 'string',
|
|
467
|
+
optional: true,
|
|
468
|
+
description: 'Source of the response: web, email, api, embed',
|
|
469
|
+
examples: ['web', 'email', 'api', 'embed', 'mobile'],
|
|
470
|
+
},
|
|
471
|
+
device: {
|
|
472
|
+
type: 'string',
|
|
473
|
+
optional: true,
|
|
474
|
+
description: 'Device type: desktop, mobile, tablet',
|
|
475
|
+
examples: ['desktop', 'mobile', 'tablet'],
|
|
476
|
+
},
|
|
477
|
+
// Tracking
|
|
478
|
+
startedAt: {
|
|
479
|
+
type: 'datetime',
|
|
480
|
+
optional: true,
|
|
481
|
+
description: 'When the respondent started filling the form',
|
|
482
|
+
},
|
|
483
|
+
submittedAt: {
|
|
484
|
+
type: 'datetime',
|
|
485
|
+
description: 'When the response was submitted',
|
|
486
|
+
},
|
|
487
|
+
// Processing
|
|
488
|
+
score: {
|
|
489
|
+
type: 'number',
|
|
490
|
+
optional: true,
|
|
491
|
+
description: 'Calculated score if applicable',
|
|
492
|
+
},
|
|
493
|
+
tags: {
|
|
494
|
+
type: 'string',
|
|
495
|
+
array: true,
|
|
496
|
+
optional: true,
|
|
497
|
+
description: 'Tags applied to this response',
|
|
498
|
+
},
|
|
499
|
+
notes: {
|
|
500
|
+
type: 'string',
|
|
501
|
+
optional: true,
|
|
502
|
+
description: 'Internal notes about the response',
|
|
503
|
+
},
|
|
504
|
+
reviewed: {
|
|
505
|
+
type: 'boolean',
|
|
506
|
+
optional: true,
|
|
507
|
+
description: 'Whether the response has been reviewed',
|
|
508
|
+
},
|
|
509
|
+
reviewedBy: {
|
|
510
|
+
type: 'string',
|
|
511
|
+
optional: true,
|
|
512
|
+
description: 'User who reviewed the response',
|
|
513
|
+
},
|
|
514
|
+
reviewedAt: {
|
|
515
|
+
type: 'datetime',
|
|
516
|
+
optional: true,
|
|
517
|
+
description: 'When the response was reviewed',
|
|
518
|
+
},
|
|
519
|
+
// Integration
|
|
520
|
+
exported: {
|
|
521
|
+
type: 'boolean',
|
|
522
|
+
optional: true,
|
|
523
|
+
description: 'Whether the response has been exported',
|
|
524
|
+
},
|
|
525
|
+
webhookDelivered: {
|
|
526
|
+
type: 'boolean',
|
|
527
|
+
optional: true,
|
|
528
|
+
description: 'Whether webhook delivery succeeded',
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
relationships: {
|
|
532
|
+
form: {
|
|
533
|
+
type: 'Form',
|
|
534
|
+
backref: 'responses',
|
|
535
|
+
description: 'Form this response belongs to',
|
|
536
|
+
},
|
|
537
|
+
respondent: {
|
|
538
|
+
type: 'Contact',
|
|
539
|
+
required: false,
|
|
540
|
+
description: 'Contact record for the respondent',
|
|
541
|
+
},
|
|
542
|
+
attachments: {
|
|
543
|
+
type: 'Attachment[]',
|
|
544
|
+
description: 'Files uploaded with the response',
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
actions: [
|
|
548
|
+
'submit',
|
|
549
|
+
'save',
|
|
550
|
+
'edit',
|
|
551
|
+
'delete',
|
|
552
|
+
'review',
|
|
553
|
+
'flag',
|
|
554
|
+
'unflag',
|
|
555
|
+
'tag',
|
|
556
|
+
'untag',
|
|
557
|
+
'export',
|
|
558
|
+
'print',
|
|
559
|
+
'addNote',
|
|
560
|
+
'verify',
|
|
561
|
+
],
|
|
562
|
+
events: [
|
|
563
|
+
'started',
|
|
564
|
+
'saved',
|
|
565
|
+
'submitted',
|
|
566
|
+
'edited',
|
|
567
|
+
'deleted',
|
|
568
|
+
'reviewed',
|
|
569
|
+
'flagged',
|
|
570
|
+
'unflagged',
|
|
571
|
+
'tagged',
|
|
572
|
+
'exported',
|
|
573
|
+
'verified',
|
|
574
|
+
],
|
|
575
|
+
};
|
|
576
|
+
// =============================================================================
|
|
577
|
+
// Survey
|
|
578
|
+
// =============================================================================
|
|
579
|
+
/**
|
|
580
|
+
* Survey entity
|
|
581
|
+
*
|
|
582
|
+
* Represents a survey for collecting feedback, opinions, and research data.
|
|
583
|
+
* Surveys typically include conditional logic, branching, and analysis features.
|
|
584
|
+
*/
|
|
585
|
+
export const Survey = {
|
|
586
|
+
singular: 'survey',
|
|
587
|
+
plural: 'surveys',
|
|
588
|
+
description: 'A survey for collecting feedback, opinions, and research data',
|
|
589
|
+
properties: {
|
|
590
|
+
// Identity
|
|
591
|
+
title: {
|
|
592
|
+
type: 'string',
|
|
593
|
+
description: 'Survey title',
|
|
594
|
+
},
|
|
595
|
+
description: {
|
|
596
|
+
type: 'string',
|
|
597
|
+
optional: true,
|
|
598
|
+
description: 'Survey description or purpose',
|
|
599
|
+
},
|
|
600
|
+
category: {
|
|
601
|
+
type: 'string',
|
|
602
|
+
optional: true,
|
|
603
|
+
description: 'Survey category: customer satisfaction, market research, feedback, poll, etc.',
|
|
604
|
+
examples: [
|
|
605
|
+
'customer-satisfaction',
|
|
606
|
+
'market-research',
|
|
607
|
+
'employee-feedback',
|
|
608
|
+
'product-feedback',
|
|
609
|
+
'nps',
|
|
610
|
+
'poll',
|
|
611
|
+
'quiz',
|
|
612
|
+
],
|
|
613
|
+
},
|
|
614
|
+
// Status
|
|
615
|
+
status: {
|
|
616
|
+
type: 'string',
|
|
617
|
+
description: 'Survey status: draft, active, paused, closed, archived',
|
|
618
|
+
examples: ['draft', 'active', 'paused', 'closed', 'archived'],
|
|
619
|
+
},
|
|
620
|
+
// Settings
|
|
621
|
+
anonymous: {
|
|
622
|
+
type: 'boolean',
|
|
623
|
+
optional: true,
|
|
624
|
+
description: 'Whether responses are anonymous',
|
|
625
|
+
},
|
|
626
|
+
allowMultipleResponses: {
|
|
627
|
+
type: 'boolean',
|
|
628
|
+
optional: true,
|
|
629
|
+
description: 'Whether users can submit multiple responses',
|
|
630
|
+
},
|
|
631
|
+
requireCompletion: {
|
|
632
|
+
type: 'boolean',
|
|
633
|
+
optional: true,
|
|
634
|
+
description: 'Whether partial responses are saved',
|
|
635
|
+
},
|
|
636
|
+
showProgress: {
|
|
637
|
+
type: 'boolean',
|
|
638
|
+
optional: true,
|
|
639
|
+
description: 'Whether to show progress indicator',
|
|
640
|
+
},
|
|
641
|
+
randomizeQuestions: {
|
|
642
|
+
type: 'boolean',
|
|
643
|
+
optional: true,
|
|
644
|
+
description: 'Whether to randomize question order',
|
|
645
|
+
},
|
|
646
|
+
allowBackNavigation: {
|
|
647
|
+
type: 'boolean',
|
|
648
|
+
optional: true,
|
|
649
|
+
description: 'Whether respondents can go back to previous questions',
|
|
650
|
+
},
|
|
651
|
+
// Pages/sections
|
|
652
|
+
pages: {
|
|
653
|
+
type: 'json',
|
|
654
|
+
optional: true,
|
|
655
|
+
description: 'Page/section configuration for multi-page surveys',
|
|
656
|
+
},
|
|
657
|
+
questionCount: {
|
|
658
|
+
type: 'number',
|
|
659
|
+
optional: true,
|
|
660
|
+
description: 'Total number of questions',
|
|
661
|
+
},
|
|
662
|
+
// Logic
|
|
663
|
+
branchingLogic: {
|
|
664
|
+
type: 'json',
|
|
665
|
+
optional: true,
|
|
666
|
+
description: 'Conditional branching and skip logic rules',
|
|
667
|
+
},
|
|
668
|
+
quotas: {
|
|
669
|
+
type: 'json',
|
|
670
|
+
optional: true,
|
|
671
|
+
description: 'Response quotas by segment or condition',
|
|
672
|
+
},
|
|
673
|
+
// Distribution
|
|
674
|
+
accessMode: {
|
|
675
|
+
type: 'string',
|
|
676
|
+
optional: true,
|
|
677
|
+
description: 'Access mode: public, private, invite-only',
|
|
678
|
+
examples: ['public', 'private', 'invite-only'],
|
|
679
|
+
},
|
|
680
|
+
distributionChannels: {
|
|
681
|
+
type: 'string',
|
|
682
|
+
array: true,
|
|
683
|
+
optional: true,
|
|
684
|
+
description: 'Channels where survey is distributed',
|
|
685
|
+
examples: ['email', 'web', 'social', 'embed', 'sms', 'qr-code'],
|
|
686
|
+
},
|
|
687
|
+
// Timing
|
|
688
|
+
estimatedTime: {
|
|
689
|
+
type: 'number',
|
|
690
|
+
optional: true,
|
|
691
|
+
description: 'Estimated completion time in minutes',
|
|
692
|
+
},
|
|
693
|
+
opensAt: {
|
|
694
|
+
type: 'datetime',
|
|
695
|
+
optional: true,
|
|
696
|
+
description: 'When the survey opens for responses',
|
|
697
|
+
},
|
|
698
|
+
closesAt: {
|
|
699
|
+
type: 'datetime',
|
|
700
|
+
optional: true,
|
|
701
|
+
description: 'When the survey closes',
|
|
702
|
+
},
|
|
703
|
+
// Responses
|
|
704
|
+
targetResponses: {
|
|
705
|
+
type: 'number',
|
|
706
|
+
optional: true,
|
|
707
|
+
description: 'Target number of responses',
|
|
708
|
+
},
|
|
709
|
+
responseCount: {
|
|
710
|
+
type: 'number',
|
|
711
|
+
optional: true,
|
|
712
|
+
description: 'Current number of responses',
|
|
713
|
+
},
|
|
714
|
+
completionRate: {
|
|
715
|
+
type: 'number',
|
|
716
|
+
optional: true,
|
|
717
|
+
description: 'Percentage of started surveys that were completed',
|
|
718
|
+
},
|
|
719
|
+
// Appearance
|
|
720
|
+
theme: {
|
|
721
|
+
type: 'json',
|
|
722
|
+
optional: true,
|
|
723
|
+
description: 'Visual theme and branding',
|
|
724
|
+
},
|
|
725
|
+
logo: {
|
|
726
|
+
type: 'url',
|
|
727
|
+
optional: true,
|
|
728
|
+
description: 'Logo URL',
|
|
729
|
+
},
|
|
730
|
+
language: {
|
|
731
|
+
type: 'string',
|
|
732
|
+
optional: true,
|
|
733
|
+
description: 'Primary language code',
|
|
734
|
+
},
|
|
735
|
+
languages: {
|
|
736
|
+
type: 'string',
|
|
737
|
+
array: true,
|
|
738
|
+
optional: true,
|
|
739
|
+
description: 'Supported languages for multi-lingual surveys',
|
|
740
|
+
},
|
|
741
|
+
// Incentives
|
|
742
|
+
incentive: {
|
|
743
|
+
type: 'json',
|
|
744
|
+
optional: true,
|
|
745
|
+
description: 'Incentive configuration for completion',
|
|
746
|
+
},
|
|
747
|
+
// Metadata
|
|
748
|
+
tags: {
|
|
749
|
+
type: 'string',
|
|
750
|
+
array: true,
|
|
751
|
+
optional: true,
|
|
752
|
+
description: 'Tags for categorizing the survey',
|
|
753
|
+
},
|
|
754
|
+
},
|
|
755
|
+
relationships: {
|
|
756
|
+
questions: {
|
|
757
|
+
type: 'SurveyQuestion[]',
|
|
758
|
+
backref: 'survey',
|
|
759
|
+
description: 'Questions in this survey',
|
|
760
|
+
},
|
|
761
|
+
responses: {
|
|
762
|
+
type: 'SurveyResponse[]',
|
|
763
|
+
backref: 'survey',
|
|
764
|
+
description: 'Responses submitted to this survey',
|
|
765
|
+
},
|
|
766
|
+
owner: {
|
|
767
|
+
type: 'Contact',
|
|
768
|
+
description: 'Owner of the survey',
|
|
769
|
+
},
|
|
770
|
+
collaborators: {
|
|
771
|
+
type: 'Contact[]',
|
|
772
|
+
description: 'People with edit access',
|
|
773
|
+
},
|
|
774
|
+
},
|
|
775
|
+
actions: [
|
|
776
|
+
'create',
|
|
777
|
+
'edit',
|
|
778
|
+
'duplicate',
|
|
779
|
+
'activate',
|
|
780
|
+
'pause',
|
|
781
|
+
'close',
|
|
782
|
+
'archive',
|
|
783
|
+
'delete',
|
|
784
|
+
'addQuestion',
|
|
785
|
+
'removeQuestion',
|
|
786
|
+
'reorderQuestions',
|
|
787
|
+
'addPage',
|
|
788
|
+
'removePage',
|
|
789
|
+
'setBranching',
|
|
790
|
+
'share',
|
|
791
|
+
'distribute',
|
|
792
|
+
'export',
|
|
793
|
+
'analyze',
|
|
794
|
+
'preview',
|
|
795
|
+
],
|
|
796
|
+
events: [
|
|
797
|
+
'created',
|
|
798
|
+
'edited',
|
|
799
|
+
'duplicated',
|
|
800
|
+
'activated',
|
|
801
|
+
'paused',
|
|
802
|
+
'closed',
|
|
803
|
+
'archived',
|
|
804
|
+
'deleted',
|
|
805
|
+
'questionAdded',
|
|
806
|
+
'questionRemoved',
|
|
807
|
+
'questionsReordered',
|
|
808
|
+
'pageAdded',
|
|
809
|
+
'pageRemoved',
|
|
810
|
+
'branchingSet',
|
|
811
|
+
'shared',
|
|
812
|
+
'distributed',
|
|
813
|
+
'responseReceived',
|
|
814
|
+
'targetReached',
|
|
815
|
+
],
|
|
816
|
+
};
|
|
817
|
+
/**
|
|
818
|
+
* SurveyQuestion entity
|
|
819
|
+
*
|
|
820
|
+
* Represents a single question within a survey.
|
|
821
|
+
*/
|
|
822
|
+
export const SurveyQuestion = {
|
|
823
|
+
singular: 'survey question',
|
|
824
|
+
plural: 'survey questions',
|
|
825
|
+
description: 'A question within a survey',
|
|
826
|
+
properties: {
|
|
827
|
+
// Identity
|
|
828
|
+
text: {
|
|
829
|
+
type: 'string',
|
|
830
|
+
description: 'Question text',
|
|
831
|
+
},
|
|
832
|
+
description: {
|
|
833
|
+
type: 'string',
|
|
834
|
+
optional: true,
|
|
835
|
+
description: 'Additional context or instructions',
|
|
836
|
+
},
|
|
837
|
+
code: {
|
|
838
|
+
type: 'string',
|
|
839
|
+
optional: true,
|
|
840
|
+
description: 'Question code for analysis',
|
|
841
|
+
},
|
|
842
|
+
// Type
|
|
843
|
+
type: {
|
|
844
|
+
type: 'string',
|
|
845
|
+
description: 'Question type',
|
|
846
|
+
examples: [
|
|
847
|
+
'multiple-choice',
|
|
848
|
+
'checkbox',
|
|
849
|
+
'dropdown',
|
|
850
|
+
'rating',
|
|
851
|
+
'scale',
|
|
852
|
+
'matrix',
|
|
853
|
+
'text',
|
|
854
|
+
'textarea',
|
|
855
|
+
'number',
|
|
856
|
+
'email',
|
|
857
|
+
'date',
|
|
858
|
+
'ranking',
|
|
859
|
+
'slider',
|
|
860
|
+
'nps',
|
|
861
|
+
'likert',
|
|
862
|
+
],
|
|
863
|
+
},
|
|
864
|
+
subtype: {
|
|
865
|
+
type: 'string',
|
|
866
|
+
optional: true,
|
|
867
|
+
description: 'Question subtype for specific variations',
|
|
868
|
+
},
|
|
869
|
+
// Order and grouping
|
|
870
|
+
order: {
|
|
871
|
+
type: 'number',
|
|
872
|
+
description: 'Display order within the survey',
|
|
873
|
+
},
|
|
874
|
+
page: {
|
|
875
|
+
type: 'number',
|
|
876
|
+
optional: true,
|
|
877
|
+
description: 'Page number for multi-page surveys',
|
|
878
|
+
},
|
|
879
|
+
section: {
|
|
880
|
+
type: 'string',
|
|
881
|
+
optional: true,
|
|
882
|
+
description: 'Section identifier',
|
|
883
|
+
},
|
|
884
|
+
// Options
|
|
885
|
+
options: {
|
|
886
|
+
type: 'json',
|
|
887
|
+
optional: true,
|
|
888
|
+
description: 'Answer options for multiple choice, rating, etc.',
|
|
889
|
+
},
|
|
890
|
+
randomizeOptions: {
|
|
891
|
+
type: 'boolean',
|
|
892
|
+
optional: true,
|
|
893
|
+
description: 'Whether to randomize option order',
|
|
894
|
+
},
|
|
895
|
+
allowOther: {
|
|
896
|
+
type: 'boolean',
|
|
897
|
+
optional: true,
|
|
898
|
+
description: 'Whether to allow "Other" with text input',
|
|
899
|
+
},
|
|
900
|
+
allowMultiple: {
|
|
901
|
+
type: 'boolean',
|
|
902
|
+
optional: true,
|
|
903
|
+
description: 'Whether multiple selections are allowed',
|
|
904
|
+
},
|
|
905
|
+
// Validation
|
|
906
|
+
required: {
|
|
907
|
+
type: 'boolean',
|
|
908
|
+
optional: true,
|
|
909
|
+
description: 'Whether the question is required',
|
|
910
|
+
},
|
|
911
|
+
validation: {
|
|
912
|
+
type: 'json',
|
|
913
|
+
optional: true,
|
|
914
|
+
description: 'Validation rules',
|
|
915
|
+
},
|
|
916
|
+
minSelections: {
|
|
917
|
+
type: 'number',
|
|
918
|
+
optional: true,
|
|
919
|
+
description: 'Minimum number of selections required',
|
|
920
|
+
},
|
|
921
|
+
maxSelections: {
|
|
922
|
+
type: 'number',
|
|
923
|
+
optional: true,
|
|
924
|
+
description: 'Maximum number of selections allowed',
|
|
925
|
+
},
|
|
926
|
+
// Scale settings
|
|
927
|
+
scaleMin: {
|
|
928
|
+
type: 'number',
|
|
929
|
+
optional: true,
|
|
930
|
+
description: 'Minimum scale value',
|
|
931
|
+
},
|
|
932
|
+
scaleMax: {
|
|
933
|
+
type: 'number',
|
|
934
|
+
optional: true,
|
|
935
|
+
description: 'Maximum scale value',
|
|
936
|
+
},
|
|
937
|
+
scaleMinLabel: {
|
|
938
|
+
type: 'string',
|
|
939
|
+
optional: true,
|
|
940
|
+
description: 'Label for minimum scale value',
|
|
941
|
+
},
|
|
942
|
+
scaleMaxLabel: {
|
|
943
|
+
type: 'string',
|
|
944
|
+
optional: true,
|
|
945
|
+
description: 'Label for maximum scale value',
|
|
946
|
+
},
|
|
947
|
+
// Logic
|
|
948
|
+
skipLogic: {
|
|
949
|
+
type: 'json',
|
|
950
|
+
optional: true,
|
|
951
|
+
description: 'Skip logic rules based on this answer',
|
|
952
|
+
},
|
|
953
|
+
displayLogic: {
|
|
954
|
+
type: 'json',
|
|
955
|
+
optional: true,
|
|
956
|
+
description: 'Conditions for showing this question',
|
|
957
|
+
},
|
|
958
|
+
piping: {
|
|
959
|
+
type: 'json',
|
|
960
|
+
optional: true,
|
|
961
|
+
description: 'Text piping configuration from other answers',
|
|
962
|
+
},
|
|
963
|
+
// Media
|
|
964
|
+
imageUrl: {
|
|
965
|
+
type: 'url',
|
|
966
|
+
optional: true,
|
|
967
|
+
description: 'Image to display with the question',
|
|
968
|
+
},
|
|
969
|
+
videoUrl: {
|
|
970
|
+
type: 'url',
|
|
971
|
+
optional: true,
|
|
972
|
+
description: 'Video to display with the question',
|
|
973
|
+
},
|
|
974
|
+
// Metadata
|
|
975
|
+
metadata: {
|
|
976
|
+
type: 'json',
|
|
977
|
+
optional: true,
|
|
978
|
+
description: 'Additional question configuration',
|
|
979
|
+
},
|
|
980
|
+
},
|
|
981
|
+
relationships: {
|
|
982
|
+
survey: {
|
|
983
|
+
type: 'Survey',
|
|
984
|
+
backref: 'questions',
|
|
985
|
+
description: 'Parent survey',
|
|
986
|
+
},
|
|
987
|
+
},
|
|
988
|
+
actions: [
|
|
989
|
+
'create',
|
|
990
|
+
'edit',
|
|
991
|
+
'delete',
|
|
992
|
+
'duplicate',
|
|
993
|
+
'move',
|
|
994
|
+
'setRequired',
|
|
995
|
+
'setOptional',
|
|
996
|
+
'addOption',
|
|
997
|
+
'removeOption',
|
|
998
|
+
'reorderOptions',
|
|
999
|
+
'setSkipLogic',
|
|
1000
|
+
'setDisplayLogic',
|
|
1001
|
+
],
|
|
1002
|
+
events: [
|
|
1003
|
+
'created',
|
|
1004
|
+
'edited',
|
|
1005
|
+
'deleted',
|
|
1006
|
+
'duplicated',
|
|
1007
|
+
'moved',
|
|
1008
|
+
'requiredChanged',
|
|
1009
|
+
'optionAdded',
|
|
1010
|
+
'optionRemoved',
|
|
1011
|
+
'optionsReordered',
|
|
1012
|
+
'skipLogicSet',
|
|
1013
|
+
'displayLogicSet',
|
|
1014
|
+
],
|
|
1015
|
+
};
|
|
1016
|
+
/**
|
|
1017
|
+
* SurveyResponse entity
|
|
1018
|
+
*
|
|
1019
|
+
* Represents a submitted response to a survey.
|
|
1020
|
+
*/
|
|
1021
|
+
export const SurveyResponse = {
|
|
1022
|
+
singular: 'survey response',
|
|
1023
|
+
plural: 'survey responses',
|
|
1024
|
+
description: 'A submitted response to a survey',
|
|
1025
|
+
properties: {
|
|
1026
|
+
// Response data
|
|
1027
|
+
answers: {
|
|
1028
|
+
type: 'json',
|
|
1029
|
+
description: 'Question answers as key-value pairs',
|
|
1030
|
+
},
|
|
1031
|
+
metadata: {
|
|
1032
|
+
type: 'json',
|
|
1033
|
+
optional: true,
|
|
1034
|
+
description: 'Response metadata and tracking data',
|
|
1035
|
+
},
|
|
1036
|
+
// Status
|
|
1037
|
+
status: {
|
|
1038
|
+
type: 'string',
|
|
1039
|
+
description: 'Response status: in-progress, completed, partial, disqualified',
|
|
1040
|
+
examples: ['in-progress', 'completed', 'partial', 'disqualified'],
|
|
1041
|
+
},
|
|
1042
|
+
completionProgress: {
|
|
1043
|
+
type: 'number',
|
|
1044
|
+
optional: true,
|
|
1045
|
+
description: 'Completion percentage (0-100)',
|
|
1046
|
+
},
|
|
1047
|
+
// Timing
|
|
1048
|
+
startedAt: {
|
|
1049
|
+
type: 'datetime',
|
|
1050
|
+
description: 'When the respondent started the survey',
|
|
1051
|
+
},
|
|
1052
|
+
submittedAt: {
|
|
1053
|
+
type: 'datetime',
|
|
1054
|
+
optional: true,
|
|
1055
|
+
description: 'When the response was submitted',
|
|
1056
|
+
},
|
|
1057
|
+
duration: {
|
|
1058
|
+
type: 'number',
|
|
1059
|
+
optional: true,
|
|
1060
|
+
description: 'Time taken to complete in seconds',
|
|
1061
|
+
},
|
|
1062
|
+
lastActivityAt: {
|
|
1063
|
+
type: 'datetime',
|
|
1064
|
+
optional: true,
|
|
1065
|
+
description: 'Last interaction timestamp',
|
|
1066
|
+
},
|
|
1067
|
+
// Respondent
|
|
1068
|
+
respondentEmail: {
|
|
1069
|
+
type: 'string',
|
|
1070
|
+
optional: true,
|
|
1071
|
+
description: 'Email address if not anonymous',
|
|
1072
|
+
},
|
|
1073
|
+
respondentName: {
|
|
1074
|
+
type: 'string',
|
|
1075
|
+
optional: true,
|
|
1076
|
+
description: 'Name if provided',
|
|
1077
|
+
},
|
|
1078
|
+
respondentId: {
|
|
1079
|
+
type: 'string',
|
|
1080
|
+
optional: true,
|
|
1081
|
+
description: 'Authenticated respondent ID',
|
|
1082
|
+
},
|
|
1083
|
+
anonymous: {
|
|
1084
|
+
type: 'boolean',
|
|
1085
|
+
description: 'Whether the response is anonymous',
|
|
1086
|
+
},
|
|
1087
|
+
// Source tracking
|
|
1088
|
+
source: {
|
|
1089
|
+
type: 'string',
|
|
1090
|
+
optional: true,
|
|
1091
|
+
description: 'Response source',
|
|
1092
|
+
examples: ['email', 'web', 'social', 'embed', 'sms', 'qr-code', 'api'],
|
|
1093
|
+
},
|
|
1094
|
+
channel: {
|
|
1095
|
+
type: 'string',
|
|
1096
|
+
optional: true,
|
|
1097
|
+
description: 'Distribution channel identifier',
|
|
1098
|
+
},
|
|
1099
|
+
campaign: {
|
|
1100
|
+
type: 'string',
|
|
1101
|
+
optional: true,
|
|
1102
|
+
description: 'Campaign identifier',
|
|
1103
|
+
},
|
|
1104
|
+
referrer: {
|
|
1105
|
+
type: 'url',
|
|
1106
|
+
optional: true,
|
|
1107
|
+
description: 'Referrer URL',
|
|
1108
|
+
},
|
|
1109
|
+
// Technical
|
|
1110
|
+
ipAddress: {
|
|
1111
|
+
type: 'string',
|
|
1112
|
+
optional: true,
|
|
1113
|
+
description: 'IP address',
|
|
1114
|
+
},
|
|
1115
|
+
userAgent: {
|
|
1116
|
+
type: 'string',
|
|
1117
|
+
optional: true,
|
|
1118
|
+
description: 'Browser user agent',
|
|
1119
|
+
},
|
|
1120
|
+
device: {
|
|
1121
|
+
type: 'string',
|
|
1122
|
+
optional: true,
|
|
1123
|
+
description: 'Device type: desktop, mobile, tablet',
|
|
1124
|
+
examples: ['desktop', 'mobile', 'tablet'],
|
|
1125
|
+
},
|
|
1126
|
+
location: {
|
|
1127
|
+
type: 'json',
|
|
1128
|
+
optional: true,
|
|
1129
|
+
description: 'Geographic location data',
|
|
1130
|
+
},
|
|
1131
|
+
// Analysis
|
|
1132
|
+
segment: {
|
|
1133
|
+
type: 'string',
|
|
1134
|
+
optional: true,
|
|
1135
|
+
description: 'Respondent segment for analysis',
|
|
1136
|
+
},
|
|
1137
|
+
tags: {
|
|
1138
|
+
type: 'string',
|
|
1139
|
+
array: true,
|
|
1140
|
+
optional: true,
|
|
1141
|
+
description: 'Tags for categorization',
|
|
1142
|
+
},
|
|
1143
|
+
quality: {
|
|
1144
|
+
type: 'string',
|
|
1145
|
+
optional: true,
|
|
1146
|
+
description: 'Response quality score or flag',
|
|
1147
|
+
examples: ['high', 'medium', 'low', 'flagged', 'spam'],
|
|
1148
|
+
},
|
|
1149
|
+
notes: {
|
|
1150
|
+
type: 'string',
|
|
1151
|
+
optional: true,
|
|
1152
|
+
description: 'Internal notes',
|
|
1153
|
+
},
|
|
1154
|
+
// Processing
|
|
1155
|
+
reviewed: {
|
|
1156
|
+
type: 'boolean',
|
|
1157
|
+
optional: true,
|
|
1158
|
+
description: 'Whether response has been reviewed',
|
|
1159
|
+
},
|
|
1160
|
+
exported: {
|
|
1161
|
+
type: 'boolean',
|
|
1162
|
+
optional: true,
|
|
1163
|
+
description: 'Whether response has been exported',
|
|
1164
|
+
},
|
|
1165
|
+
},
|
|
1166
|
+
relationships: {
|
|
1167
|
+
survey: {
|
|
1168
|
+
type: 'Survey',
|
|
1169
|
+
backref: 'responses',
|
|
1170
|
+
description: 'Survey this response belongs to',
|
|
1171
|
+
},
|
|
1172
|
+
respondent: {
|
|
1173
|
+
type: 'Contact',
|
|
1174
|
+
required: false,
|
|
1175
|
+
description: 'Contact record for the respondent',
|
|
1176
|
+
},
|
|
1177
|
+
},
|
|
1178
|
+
actions: [
|
|
1179
|
+
'start',
|
|
1180
|
+
'continue',
|
|
1181
|
+
'submit',
|
|
1182
|
+
'save',
|
|
1183
|
+
'delete',
|
|
1184
|
+
'review',
|
|
1185
|
+
'flag',
|
|
1186
|
+
'unflag',
|
|
1187
|
+
'tag',
|
|
1188
|
+
'untag',
|
|
1189
|
+
'export',
|
|
1190
|
+
'disqualify',
|
|
1191
|
+
],
|
|
1192
|
+
events: [
|
|
1193
|
+
'started',
|
|
1194
|
+
'saved',
|
|
1195
|
+
'submitted',
|
|
1196
|
+
'deleted',
|
|
1197
|
+
'reviewed',
|
|
1198
|
+
'flagged',
|
|
1199
|
+
'unflagged',
|
|
1200
|
+
'tagged',
|
|
1201
|
+
'exported',
|
|
1202
|
+
'disqualified',
|
|
1203
|
+
],
|
|
1204
|
+
};
|
|
1205
|
+
// =============================================================================
|
|
1206
|
+
// Quiz
|
|
1207
|
+
// =============================================================================
|
|
1208
|
+
/**
|
|
1209
|
+
* Quiz entity
|
|
1210
|
+
*
|
|
1211
|
+
* Represents a quiz for testing knowledge with correct/incorrect answers and scoring.
|
|
1212
|
+
*/
|
|
1213
|
+
export const Quiz = {
|
|
1214
|
+
singular: 'quiz',
|
|
1215
|
+
plural: 'quizzes',
|
|
1216
|
+
description: 'A quiz for testing knowledge with scoring and correct answers',
|
|
1217
|
+
properties: {
|
|
1218
|
+
// Identity
|
|
1219
|
+
title: {
|
|
1220
|
+
type: 'string',
|
|
1221
|
+
description: 'Quiz title',
|
|
1222
|
+
},
|
|
1223
|
+
description: {
|
|
1224
|
+
type: 'string',
|
|
1225
|
+
optional: true,
|
|
1226
|
+
description: 'Quiz description or instructions',
|
|
1227
|
+
},
|
|
1228
|
+
category: {
|
|
1229
|
+
type: 'string',
|
|
1230
|
+
optional: true,
|
|
1231
|
+
description: 'Quiz category or subject',
|
|
1232
|
+
},
|
|
1233
|
+
// Status
|
|
1234
|
+
status: {
|
|
1235
|
+
type: 'string',
|
|
1236
|
+
description: 'Quiz status: draft, published, archived',
|
|
1237
|
+
examples: ['draft', 'published', 'archived'],
|
|
1238
|
+
},
|
|
1239
|
+
// Settings
|
|
1240
|
+
randomizeQuestions: {
|
|
1241
|
+
type: 'boolean',
|
|
1242
|
+
optional: true,
|
|
1243
|
+
description: 'Whether to randomize question order',
|
|
1244
|
+
},
|
|
1245
|
+
randomizeAnswers: {
|
|
1246
|
+
type: 'boolean',
|
|
1247
|
+
optional: true,
|
|
1248
|
+
description: 'Whether to randomize answer options',
|
|
1249
|
+
},
|
|
1250
|
+
showFeedback: {
|
|
1251
|
+
type: 'boolean',
|
|
1252
|
+
optional: true,
|
|
1253
|
+
description: 'Whether to show correct/incorrect feedback',
|
|
1254
|
+
},
|
|
1255
|
+
showCorrectAnswers: {
|
|
1256
|
+
type: 'boolean',
|
|
1257
|
+
optional: true,
|
|
1258
|
+
description: 'Whether to show correct answers after submission',
|
|
1259
|
+
},
|
|
1260
|
+
allowRetake: {
|
|
1261
|
+
type: 'boolean',
|
|
1262
|
+
optional: true,
|
|
1263
|
+
description: 'Whether users can retake the quiz',
|
|
1264
|
+
},
|
|
1265
|
+
maxAttempts: {
|
|
1266
|
+
type: 'number',
|
|
1267
|
+
optional: true,
|
|
1268
|
+
description: 'Maximum number of attempts allowed',
|
|
1269
|
+
},
|
|
1270
|
+
allowBackNavigation: {
|
|
1271
|
+
type: 'boolean',
|
|
1272
|
+
optional: true,
|
|
1273
|
+
description: 'Whether users can go back to previous questions',
|
|
1274
|
+
},
|
|
1275
|
+
// Timing
|
|
1276
|
+
timeLimit: {
|
|
1277
|
+
type: 'number',
|
|
1278
|
+
optional: true,
|
|
1279
|
+
description: 'Time limit in seconds',
|
|
1280
|
+
},
|
|
1281
|
+
timeLimitPerQuestion: {
|
|
1282
|
+
type: 'number',
|
|
1283
|
+
optional: true,
|
|
1284
|
+
description: 'Time limit per question in seconds',
|
|
1285
|
+
},
|
|
1286
|
+
availableFrom: {
|
|
1287
|
+
type: 'datetime',
|
|
1288
|
+
optional: true,
|
|
1289
|
+
description: 'When quiz becomes available',
|
|
1290
|
+
},
|
|
1291
|
+
availableUntil: {
|
|
1292
|
+
type: 'datetime',
|
|
1293
|
+
optional: true,
|
|
1294
|
+
description: 'When quiz expires',
|
|
1295
|
+
},
|
|
1296
|
+
// Structure
|
|
1297
|
+
questionCount: {
|
|
1298
|
+
type: 'number',
|
|
1299
|
+
optional: true,
|
|
1300
|
+
description: 'Total number of questions',
|
|
1301
|
+
},
|
|
1302
|
+
questionsPerPage: {
|
|
1303
|
+
type: 'number',
|
|
1304
|
+
optional: true,
|
|
1305
|
+
description: 'Number of questions per page',
|
|
1306
|
+
},
|
|
1307
|
+
// Scoring
|
|
1308
|
+
totalPoints: {
|
|
1309
|
+
type: 'number',
|
|
1310
|
+
optional: true,
|
|
1311
|
+
description: 'Total points possible',
|
|
1312
|
+
},
|
|
1313
|
+
passingScore: {
|
|
1314
|
+
type: 'number',
|
|
1315
|
+
optional: true,
|
|
1316
|
+
description: 'Minimum score to pass (percentage or points)',
|
|
1317
|
+
},
|
|
1318
|
+
scoringType: {
|
|
1319
|
+
type: 'string',
|
|
1320
|
+
optional: true,
|
|
1321
|
+
description: 'Scoring method: points, percentage, letter-grade',
|
|
1322
|
+
examples: ['points', 'percentage', 'letter-grade'],
|
|
1323
|
+
},
|
|
1324
|
+
negativeMarking: {
|
|
1325
|
+
type: 'boolean',
|
|
1326
|
+
optional: true,
|
|
1327
|
+
description: 'Whether incorrect answers deduct points',
|
|
1328
|
+
},
|
|
1329
|
+
partialCredit: {
|
|
1330
|
+
type: 'boolean',
|
|
1331
|
+
optional: true,
|
|
1332
|
+
description: 'Whether partial credit is awarded',
|
|
1333
|
+
},
|
|
1334
|
+
// Results
|
|
1335
|
+
showScore: {
|
|
1336
|
+
type: 'boolean',
|
|
1337
|
+
optional: true,
|
|
1338
|
+
description: 'Whether to show score to quiz takers',
|
|
1339
|
+
},
|
|
1340
|
+
certificateEnabled: {
|
|
1341
|
+
type: 'boolean',
|
|
1342
|
+
optional: true,
|
|
1343
|
+
description: 'Whether to generate completion certificate',
|
|
1344
|
+
},
|
|
1345
|
+
certificateTemplate: {
|
|
1346
|
+
type: 'string',
|
|
1347
|
+
optional: true,
|
|
1348
|
+
description: 'Certificate template ID',
|
|
1349
|
+
},
|
|
1350
|
+
// Access
|
|
1351
|
+
accessMode: {
|
|
1352
|
+
type: 'string',
|
|
1353
|
+
optional: true,
|
|
1354
|
+
description: 'Access mode: public, private, password-protected',
|
|
1355
|
+
examples: ['public', 'private', 'password-protected'],
|
|
1356
|
+
},
|
|
1357
|
+
password: {
|
|
1358
|
+
type: 'string',
|
|
1359
|
+
optional: true,
|
|
1360
|
+
description: 'Password for protected quizzes',
|
|
1361
|
+
},
|
|
1362
|
+
requireAuthentication: {
|
|
1363
|
+
type: 'boolean',
|
|
1364
|
+
optional: true,
|
|
1365
|
+
description: 'Whether authentication is required',
|
|
1366
|
+
},
|
|
1367
|
+
// Statistics
|
|
1368
|
+
attemptCount: {
|
|
1369
|
+
type: 'number',
|
|
1370
|
+
optional: true,
|
|
1371
|
+
description: 'Total number of attempts',
|
|
1372
|
+
},
|
|
1373
|
+
averageScore: {
|
|
1374
|
+
type: 'number',
|
|
1375
|
+
optional: true,
|
|
1376
|
+
description: 'Average score across all attempts',
|
|
1377
|
+
},
|
|
1378
|
+
passRate: {
|
|
1379
|
+
type: 'number',
|
|
1380
|
+
optional: true,
|
|
1381
|
+
description: 'Percentage of passing attempts',
|
|
1382
|
+
},
|
|
1383
|
+
// Appearance
|
|
1384
|
+
theme: {
|
|
1385
|
+
type: 'json',
|
|
1386
|
+
optional: true,
|
|
1387
|
+
description: 'Visual theme and styling',
|
|
1388
|
+
},
|
|
1389
|
+
logo: {
|
|
1390
|
+
type: 'url',
|
|
1391
|
+
optional: true,
|
|
1392
|
+
description: 'Logo URL',
|
|
1393
|
+
},
|
|
1394
|
+
// Metadata
|
|
1395
|
+
tags: {
|
|
1396
|
+
type: 'string',
|
|
1397
|
+
array: true,
|
|
1398
|
+
optional: true,
|
|
1399
|
+
description: 'Tags for categorization',
|
|
1400
|
+
},
|
|
1401
|
+
},
|
|
1402
|
+
relationships: {
|
|
1403
|
+
questions: {
|
|
1404
|
+
type: 'QuizQuestion[]',
|
|
1405
|
+
backref: 'quiz',
|
|
1406
|
+
description: 'Questions in this quiz',
|
|
1407
|
+
},
|
|
1408
|
+
results: {
|
|
1409
|
+
type: 'QuizResult[]',
|
|
1410
|
+
backref: 'quiz',
|
|
1411
|
+
description: 'Results from quiz attempts',
|
|
1412
|
+
},
|
|
1413
|
+
owner: {
|
|
1414
|
+
type: 'Contact',
|
|
1415
|
+
description: 'Owner of the quiz',
|
|
1416
|
+
},
|
|
1417
|
+
collaborators: {
|
|
1418
|
+
type: 'Contact[]',
|
|
1419
|
+
description: 'People with edit access',
|
|
1420
|
+
},
|
|
1421
|
+
},
|
|
1422
|
+
actions: [
|
|
1423
|
+
'create',
|
|
1424
|
+
'edit',
|
|
1425
|
+
'duplicate',
|
|
1426
|
+
'publish',
|
|
1427
|
+
'unpublish',
|
|
1428
|
+
'archive',
|
|
1429
|
+
'delete',
|
|
1430
|
+
'addQuestion',
|
|
1431
|
+
'removeQuestion',
|
|
1432
|
+
'reorderQuestions',
|
|
1433
|
+
'share',
|
|
1434
|
+
'export',
|
|
1435
|
+
'import',
|
|
1436
|
+
'preview',
|
|
1437
|
+
'reset',
|
|
1438
|
+
],
|
|
1439
|
+
events: [
|
|
1440
|
+
'created',
|
|
1441
|
+
'edited',
|
|
1442
|
+
'duplicated',
|
|
1443
|
+
'published',
|
|
1444
|
+
'unpublished',
|
|
1445
|
+
'archived',
|
|
1446
|
+
'deleted',
|
|
1447
|
+
'questionAdded',
|
|
1448
|
+
'questionRemoved',
|
|
1449
|
+
'questionsReordered',
|
|
1450
|
+
'shared',
|
|
1451
|
+
'attempted',
|
|
1452
|
+
'completed',
|
|
1453
|
+
],
|
|
1454
|
+
};
|
|
1455
|
+
/**
|
|
1456
|
+
* QuizQuestion entity
|
|
1457
|
+
*
|
|
1458
|
+
* Represents a question within a quiz with correct answer(s) and scoring.
|
|
1459
|
+
*/
|
|
1460
|
+
export const QuizQuestion = {
|
|
1461
|
+
singular: 'quiz question',
|
|
1462
|
+
plural: 'quiz questions',
|
|
1463
|
+
description: 'A question within a quiz with correct answer and scoring',
|
|
1464
|
+
properties: {
|
|
1465
|
+
// Identity
|
|
1466
|
+
text: {
|
|
1467
|
+
type: 'string',
|
|
1468
|
+
description: 'Question text',
|
|
1469
|
+
},
|
|
1470
|
+
description: {
|
|
1471
|
+
type: 'string',
|
|
1472
|
+
optional: true,
|
|
1473
|
+
description: 'Additional context or instructions',
|
|
1474
|
+
},
|
|
1475
|
+
// Type
|
|
1476
|
+
type: {
|
|
1477
|
+
type: 'string',
|
|
1478
|
+
description: 'Question type',
|
|
1479
|
+
examples: [
|
|
1480
|
+
'multiple-choice',
|
|
1481
|
+
'multiple-select',
|
|
1482
|
+
'true-false',
|
|
1483
|
+
'short-answer',
|
|
1484
|
+
'essay',
|
|
1485
|
+
'fill-blank',
|
|
1486
|
+
'matching',
|
|
1487
|
+
'ordering',
|
|
1488
|
+
],
|
|
1489
|
+
},
|
|
1490
|
+
order: {
|
|
1491
|
+
type: 'number',
|
|
1492
|
+
description: 'Display order within the quiz',
|
|
1493
|
+
},
|
|
1494
|
+
category: {
|
|
1495
|
+
type: 'string',
|
|
1496
|
+
optional: true,
|
|
1497
|
+
description: 'Question category for grouping',
|
|
1498
|
+
},
|
|
1499
|
+
// Options and answers
|
|
1500
|
+
options: {
|
|
1501
|
+
type: 'json',
|
|
1502
|
+
optional: true,
|
|
1503
|
+
description: 'Answer options for multiple choice',
|
|
1504
|
+
},
|
|
1505
|
+
correctAnswers: {
|
|
1506
|
+
type: 'json',
|
|
1507
|
+
description: 'Correct answer(s) with metadata',
|
|
1508
|
+
},
|
|
1509
|
+
caseSensitive: {
|
|
1510
|
+
type: 'boolean',
|
|
1511
|
+
optional: true,
|
|
1512
|
+
description: 'Whether text answers are case sensitive',
|
|
1513
|
+
},
|
|
1514
|
+
// Scoring
|
|
1515
|
+
points: {
|
|
1516
|
+
type: 'number',
|
|
1517
|
+
optional: true,
|
|
1518
|
+
description: 'Points awarded for correct answer',
|
|
1519
|
+
},
|
|
1520
|
+
negativePoints: {
|
|
1521
|
+
type: 'number',
|
|
1522
|
+
optional: true,
|
|
1523
|
+
description: 'Points deducted for incorrect answer',
|
|
1524
|
+
},
|
|
1525
|
+
partialCreditRules: {
|
|
1526
|
+
type: 'json',
|
|
1527
|
+
optional: true,
|
|
1528
|
+
description: 'Rules for awarding partial credit',
|
|
1529
|
+
},
|
|
1530
|
+
// Difficulty
|
|
1531
|
+
difficulty: {
|
|
1532
|
+
type: 'string',
|
|
1533
|
+
optional: true,
|
|
1534
|
+
description: 'Question difficulty level',
|
|
1535
|
+
examples: ['easy', 'medium', 'hard'],
|
|
1536
|
+
},
|
|
1537
|
+
// Feedback
|
|
1538
|
+
correctFeedback: {
|
|
1539
|
+
type: 'string',
|
|
1540
|
+
optional: true,
|
|
1541
|
+
description: 'Feedback shown for correct answers',
|
|
1542
|
+
},
|
|
1543
|
+
incorrectFeedback: {
|
|
1544
|
+
type: 'string',
|
|
1545
|
+
optional: true,
|
|
1546
|
+
description: 'Feedback shown for incorrect answers',
|
|
1547
|
+
},
|
|
1548
|
+
explanation: {
|
|
1549
|
+
type: 'string',
|
|
1550
|
+
optional: true,
|
|
1551
|
+
description: 'Detailed explanation of the correct answer',
|
|
1552
|
+
},
|
|
1553
|
+
// Media
|
|
1554
|
+
imageUrl: {
|
|
1555
|
+
type: 'url',
|
|
1556
|
+
optional: true,
|
|
1557
|
+
description: 'Image to display with the question',
|
|
1558
|
+
},
|
|
1559
|
+
videoUrl: {
|
|
1560
|
+
type: 'url',
|
|
1561
|
+
optional: true,
|
|
1562
|
+
description: 'Video to display with the question',
|
|
1563
|
+
},
|
|
1564
|
+
audioUrl: {
|
|
1565
|
+
type: 'url',
|
|
1566
|
+
optional: true,
|
|
1567
|
+
description: 'Audio to play with the question',
|
|
1568
|
+
},
|
|
1569
|
+
// Settings
|
|
1570
|
+
required: {
|
|
1571
|
+
type: 'boolean',
|
|
1572
|
+
optional: true,
|
|
1573
|
+
description: 'Whether the question must be answered',
|
|
1574
|
+
},
|
|
1575
|
+
randomizeOptions: {
|
|
1576
|
+
type: 'boolean',
|
|
1577
|
+
optional: true,
|
|
1578
|
+
description: 'Whether to randomize option order',
|
|
1579
|
+
},
|
|
1580
|
+
timeLimit: {
|
|
1581
|
+
type: 'number',
|
|
1582
|
+
optional: true,
|
|
1583
|
+
description: 'Time limit for this question in seconds',
|
|
1584
|
+
},
|
|
1585
|
+
// Statistics
|
|
1586
|
+
timesAnswered: {
|
|
1587
|
+
type: 'number',
|
|
1588
|
+
optional: true,
|
|
1589
|
+
description: 'Number of times this question was answered',
|
|
1590
|
+
},
|
|
1591
|
+
correctRate: {
|
|
1592
|
+
type: 'number',
|
|
1593
|
+
optional: true,
|
|
1594
|
+
description: 'Percentage of correct answers',
|
|
1595
|
+
},
|
|
1596
|
+
averageTime: {
|
|
1597
|
+
type: 'number',
|
|
1598
|
+
optional: true,
|
|
1599
|
+
description: 'Average time to answer in seconds',
|
|
1600
|
+
},
|
|
1601
|
+
// Metadata
|
|
1602
|
+
metadata: {
|
|
1603
|
+
type: 'json',
|
|
1604
|
+
optional: true,
|
|
1605
|
+
description: 'Additional question configuration',
|
|
1606
|
+
},
|
|
1607
|
+
},
|
|
1608
|
+
relationships: {
|
|
1609
|
+
quiz: {
|
|
1610
|
+
type: 'Quiz',
|
|
1611
|
+
backref: 'questions',
|
|
1612
|
+
description: 'Parent quiz',
|
|
1613
|
+
},
|
|
1614
|
+
},
|
|
1615
|
+
actions: [
|
|
1616
|
+
'create',
|
|
1617
|
+
'edit',
|
|
1618
|
+
'delete',
|
|
1619
|
+
'duplicate',
|
|
1620
|
+
'move',
|
|
1621
|
+
'setCorrectAnswer',
|
|
1622
|
+
'addOption',
|
|
1623
|
+
'removeOption',
|
|
1624
|
+
'reorderOptions',
|
|
1625
|
+
'setPoints',
|
|
1626
|
+
'setFeedback',
|
|
1627
|
+
],
|
|
1628
|
+
events: [
|
|
1629
|
+
'created',
|
|
1630
|
+
'edited',
|
|
1631
|
+
'deleted',
|
|
1632
|
+
'duplicated',
|
|
1633
|
+
'moved',
|
|
1634
|
+
'correctAnswerSet',
|
|
1635
|
+
'optionAdded',
|
|
1636
|
+
'optionRemoved',
|
|
1637
|
+
'optionsReordered',
|
|
1638
|
+
'pointsSet',
|
|
1639
|
+
'feedbackSet',
|
|
1640
|
+
],
|
|
1641
|
+
};
|
|
1642
|
+
/**
|
|
1643
|
+
* QuizResult entity
|
|
1644
|
+
*
|
|
1645
|
+
* Represents a completed quiz attempt with score and answers.
|
|
1646
|
+
*/
|
|
1647
|
+
export const QuizResult = {
|
|
1648
|
+
singular: 'quiz result',
|
|
1649
|
+
plural: 'quiz results',
|
|
1650
|
+
description: 'A completed quiz attempt with score and detailed results',
|
|
1651
|
+
properties: {
|
|
1652
|
+
// Score
|
|
1653
|
+
score: {
|
|
1654
|
+
type: 'number',
|
|
1655
|
+
description: 'Total score achieved',
|
|
1656
|
+
},
|
|
1657
|
+
maxScore: {
|
|
1658
|
+
type: 'number',
|
|
1659
|
+
description: 'Maximum possible score',
|
|
1660
|
+
},
|
|
1661
|
+
percentage: {
|
|
1662
|
+
type: 'number',
|
|
1663
|
+
description: 'Score as percentage (0-100)',
|
|
1664
|
+
},
|
|
1665
|
+
grade: {
|
|
1666
|
+
type: 'string',
|
|
1667
|
+
optional: true,
|
|
1668
|
+
description: 'Letter grade if applicable',
|
|
1669
|
+
},
|
|
1670
|
+
passed: {
|
|
1671
|
+
type: 'boolean',
|
|
1672
|
+
description: 'Whether the passing score was met',
|
|
1673
|
+
},
|
|
1674
|
+
// Answers
|
|
1675
|
+
answers: {
|
|
1676
|
+
type: 'json',
|
|
1677
|
+
description: 'Question answers with correctness',
|
|
1678
|
+
},
|
|
1679
|
+
correctCount: {
|
|
1680
|
+
type: 'number',
|
|
1681
|
+
description: 'Number of correct answers',
|
|
1682
|
+
},
|
|
1683
|
+
incorrectCount: {
|
|
1684
|
+
type: 'number',
|
|
1685
|
+
description: 'Number of incorrect answers',
|
|
1686
|
+
},
|
|
1687
|
+
skippedCount: {
|
|
1688
|
+
type: 'number',
|
|
1689
|
+
optional: true,
|
|
1690
|
+
description: 'Number of skipped questions',
|
|
1691
|
+
},
|
|
1692
|
+
// Timing
|
|
1693
|
+
startedAt: {
|
|
1694
|
+
type: 'datetime',
|
|
1695
|
+
description: 'When the quiz was started',
|
|
1696
|
+
},
|
|
1697
|
+
completedAt: {
|
|
1698
|
+
type: 'datetime',
|
|
1699
|
+
description: 'When the quiz was completed',
|
|
1700
|
+
},
|
|
1701
|
+
duration: {
|
|
1702
|
+
type: 'number',
|
|
1703
|
+
description: 'Time taken to complete in seconds',
|
|
1704
|
+
},
|
|
1705
|
+
timePerQuestion: {
|
|
1706
|
+
type: 'json',
|
|
1707
|
+
optional: true,
|
|
1708
|
+
description: 'Time spent on each question',
|
|
1709
|
+
},
|
|
1710
|
+
// Attempt
|
|
1711
|
+
attemptNumber: {
|
|
1712
|
+
type: 'number',
|
|
1713
|
+
description: 'Attempt number for this user',
|
|
1714
|
+
},
|
|
1715
|
+
isRetake: {
|
|
1716
|
+
type: 'boolean',
|
|
1717
|
+
description: 'Whether this is a retake',
|
|
1718
|
+
},
|
|
1719
|
+
previousBestScore: {
|
|
1720
|
+
type: 'number',
|
|
1721
|
+
optional: true,
|
|
1722
|
+
description: 'Best score from previous attempts',
|
|
1723
|
+
},
|
|
1724
|
+
// Participant
|
|
1725
|
+
participantEmail: {
|
|
1726
|
+
type: 'string',
|
|
1727
|
+
optional: true,
|
|
1728
|
+
description: 'Email address of quiz taker',
|
|
1729
|
+
},
|
|
1730
|
+
participantName: {
|
|
1731
|
+
type: 'string',
|
|
1732
|
+
optional: true,
|
|
1733
|
+
description: 'Name of quiz taker',
|
|
1734
|
+
},
|
|
1735
|
+
participantId: {
|
|
1736
|
+
type: 'string',
|
|
1737
|
+
optional: true,
|
|
1738
|
+
description: 'Authenticated user ID',
|
|
1739
|
+
},
|
|
1740
|
+
// Certification
|
|
1741
|
+
certificateIssued: {
|
|
1742
|
+
type: 'boolean',
|
|
1743
|
+
optional: true,
|
|
1744
|
+
description: 'Whether a certificate was issued',
|
|
1745
|
+
},
|
|
1746
|
+
certificateUrl: {
|
|
1747
|
+
type: 'url',
|
|
1748
|
+
optional: true,
|
|
1749
|
+
description: 'URL to download certificate',
|
|
1750
|
+
},
|
|
1751
|
+
certificateId: {
|
|
1752
|
+
type: 'string',
|
|
1753
|
+
optional: true,
|
|
1754
|
+
description: 'Unique certificate identifier',
|
|
1755
|
+
},
|
|
1756
|
+
// Analysis
|
|
1757
|
+
strengthAreas: {
|
|
1758
|
+
type: 'string',
|
|
1759
|
+
array: true,
|
|
1760
|
+
optional: true,
|
|
1761
|
+
description: 'Categories where participant performed well',
|
|
1762
|
+
},
|
|
1763
|
+
improvementAreas: {
|
|
1764
|
+
type: 'string',
|
|
1765
|
+
array: true,
|
|
1766
|
+
optional: true,
|
|
1767
|
+
description: 'Categories needing improvement',
|
|
1768
|
+
},
|
|
1769
|
+
percentile: {
|
|
1770
|
+
type: 'number',
|
|
1771
|
+
optional: true,
|
|
1772
|
+
description: 'Percentile rank compared to other attempts',
|
|
1773
|
+
},
|
|
1774
|
+
// Technical
|
|
1775
|
+
ipAddress: {
|
|
1776
|
+
type: 'string',
|
|
1777
|
+
optional: true,
|
|
1778
|
+
description: 'IP address',
|
|
1779
|
+
},
|
|
1780
|
+
userAgent: {
|
|
1781
|
+
type: 'string',
|
|
1782
|
+
optional: true,
|
|
1783
|
+
description: 'Browser user agent',
|
|
1784
|
+
},
|
|
1785
|
+
device: {
|
|
1786
|
+
type: 'string',
|
|
1787
|
+
optional: true,
|
|
1788
|
+
description: 'Device type: desktop, mobile, tablet',
|
|
1789
|
+
examples: ['desktop', 'mobile', 'tablet'],
|
|
1790
|
+
},
|
|
1791
|
+
// Review
|
|
1792
|
+
reviewed: {
|
|
1793
|
+
type: 'boolean',
|
|
1794
|
+
optional: true,
|
|
1795
|
+
description: 'Whether result has been reviewed by instructor',
|
|
1796
|
+
},
|
|
1797
|
+
reviewedBy: {
|
|
1798
|
+
type: 'string',
|
|
1799
|
+
optional: true,
|
|
1800
|
+
description: 'Instructor who reviewed the result',
|
|
1801
|
+
},
|
|
1802
|
+
reviewNotes: {
|
|
1803
|
+
type: 'string',
|
|
1804
|
+
optional: true,
|
|
1805
|
+
description: 'Instructor notes',
|
|
1806
|
+
},
|
|
1807
|
+
manualScore: {
|
|
1808
|
+
type: 'number',
|
|
1809
|
+
optional: true,
|
|
1810
|
+
description: 'Manually adjusted score if applicable',
|
|
1811
|
+
},
|
|
1812
|
+
// Flags
|
|
1813
|
+
flagged: {
|
|
1814
|
+
type: 'boolean',
|
|
1815
|
+
optional: true,
|
|
1816
|
+
description: 'Whether result is flagged for review',
|
|
1817
|
+
},
|
|
1818
|
+
flagReason: {
|
|
1819
|
+
type: 'string',
|
|
1820
|
+
optional: true,
|
|
1821
|
+
description: 'Reason for flagging',
|
|
1822
|
+
},
|
|
1823
|
+
cheatingDetected: {
|
|
1824
|
+
type: 'boolean',
|
|
1825
|
+
optional: true,
|
|
1826
|
+
description: 'Whether potential cheating was detected',
|
|
1827
|
+
},
|
|
1828
|
+
},
|
|
1829
|
+
relationships: {
|
|
1830
|
+
quiz: {
|
|
1831
|
+
type: 'Quiz',
|
|
1832
|
+
backref: 'results',
|
|
1833
|
+
description: 'Quiz this result belongs to',
|
|
1834
|
+
},
|
|
1835
|
+
participant: {
|
|
1836
|
+
type: 'Contact',
|
|
1837
|
+
required: false,
|
|
1838
|
+
description: 'Contact record for the quiz taker',
|
|
1839
|
+
},
|
|
1840
|
+
},
|
|
1841
|
+
actions: [
|
|
1842
|
+
'view',
|
|
1843
|
+
'export',
|
|
1844
|
+
'print',
|
|
1845
|
+
'downloadCertificate',
|
|
1846
|
+
'review',
|
|
1847
|
+
'flag',
|
|
1848
|
+
'unflag',
|
|
1849
|
+
'adjustScore',
|
|
1850
|
+
'delete',
|
|
1851
|
+
'retake',
|
|
1852
|
+
],
|
|
1853
|
+
events: [
|
|
1854
|
+
'completed',
|
|
1855
|
+
'exported',
|
|
1856
|
+
'printed',
|
|
1857
|
+
'certificateDownloaded',
|
|
1858
|
+
'reviewed',
|
|
1859
|
+
'flagged',
|
|
1860
|
+
'unflagged',
|
|
1861
|
+
'scoreAdjusted',
|
|
1862
|
+
'deleted',
|
|
1863
|
+
],
|
|
1864
|
+
};
|
|
1865
|
+
// =============================================================================
|
|
1866
|
+
// Export all entities as a schema
|
|
1867
|
+
// =============================================================================
|
|
1868
|
+
/**
|
|
1869
|
+
* All forms and survey entity types
|
|
1870
|
+
*/
|
|
1871
|
+
export const FormsEntities = {
|
|
1872
|
+
// Forms
|
|
1873
|
+
Form,
|
|
1874
|
+
FormField,
|
|
1875
|
+
FormResponse,
|
|
1876
|
+
// Surveys
|
|
1877
|
+
Survey,
|
|
1878
|
+
SurveyQuestion,
|
|
1879
|
+
SurveyResponse,
|
|
1880
|
+
// Quizzes
|
|
1881
|
+
Quiz,
|
|
1882
|
+
QuizQuestion,
|
|
1883
|
+
QuizResult,
|
|
1884
|
+
};
|
|
1885
|
+
/**
|
|
1886
|
+
* Entity categories for organization
|
|
1887
|
+
*/
|
|
1888
|
+
export const FormsCategories = {
|
|
1889
|
+
forms: ['Form', 'FormField', 'FormResponse'],
|
|
1890
|
+
surveys: ['Survey', 'SurveyQuestion', 'SurveyResponse'],
|
|
1891
|
+
quizzes: ['Quiz', 'QuizQuestion', 'QuizResult'],
|
|
1892
|
+
};
|
|
1893
|
+
//# sourceMappingURL=forms.js.map
|