@keystrokehq/scale_ai 0.1.0
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/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/add-studio-assignments.cjs +19 -0
- package/dist/actions/add-studio-assignments.cjs.map +1 -0
- package/dist/actions/add-studio-assignments.d.cts +9 -0
- package/dist/actions/add-studio-assignments.d.cts.map +1 -0
- package/dist/actions/add-studio-assignments.d.mts +9 -0
- package/dist/actions/add-studio-assignments.d.mts.map +1 -0
- package/dist/actions/add-studio-assignments.mjs +16 -0
- package/dist/actions/add-studio-assignments.mjs.map +1 -0
- package/dist/actions/add-task-tags.cjs +29 -0
- package/dist/actions/add-task-tags.cjs.map +1 -0
- package/dist/actions/add-task-tags.d.cts +9 -0
- package/dist/actions/add-task-tags.d.cts.map +1 -0
- package/dist/actions/add-task-tags.d.mts +9 -0
- package/dist/actions/add-task-tags.d.mts.map +1 -0
- package/dist/actions/add-task-tags.mjs +26 -0
- package/dist/actions/add-task-tags.mjs.map +1 -0
- package/dist/actions/create-batch.cjs +29 -0
- package/dist/actions/create-batch.cjs.map +1 -0
- package/dist/actions/create-batch.d.cts +9 -0
- package/dist/actions/create-batch.d.cts.map +1 -0
- package/dist/actions/create-batch.d.mts +9 -0
- package/dist/actions/create-batch.d.mts.map +1 -0
- package/dist/actions/create-batch.mjs +26 -0
- package/dist/actions/create-batch.mjs.map +1 -0
- package/dist/actions/create-document-transcription-task.cjs +111 -0
- package/dist/actions/create-document-transcription-task.cjs.map +1 -0
- package/dist/actions/create-document-transcription-task.d.cts +9 -0
- package/dist/actions/create-document-transcription-task.d.cts.map +1 -0
- package/dist/actions/create-document-transcription-task.d.mts +9 -0
- package/dist/actions/create-document-transcription-task.d.mts.map +1 -0
- package/dist/actions/create-document-transcription-task.mjs +110 -0
- package/dist/actions/create-document-transcription-task.mjs.map +1 -0
- package/dist/actions/create-image-annotation-task.cjs +188 -0
- package/dist/actions/create-image-annotation-task.cjs.map +1 -0
- package/dist/actions/create-image-annotation-task.d.cts +9 -0
- package/dist/actions/create-image-annotation-task.d.cts.map +1 -0
- package/dist/actions/create-image-annotation-task.d.mts +9 -0
- package/dist/actions/create-image-annotation-task.d.mts.map +1 -0
- package/dist/actions/create-image-annotation-task.mjs +187 -0
- package/dist/actions/create-image-annotation-task.mjs.map +1 -0
- package/dist/actions/create-lidar-annotation-task.cjs +52 -0
- package/dist/actions/create-lidar-annotation-task.cjs.map +1 -0
- package/dist/actions/create-lidar-annotation-task.d.cts +9 -0
- package/dist/actions/create-lidar-annotation-task.d.cts.map +1 -0
- package/dist/actions/create-lidar-annotation-task.d.mts +9 -0
- package/dist/actions/create-lidar-annotation-task.d.mts.map +1 -0
- package/dist/actions/create-lidar-annotation-task.mjs +51 -0
- package/dist/actions/create-lidar-annotation-task.mjs.map +1 -0
- package/dist/actions/create-lidar-segmentation-task.cjs +52 -0
- package/dist/actions/create-lidar-segmentation-task.cjs.map +1 -0
- package/dist/actions/create-lidar-segmentation-task.d.cts +9 -0
- package/dist/actions/create-lidar-segmentation-task.d.cts.map +1 -0
- package/dist/actions/create-lidar-segmentation-task.d.mts +9 -0
- package/dist/actions/create-lidar-segmentation-task.d.mts.map +1 -0
- package/dist/actions/create-lidar-segmentation-task.mjs +51 -0
- package/dist/actions/create-lidar-segmentation-task.mjs.map +1 -0
- package/dist/actions/create-named-entity-recognition-task.cjs +59 -0
- package/dist/actions/create-named-entity-recognition-task.cjs.map +1 -0
- package/dist/actions/create-named-entity-recognition-task.d.cts +9 -0
- package/dist/actions/create-named-entity-recognition-task.d.cts.map +1 -0
- package/dist/actions/create-named-entity-recognition-task.d.mts +9 -0
- package/dist/actions/create-named-entity-recognition-task.d.mts.map +1 -0
- package/dist/actions/create-named-entity-recognition-task.mjs +58 -0
- package/dist/actions/create-named-entity-recognition-task.mjs.map +1 -0
- package/dist/actions/create-segmentation-annotation-task.cjs +72 -0
- package/dist/actions/create-segmentation-annotation-task.cjs.map +1 -0
- package/dist/actions/create-segmentation-annotation-task.d.cts +9 -0
- package/dist/actions/create-segmentation-annotation-task.d.cts.map +1 -0
- package/dist/actions/create-segmentation-annotation-task.d.mts +9 -0
- package/dist/actions/create-segmentation-annotation-task.d.mts.map +1 -0
- package/dist/actions/create-segmentation-annotation-task.mjs +71 -0
- package/dist/actions/create-segmentation-annotation-task.mjs.map +1 -0
- package/dist/actions/create-text-collection-task.cjs +69 -0
- package/dist/actions/create-text-collection-task.cjs.map +1 -0
- package/dist/actions/create-text-collection-task.d.cts +9 -0
- package/dist/actions/create-text-collection-task.d.cts.map +1 -0
- package/dist/actions/create-text-collection-task.d.mts +9 -0
- package/dist/actions/create-text-collection-task.d.mts.map +1 -0
- package/dist/actions/create-text-collection-task.mjs +68 -0
- package/dist/actions/create-text-collection-task.mjs.map +1 -0
- package/dist/actions/create-video-annotation-task.cjs +120 -0
- package/dist/actions/create-video-annotation-task.cjs.map +1 -0
- package/dist/actions/create-video-annotation-task.d.cts +9 -0
- package/dist/actions/create-video-annotation-task.d.cts.map +1 -0
- package/dist/actions/create-video-annotation-task.d.mts +9 -0
- package/dist/actions/create-video-annotation-task.d.mts.map +1 -0
- package/dist/actions/create-video-annotation-task.mjs +119 -0
- package/dist/actions/create-video-annotation-task.mjs.map +1 -0
- package/dist/actions/create-video-playback-annotation-task.cjs +152 -0
- package/dist/actions/create-video-playback-annotation-task.cjs.map +1 -0
- package/dist/actions/create-video-playback-annotation-task.d.cts +9 -0
- package/dist/actions/create-video-playback-annotation-task.d.cts.map +1 -0
- package/dist/actions/create-video-playback-annotation-task.d.mts +9 -0
- package/dist/actions/create-video-playback-annotation-task.d.mts.map +1 -0
- package/dist/actions/create-video-playback-annotation-task.mjs +151 -0
- package/dist/actions/create-video-playback-annotation-task.mjs.map +1 -0
- package/dist/actions/delete-task-tags.cjs +28 -0
- package/dist/actions/delete-task-tags.cjs.map +1 -0
- package/dist/actions/delete-task-tags.d.cts +9 -0
- package/dist/actions/delete-task-tags.d.cts.map +1 -0
- package/dist/actions/delete-task-tags.d.mts +9 -0
- package/dist/actions/delete-task-tags.d.mts.map +1 -0
- package/dist/actions/delete-task-tags.mjs +25 -0
- package/dist/actions/delete-task-tags.mjs.map +1 -0
- package/dist/actions/delete-task-unique-id.cjs +26 -0
- package/dist/actions/delete-task-unique-id.cjs.map +1 -0
- package/dist/actions/delete-task-unique-id.d.cts +9 -0
- package/dist/actions/delete-task-unique-id.d.cts.map +1 -0
- package/dist/actions/delete-task-unique-id.d.mts +9 -0
- package/dist/actions/delete-task-unique-id.d.mts.map +1 -0
- package/dist/actions/delete-task-unique-id.mjs +25 -0
- package/dist/actions/delete-task-unique-id.mjs.map +1 -0
- package/dist/actions/finalize-batch.cjs +23 -0
- package/dist/actions/finalize-batch.cjs.map +1 -0
- package/dist/actions/finalize-batch.d.cts +9 -0
- package/dist/actions/finalize-batch.d.cts.map +1 -0
- package/dist/actions/finalize-batch.d.mts +9 -0
- package/dist/actions/finalize-batch.d.mts.map +1 -0
- package/dist/actions/finalize-batch.mjs +20 -0
- package/dist/actions/finalize-batch.mjs.map +1 -0
- package/dist/actions/get-assets.cjs +33 -0
- package/dist/actions/get-assets.cjs.map +1 -0
- package/dist/actions/get-assets.d.cts +9 -0
- package/dist/actions/get-assets.d.cts.map +1 -0
- package/dist/actions/get-assets.d.mts +9 -0
- package/dist/actions/get-assets.d.mts.map +1 -0
- package/dist/actions/get-assets.mjs +32 -0
- package/dist/actions/get-assets.mjs.map +1 -0
- package/dist/actions/get-batch-status.cjs +22 -0
- package/dist/actions/get-batch-status.cjs.map +1 -0
- package/dist/actions/get-batch-status.d.cts +9 -0
- package/dist/actions/get-batch-status.d.cts.map +1 -0
- package/dist/actions/get-batch-status.d.mts +9 -0
- package/dist/actions/get-batch-status.d.mts.map +1 -0
- package/dist/actions/get-batch-status.mjs +19 -0
- package/dist/actions/get-batch-status.mjs.map +1 -0
- package/dist/actions/get-batch.cjs +23 -0
- package/dist/actions/get-batch.cjs.map +1 -0
- package/dist/actions/get-batch.d.cts +9 -0
- package/dist/actions/get-batch.d.cts.map +1 -0
- package/dist/actions/get-batch.d.mts +9 -0
- package/dist/actions/get-batch.d.mts.map +1 -0
- package/dist/actions/get-batch.mjs +20 -0
- package/dist/actions/get-batch.mjs.map +1 -0
- package/dist/actions/get-fixless-audits.cjs +45 -0
- package/dist/actions/get-fixless-audits.cjs.map +1 -0
- package/dist/actions/get-fixless-audits.d.cts +9 -0
- package/dist/actions/get-fixless-audits.d.cts.map +1 -0
- package/dist/actions/get-fixless-audits.d.mts +9 -0
- package/dist/actions/get-fixless-audits.d.mts.map +1 -0
- package/dist/actions/get-fixless-audits.mjs +44 -0
- package/dist/actions/get-fixless-audits.mjs.map +1 -0
- package/dist/actions/get-project.cjs +26 -0
- package/dist/actions/get-project.cjs.map +1 -0
- package/dist/actions/get-project.d.cts +9 -0
- package/dist/actions/get-project.d.cts.map +1 -0
- package/dist/actions/get-project.d.mts +9 -0
- package/dist/actions/get-project.d.mts.map +1 -0
- package/dist/actions/get-project.mjs +25 -0
- package/dist/actions/get-project.mjs.map +1 -0
- package/dist/actions/get-quality-labelers.cjs +34 -0
- package/dist/actions/get-quality-labelers.cjs.map +1 -0
- package/dist/actions/get-quality-labelers.d.cts +9 -0
- package/dist/actions/get-quality-labelers.d.cts.map +1 -0
- package/dist/actions/get-quality-labelers.d.mts +9 -0
- package/dist/actions/get-quality-labelers.d.mts.map +1 -0
- package/dist/actions/get-quality-labelers.mjs +33 -0
- package/dist/actions/get-quality-labelers.mjs.map +1 -0
- package/dist/actions/get-studio-assignments.cjs +23 -0
- package/dist/actions/get-studio-assignments.cjs.map +1 -0
- package/dist/actions/get-studio-assignments.d.cts +9 -0
- package/dist/actions/get-studio-assignments.d.cts.map +1 -0
- package/dist/actions/get-studio-assignments.d.mts +9 -0
- package/dist/actions/get-studio-assignments.d.mts.map +1 -0
- package/dist/actions/get-studio-assignments.mjs +22 -0
- package/dist/actions/get-studio-assignments.mjs.map +1 -0
- package/dist/actions/get-studio-batches.cjs +25 -0
- package/dist/actions/get-studio-batches.cjs.map +1 -0
- package/dist/actions/get-studio-batches.d.cts +9 -0
- package/dist/actions/get-studio-batches.d.cts.map +1 -0
- package/dist/actions/get-studio-batches.d.mts +9 -0
- package/dist/actions/get-studio-batches.d.mts.map +1 -0
- package/dist/actions/get-studio-batches.mjs +24 -0
- package/dist/actions/get-studio-batches.mjs.map +1 -0
- package/dist/actions/get-teams.cjs +26 -0
- package/dist/actions/get-teams.cjs.map +1 -0
- package/dist/actions/get-teams.d.cts +9 -0
- package/dist/actions/get-teams.d.cts.map +1 -0
- package/dist/actions/get-teams.d.mts +9 -0
- package/dist/actions/get-teams.d.mts.map +1 -0
- package/dist/actions/get-teams.mjs +25 -0
- package/dist/actions/get-teams.mjs.map +1 -0
- package/dist/actions/get-v1-task-response-url.cjs +24 -0
- package/dist/actions/get-v1-task-response-url.cjs.map +1 -0
- package/dist/actions/get-v1-task-response-url.d.cts +9 -0
- package/dist/actions/get-v1-task-response-url.d.cts.map +1 -0
- package/dist/actions/get-v1-task-response-url.d.mts +9 -0
- package/dist/actions/get-v1-task-response-url.d.mts.map +1 -0
- package/dist/actions/get-v1-task-response-url.mjs +21 -0
- package/dist/actions/get-v1-task-response-url.mjs.map +1 -0
- package/dist/actions/get-v1-task.cjs +28 -0
- package/dist/actions/get-v1-task.cjs.map +1 -0
- package/dist/actions/get-v1-task.d.cts +9 -0
- package/dist/actions/get-v1-task.d.cts.map +1 -0
- package/dist/actions/get-v1-task.d.mts +9 -0
- package/dist/actions/get-v1-task.d.mts.map +1 -0
- package/dist/actions/get-v1-task.mjs +25 -0
- package/dist/actions/get-v1-task.mjs.map +1 -0
- package/dist/actions/import-file.cjs +27 -0
- package/dist/actions/import-file.cjs.map +1 -0
- package/dist/actions/import-file.d.cts +9 -0
- package/dist/actions/import-file.d.cts.map +1 -0
- package/dist/actions/import-file.d.mts +9 -0
- package/dist/actions/import-file.d.mts.map +1 -0
- package/dist/actions/import-file.mjs +24 -0
- package/dist/actions/import-file.mjs.map +1 -0
- package/dist/actions/index.cjs +81 -0
- package/dist/actions/index.d.cts +41 -0
- package/dist/actions/index.d.mts +41 -0
- package/dist/actions/index.mjs +41 -0
- package/dist/actions/invite-team-member.cjs +29 -0
- package/dist/actions/invite-team-member.cjs.map +1 -0
- package/dist/actions/invite-team-member.d.cts +9 -0
- package/dist/actions/invite-team-member.d.cts.map +1 -0
- package/dist/actions/invite-team-member.d.mts +9 -0
- package/dist/actions/invite-team-member.d.mts.map +1 -0
- package/dist/actions/invite-team-member.mjs +28 -0
- package/dist/actions/invite-team-member.mjs.map +1 -0
- package/dist/actions/list-batches.cjs +37 -0
- package/dist/actions/list-batches.cjs.map +1 -0
- package/dist/actions/list-batches.d.cts +9 -0
- package/dist/actions/list-batches.d.cts.map +1 -0
- package/dist/actions/list-batches.d.mts +9 -0
- package/dist/actions/list-batches.d.mts.map +1 -0
- package/dist/actions/list-batches.mjs +36 -0
- package/dist/actions/list-batches.mjs.map +1 -0
- package/dist/actions/list-projects.cjs +37 -0
- package/dist/actions/list-projects.cjs.map +1 -0
- package/dist/actions/list-projects.d.cts +9 -0
- package/dist/actions/list-projects.d.cts.map +1 -0
- package/dist/actions/list-projects.d.mts +9 -0
- package/dist/actions/list-projects.d.mts.map +1 -0
- package/dist/actions/list-projects.mjs +36 -0
- package/dist/actions/list-projects.mjs.map +1 -0
- package/dist/actions/list-tasks.cjs +53 -0
- package/dist/actions/list-tasks.cjs.map +1 -0
- package/dist/actions/list-tasks.d.cts +9 -0
- package/dist/actions/list-tasks.d.cts.map +1 -0
- package/dist/actions/list-tasks.d.mts +9 -0
- package/dist/actions/list-tasks.d.mts.map +1 -0
- package/dist/actions/list-tasks.mjs +52 -0
- package/dist/actions/list-tasks.mjs.map +1 -0
- package/dist/actions/post-v1-task-send-callback.cjs +22 -0
- package/dist/actions/post-v1-task-send-callback.cjs.map +1 -0
- package/dist/actions/post-v1-task-send-callback.d.cts +9 -0
- package/dist/actions/post-v1-task-send-callback.d.cts.map +1 -0
- package/dist/actions/post-v1-task-send-callback.d.mts +9 -0
- package/dist/actions/post-v1-task-send-callback.d.mts.map +1 -0
- package/dist/actions/post-v1-task-send-callback.mjs +19 -0
- package/dist/actions/post-v1-task-send-callback.mjs.map +1 -0
- package/dist/actions/remove-studio-assignments.cjs +33 -0
- package/dist/actions/remove-studio-assignments.cjs.map +1 -0
- package/dist/actions/remove-studio-assignments.d.cts +9 -0
- package/dist/actions/remove-studio-assignments.d.cts.map +1 -0
- package/dist/actions/remove-studio-assignments.d.mts +9 -0
- package/dist/actions/remove-studio-assignments.d.mts.map +1 -0
- package/dist/actions/remove-studio-assignments.mjs +32 -0
- package/dist/actions/remove-studio-assignments.mjs.map +1 -0
- package/dist/actions/reset-batch-priorities.cjs +25 -0
- package/dist/actions/reset-batch-priorities.cjs.map +1 -0
- package/dist/actions/reset-batch-priorities.d.cts +9 -0
- package/dist/actions/reset-batch-priorities.d.cts.map +1 -0
- package/dist/actions/reset-batch-priorities.d.mts +9 -0
- package/dist/actions/reset-batch-priorities.d.mts.map +1 -0
- package/dist/actions/reset-batch-priorities.mjs +24 -0
- package/dist/actions/reset-batch-priorities.mjs.map +1 -0
- package/dist/actions/set-batch-priorities.cjs +27 -0
- package/dist/actions/set-batch-priorities.cjs.map +1 -0
- package/dist/actions/set-batch-priorities.d.cts +9 -0
- package/dist/actions/set-batch-priorities.d.cts.map +1 -0
- package/dist/actions/set-batch-priorities.d.mts +9 -0
- package/dist/actions/set-batch-priorities.d.mts.map +1 -0
- package/dist/actions/set-batch-priorities.mjs +26 -0
- package/dist/actions/set-batch-priorities.mjs.map +1 -0
- package/dist/actions/set-project-ontology.cjs +44 -0
- package/dist/actions/set-project-ontology.cjs.map +1 -0
- package/dist/actions/set-project-ontology.d.cts +9 -0
- package/dist/actions/set-project-ontology.d.cts.map +1 -0
- package/dist/actions/set-project-ontology.d.mts +9 -0
- package/dist/actions/set-project-ontology.d.mts.map +1 -0
- package/dist/actions/set-project-ontology.mjs +43 -0
- package/dist/actions/set-project-ontology.mjs.map +1 -0
- package/dist/actions/set-project-params.cjs +32 -0
- package/dist/actions/set-project-params.cjs.map +1 -0
- package/dist/actions/set-project-params.d.cts +9 -0
- package/dist/actions/set-project-params.d.cts.map +1 -0
- package/dist/actions/set-project-params.d.mts +9 -0
- package/dist/actions/set-project-params.d.mts.map +1 -0
- package/dist/actions/set-project-params.mjs +31 -0
- package/dist/actions/set-project-params.mjs.map +1 -0
- package/dist/actions/set-task-metadata.cjs +34 -0
- package/dist/actions/set-task-metadata.cjs.map +1 -0
- package/dist/actions/set-task-metadata.d.cts +9 -0
- package/dist/actions/set-task-metadata.d.cts.map +1 -0
- package/dist/actions/set-task-metadata.d.mts +9 -0
- package/dist/actions/set-task-metadata.d.mts.map +1 -0
- package/dist/actions/set-task-metadata.mjs +31 -0
- package/dist/actions/set-task-metadata.mjs.map +1 -0
- package/dist/actions/update-task-unique-id.cjs +30 -0
- package/dist/actions/update-task-unique-id.cjs.map +1 -0
- package/dist/actions/update-task-unique-id.d.cts +9 -0
- package/dist/actions/update-task-unique-id.d.cts.map +1 -0
- package/dist/actions/update-task-unique-id.d.mts +9 -0
- package/dist/actions/update-task-unique-id.d.mts.map +1 -0
- package/dist/actions/update-task-unique-id.mjs +29 -0
- package/dist/actions/update-task-unique-id.mjs.map +1 -0
- package/dist/actions/upload-file.cjs +34 -0
- package/dist/actions/upload-file.cjs.map +1 -0
- package/dist/actions/upload-file.d.cts +9 -0
- package/dist/actions/upload-file.d.cts.map +1 -0
- package/dist/actions/upload-file.d.mts +9 -0
- package/dist/actions/upload-file.d.mts.map +1 -0
- package/dist/actions/upload-file.mjs +31 -0
- package/dist/actions/upload-file.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +86 -0
- package/dist/index.d.cts +43 -0
- package/dist/index.d.mts +43 -0
- package/dist/index.mjs +44 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-lidar-segmentation-task.mjs","names":[],"sources":["../../src/actions/create-lidar-segmentation-task.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScaleAiCreateLidarSegmentationTaskInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Up to 5 arbitrary labels per task for organization and filtering purposes.\").optional(),\n batch: z.string().describe(\"Batch name to associate with this task. If batch is provided, the batch's project is auto-assigned. Either 'project' or 'batch' must be provided.\").optional(),\n labels: z.array(z.string()).describe(\"Object classes for which semantic information is desired. Annotators will assign these semantic classes to each LiDAR point.\"),\n project: z.string().describe(\"Project name to associate with this task. Either 'project' or 'batch' must be provided.\").optional(),\n metadata: z.object({}).describe(\"Key-value pairs (max 10KB) for structured task information. Use this to store custom data related to the task.\").optional(),\n priority: z.union([z.literal(10), z.literal(20), z.literal(30)]).describe(\"Task priority level. Valid values are 10 (low), 20 (medium), or 30 (high).\").optional(),\n unique_id: z.string().describe(\"Arbitrary unique identifier across your account. Use this to prevent duplicate task creation.\").optional(),\n attachments: z.array(z.string()).describe(\"URLs to Frame objects you'd like to be labeled. Each URL should point to a valid frame data file.\"),\n instruction: z.string().describe(\"Markdown-enabled task instructions with examples to guide annotators.\").optional(),\n callback_url: z.string().describe(\"Full URL (http:// or https://) for task completion notification. Scale will send a POST request to this URL when the task is completed.\").optional(),\n attachment_type: z.enum([\"json\", \"protobuf\"]).describe(\"File format of the attachments. Must be either 'json' or 'protobuf'.\"),\n annotation_attributes: z.object({}).describe(\"Additional attributes to capture per annotation. Define custom attributes for the annotation process.\").optional(),\n clear_unique_id_on_error: z.boolean().describe(\"Reset unique_id if task errors. Set to true to allow resubmission of failed tasks with the same unique_id.\").optional(),\n}).describe(\"Request model for creating a LiDAR segmentation task.\");\nconst ScaleAiCreateLidarSegmentationTask_TaskParamsSchema: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Task tags.\").nullable().optional(),\n labels: z.array(z.string()).describe(\"Object classes for semantic annotation.\"),\n metadata: z.object({}).describe(\"Task metadata.\").nullable().optional(),\n attachments: z.array(z.string()).describe(\"URLs to Frame objects being labeled.\"),\n instruction: z.string().describe(\"Task instructions.\").nullable().optional(),\n attachment_type: z.string().describe(\"File format of the attachments.\"),\n annotation_attributes: z.object({}).describe(\"Additional annotation attributes.\").nullable().optional(),\n}).describe(\"Task parameters containing the submitted request parameters.\");\nexport const ScaleAiCreateLidarSegmentationTaskOutput: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Task type, will be 'lidarsegmentation'.\"),\n params: ScaleAiCreateLidarSegmentationTask_TaskParamsSchema.nullable().optional(),\n status: z.string().describe(\"Task status such as 'pending', 'completed', 'error', etc.\"),\n is_test: z.boolean().describe(\"Whether task is a test task.\").nullable().optional(),\n task_id: z.string().describe(\"Unique task identifier.\"),\n created_at: z.string().describe(\"Task creation timestamp in ISO 8601 format.\"),\n instruction: z.string().describe(\"Task instruction text.\").nullable().optional(),\n callback_url: z.string().describe(\"Callback URL for task completion notification.\").nullable().optional(),\n}).describe(\"Response model for a created LiDAR segmentation task.\");\n\nexport const scaleAiCreateLidarSegmentationTask = action(\"SCALE_AI_CREATE_LIDAR_SEGMENTATION_TASK\", {\n slug: \"scale_ai-create-lidar-segmentation-task\",\n name: \"Create LiDAR Segmentation Task\",\n description: \"Tool to create a LiDAR segmentation task where annotators assign semantic class labels to individual LiDAR points. Use when you need to annotate point cloud data with object classes such as vehicles, pedestrians, roads, buildings, etc. Either 'project' or 'batch' must be provided in the request.\",\n input: ScaleAiCreateLidarSegmentationTaskInput,\n output: ScaleAiCreateLidarSegmentationTaskOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0CAAwD,EAAE,OAAO;CAC5E,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CAC1H,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mJAAmJ,CAAC,CAAC,SAAS;CACzL,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,8HAA8H;CACnK,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS;CACjI,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,gHAAgH,CAAC,CAAC,SAAS;CAC3J,UAAU,EAAE,MAAM;EAAC,EAAE,QAAQ,EAAE;EAAG,EAAE,QAAQ,EAAE;EAAG,EAAE,QAAQ,EAAE;CAAC,CAAC,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CACjK,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;CACzI,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,mGAAmG;CAC7I,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,CAAC,CAAC,SAAS;CACnH,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,yIAAyI,CAAC,CAAC,SAAS;CACtL,iBAAiB,EAAE,KAAK,CAAC,QAAQ,UAAU,CAAC,CAAC,CAAC,SAAS,sE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C,SAAS,yBAAyB;EACtD,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C;EAC7E,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/E,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1G,CAAC,CAAC,CAAC,SAAS,uDAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-named-entity-recognition-task.ts
|
|
4
|
+
const ScaleAiCreateNamedEntityRecognitionTaskInput = zod.z.object({
|
|
5
|
+
tags: zod.z.array(zod.z.string()).describe("Custom labels (maximum 5 per task)").optional(),
|
|
6
|
+
text: zod.z.string().describe("The text from which to extract named entities"),
|
|
7
|
+
batch: zod.z.string().describe("Batch association (required for Scale Rapid projects)").optional(),
|
|
8
|
+
labels: zod.z.array(zod.z.object({
|
|
9
|
+
name: zod.z.string().describe("Identifier for the label type"),
|
|
10
|
+
children: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Nested sub-labels with name and display_name").optional(),
|
|
11
|
+
display_name: zod.z.string().describe("Human-readable label name").optional()
|
|
12
|
+
}).describe("Label definition for named entity recognition.")).describe("Array of label definitions for entity types to identify"),
|
|
13
|
+
project: zod.z.string().describe("Project association for the task").optional(),
|
|
14
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Custom metadata object for the task").optional(),
|
|
15
|
+
unique_id: zod.z.string().describe("Arbitrary unique identifier for the task").optional(),
|
|
16
|
+
attachments: zod.z.array(zod.z.object({
|
|
17
|
+
type: zod.z.string().describe("Type of attachment (e.g., 'text', 'website')"),
|
|
18
|
+
content: zod.z.string().describe("The actual text or URL content")
|
|
19
|
+
}).describe("Attachment for text collection tasks.")).describe("Array of attachments with additional context").optional(),
|
|
20
|
+
instruction: zod.z.string().describe("Markdown-enabled instructions for task completion"),
|
|
21
|
+
callback_url: zod.z.string().describe("Webhook URL for task completion notifications").optional(),
|
|
22
|
+
relationships: zod.z.array(zod.z.object({
|
|
23
|
+
name: zod.z.string().describe("Identifier for the relationship"),
|
|
24
|
+
is_directed: zod.z.boolean().describe("Indicates if the relationship is directional"),
|
|
25
|
+
display_name: zod.z.string().describe("Human-readable relationship label"),
|
|
26
|
+
source_label: zod.z.string().describe("Source entity label name"),
|
|
27
|
+
target_label: zod.z.string().describe("Target entity label name")
|
|
28
|
+
}).describe("Relationship definition between entities.")).describe("Array of relationship definitions between entities").optional(),
|
|
29
|
+
merge_newlines: zod.z.boolean().describe("Controls newline character handling in text").optional(),
|
|
30
|
+
allow_overlapping_annotations: zod.z.boolean().describe("Permits overlapping text spans in annotations").optional()
|
|
31
|
+
}).describe("Request model for creating a named entity recognition task.");
|
|
32
|
+
const ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema = zod.z.object({
|
|
33
|
+
text: zod.z.string().describe("The input text for entity extraction").nullable().optional(),
|
|
34
|
+
labels: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Array of label definitions").nullable().optional(),
|
|
35
|
+
attachments: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Array of attachments").nullable().optional()
|
|
36
|
+
}).describe("Task configuration parameters.");
|
|
37
|
+
const ScaleAiCreateNamedEntityRecognitionTaskOutput = zod.z.object({
|
|
38
|
+
type: zod.z.string().describe("Task type, always 'namedentityrecognition'").nullable().optional(),
|
|
39
|
+
params: ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema.nullable().optional(),
|
|
40
|
+
status: zod.z.string().describe("Current task status").nullable().optional(),
|
|
41
|
+
is_test: zod.z.boolean().describe("Indicates if this is a test task").nullable().optional(),
|
|
42
|
+
task_id: zod.z.string().describe("Unique identifier for the created task").nullable().optional(),
|
|
43
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Custom metadata object passed during creation").nullable().optional(),
|
|
44
|
+
created_at: zod.z.string().describe("ISO 8601 timestamp when the task was created").nullable().optional(),
|
|
45
|
+
instruction: zod.z.string().describe("The markdown-enabled instructions provided").nullable().optional(),
|
|
46
|
+
callback_url: zod.z.string().describe("The webhook URL specified in the request").nullable().optional(),
|
|
47
|
+
completed_at: zod.z.string().describe("ISO 8601 timestamp when the task was completed").nullable().optional()
|
|
48
|
+
}).describe("Response model for created named entity recognition task.");
|
|
49
|
+
const scaleAiCreateNamedEntityRecognitionTask = require_action.action("SCALE_AI_CREATE_NAMED_ENTITY_RECOGNITION_TASK", {
|
|
50
|
+
slug: "scale_ai-create-named-entity-recognition-task",
|
|
51
|
+
name: "Create Named Entity Recognition Task",
|
|
52
|
+
description: "Tool to create a named entity recognition task for labelers to highlight text entity mentions. Use when you need to extract and label entities such as people, organizations, or locations from text.",
|
|
53
|
+
input: ScaleAiCreateNamedEntityRecognitionTaskInput,
|
|
54
|
+
output: ScaleAiCreateNamedEntityRecognitionTaskOutput
|
|
55
|
+
});
|
|
56
|
+
//#endregion
|
|
57
|
+
exports.scaleAiCreateNamedEntityRecognitionTask = scaleAiCreateNamedEntityRecognitionTask;
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=create-named-entity-recognition-task.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-named-entity-recognition-task.cjs","names":["z","action"],"sources":["../../src/actions/create-named-entity-recognition-task.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScaleAiCreateNamedEntityRecognitionTaskInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Custom labels (maximum 5 per task)\").optional(),\n text: z.string().describe(\"The text from which to extract named entities\"),\n batch: z.string().describe(\"Batch association (required for Scale Rapid projects)\").optional(),\n labels: z.array(z.object({\n name: z.string().describe(\"Identifier for the label type\"),\n children: z.array(z.record(z.string(), z.unknown())).describe(\"Nested sub-labels with name and display_name\").optional(),\n display_name: z.string().describe(\"Human-readable label name\").optional(),\n}).describe(\"Label definition for named entity recognition.\")).describe(\"Array of label definitions for entity types to identify\"),\n project: z.string().describe(\"Project association for the task\").optional(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Custom metadata object for the task\").optional(),\n unique_id: z.string().describe(\"Arbitrary unique identifier for the task\").optional(),\n attachments: z.array(z.object({\n type: z.string().describe(\"Type of attachment (e.g., 'text', 'website')\"),\n content: z.string().describe(\"The actual text or URL content\"),\n}).describe(\"Attachment for text collection tasks.\")).describe(\"Array of attachments with additional context\").optional(),\n instruction: z.string().describe(\"Markdown-enabled instructions for task completion\"),\n callback_url: z.string().describe(\"Webhook URL for task completion notifications\").optional(),\n relationships: z.array(z.object({\n name: z.string().describe(\"Identifier for the relationship\"),\n is_directed: z.boolean().describe(\"Indicates if the relationship is directional\"),\n display_name: z.string().describe(\"Human-readable relationship label\"),\n source_label: z.string().describe(\"Source entity label name\"),\n target_label: z.string().describe(\"Target entity label name\"),\n}).describe(\"Relationship definition between entities.\")).describe(\"Array of relationship definitions between entities\").optional(),\n merge_newlines: z.boolean().describe(\"Controls newline character handling in text\").optional(),\n allow_overlapping_annotations: z.boolean().describe(\"Permits overlapping text spans in annotations\").optional(),\n}).describe(\"Request model for creating a named entity recognition task.\");\nconst ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The input text for entity extraction\").nullable().optional(),\n labels: z.array(z.record(z.string(), z.unknown())).describe(\"Array of label definitions\").nullable().optional(),\n attachments: z.array(z.record(z.string(), z.unknown())).describe(\"Array of attachments\").nullable().optional(),\n}).describe(\"Task configuration parameters.\");\nexport const ScaleAiCreateNamedEntityRecognitionTaskOutput: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Task type, always 'namedentityrecognition'\").nullable().optional(),\n params: ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema.nullable().optional(),\n status: z.string().describe(\"Current task status\").nullable().optional(),\n is_test: z.boolean().describe(\"Indicates if this is a test task\").nullable().optional(),\n task_id: z.string().describe(\"Unique identifier for the created task\").nullable().optional(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Custom metadata object passed during creation\").nullable().optional(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the task was created\").nullable().optional(),\n instruction: z.string().describe(\"The markdown-enabled instructions provided\").nullable().optional(),\n callback_url: z.string().describe(\"The webhook URL specified in the request\").nullable().optional(),\n completed_at: z.string().describe(\"ISO 8601 timestamp when the task was completed\").nullable().optional(),\n}).describe(\"Response model for created named entity recognition task.\");\n\nexport const scaleAiCreateNamedEntityRecognitionTask = action(\"SCALE_AI_CREATE_NAMED_ENTITY_RECOGNITION_TASK\", {\n slug: \"scale_ai-create-named-entity-recognition-task\",\n name: \"Create Named Entity Recognition Task\",\n description: \"Tool to create a named entity recognition task for labelers to highlight text entity mentions. Use when you need to extract and label entities such as people, organizations, or locations from text.\",\n input: ScaleAiCreateNamedEntityRecognitionTaskInput,\n output: ScaleAiCreateNamedEntityRecognitionTaskOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+CAA6DA,IAAAA,EAAE,OAAO;CACjF,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;CAClF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C;CACzE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CAC7F,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACzB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EACzD,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,8CAA8C,C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,SAAS,CAAC,CAAC,SAAS;CAC3F,UAAUA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1H,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpG,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClG,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC1G,CAAC,CAAC,CAAC,SAAS,2DAA2D;AAEvE,MAAa,0CAA0CC,eAAAA,OAAO,iDAAiD;CAC7G,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-named-entity-recognition-task.d.ts
|
|
4
|
+
declare const ScaleAiCreateNamedEntityRecognitionTaskInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScaleAiCreateNamedEntityRecognitionTaskOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scaleAiCreateNamedEntityRecognitionTask: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scaleAiCreateNamedEntityRecognitionTask };
|
|
9
|
+
//# sourceMappingURL=create-named-entity-recognition-task.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-named-entity-recognition-task.d.cts","names":[],"sources":["../../src/actions/create-named-entity-recognition-task.ts"],"mappings":";;;cAIa,4CAAA,EAA8C,CAAA,CAAE,UA2Ba;AAAA,cAM7D,6CAAA,EAA+C,CAAA,CAAE,UAWU;AAAA,cAE3D,uCAAA,gCAAuC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-named-entity-recognition-task.d.ts
|
|
4
|
+
declare const ScaleAiCreateNamedEntityRecognitionTaskInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScaleAiCreateNamedEntityRecognitionTaskOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scaleAiCreateNamedEntityRecognitionTask: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scaleAiCreateNamedEntityRecognitionTask };
|
|
9
|
+
//# sourceMappingURL=create-named-entity-recognition-task.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-named-entity-recognition-task.d.mts","names":[],"sources":["../../src/actions/create-named-entity-recognition-task.ts"],"mappings":";;;cAIa,4CAAA,EAA8C,CAAA,CAAE,UA2Ba;AAAA,cAM7D,6CAAA,EAA+C,CAAA,CAAE,UAWU;AAAA,cAE3D,uCAAA,gCAAuC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-named-entity-recognition-task.ts
|
|
4
|
+
const ScaleAiCreateNamedEntityRecognitionTaskInput = z.object({
|
|
5
|
+
tags: z.array(z.string()).describe("Custom labels (maximum 5 per task)").optional(),
|
|
6
|
+
text: z.string().describe("The text from which to extract named entities"),
|
|
7
|
+
batch: z.string().describe("Batch association (required for Scale Rapid projects)").optional(),
|
|
8
|
+
labels: z.array(z.object({
|
|
9
|
+
name: z.string().describe("Identifier for the label type"),
|
|
10
|
+
children: z.array(z.record(z.string(), z.unknown())).describe("Nested sub-labels with name and display_name").optional(),
|
|
11
|
+
display_name: z.string().describe("Human-readable label name").optional()
|
|
12
|
+
}).describe("Label definition for named entity recognition.")).describe("Array of label definitions for entity types to identify"),
|
|
13
|
+
project: z.string().describe("Project association for the task").optional(),
|
|
14
|
+
metadata: z.record(z.string(), z.unknown()).describe("Custom metadata object for the task").optional(),
|
|
15
|
+
unique_id: z.string().describe("Arbitrary unique identifier for the task").optional(),
|
|
16
|
+
attachments: z.array(z.object({
|
|
17
|
+
type: z.string().describe("Type of attachment (e.g., 'text', 'website')"),
|
|
18
|
+
content: z.string().describe("The actual text or URL content")
|
|
19
|
+
}).describe("Attachment for text collection tasks.")).describe("Array of attachments with additional context").optional(),
|
|
20
|
+
instruction: z.string().describe("Markdown-enabled instructions for task completion"),
|
|
21
|
+
callback_url: z.string().describe("Webhook URL for task completion notifications").optional(),
|
|
22
|
+
relationships: z.array(z.object({
|
|
23
|
+
name: z.string().describe("Identifier for the relationship"),
|
|
24
|
+
is_directed: z.boolean().describe("Indicates if the relationship is directional"),
|
|
25
|
+
display_name: z.string().describe("Human-readable relationship label"),
|
|
26
|
+
source_label: z.string().describe("Source entity label name"),
|
|
27
|
+
target_label: z.string().describe("Target entity label name")
|
|
28
|
+
}).describe("Relationship definition between entities.")).describe("Array of relationship definitions between entities").optional(),
|
|
29
|
+
merge_newlines: z.boolean().describe("Controls newline character handling in text").optional(),
|
|
30
|
+
allow_overlapping_annotations: z.boolean().describe("Permits overlapping text spans in annotations").optional()
|
|
31
|
+
}).describe("Request model for creating a named entity recognition task.");
|
|
32
|
+
const ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema = z.object({
|
|
33
|
+
text: z.string().describe("The input text for entity extraction").nullable().optional(),
|
|
34
|
+
labels: z.array(z.record(z.string(), z.unknown())).describe("Array of label definitions").nullable().optional(),
|
|
35
|
+
attachments: z.array(z.record(z.string(), z.unknown())).describe("Array of attachments").nullable().optional()
|
|
36
|
+
}).describe("Task configuration parameters.");
|
|
37
|
+
const scaleAiCreateNamedEntityRecognitionTask = action("SCALE_AI_CREATE_NAMED_ENTITY_RECOGNITION_TASK", {
|
|
38
|
+
slug: "scale_ai-create-named-entity-recognition-task",
|
|
39
|
+
name: "Create Named Entity Recognition Task",
|
|
40
|
+
description: "Tool to create a named entity recognition task for labelers to highlight text entity mentions. Use when you need to extract and label entities such as people, organizations, or locations from text.",
|
|
41
|
+
input: ScaleAiCreateNamedEntityRecognitionTaskInput,
|
|
42
|
+
output: z.object({
|
|
43
|
+
type: z.string().describe("Task type, always 'namedentityrecognition'").nullable().optional(),
|
|
44
|
+
params: ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema.nullable().optional(),
|
|
45
|
+
status: z.string().describe("Current task status").nullable().optional(),
|
|
46
|
+
is_test: z.boolean().describe("Indicates if this is a test task").nullable().optional(),
|
|
47
|
+
task_id: z.string().describe("Unique identifier for the created task").nullable().optional(),
|
|
48
|
+
metadata: z.record(z.string(), z.unknown()).describe("Custom metadata object passed during creation").nullable().optional(),
|
|
49
|
+
created_at: z.string().describe("ISO 8601 timestamp when the task was created").nullable().optional(),
|
|
50
|
+
instruction: z.string().describe("The markdown-enabled instructions provided").nullable().optional(),
|
|
51
|
+
callback_url: z.string().describe("The webhook URL specified in the request").nullable().optional(),
|
|
52
|
+
completed_at: z.string().describe("ISO 8601 timestamp when the task was completed").nullable().optional()
|
|
53
|
+
}).describe("Response model for created named entity recognition task.")
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
export { scaleAiCreateNamedEntityRecognitionTask };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=create-named-entity-recognition-task.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-named-entity-recognition-task.mjs","names":[],"sources":["../../src/actions/create-named-entity-recognition-task.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScaleAiCreateNamedEntityRecognitionTaskInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Custom labels (maximum 5 per task)\").optional(),\n text: z.string().describe(\"The text from which to extract named entities\"),\n batch: z.string().describe(\"Batch association (required for Scale Rapid projects)\").optional(),\n labels: z.array(z.object({\n name: z.string().describe(\"Identifier for the label type\"),\n children: z.array(z.record(z.string(), z.unknown())).describe(\"Nested sub-labels with name and display_name\").optional(),\n display_name: z.string().describe(\"Human-readable label name\").optional(),\n}).describe(\"Label definition for named entity recognition.\")).describe(\"Array of label definitions for entity types to identify\"),\n project: z.string().describe(\"Project association for the task\").optional(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Custom metadata object for the task\").optional(),\n unique_id: z.string().describe(\"Arbitrary unique identifier for the task\").optional(),\n attachments: z.array(z.object({\n type: z.string().describe(\"Type of attachment (e.g., 'text', 'website')\"),\n content: z.string().describe(\"The actual text or URL content\"),\n}).describe(\"Attachment for text collection tasks.\")).describe(\"Array of attachments with additional context\").optional(),\n instruction: z.string().describe(\"Markdown-enabled instructions for task completion\"),\n callback_url: z.string().describe(\"Webhook URL for task completion notifications\").optional(),\n relationships: z.array(z.object({\n name: z.string().describe(\"Identifier for the relationship\"),\n is_directed: z.boolean().describe(\"Indicates if the relationship is directional\"),\n display_name: z.string().describe(\"Human-readable relationship label\"),\n source_label: z.string().describe(\"Source entity label name\"),\n target_label: z.string().describe(\"Target entity label name\"),\n}).describe(\"Relationship definition between entities.\")).describe(\"Array of relationship definitions between entities\").optional(),\n merge_newlines: z.boolean().describe(\"Controls newline character handling in text\").optional(),\n allow_overlapping_annotations: z.boolean().describe(\"Permits overlapping text spans in annotations\").optional(),\n}).describe(\"Request model for creating a named entity recognition task.\");\nconst ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The input text for entity extraction\").nullable().optional(),\n labels: z.array(z.record(z.string(), z.unknown())).describe(\"Array of label definitions\").nullable().optional(),\n attachments: z.array(z.record(z.string(), z.unknown())).describe(\"Array of attachments\").nullable().optional(),\n}).describe(\"Task configuration parameters.\");\nexport const ScaleAiCreateNamedEntityRecognitionTaskOutput: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Task type, always 'namedentityrecognition'\").nullable().optional(),\n params: ScaleAiCreateNamedEntityRecognitionTask_TaskParamsSchema.nullable().optional(),\n status: z.string().describe(\"Current task status\").nullable().optional(),\n is_test: z.boolean().describe(\"Indicates if this is a test task\").nullable().optional(),\n task_id: z.string().describe(\"Unique identifier for the created task\").nullable().optional(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Custom metadata object passed during creation\").nullable().optional(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the task was created\").nullable().optional(),\n instruction: z.string().describe(\"The markdown-enabled instructions provided\").nullable().optional(),\n callback_url: z.string().describe(\"The webhook URL specified in the request\").nullable().optional(),\n completed_at: z.string().describe(\"ISO 8601 timestamp when the task was completed\").nullable().optional(),\n}).describe(\"Response model for created named entity recognition task.\");\n\nexport const scaleAiCreateNamedEntityRecognitionTask = action(\"SCALE_AI_CREATE_NAMED_ENTITY_RECOGNITION_TASK\", {\n slug: \"scale_ai-create-named-entity-recognition-task\",\n name: \"Create Named Entity Recognition Task\",\n description: \"Tool to create a named entity recognition task for labelers to highlight text entity mentions. Use when you need to extract and label entities such as people, organizations, or locations from text.\",\n input: ScaleAiCreateNamedEntityRecognitionTaskInput,\n output: ScaleAiCreateNamedEntityRecognitionTaskOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+CAA6D,EAAE,OAAO;CACjF,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CA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Q,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC1H,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpG,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACnG,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClG,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC1G,CAAC,CAAC,CAAC,SAAS,2DAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-segmentation-annotation-task.ts
|
|
4
|
+
const ScaleAiCreateSegmentationAnnotationTaskInput = zod.z.object({
|
|
5
|
+
tags: zod.z.array(zod.z.string()).describe("Arbitrary labels to assign to task. Maximum 5 per task").optional(),
|
|
6
|
+
batch: zod.z.string().describe("Batch name for task association; overrides project requirement").optional(),
|
|
7
|
+
labels: zod.z.array(zod.z.union([zod.z.string(), zod.z.object({
|
|
8
|
+
name: zod.z.string().describe("Identifier for the label type"),
|
|
9
|
+
display_name: zod.z.string().nullable().optional()
|
|
10
|
+
}).describe("Label description object for segmentation.")])).describe("Array of strings or LabelDescription objects describing different types of objects for image segmentation. Maximum 50 labels."),
|
|
11
|
+
project: zod.z.string().describe("Name of the project to associate this task with").optional(),
|
|
12
|
+
metadata: zod.z.object({}).describe("Set of key/value pairs to attach to task object. Maximum 10KB").optional(),
|
|
13
|
+
unique_id: zod.z.string().describe("Custom identifier; must be unique across your account").optional(),
|
|
14
|
+
attachment: zod.z.string().describe("URL to the image requiring segmentation"),
|
|
15
|
+
hypothesis: zod.z.object({}).describe("Pre-labeled annotations for refinement by annotators. Editable annotations that a task should be initialized with, useful for model pre-labeling scenarios").optional(),
|
|
16
|
+
instruction: zod.z.string().describe("Markdown-enabled string or iframe embed Google Doc explaining how to do the segmentation").optional(),
|
|
17
|
+
callback_url: zod.z.string().describe("Full URL (including http:// or https://) or email address for callback notification").optional(),
|
|
18
|
+
allow_unlabeled: zod.z.boolean().describe("Whether this image can be completed without every pixel being labeled").optional(),
|
|
19
|
+
attachment_type: zod.z.string().describe("Describes file type; currently supports 'image' only").optional(),
|
|
20
|
+
context_attachments: zod.z.array(zod.z.object({ attachment: zod.z.string().describe("URL to the reference image") }).describe("Reference image attachment for context.")).describe("Reference images in [{\"attachment\": \"<url>\"}] format; cannot include task URL").optional(),
|
|
21
|
+
annotation_attributes: zod.z.object({}).describe("Additional attributes to capture per annotation with structure containing type, description, choices, and conditions").optional(),
|
|
22
|
+
clear_unique_id_on_error: zod.z.boolean().describe("Auto-reset unique_id if task errors post-submission").optional()
|
|
23
|
+
}).describe("Request model for creating a segmentation annotation task.");
|
|
24
|
+
const ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema = zod.z.object({
|
|
25
|
+
labels: zod.z.array(zod.z.union([zod.z.string(), zod.z.object({})])).describe("Label objects used for segmentation").nullable().optional(),
|
|
26
|
+
attachment: zod.z.string().describe("URL to the image").nullable().optional(),
|
|
27
|
+
allow_unlabeled: zod.z.boolean().describe("Whether unlabeled pixels are allowed").nullable().optional(),
|
|
28
|
+
attachment_type: zod.z.string().describe("Type of attachment").nullable().optional(),
|
|
29
|
+
annotation_attributes: zod.z.object({}).describe("Additional annotation attributes").nullable().optional()
|
|
30
|
+
}).describe("Task parameters containing the submitted request parameters.");
|
|
31
|
+
const ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema = zod.z.object({
|
|
32
|
+
image: zod.z.string().describe("URL to the combined segmentation image").nullable().optional(),
|
|
33
|
+
indexedImage: zod.z.string().describe("URL to the indexed image where pixel values correspond to label indices").nullable().optional(),
|
|
34
|
+
extendedIndexedImage: zod.z.string().describe("URL to extended indexed image if applicable").nullable().optional()
|
|
35
|
+
}).describe("Combined annotation images.");
|
|
36
|
+
const ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema = zod.z.object({
|
|
37
|
+
labeled: zod.z.object({}).describe("Dictionary mapping label names to their individual mask URLs").nullable().optional(),
|
|
38
|
+
combined: ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema.nullable().optional(),
|
|
39
|
+
unlabeled: zod.z.string().describe("URL to mask of unlabeled pixels").nullable().optional()
|
|
40
|
+
}).describe("Annotations data structure containing combined, labeled and unlabeled images.");
|
|
41
|
+
const ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema = zod.z.object({
|
|
42
|
+
annotations: ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema.nullable().optional(),
|
|
43
|
+
labelMapping: zod.z.object({}).describe("Mapping of label names to their index and color values").nullable().optional(),
|
|
44
|
+
is_customer_fix: zod.z.boolean().describe("Indicates if this is a customer fix").nullable().optional()
|
|
45
|
+
}).describe("Segmentation results when task is completed.");
|
|
46
|
+
const ScaleAiCreateSegmentationAnnotationTaskOutput = zod.z.object({
|
|
47
|
+
type: zod.z.string().describe("Task type; returns 'segmentannotation'"),
|
|
48
|
+
params: ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema.nullable().optional(),
|
|
49
|
+
status: zod.z.string().describe("Task status (e.g., 'pending', 'completed')"),
|
|
50
|
+
is_test: zod.z.boolean().describe("Indicates test task status").nullable().optional(),
|
|
51
|
+
project: zod.z.string().describe("Associated project name").nullable().optional(),
|
|
52
|
+
task_id: zod.z.string().describe("Unique identifier for the created task"),
|
|
53
|
+
urgency: zod.z.string().describe("Priority level; defaults to 'standard'").nullable().optional(),
|
|
54
|
+
metadata: zod.z.object({}).describe("Custom key/value pairs attached to task").nullable().optional(),
|
|
55
|
+
response: ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema.nullable().optional(),
|
|
56
|
+
created_at: zod.z.string().describe("ISO timestamp of task creation"),
|
|
57
|
+
updated_at: zod.z.string().describe("ISO timestamp of last update").nullable().optional(),
|
|
58
|
+
instruction: zod.z.string().describe("Instructions provided for the task").nullable().optional(),
|
|
59
|
+
callback_url: zod.z.string().describe("Callback endpoint for completion notification").nullable().optional(),
|
|
60
|
+
work_started: zod.z.boolean().describe("Whether annotation has commenced").nullable().optional()
|
|
61
|
+
}).describe("Response model for created segmentation annotation task.");
|
|
62
|
+
const scaleAiCreateSegmentationAnnotationTask = require_action.action("SCALE_AI_CREATE_SEGMENTATION_ANNOTATION_TASK", {
|
|
63
|
+
slug: "scale_ai-create-segmentation-annotation-task",
|
|
64
|
+
name: "Create Segmentation Annotation Task",
|
|
65
|
+
description: "Tool to create a segmentation task where annotators classify pixels in an image according to provided labels. Use when you need pixel-wise semantic segmentation of images.",
|
|
66
|
+
input: ScaleAiCreateSegmentationAnnotationTaskInput,
|
|
67
|
+
output: ScaleAiCreateSegmentationAnnotationTaskOutput
|
|
68
|
+
});
|
|
69
|
+
//#endregion
|
|
70
|
+
exports.scaleAiCreateSegmentationAnnotationTask = scaleAiCreateSegmentationAnnotationTask;
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=create-segmentation-annotation-task.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-segmentation-annotation-task.cjs","names":["z","action"],"sources":["../../src/actions/create-segmentation-annotation-task.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScaleAiCreateSegmentationAnnotationTaskInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Arbitrary labels to assign to task. Maximum 5 per task\").optional(),\n batch: z.string().describe(\"Batch name for task association; overrides project requirement\").optional(),\n labels: z.array(z.union([z.string(), z.object({\n name: z.string().describe(\"Identifier for the label type\"),\n display_name: z.string().nullable().optional(),\n}).describe(\"Label description object for segmentation.\")])).describe(\"Array of strings or LabelDescription objects describing different types of objects for image segmentation. Maximum 50 labels.\"),\n project: z.string().describe(\"Name of the project to associate this task with\").optional(),\n metadata: z.object({}).describe(\"Set of key/value pairs to attach to task object. Maximum 10KB\").optional(),\n unique_id: z.string().describe(\"Custom identifier; must be unique across your account\").optional(),\n attachment: z.string().describe(\"URL to the image requiring segmentation\"),\n hypothesis: z.object({}).describe(\"Pre-labeled annotations for refinement by annotators. Editable annotations that a task should be initialized with, useful for model pre-labeling scenarios\").optional(),\n instruction: z.string().describe(\"Markdown-enabled string or iframe embed Google Doc explaining how to do the segmentation\").optional(),\n callback_url: z.string().describe(\"Full URL (including http:// or https://) or email address for callback notification\").optional(),\n allow_unlabeled: z.boolean().describe(\"Whether this image can be completed without every pixel being labeled\").optional(),\n attachment_type: z.string().describe(\"Describes file type; currently supports 'image' only\").optional(),\n context_attachments: z.array(z.object({\n attachment: z.string().describe(\"URL to the reference image\"),\n}).describe(\"Reference image attachment for context.\")).describe(\"Reference images in [{\\\"attachment\\\": \\\"<url>\\\"}] format; cannot include task URL\").optional(),\n annotation_attributes: z.object({}).describe(\"Additional attributes to capture per annotation with structure containing type, description, choices, and conditions\").optional(),\n clear_unique_id_on_error: z.boolean().describe(\"Auto-reset unique_id if task errors post-submission\").optional(),\n}).describe(\"Request model for creating a segmentation annotation task.\");\nconst ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema: z.ZodTypeAny = z.object({\n labels: z.array(z.union([z.string(), z.object({})])).describe(\"Label objects used for segmentation\").nullable().optional(),\n attachment: z.string().describe(\"URL to the image\").nullable().optional(),\n allow_unlabeled: z.boolean().describe(\"Whether unlabeled pixels are allowed\").nullable().optional(),\n attachment_type: z.string().describe(\"Type of attachment\").nullable().optional(),\n annotation_attributes: z.object({}).describe(\"Additional annotation attributes\").nullable().optional(),\n}).describe(\"Task parameters containing the submitted request parameters.\");\nconst ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema: z.ZodTypeAny = z.object({\n image: z.string().describe(\"URL to the combined segmentation image\").nullable().optional(),\n indexedImage: z.string().describe(\"URL to the indexed image where pixel values correspond to label indices\").nullable().optional(),\n extendedIndexedImage: z.string().describe(\"URL to extended indexed image if applicable\").nullable().optional(),\n}).describe(\"Combined annotation images.\");\nconst ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema: z.ZodTypeAny = z.object({\n labeled: z.object({}).describe(\"Dictionary mapping label names to their individual mask URLs\").nullable().optional(),\n combined: ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema.nullable().optional(),\n unlabeled: z.string().describe(\"URL to mask of unlabeled pixels\").nullable().optional(),\n}).describe(\"Annotations data structure containing combined, labeled and unlabeled images.\");\nconst ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema: z.ZodTypeAny = z.object({\n annotations: ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema.nullable().optional(),\n labelMapping: z.object({}).describe(\"Mapping of label names to their index and color values\").nullable().optional(),\n is_customer_fix: z.boolean().describe(\"Indicates if this is a customer fix\").nullable().optional(),\n}).describe(\"Segmentation results when task is completed.\");\nexport const ScaleAiCreateSegmentationAnnotationTaskOutput: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Task type; returns 'segmentannotation'\"),\n params: ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema.nullable().optional(),\n status: z.string().describe(\"Task status (e.g., 'pending', 'completed')\"),\n is_test: z.boolean().describe(\"Indicates test task status\").nullable().optional(),\n project: z.string().describe(\"Associated project name\").nullable().optional(),\n task_id: z.string().describe(\"Unique identifier for the created task\"),\n urgency: z.string().describe(\"Priority level; defaults to 'standard'\").nullable().optional(),\n metadata: z.object({}).describe(\"Custom key/value pairs attached to task\").nullable().optional(),\n response: ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema.nullable().optional(),\n created_at: z.string().describe(\"ISO timestamp of task creation\"),\n updated_at: z.string().describe(\"ISO timestamp of last update\").nullable().optional(),\n instruction: z.string().describe(\"Instructions provided for the task\").nullable().optional(),\n callback_url: z.string().describe(\"Callback endpoint for completion notification\").nullable().optional(),\n work_started: z.boolean().describe(\"Whether annotation has commenced\").nullable().optional(),\n}).describe(\"Response model for created segmentation annotation task.\");\n\nexport const scaleAiCreateSegmentationAnnotationTask = action(\"SCALE_AI_CREATE_SEGMENTATION_ANNOTATION_TASK\", {\n slug: \"scale_ai-create-segmentation-annotation-task\",\n name: \"Create Segmentation Annotation Task\",\n description: \"Tool to create a segmentation task where annotators classify pixels in an image according to provided labels. Use when you need pixel-wise semantic segmentation of images.\",\n input: ScaleAiCreateSegmentationAnnotationTaskInput,\n output: ScaleAiCreateSegmentationAnnotationTaskOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+CAA6DA,IAAAA,EAAE,OAAO;CACjF,MAAMA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;CACtG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACtG,QAAQA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,OAAO;EAC9C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EACzD,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/C,CAAC,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,+HAA+H;CACnM,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,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CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvG,cAAcA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7F,CAAC,CAAC,CAAC,SAAS,0DAA0D;AAEtE,MAAa,0CAA0CC,eAAAA,OAAO,gDAAgD;CAC5G,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-segmentation-annotation-task.d.ts
|
|
4
|
+
declare const ScaleAiCreateSegmentationAnnotationTaskInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScaleAiCreateSegmentationAnnotationTaskOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scaleAiCreateSegmentationAnnotationTask: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scaleAiCreateSegmentationAnnotationTask };
|
|
9
|
+
//# sourceMappingURL=create-segmentation-annotation-task.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-segmentation-annotation-task.d.cts","names":[],"sources":["../../src/actions/create-segmentation-annotation-task.ts"],"mappings":";;;cAIa,4CAAA,EAA8C,CAAA,CAAE,UAqBY;AAAA,cAuB5D,6CAAA,EAA+C,CAAA,CAAE,UAeS;AAAA,cAE1D,uCAAA,gCAAuC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-segmentation-annotation-task.d.ts
|
|
4
|
+
declare const ScaleAiCreateSegmentationAnnotationTaskInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScaleAiCreateSegmentationAnnotationTaskOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scaleAiCreateSegmentationAnnotationTask: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scaleAiCreateSegmentationAnnotationTask };
|
|
9
|
+
//# sourceMappingURL=create-segmentation-annotation-task.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-segmentation-annotation-task.d.mts","names":[],"sources":["../../src/actions/create-segmentation-annotation-task.ts"],"mappings":";;;cAIa,4CAAA,EAA8C,CAAA,CAAE,UAqBY;AAAA,cAuB5D,6CAAA,EAA+C,CAAA,CAAE,UAeS;AAAA,cAE1D,uCAAA,gCAAuC,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-segmentation-annotation-task.ts
|
|
4
|
+
const ScaleAiCreateSegmentationAnnotationTaskInput = z.object({
|
|
5
|
+
tags: z.array(z.string()).describe("Arbitrary labels to assign to task. Maximum 5 per task").optional(),
|
|
6
|
+
batch: z.string().describe("Batch name for task association; overrides project requirement").optional(),
|
|
7
|
+
labels: z.array(z.union([z.string(), z.object({
|
|
8
|
+
name: z.string().describe("Identifier for the label type"),
|
|
9
|
+
display_name: z.string().nullable().optional()
|
|
10
|
+
}).describe("Label description object for segmentation.")])).describe("Array of strings or LabelDescription objects describing different types of objects for image segmentation. Maximum 50 labels."),
|
|
11
|
+
project: z.string().describe("Name of the project to associate this task with").optional(),
|
|
12
|
+
metadata: z.object({}).describe("Set of key/value pairs to attach to task object. Maximum 10KB").optional(),
|
|
13
|
+
unique_id: z.string().describe("Custom identifier; must be unique across your account").optional(),
|
|
14
|
+
attachment: z.string().describe("URL to the image requiring segmentation"),
|
|
15
|
+
hypothesis: z.object({}).describe("Pre-labeled annotations for refinement by annotators. Editable annotations that a task should be initialized with, useful for model pre-labeling scenarios").optional(),
|
|
16
|
+
instruction: z.string().describe("Markdown-enabled string or iframe embed Google Doc explaining how to do the segmentation").optional(),
|
|
17
|
+
callback_url: z.string().describe("Full URL (including http:// or https://) or email address for callback notification").optional(),
|
|
18
|
+
allow_unlabeled: z.boolean().describe("Whether this image can be completed without every pixel being labeled").optional(),
|
|
19
|
+
attachment_type: z.string().describe("Describes file type; currently supports 'image' only").optional(),
|
|
20
|
+
context_attachments: z.array(z.object({ attachment: z.string().describe("URL to the reference image") }).describe("Reference image attachment for context.")).describe("Reference images in [{\"attachment\": \"<url>\"}] format; cannot include task URL").optional(),
|
|
21
|
+
annotation_attributes: z.object({}).describe("Additional attributes to capture per annotation with structure containing type, description, choices, and conditions").optional(),
|
|
22
|
+
clear_unique_id_on_error: z.boolean().describe("Auto-reset unique_id if task errors post-submission").optional()
|
|
23
|
+
}).describe("Request model for creating a segmentation annotation task.");
|
|
24
|
+
const ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema = z.object({
|
|
25
|
+
labels: z.array(z.union([z.string(), z.object({})])).describe("Label objects used for segmentation").nullable().optional(),
|
|
26
|
+
attachment: z.string().describe("URL to the image").nullable().optional(),
|
|
27
|
+
allow_unlabeled: z.boolean().describe("Whether unlabeled pixels are allowed").nullable().optional(),
|
|
28
|
+
attachment_type: z.string().describe("Type of attachment").nullable().optional(),
|
|
29
|
+
annotation_attributes: z.object({}).describe("Additional annotation attributes").nullable().optional()
|
|
30
|
+
}).describe("Task parameters containing the submitted request parameters.");
|
|
31
|
+
const ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema = z.object({
|
|
32
|
+
image: z.string().describe("URL to the combined segmentation image").nullable().optional(),
|
|
33
|
+
indexedImage: z.string().describe("URL to the indexed image where pixel values correspond to label indices").nullable().optional(),
|
|
34
|
+
extendedIndexedImage: z.string().describe("URL to extended indexed image if applicable").nullable().optional()
|
|
35
|
+
}).describe("Combined annotation images.");
|
|
36
|
+
const ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema = z.object({
|
|
37
|
+
labeled: z.object({}).describe("Dictionary mapping label names to their individual mask URLs").nullable().optional(),
|
|
38
|
+
combined: ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema.nullable().optional(),
|
|
39
|
+
unlabeled: z.string().describe("URL to mask of unlabeled pixels").nullable().optional()
|
|
40
|
+
}).describe("Annotations data structure containing combined, labeled and unlabeled images.");
|
|
41
|
+
const ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema = z.object({
|
|
42
|
+
annotations: ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema.nullable().optional(),
|
|
43
|
+
labelMapping: z.object({}).describe("Mapping of label names to their index and color values").nullable().optional(),
|
|
44
|
+
is_customer_fix: z.boolean().describe("Indicates if this is a customer fix").nullable().optional()
|
|
45
|
+
}).describe("Segmentation results when task is completed.");
|
|
46
|
+
const scaleAiCreateSegmentationAnnotationTask = action("SCALE_AI_CREATE_SEGMENTATION_ANNOTATION_TASK", {
|
|
47
|
+
slug: "scale_ai-create-segmentation-annotation-task",
|
|
48
|
+
name: "Create Segmentation Annotation Task",
|
|
49
|
+
description: "Tool to create a segmentation task where annotators classify pixels in an image according to provided labels. Use when you need pixel-wise semantic segmentation of images.",
|
|
50
|
+
input: ScaleAiCreateSegmentationAnnotationTaskInput,
|
|
51
|
+
output: z.object({
|
|
52
|
+
type: z.string().describe("Task type; returns 'segmentannotation'"),
|
|
53
|
+
params: ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema.nullable().optional(),
|
|
54
|
+
status: z.string().describe("Task status (e.g., 'pending', 'completed')"),
|
|
55
|
+
is_test: z.boolean().describe("Indicates test task status").nullable().optional(),
|
|
56
|
+
project: z.string().describe("Associated project name").nullable().optional(),
|
|
57
|
+
task_id: z.string().describe("Unique identifier for the created task"),
|
|
58
|
+
urgency: z.string().describe("Priority level; defaults to 'standard'").nullable().optional(),
|
|
59
|
+
metadata: z.object({}).describe("Custom key/value pairs attached to task").nullable().optional(),
|
|
60
|
+
response: ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema.nullable().optional(),
|
|
61
|
+
created_at: z.string().describe("ISO timestamp of task creation"),
|
|
62
|
+
updated_at: z.string().describe("ISO timestamp of last update").nullable().optional(),
|
|
63
|
+
instruction: z.string().describe("Instructions provided for the task").nullable().optional(),
|
|
64
|
+
callback_url: z.string().describe("Callback endpoint for completion notification").nullable().optional(),
|
|
65
|
+
work_started: z.boolean().describe("Whether annotation has commenced").nullable().optional()
|
|
66
|
+
}).describe("Response model for created segmentation annotation task.")
|
|
67
|
+
});
|
|
68
|
+
//#endregion
|
|
69
|
+
export { scaleAiCreateSegmentationAnnotationTask };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=create-segmentation-annotation-task.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-segmentation-annotation-task.mjs","names":[],"sources":["../../src/actions/create-segmentation-annotation-task.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScaleAiCreateSegmentationAnnotationTaskInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Arbitrary labels to assign to task. Maximum 5 per task\").optional(),\n batch: z.string().describe(\"Batch name for task association; overrides project requirement\").optional(),\n labels: z.array(z.union([z.string(), z.object({\n name: z.string().describe(\"Identifier for the label type\"),\n display_name: z.string().nullable().optional(),\n}).describe(\"Label description object for segmentation.\")])).describe(\"Array of strings or LabelDescription objects describing different types of objects for image segmentation. Maximum 50 labels.\"),\n project: z.string().describe(\"Name of the project to associate this task with\").optional(),\n metadata: z.object({}).describe(\"Set of key/value pairs to attach to task object. Maximum 10KB\").optional(),\n unique_id: z.string().describe(\"Custom identifier; must be unique across your account\").optional(),\n attachment: z.string().describe(\"URL to the image requiring segmentation\"),\n hypothesis: z.object({}).describe(\"Pre-labeled annotations for refinement by annotators. Editable annotations that a task should be initialized with, useful for model pre-labeling scenarios\").optional(),\n instruction: z.string().describe(\"Markdown-enabled string or iframe embed Google Doc explaining how to do the segmentation\").optional(),\n callback_url: z.string().describe(\"Full URL (including http:// or https://) or email address for callback notification\").optional(),\n allow_unlabeled: z.boolean().describe(\"Whether this image can be completed without every pixel being labeled\").optional(),\n attachment_type: z.string().describe(\"Describes file type; currently supports 'image' only\").optional(),\n context_attachments: z.array(z.object({\n attachment: z.string().describe(\"URL to the reference image\"),\n}).describe(\"Reference image attachment for context.\")).describe(\"Reference images in [{\\\"attachment\\\": \\\"<url>\\\"}] format; cannot include task URL\").optional(),\n annotation_attributes: z.object({}).describe(\"Additional attributes to capture per annotation with structure containing type, description, choices, and conditions\").optional(),\n clear_unique_id_on_error: z.boolean().describe(\"Auto-reset unique_id if task errors post-submission\").optional(),\n}).describe(\"Request model for creating a segmentation annotation task.\");\nconst ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema: z.ZodTypeAny = z.object({\n labels: z.array(z.union([z.string(), z.object({})])).describe(\"Label objects used for segmentation\").nullable().optional(),\n attachment: z.string().describe(\"URL to the image\").nullable().optional(),\n allow_unlabeled: z.boolean().describe(\"Whether unlabeled pixels are allowed\").nullable().optional(),\n attachment_type: z.string().describe(\"Type of attachment\").nullable().optional(),\n annotation_attributes: z.object({}).describe(\"Additional annotation attributes\").nullable().optional(),\n}).describe(\"Task parameters containing the submitted request parameters.\");\nconst ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema: z.ZodTypeAny = z.object({\n image: z.string().describe(\"URL to the combined segmentation image\").nullable().optional(),\n indexedImage: z.string().describe(\"URL to the indexed image where pixel values correspond to label indices\").nullable().optional(),\n extendedIndexedImage: z.string().describe(\"URL to extended indexed image if applicable\").nullable().optional(),\n}).describe(\"Combined annotation images.\");\nconst ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema: z.ZodTypeAny = z.object({\n labeled: z.object({}).describe(\"Dictionary mapping label names to their individual mask URLs\").nullable().optional(),\n combined: ScaleAiCreateSegmentationAnnotationTask_CombinedAnnotationSchema.nullable().optional(),\n unlabeled: z.string().describe(\"URL to mask of unlabeled pixels\").nullable().optional(),\n}).describe(\"Annotations data structure containing combined, labeled and unlabeled images.\");\nconst ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema: z.ZodTypeAny = z.object({\n annotations: ScaleAiCreateSegmentationAnnotationTask_AnnotationsDataSchema.nullable().optional(),\n labelMapping: z.object({}).describe(\"Mapping of label names to their index and color values\").nullable().optional(),\n is_customer_fix: z.boolean().describe(\"Indicates if this is a customer fix\").nullable().optional(),\n}).describe(\"Segmentation results when task is completed.\");\nexport const ScaleAiCreateSegmentationAnnotationTaskOutput: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Task type; returns 'segmentannotation'\"),\n params: ScaleAiCreateSegmentationAnnotationTask_SegmentationParamsSchema.nullable().optional(),\n status: z.string().describe(\"Task status (e.g., 'pending', 'completed')\"),\n is_test: z.boolean().describe(\"Indicates test task status\").nullable().optional(),\n project: z.string().describe(\"Associated project name\").nullable().optional(),\n task_id: z.string().describe(\"Unique identifier for the created task\"),\n urgency: z.string().describe(\"Priority level; defaults to 'standard'\").nullable().optional(),\n metadata: z.object({}).describe(\"Custom key/value pairs attached to task\").nullable().optional(),\n response: ScaleAiCreateSegmentationAnnotationTask_SegmentationResponseSchema.nullable().optional(),\n created_at: z.string().describe(\"ISO timestamp of task creation\"),\n updated_at: z.string().describe(\"ISO timestamp of last update\").nullable().optional(),\n instruction: z.string().describe(\"Instructions provided for the task\").nullable().optional(),\n callback_url: z.string().describe(\"Callback endpoint for completion notification\").nullable().optional(),\n work_started: z.boolean().describe(\"Whether annotation has commenced\").nullable().optional(),\n}).describe(\"Response model for created segmentation annotation task.\");\n\nexport const scaleAiCreateSegmentationAnnotationTask = action(\"SCALE_AI_CREATE_SEGMENTATION_ANNOTATION_TASK\", {\n slug: \"scale_ai-create-segmentation-annotation-task\",\n name: \"Create Segmentation Annotation Task\",\n description: \"Tool to create a segmentation task where annotators classify pixels in an image according to provided labels. Use when you need pixel-wise semantic segmentation of images.\",\n input: ScaleAiCreateSegmentationAnnotationTaskInput,\n output: ScaleAiCreateSegmentationAnnotationTaskOutput,\n});\n"],"mappings":";;;AAIA,MAAa,+CAA6D,EAAE,OAAO;CACjF,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;CACtG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACtG,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO;EAC9C,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EACzD,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/C,CAAC,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,+HAA+H;CACnM,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CACzF,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CAC1G,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CACjG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACzE,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,4JAA4J,CAAC,CAAC,SAAS;CACzM,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,0FAA0F,CAAC,CAAC,SA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SAAS,CAAC,CAAC,SAAS;EAChF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC5E,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;EACrE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/F,UAAU,mEAAmE,SAAS,CAAC,CAAC,SAAS;EACjG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;EAChE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpF,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3F,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvG,cAAc,EAAE,QAAQ,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC7F,CAAC,CAAC,CAAC,SAAS,0DAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-text-collection-task.ts
|
|
4
|
+
const ScaleAiCreateTextCollectionTaskInput = zod.z.object({
|
|
5
|
+
tags: zod.z.array(zod.z.string()).describe("Arbitrary labels for task organization (maximum 5 tags allowed)").optional(),
|
|
6
|
+
batch: zod.z.string().describe("Batch name; automatically associates task with the batch's project").optional(),
|
|
7
|
+
title: zod.z.string().describe("Task title").optional(),
|
|
8
|
+
fields: zod.z.array(zod.z.object({
|
|
9
|
+
type: zod.z.string().describe("Field type: 'text', 'category', 'boolean', 'number', 'datetime', 'select', or 'time_range'"),
|
|
10
|
+
title: zod.z.string().describe("Display title for the field shown to taskers"),
|
|
11
|
+
choices: zod.z.array(zod.z.object({
|
|
12
|
+
label: zod.z.string().describe("Display label for the choice"),
|
|
13
|
+
value: zod.z.string().describe("Value to be stored for this choice")
|
|
14
|
+
}).describe("Choice option for category-type fields.")).describe("Available choices for category-type fields").optional(),
|
|
15
|
+
field_id: zod.z.string().describe("Unique identifier for the field within the project"),
|
|
16
|
+
description: zod.z.string().describe("Additional description to guide taskers").optional()
|
|
17
|
+
}).describe("Field definition for text collection task.")).describe("Array of field definitions describing data to collect"),
|
|
18
|
+
project: zod.z.string().describe("Project name to associate this task with").optional(),
|
|
19
|
+
metadata: zod.z.object({}).describe("Custom metadata as key-value pairs").optional(),
|
|
20
|
+
priority: zod.z.number().int().describe("Task priority level. Must be one of: 10, 20, 30, 40, or 50. Default: 30").optional(),
|
|
21
|
+
unique_id: zod.z.string().describe("Unique identifier for task deduplication and later querying").optional(),
|
|
22
|
+
hypothesis: zod.z.object({}).describe("Pre-labels to accelerate annotation, matching the task's response schema").optional(),
|
|
23
|
+
attachments: zod.z.array(zod.z.object({
|
|
24
|
+
type: zod.z.string().describe("Attachment type: 'pdf', 'image', 'text', 'video', 'website', or 'audio'"),
|
|
25
|
+
forms: zod.z.array(zod.z.string()).describe("Optional field_id references for conditional display").optional(),
|
|
26
|
+
content: zod.z.string().describe("Content or link to the attachment file")
|
|
27
|
+
}).describe("Attachment for text collection task.")).describe("Array of attachments to collect information from").optional(),
|
|
28
|
+
description: zod.z.string().describe("Task description").optional(),
|
|
29
|
+
instruction: zod.z.string().describe("Markdown-enabled instructions explaining the task to taskers"),
|
|
30
|
+
callback_url: zod.z.string().describe("Full URL (http:// or https://) or email address for completion callback").optional(),
|
|
31
|
+
responses_required: zod.z.number().int().describe("Number of responses needed (default: 1)").optional(),
|
|
32
|
+
clear_unique_id_on_error: zod.z.boolean().describe("If true, unsets unique_id if task errors after submission").optional()
|
|
33
|
+
}).describe("Request model for creating a text collection task.");
|
|
34
|
+
const ScaleAiCreateTextCollectionTask_TaskParamsSchema = zod.z.object({
|
|
35
|
+
fields: zod.z.array(zod.z.object({})).describe("Stored field definitions").nullable().optional(),
|
|
36
|
+
attachments: zod.z.array(zod.z.object({})).describe("Stored attachments configuration").nullable().optional()
|
|
37
|
+
}).describe("Task configuration parameters.");
|
|
38
|
+
const ScaleAiCreateTextCollectionTask_TaskResponseSchema = zod.z.object({ annotations: zod.z.object({}).describe("Dictionary where keys are field_ids and values are worker responses").nullable().optional() }).describe("Task response containing annotations.");
|
|
39
|
+
const ScaleAiCreateTextCollectionTaskOutput = zod.z.object({
|
|
40
|
+
tags: zod.z.array(zod.z.string()).describe("Task tags if provided").nullable().optional(),
|
|
41
|
+
type: zod.z.string().describe("Task type: 'textcollection'").nullable().optional(),
|
|
42
|
+
audits: zod.z.array(zod.z.object({})).describe("Array of audit records showing quality reviews and modifications").nullable().optional(),
|
|
43
|
+
fields: zod.z.array(zod.z.object({})).describe("Array of field definitions as provided").nullable().optional(),
|
|
44
|
+
params: ScaleAiCreateTextCollectionTask_TaskParamsSchema.nullable().optional(),
|
|
45
|
+
status: zod.z.string().describe("Current task status: 'pending', 'completed', or 'canceled'").nullable().optional(),
|
|
46
|
+
is_test: zod.z.boolean().describe("Indicates if this is a test task").nullable().optional(),
|
|
47
|
+
task_id: zod.z.string().describe("Unique permanent task identifier").nullable().optional(),
|
|
48
|
+
metadata: zod.z.object({}).describe("Associated metadata object").nullable().optional(),
|
|
49
|
+
response: ScaleAiCreateTextCollectionTask_TaskResponseSchema.nullable().optional(),
|
|
50
|
+
unique_id: zod.z.string().describe("Custom identifier if provided").nullable().optional(),
|
|
51
|
+
created_at: zod.z.string().describe("ISO 8601 timestamp of task creation").nullable().optional(),
|
|
52
|
+
updated_at: zod.z.string().describe("ISO 8601 timestamp of most recent update").nullable().optional(),
|
|
53
|
+
attachments: zod.z.array(zod.z.object({})).describe("Array of attachment objects as provided").nullable().optional(),
|
|
54
|
+
instruction: zod.z.string().describe("Task instructions as provided").nullable().optional(),
|
|
55
|
+
callback_url: zod.z.string().describe("Callback endpoint if provided").nullable().optional(),
|
|
56
|
+
completed_at: zod.z.string().describe("ISO 8601 timestamp when task was finished").nullable().optional(),
|
|
57
|
+
callback_completed: zod.z.boolean().describe("Whether callback was successfully sent").nullable().optional()
|
|
58
|
+
}).describe("Response model for created text collection task.");
|
|
59
|
+
const scaleAiCreateTextCollectionTask = require_action.action("SCALE_AI_CREATE_TEXT_COLLECTION_TASK", {
|
|
60
|
+
slug: "scale_ai-create-text-collection-task",
|
|
61
|
+
name: "Create Text Collection Task",
|
|
62
|
+
description: "Tool to create a textcollection task for collecting information from attachments and/or web sources. Use when you need to gather structured data from documents, websites, images, or other content by having taskers fill out defined fields.",
|
|
63
|
+
input: ScaleAiCreateTextCollectionTaskInput,
|
|
64
|
+
output: ScaleAiCreateTextCollectionTaskOutput
|
|
65
|
+
});
|
|
66
|
+
//#endregion
|
|
67
|
+
exports.scaleAiCreateTextCollectionTask = scaleAiCreateTextCollectionTask;
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=create-text-collection-task.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-text-collection-task.cjs","names":["z","action"],"sources":["../../src/actions/create-text-collection-task.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScaleAiCreateTextCollectionTaskInput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Arbitrary labels for task organization (maximum 5 tags allowed)\").optional(),\n batch: z.string().describe(\"Batch name; automatically associates task with the batch's project\").optional(),\n title: z.string().describe(\"Task title\").optional(),\n fields: z.array(z.object({\n type: z.string().describe(\"Field type: 'text', 'category', 'boolean', 'number', 'datetime', 'select', or 'time_range'\"),\n title: z.string().describe(\"Display title for the field shown to taskers\"),\n choices: z.array(z.object({\n label: z.string().describe(\"Display label for the choice\"),\n value: z.string().describe(\"Value to be stored for this choice\"),\n}).describe(\"Choice option for category-type fields.\")).describe(\"Available choices for category-type fields\").optional(),\n field_id: z.string().describe(\"Unique identifier for the field within the project\"),\n description: z.string().describe(\"Additional description to guide taskers\").optional(),\n}).describe(\"Field definition for text collection task.\")).describe(\"Array of field definitions describing data to collect\"),\n project: z.string().describe(\"Project name to associate this task with\").optional(),\n metadata: z.object({}).describe(\"Custom metadata as key-value pairs\").optional(),\n priority: z.number().int().describe(\"Task priority level. Must be one of: 10, 20, 30, 40, or 50. Default: 30\").optional(),\n unique_id: z.string().describe(\"Unique identifier for task deduplication and later querying\").optional(),\n hypothesis: z.object({}).describe(\"Pre-labels to accelerate annotation, matching the task's response schema\").optional(),\n attachments: z.array(z.object({\n type: z.string().describe(\"Attachment type: 'pdf', 'image', 'text', 'video', 'website', or 'audio'\"),\n forms: z.array(z.string()).describe(\"Optional field_id references for conditional display\").optional(),\n content: z.string().describe(\"Content or link to the attachment file\"),\n}).describe(\"Attachment for text collection task.\")).describe(\"Array of attachments to collect information from\").optional(),\n description: z.string().describe(\"Task description\").optional(),\n instruction: z.string().describe(\"Markdown-enabled instructions explaining the task to taskers\"),\n callback_url: z.string().describe(\"Full URL (http:// or https://) or email address for completion callback\").optional(),\n responses_required: z.number().int().describe(\"Number of responses needed (default: 1)\").optional(),\n clear_unique_id_on_error: z.boolean().describe(\"If true, unsets unique_id if task errors after submission\").optional(),\n}).describe(\"Request model for creating a text collection task.\");\nconst ScaleAiCreateTextCollectionTask_TaskParamsSchema: z.ZodTypeAny = z.object({\n fields: z.array(z.object({})).describe(\"Stored field definitions\").nullable().optional(),\n attachments: z.array(z.object({})).describe(\"Stored attachments configuration\").nullable().optional(),\n}).describe(\"Task configuration parameters.\");\nconst ScaleAiCreateTextCollectionTask_TaskResponseSchema: z.ZodTypeAny = z.object({\n annotations: z.object({}).describe(\"Dictionary where keys are field_ids and values are worker responses\").nullable().optional(),\n}).describe(\"Task response containing annotations.\");\nexport const ScaleAiCreateTextCollectionTaskOutput: z.ZodTypeAny = z.object({\n tags: z.array(z.string()).describe(\"Task tags if provided\").nullable().optional(),\n type: z.string().describe(\"Task type: 'textcollection'\").nullable().optional(),\n audits: z.array(z.object({})).describe(\"Array of audit records showing quality reviews and modifications\").nullable().optional(),\n fields: z.array(z.object({})).describe(\"Array of field definitions as provided\").nullable().optional(),\n params: ScaleAiCreateTextCollectionTask_TaskParamsSchema.nullable().optional(),\n status: z.string().describe(\"Current task status: 'pending', 'completed', or 'canceled'\").nullable().optional(),\n is_test: z.boolean().describe(\"Indicates if this is a test task\").nullable().optional(),\n task_id: z.string().describe(\"Unique permanent task identifier\").nullable().optional(),\n metadata: z.object({}).describe(\"Associated metadata object\").nullable().optional(),\n response: ScaleAiCreateTextCollectionTask_TaskResponseSchema.nullable().optional(),\n unique_id: z.string().describe(\"Custom identifier if provided\").nullable().optional(),\n created_at: z.string().describe(\"ISO 8601 timestamp of task creation\").nullable().optional(),\n updated_at: z.string().describe(\"ISO 8601 timestamp of most recent update\").nullable().optional(),\n attachments: z.array(z.object({})).describe(\"Array of attachment objects as provided\").nullable().optional(),\n instruction: z.string().describe(\"Task instructions as provided\").nullable().optional(),\n callback_url: z.string().describe(\"Callback endpoint if provided\").nullable().optional(),\n completed_at: z.string().describe(\"ISO 8601 timestamp when task was finished\").nullable().optional(),\n callback_completed: z.boolean().describe(\"Whether callback was successfully sent\").nullable().optional(),\n}).describe(\"Response model for created text collection task.\");\n\nexport const scaleAiCreateTextCollectionTask = action(\"SCALE_AI_CREATE_TEXT_COLLECTION_TASK\", {\n slug: \"scale_ai-create-text-collection-task\",\n name: \"Create Text Collection Task\",\n description: \"Tool to create a textcollection task for collecting information from attachments and/or web sources. Use when you need to gather structured data from documents, websites, images, or other content by having taskers fill out defined fields.\",\n input: ScaleAiCreateTextCollectionTaskInput,\n output: ScaleAiCreateTextCollectionTaskOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uCAAqDA,IA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AAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACpF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,aAAaA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnG,oBAAoBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACzG,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAE9D,MAAa,kCAAkCC,eAAAA,OAAO,wCAAwC;CAC5F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-text-collection-task.d.ts
|
|
4
|
+
declare const ScaleAiCreateTextCollectionTaskInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScaleAiCreateTextCollectionTaskOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scaleAiCreateTextCollectionTask: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scaleAiCreateTextCollectionTask };
|
|
9
|
+
//# sourceMappingURL=create-text-collection-task.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-text-collection-task.d.cts","names":[],"sources":["../../src/actions/create-text-collection-task.ts"],"mappings":";;;cAIa,oCAAA,EAAsC,CAAA,CAAE,UA6BY;AAAA,cAQpD,qCAAA,EAAuC,CAAA,CAAE,UAmBS;AAAA,cAElD,+BAAA,gCAA+B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-text-collection-task.d.ts
|
|
4
|
+
declare const ScaleAiCreateTextCollectionTaskInput: z.ZodTypeAny;
|
|
5
|
+
declare const ScaleAiCreateTextCollectionTaskOutput: z.ZodTypeAny;
|
|
6
|
+
declare const scaleAiCreateTextCollectionTask: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { scaleAiCreateTextCollectionTask };
|
|
9
|
+
//# sourceMappingURL=create-text-collection-task.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-text-collection-task.d.mts","names":[],"sources":["../../src/actions/create-text-collection-task.ts"],"mappings":";;;cAIa,oCAAA,EAAsC,CAAA,CAAE,UA6BY;AAAA,cAQpD,qCAAA,EAAuC,CAAA,CAAE,UAmBS;AAAA,cAElD,+BAAA,gCAA+B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|