@scenario-labs/sdk 3.2.0 → 3.3.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/CHANGELOG.md +27 -0
- package/client.d.mts +20 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +20 -5
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +42 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +42 -0
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +79 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +75 -0
- package/core/pagination.mjs.map +1 -1
- package/internal/utils/values.d.mts +6 -0
- package/internal/utils/values.d.mts.map +1 -1
- package/internal/utils/values.d.ts +6 -0
- package/internal/utils/values.d.ts.map +1 -1
- package/internal/utils/values.js +11 -0
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +10 -0
- package/internal/utils/values.mjs.map +1 -1
- package/lib/generate.js +7 -7
- package/lib/generate.js.map +1 -1
- package/lib/generate.mjs +7 -7
- package/lib/generate.mjs.map +1 -1
- package/lib/job.d.mts +1 -1
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +1 -1
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +5 -6
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +6 -7
- package/lib/job.mjs.map +1 -1
- package/lib/models.d.mts.map +1 -1
- package/lib/models.d.ts.map +1 -1
- package/lib/models.js +7 -5
- package/lib/models.js.map +1 -1
- package/lib/models.mjs +8 -6
- package/lib/models.mjs.map +1 -1
- package/lib/query.d.mts +21 -0
- package/lib/query.d.mts.map +1 -0
- package/lib/query.d.ts +21 -0
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js +36 -0
- package/lib/query.js.map +1 -0
- package/lib/query.mjs +33 -0
- package/lib/query.mjs.map +1 -0
- package/lib/scenario.d.mts +3 -0
- package/lib/scenario.d.mts.map +1 -1
- package/lib/scenario.d.ts +3 -0
- package/lib/scenario.d.ts.map +1 -1
- package/lib/scenario.js +6 -0
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +6 -0
- package/lib/scenario.mjs.map +1 -1
- package/lib/scope.d.mts +27 -7
- package/lib/scope.d.mts.map +1 -1
- package/lib/scope.d.ts +27 -7
- package/lib/scope.d.ts.map +1 -1
- package/lib/scope.js +40 -7
- package/lib/scope.js.map +1 -1
- package/lib/scope.mjs +37 -7
- package/lib/scope.mjs.map +1 -1
- package/lib/upload.d.mts +1 -1
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +1 -1
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +6 -7
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +7 -8
- package/lib/upload.mjs.map +1 -1
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +8 -6
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +9 -7
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_validator.d.mts +5 -0
- package/lib/workflow_validator.d.mts.map +1 -1
- package/lib/workflow_validator.d.ts +5 -0
- package/lib/workflow_validator.d.ts.map +1 -1
- package/lib/workflow_validator.js +113 -0
- package/lib/workflow_validator.js.map +1 -1
- package/lib/workflow_validator.mjs +113 -0
- package/lib/workflow_validator.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +130 -31
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +130 -31
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +34 -11
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +34 -11
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/download.d.mts +24 -5
- package/resources/assets/download.d.mts.map +1 -1
- package/resources/assets/download.d.ts +24 -5
- package/resources/assets/download.d.ts.map +1 -1
- package/resources/assets/download.js +15 -3
- package/resources/assets/download.js.map +1 -1
- package/resources/assets/download.mjs +15 -3
- package/resources/assets/download.mjs.map +1 -1
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +3 -2
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +3 -2
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +20 -5
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +20 -5
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +3 -2
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +3 -2
- package/resources/collections/models.mjs.map +1 -1
- package/resources/generate.d.mts +1719 -225
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +1719 -225
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +65 -8
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +65 -8
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +5 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +176 -74
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +176 -74
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +16 -4
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +16 -4
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +2 -2
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +2 -2
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/description.js +6 -2
- package/resources/models/description.js.map +1 -1
- package/resources/models/description.mjs +6 -2
- package/resources/models/description.mjs.map +1 -1
- package/resources/models/examples.d.mts +120 -48
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +120 -48
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/examples.js +6 -2
- package/resources/models/examples.js.map +1 -1
- package/resources/models/examples.mjs +6 -2
- package/resources/models/examples.mjs.map +1 -1
- package/resources/models/index.d.mts +3 -0
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +3 -0
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js +7 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs +3 -0
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +215 -77
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +215 -77
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +52 -11
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +52 -11
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/presets.d.mts +1016 -0
- package/resources/models/presets.d.mts.map +1 -0
- package/resources/models/presets.d.ts +1016 -0
- package/resources/models/presets.d.ts.map +1 -0
- package/resources/models/presets.js +52 -0
- package/resources/models/presets.js.map +1 -0
- package/resources/models/presets.mjs +48 -0
- package/resources/models/presets.mjs.map +1 -0
- package/resources/models/prompt-guide.d.mts +64 -0
- package/resources/models/prompt-guide.d.mts.map +1 -0
- package/resources/models/prompt-guide.d.ts +64 -0
- package/resources/models/prompt-guide.d.ts.map +1 -0
- package/resources/models/prompt-guide.js +31 -0
- package/resources/models/prompt-guide.js.map +1 -0
- package/resources/models/prompt-guide.mjs +27 -0
- package/resources/models/prompt-guide.mjs.map +1 -0
- package/resources/models/scores.d.mts +278 -0
- package/resources/models/scores.d.mts.map +1 -0
- package/resources/models/scores.d.ts +278 -0
- package/resources/models/scores.d.ts.map +1 -0
- package/resources/models/scores.js +29 -0
- package/resources/models/scores.js.map +1 -0
- package/resources/models/scores.mjs +25 -0
- package/resources/models/scores.mjs.map +1 -0
- package/resources/models/train.d.mts +108 -45
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +108 -45
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +3 -2
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +3 -2
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/models/training-images.js +5 -4
- package/resources/models/training-images.js.map +1 -1
- package/resources/models/training-images.mjs +5 -4
- package/resources/models/training-images.mjs.map +1 -1
- package/resources/projects/api-keys.d.mts +54 -0
- package/resources/projects/api-keys.d.mts.map +1 -0
- package/resources/projects/api-keys.d.ts +54 -0
- package/resources/projects/api-keys.d.ts.map +1 -0
- package/resources/projects/api-keys.js +23 -0
- package/resources/projects/api-keys.js.map +1 -0
- package/resources/projects/api-keys.mjs +19 -0
- package/resources/projects/api-keys.mjs.map +1 -0
- package/resources/projects/brief.d.mts +149 -0
- package/resources/projects/brief.d.mts.map +1 -0
- package/resources/projects/brief.d.ts +149 -0
- package/resources/projects/brief.d.ts.map +1 -0
- package/resources/projects/brief.js +28 -0
- package/resources/projects/brief.js.map +1 -0
- package/resources/projects/brief.mjs +24 -0
- package/resources/projects/brief.mjs.map +1 -0
- package/resources/projects/index.d.mts +9 -0
- package/resources/projects/index.d.mts.map +1 -0
- package/resources/projects/index.d.ts +9 -0
- package/resources/projects/index.d.ts.map +1 -0
- package/resources/projects/index.js +21 -0
- package/resources/projects/index.js.map +1 -0
- package/resources/projects/index.mjs +10 -0
- package/resources/projects/index.mjs.map +1 -0
- package/resources/projects/instructions.d.mts +102 -0
- package/resources/projects/instructions.d.mts.map +1 -0
- package/resources/projects/instructions.d.ts +102 -0
- package/resources/projects/instructions.d.ts.map +1 -0
- package/resources/projects/instructions.js +24 -0
- package/resources/projects/instructions.js.map +1 -0
- package/resources/projects/instructions.mjs +20 -0
- package/resources/projects/instructions.mjs.map +1 -0
- package/resources/projects/members.d.mts +788 -0
- package/resources/projects/members.d.mts.map +1 -0
- package/resources/projects/members.d.ts +788 -0
- package/resources/projects/members.d.ts.map +1 -0
- package/resources/projects/members.js +30 -0
- package/resources/projects/members.js.map +1 -0
- package/resources/projects/members.mjs +26 -0
- package/resources/projects/members.mjs.map +1 -0
- package/resources/projects/memory.d.mts +102 -0
- package/resources/projects/memory.d.mts.map +1 -0
- package/resources/projects/memory.d.ts +102 -0
- package/resources/projects/memory.d.ts.map +1 -0
- package/resources/projects/memory.js +24 -0
- package/resources/projects/memory.js.map +1 -0
- package/resources/projects/memory.mjs +20 -0
- package/resources/projects/memory.mjs.map +1 -0
- package/resources/projects/projects.d.mts +1129 -0
- package/resources/projects/projects.d.mts.map +1 -0
- package/resources/projects/projects.d.ts +1129 -0
- package/resources/projects/projects.d.ts.map +1 -0
- package/resources/projects/projects.js +79 -0
- package/resources/projects/projects.js.map +1 -0
- package/resources/projects/projects.mjs +74 -0
- package/resources/projects/projects.mjs.map +1 -0
- package/resources/projects/watermark.d.mts +459 -0
- package/resources/projects/watermark.d.mts.map +1 -0
- package/resources/projects/watermark.d.ts +459 -0
- package/resources/projects/watermark.d.ts.map +1 -0
- package/resources/projects/watermark.js +46 -0
- package/resources/projects/watermark.js.map +1 -0
- package/resources/projects/watermark.mjs +42 -0
- package/resources/projects/watermark.mjs.map +1 -0
- package/resources/projects/webhook-endpoints/events.d.mts +87 -0
- package/resources/projects/webhook-endpoints/events.d.mts.map +1 -0
- package/resources/projects/webhook-endpoints/events.d.ts +87 -0
- package/resources/projects/webhook-endpoints/events.d.ts.map +1 -0
- package/resources/projects/webhook-endpoints/events.js +28 -0
- package/resources/projects/webhook-endpoints/events.js.map +1 -0
- package/resources/projects/webhook-endpoints/events.mjs +24 -0
- package/resources/projects/webhook-endpoints/events.mjs.map +1 -0
- package/resources/projects/webhook-endpoints/index.d.mts +3 -0
- package/resources/projects/webhook-endpoints/index.d.mts.map +1 -0
- package/resources/projects/webhook-endpoints/index.d.ts +3 -0
- package/resources/projects/webhook-endpoints/index.d.ts.map +1 -0
- package/resources/projects/webhook-endpoints/index.js +9 -0
- package/resources/projects/webhook-endpoints/index.js.map +1 -0
- package/resources/projects/webhook-endpoints/index.mjs +4 -0
- package/resources/projects/webhook-endpoints/index.mjs.map +1 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.d.mts +249 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.d.mts.map +1 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.d.ts +249 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.d.ts.map +1 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.js +44 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.js.map +1 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.mjs +39 -0
- package/resources/projects/webhook-endpoints/webhook-endpoints.mjs.map +1 -0
- package/resources/projects/webhook-endpoints.d.mts +2 -0
- package/resources/projects/webhook-endpoints.d.mts.map +1 -0
- package/resources/projects/webhook-endpoints.d.ts +2 -0
- package/resources/projects/webhook-endpoints.d.ts.map +1 -0
- package/resources/projects/webhook-endpoints.js +6 -0
- package/resources/projects/webhook-endpoints.js.map +1 -0
- package/resources/projects/webhook-endpoints.mjs +3 -0
- package/resources/projects/webhook-endpoints.mjs.map +1 -0
- package/resources/projects.d.mts +2 -0
- package/resources/projects.d.mts.map +1 -0
- package/resources/projects.d.ts +2 -0
- package/resources/projects.d.ts.map +1 -0
- package/resources/projects.js +6 -0
- package/resources/projects.js.map +1 -0
- package/resources/projects.mjs +3 -0
- package/resources/projects.mjs.map +1 -0
- package/resources/recommendations.d.mts +1107 -0
- package/resources/recommendations.d.mts.map +1 -0
- package/resources/recommendations.d.ts +1107 -0
- package/resources/recommendations.d.ts.map +1 -0
- package/resources/recommendations.js +17 -0
- package/resources/recommendations.js.map +1 -0
- package/resources/recommendations.mjs +13 -0
- package/resources/recommendations.mjs.map +1 -0
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +4 -3
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +4 -3
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts.map +1 -1
- package/resources/tags.js +5 -1
- package/resources/tags.js.map +1 -1
- package/resources/tags.mjs +5 -1
- package/resources/tags.mjs.map +1 -1
- package/resources/teams/brief.d.mts +149 -0
- package/resources/teams/brief.d.mts.map +1 -0
- package/resources/teams/brief.d.ts +149 -0
- package/resources/teams/brief.d.ts.map +1 -0
- package/resources/teams/brief.js +28 -0
- package/resources/teams/brief.js.map +1 -0
- package/resources/teams/brief.mjs +24 -0
- package/resources/teams/brief.mjs.map +1 -0
- package/resources/teams/index.d.mts +7 -0
- package/resources/teams/index.d.mts.map +1 -0
- package/resources/teams/index.d.ts +7 -0
- package/resources/teams/index.d.ts.map +1 -0
- package/resources/teams/index.js +17 -0
- package/resources/teams/index.js.map +1 -0
- package/resources/teams/index.mjs +8 -0
- package/resources/teams/index.mjs.map +1 -0
- package/resources/teams/ip-filters.d.mts +115 -0
- package/resources/teams/ip-filters.d.mts.map +1 -0
- package/resources/teams/ip-filters.d.ts +115 -0
- package/resources/teams/ip-filters.d.ts.map +1 -0
- package/resources/teams/ip-filters.js +45 -0
- package/resources/teams/ip-filters.js.map +1 -0
- package/resources/teams/ip-filters.mjs +41 -0
- package/resources/teams/ip-filters.mjs.map +1 -0
- package/resources/teams/members.d.mts +204 -0
- package/resources/teams/members.d.mts.map +1 -0
- package/resources/teams/members.d.ts +204 -0
- package/resources/teams/members.d.ts.map +1 -0
- package/resources/teams/members.js +30 -0
- package/resources/teams/members.js.map +1 -0
- package/resources/teams/members.mjs +26 -0
- package/resources/teams/members.mjs.map +1 -0
- package/resources/teams/teams.d.mts +878 -0
- package/resources/teams/teams.d.mts.map +1 -0
- package/resources/teams/teams.d.ts +878 -0
- package/resources/teams/teams.d.ts.map +1 -0
- package/resources/teams/teams.js +66 -0
- package/resources/teams/teams.js.map +1 -0
- package/resources/teams/teams.mjs +61 -0
- package/resources/teams/teams.mjs.map +1 -0
- package/resources/teams/watermark.d.mts +459 -0
- package/resources/teams/watermark.d.mts.map +1 -0
- package/resources/teams/watermark.d.ts +459 -0
- package/resources/teams/watermark.d.ts.map +1 -0
- package/resources/teams/watermark.js +46 -0
- package/resources/teams/watermark.js.map +1 -0
- package/resources/teams/watermark.mjs +42 -0
- package/resources/teams/watermark.mjs.map +1 -0
- package/resources/teams/webhook-endpoints/events.d.mts +87 -0
- package/resources/teams/webhook-endpoints/events.d.mts.map +1 -0
- package/resources/teams/webhook-endpoints/events.d.ts +87 -0
- package/resources/teams/webhook-endpoints/events.d.ts.map +1 -0
- package/resources/teams/webhook-endpoints/events.js +28 -0
- package/resources/teams/webhook-endpoints/events.js.map +1 -0
- package/resources/teams/webhook-endpoints/events.mjs +24 -0
- package/resources/teams/webhook-endpoints/events.mjs.map +1 -0
- package/resources/teams/webhook-endpoints/index.d.mts +3 -0
- package/resources/teams/webhook-endpoints/index.d.mts.map +1 -0
- package/resources/teams/webhook-endpoints/index.d.ts +3 -0
- package/resources/teams/webhook-endpoints/index.d.ts.map +1 -0
- package/resources/teams/webhook-endpoints/index.js +9 -0
- package/resources/teams/webhook-endpoints/index.js.map +1 -0
- package/resources/teams/webhook-endpoints/index.mjs +4 -0
- package/resources/teams/webhook-endpoints/index.mjs.map +1 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.d.mts +250 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.d.mts.map +1 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.d.ts +250 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.d.ts.map +1 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.js +45 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.js.map +1 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.mjs +40 -0
- package/resources/teams/webhook-endpoints/webhook-endpoints.mjs.map +1 -0
- package/resources/teams/webhook-endpoints.d.mts +2 -0
- package/resources/teams/webhook-endpoints.d.mts.map +1 -0
- package/resources/teams/webhook-endpoints.d.ts +2 -0
- package/resources/teams/webhook-endpoints.d.ts.map +1 -0
- package/resources/teams/webhook-endpoints.js +6 -0
- package/resources/teams/webhook-endpoints.js.map +1 -0
- package/resources/teams/webhook-endpoints.mjs +3 -0
- package/resources/teams/webhook-endpoints.mjs.map +1 -0
- package/resources/teams.d.mts +2 -0
- package/resources/teams.d.mts.map +1 -0
- package/resources/teams.d.ts +2 -0
- package/resources/teams.d.ts.map +1 -0
- package/resources/teams.js +6 -0
- package/resources/teams.js.map +1 -0
- package/resources/teams.mjs +3 -0
- package/resources/teams.mjs.map +1 -0
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +15 -3
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +15 -3
- package/resources/uploads.mjs.map +1 -1
- package/resources/usages.d.mts +51 -24
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +51 -24
- package/resources/usages.d.ts.map +1 -1
- package/resources/usages.js +2 -1
- package/resources/usages.js.map +1 -1
- package/resources/usages.mjs +2 -1
- package/resources/usages.mjs.map +1 -1
- package/resources/workflows.d.mts +1381 -280
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +1381 -280
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +39 -8
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +39 -8
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +101 -0
- package/src/core/pagination.ts +144 -0
- package/src/internal/utils/values.ts +10 -0
- package/src/lib/generate.ts +7 -7
- package/src/lib/job.ts +9 -7
- package/src/lib/models.ts +8 -6
- package/src/lib/query.ts +42 -0
- package/src/lib/scenario.ts +8 -0
- package/src/lib/scope.ts +42 -7
- package/src/lib/upload.ts +10 -8
- package/src/lib/workflow.ts +9 -7
- package/src/lib/workflow_validator.ts +115 -0
- package/src/resources/assets/assets.ts +192 -33
- package/src/resources/assets/download.ts +43 -8
- package/src/resources/collections/assets.ts +3 -2
- package/src/resources/collections/collections.ts +20 -5
- package/src/resources/collections/models.ts +3 -2
- package/src/resources/generate.ts +2350 -186
- package/src/resources/index.ts +34 -0
- package/src/resources/jobs.ts +204 -74
- package/src/resources/models/description.ts +10 -2
- package/src/resources/models/examples.ts +140 -46
- package/src/resources/models/index.ts +25 -0
- package/src/resources/models/models.ts +326 -88
- package/src/resources/models/presets.ts +1335 -0
- package/src/resources/models/prompt-guide.ts +102 -0
- package/src/resources/models/scores.ts +383 -0
- package/src/resources/models/train.ts +121 -46
- package/src/resources/models/training-images.ts +5 -4
- package/src/resources/projects/api-keys.ts +86 -0
- package/src/resources/projects/brief.ts +197 -0
- package/src/resources/projects/index.ts +71 -0
- package/src/resources/projects/instructions.ts +134 -0
- package/src/resources/projects/members.ts +958 -0
- package/src/resources/projects/memory.ts +134 -0
- package/src/resources/projects/projects.ts +1478 -0
- package/src/resources/projects/watermark.ts +590 -0
- package/src/resources/projects/webhook-endpoints/events.ts +179 -0
- package/src/resources/projects/webhook-endpoints/index.ts +19 -0
- package/src/resources/projects/webhook-endpoints/webhook-endpoints.ts +452 -0
- package/src/resources/projects/webhook-endpoints.ts +3 -0
- package/src/resources/projects.ts +3 -0
- package/src/resources/recommendations.ts +1502 -0
- package/src/resources/search.ts +4 -3
- package/src/resources/tags.ts +5 -1
- package/src/resources/teams/brief.ts +193 -0
- package/src/resources/teams/index.ts +62 -0
- package/src/resources/teams/ip-filters.ts +177 -0
- package/src/resources/teams/members.ts +282 -0
- package/src/resources/teams/teams.ts +1255 -0
- package/src/resources/teams/watermark.ts +590 -0
- package/src/resources/teams/webhook-endpoints/events.ts +179 -0
- package/src/resources/teams/webhook-endpoints/index.ts +19 -0
- package/src/resources/teams/webhook-endpoints/webhook-endpoints.ts +453 -0
- package/src/resources/teams/webhook-endpoints.ts +3 -0
- package/src/resources/teams.ts +3 -0
- package/src/resources/uploads.ts +15 -3
- package/src/resources/usages.ts +58 -23
- package/src/resources/workflows.ts +1707 -241
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
6
|
import { path } from '../../internal/utils/path';
|
|
7
|
+
import { omitUndefined } from '../../internal/utils/values';
|
|
7
8
|
|
|
8
9
|
export class Train extends APIResource {
|
|
9
10
|
/**
|
|
@@ -16,9 +17,9 @@ export class Train extends APIResource {
|
|
|
16
17
|
): APIPromise<TrainActionResponse> {
|
|
17
18
|
const { projectId, ...body } = params;
|
|
18
19
|
return this._client.post(path`/models/${modelID}/train/action`, {
|
|
19
|
-
query: { projectId },
|
|
20
20
|
body,
|
|
21
21
|
...options,
|
|
22
|
+
query: { projectId, ...omitUndefined(options?.query) },
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -32,9 +33,9 @@ export class Train extends APIResource {
|
|
|
32
33
|
): APIPromise<TrainTriggerResponse> {
|
|
33
34
|
const { dryRun, originalAssets, projectId, trainingImagesCount, ...body } = params;
|
|
34
35
|
return this._client.put(path`/models/${modelID}/train`, {
|
|
35
|
-
query: { dryRun, originalAssets, projectId, trainingImagesCount },
|
|
36
36
|
body,
|
|
37
37
|
...options,
|
|
38
|
+
query: { dryRun, originalAssets, projectId, trainingImagesCount, ...omitUndefined(options?.query) },
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -179,8 +180,8 @@ export namespace TrainActionResponse {
|
|
|
179
180
|
updatedAt: string;
|
|
180
181
|
|
|
181
182
|
/**
|
|
182
|
-
* The access restrictions of the model 0: Free plan 25:
|
|
183
|
-
* 75:
|
|
183
|
+
* The access restrictions of the model 0: Free plan 25: Starter plan 50: Pro plan
|
|
184
|
+
* 75: Max plan 100: Enterprise plan
|
|
184
185
|
*/
|
|
185
186
|
accessRestrictions?: 0 | 100 | 25 | 50 | 75;
|
|
186
187
|
|
|
@@ -229,6 +230,12 @@ export namespace TrainActionResponse {
|
|
|
229
230
|
*/
|
|
230
231
|
inputs?: Array<Model.Input>;
|
|
231
232
|
|
|
233
|
+
/**
|
|
234
|
+
* The ID of the job that trained the model, returned to the model owner only
|
|
235
|
+
* (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
236
|
+
*/
|
|
237
|
+
jobId?: string;
|
|
238
|
+
|
|
232
239
|
/**
|
|
233
240
|
* The model keyword, this is a legacy parameter, please use conceptPrompt in
|
|
234
241
|
* parameters
|
|
@@ -618,8 +625,7 @@ export namespace TrainActionResponse {
|
|
|
618
625
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
619
626
|
* defined
|
|
620
627
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
621
|
-
* - \`
|
|
622
|
-
* value
|
|
628
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
623
629
|
*
|
|
624
630
|
* By default, the input is not required.
|
|
625
631
|
*/
|
|
@@ -639,8 +645,7 @@ export namespace TrainActionResponse {
|
|
|
639
645
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
640
646
|
* defined
|
|
641
647
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
642
|
-
* - \`
|
|
643
|
-
* value
|
|
648
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
644
649
|
*
|
|
645
650
|
* By default, the input is not required.
|
|
646
651
|
*/
|
|
@@ -651,12 +656,9 @@ export namespace TrainActionResponse {
|
|
|
651
656
|
always?: boolean;
|
|
652
657
|
|
|
653
658
|
/**
|
|
654
|
-
* Makes this input required when
|
|
655
|
-
*
|
|
656
|
-
* - Key: name of the input to check
|
|
657
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
659
|
+
* Makes this input required when other inputs have one of the listed values
|
|
658
660
|
*/
|
|
659
|
-
|
|
661
|
+
conditional?: Required.Conditional;
|
|
660
662
|
|
|
661
663
|
/**
|
|
662
664
|
* Makes this input required when another input is defined:
|
|
@@ -674,6 +676,26 @@ export namespace TrainActionResponse {
|
|
|
674
676
|
*/
|
|
675
677
|
ifNotDefined?: unknown;
|
|
676
678
|
}
|
|
679
|
+
|
|
680
|
+
export namespace Required {
|
|
681
|
+
/**
|
|
682
|
+
* Makes this input required when other inputs have one of the listed values
|
|
683
|
+
*/
|
|
684
|
+
export interface Conditional {
|
|
685
|
+
/**
|
|
686
|
+
* The conditions to check:
|
|
687
|
+
*
|
|
688
|
+
* - Key: name of the input to check
|
|
689
|
+
* - Value: values of that input that satisfy the condition
|
|
690
|
+
*/
|
|
691
|
+
values: unknown;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
|
|
695
|
+
*/
|
|
696
|
+
operator?: 'and' | 'or';
|
|
697
|
+
}
|
|
698
|
+
}
|
|
677
699
|
}
|
|
678
700
|
|
|
679
701
|
/**
|
|
@@ -1581,6 +1603,7 @@ export namespace TrainTriggerResponse {
|
|
|
1581
1603
|
| 'remove-background'
|
|
1582
1604
|
| 'transform'
|
|
1583
1605
|
| 'user-approval'
|
|
1606
|
+
| 'user-selection'
|
|
1584
1607
|
| 'workflow';
|
|
1585
1608
|
|
|
1586
1609
|
/**
|
|
@@ -1611,14 +1634,15 @@ export namespace TrainTriggerResponse {
|
|
|
1611
1634
|
includeOutputsInWorkflowJob?: true;
|
|
1612
1635
|
|
|
1613
1636
|
/**
|
|
1614
|
-
* The inputs of the node.
|
|
1637
|
+
* The inputs of the node. For a user-selection node, the array input's `min`/`max`
|
|
1638
|
+
* bound how many items the user may pick (defaults: 1 and 100); conditional
|
|
1639
|
+
* connections may be present as additional inputs.
|
|
1615
1640
|
*/
|
|
1616
1641
|
inputs?: Array<Flow.Input>;
|
|
1617
1642
|
|
|
1618
1643
|
/**
|
|
1619
|
-
* Statically-configured items for a List node
|
|
1620
|
-
*
|
|
1621
|
-
* numbers, or asset IDs.
|
|
1644
|
+
* Statically-configured items for a List node, or the frozen candidate list of a
|
|
1645
|
+
* UserSelection node. The values can be strings, numbers, or asset IDs.
|
|
1622
1646
|
*/
|
|
1623
1647
|
items?: Array<string>;
|
|
1624
1648
|
|
|
@@ -1898,8 +1922,7 @@ export namespace TrainTriggerResponse {
|
|
|
1898
1922
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1899
1923
|
* defined
|
|
1900
1924
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1901
|
-
* - \`
|
|
1902
|
-
* value
|
|
1925
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
1903
1926
|
*
|
|
1904
1927
|
* By default, the input is not required.
|
|
1905
1928
|
*/
|
|
@@ -2129,8 +2152,7 @@ export namespace TrainTriggerResponse {
|
|
|
2129
2152
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
2130
2153
|
* defined
|
|
2131
2154
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
2132
|
-
* - \`
|
|
2133
|
-
* value
|
|
2155
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
2134
2156
|
*
|
|
2135
2157
|
* By default, the input is not required.
|
|
2136
2158
|
*/
|
|
@@ -2187,8 +2209,7 @@ export namespace TrainTriggerResponse {
|
|
|
2187
2209
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
2188
2210
|
* defined
|
|
2189
2211
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
2190
|
-
* - \`
|
|
2191
|
-
* value
|
|
2212
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
2192
2213
|
*
|
|
2193
2214
|
* By default, the input is not required.
|
|
2194
2215
|
*/
|
|
@@ -2199,12 +2220,9 @@ export namespace TrainTriggerResponse {
|
|
|
2199
2220
|
always?: boolean;
|
|
2200
2221
|
|
|
2201
2222
|
/**
|
|
2202
|
-
* Makes this input required when
|
|
2203
|
-
*
|
|
2204
|
-
* - Key: name of the input to check
|
|
2205
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
2223
|
+
* Makes this input required when other inputs have one of the listed values
|
|
2206
2224
|
*/
|
|
2207
|
-
|
|
2225
|
+
conditional?: Required.Conditional;
|
|
2208
2226
|
|
|
2209
2227
|
/**
|
|
2210
2228
|
* Makes this input required when another input is defined:
|
|
@@ -2222,6 +2240,26 @@ export namespace TrainTriggerResponse {
|
|
|
2222
2240
|
*/
|
|
2223
2241
|
ifNotDefined?: unknown;
|
|
2224
2242
|
}
|
|
2243
|
+
|
|
2244
|
+
export namespace Required {
|
|
2245
|
+
/**
|
|
2246
|
+
* Makes this input required when other inputs have one of the listed values
|
|
2247
|
+
*/
|
|
2248
|
+
export interface Conditional {
|
|
2249
|
+
/**
|
|
2250
|
+
* The conditions to check:
|
|
2251
|
+
*
|
|
2252
|
+
* - Key: name of the input to check
|
|
2253
|
+
* - Value: values of that input that satisfy the condition
|
|
2254
|
+
*/
|
|
2255
|
+
values: unknown;
|
|
2256
|
+
|
|
2257
|
+
/**
|
|
2258
|
+
* How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
|
|
2259
|
+
*/
|
|
2260
|
+
operator?: 'and' | 'or';
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2225
2263
|
}
|
|
2226
2264
|
|
|
2227
2265
|
/**
|
|
@@ -2262,8 +2300,7 @@ export namespace TrainTriggerResponse {
|
|
|
2262
2300
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
2263
2301
|
* defined
|
|
2264
2302
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
2265
|
-
* - \`
|
|
2266
|
-
* value
|
|
2303
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
2267
2304
|
*
|
|
2268
2305
|
* By default, the input is not required.
|
|
2269
2306
|
*/
|
|
@@ -2274,12 +2311,9 @@ export namespace TrainTriggerResponse {
|
|
|
2274
2311
|
always?: boolean;
|
|
2275
2312
|
|
|
2276
2313
|
/**
|
|
2277
|
-
* Makes this input required when
|
|
2278
|
-
*
|
|
2279
|
-
* - Key: name of the input to check
|
|
2280
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
2314
|
+
* Makes this input required when other inputs have one of the listed values
|
|
2281
2315
|
*/
|
|
2282
|
-
|
|
2316
|
+
conditional?: Required.Conditional;
|
|
2283
2317
|
|
|
2284
2318
|
/**
|
|
2285
2319
|
* Makes this input required when another input is defined:
|
|
@@ -2297,6 +2331,26 @@ export namespace TrainTriggerResponse {
|
|
|
2297
2331
|
*/
|
|
2298
2332
|
ifNotDefined?: unknown;
|
|
2299
2333
|
}
|
|
2334
|
+
|
|
2335
|
+
export namespace Required {
|
|
2336
|
+
/**
|
|
2337
|
+
* Makes this input required when other inputs have one of the listed values
|
|
2338
|
+
*/
|
|
2339
|
+
export interface Conditional {
|
|
2340
|
+
/**
|
|
2341
|
+
* The conditions to check:
|
|
2342
|
+
*
|
|
2343
|
+
* - Key: name of the input to check
|
|
2344
|
+
* - Value: values of that input that satisfy the condition
|
|
2345
|
+
*/
|
|
2346
|
+
values: unknown;
|
|
2347
|
+
|
|
2348
|
+
/**
|
|
2349
|
+
* How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
|
|
2350
|
+
*/
|
|
2351
|
+
operator?: 'and' | 'or';
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2300
2354
|
}
|
|
2301
2355
|
|
|
2302
2356
|
/**
|
|
@@ -2544,8 +2598,8 @@ export namespace TrainTriggerResponse {
|
|
|
2544
2598
|
updatedAt: string;
|
|
2545
2599
|
|
|
2546
2600
|
/**
|
|
2547
|
-
* The access restrictions of the model 0: Free plan 25:
|
|
2548
|
-
* 75:
|
|
2601
|
+
* The access restrictions of the model 0: Free plan 25: Starter plan 50: Pro plan
|
|
2602
|
+
* 75: Max plan 100: Enterprise plan
|
|
2549
2603
|
*/
|
|
2550
2604
|
accessRestrictions?: 0 | 100 | 25 | 50 | 75;
|
|
2551
2605
|
|
|
@@ -2594,6 +2648,12 @@ export namespace TrainTriggerResponse {
|
|
|
2594
2648
|
*/
|
|
2595
2649
|
inputs?: Array<Model.Input>;
|
|
2596
2650
|
|
|
2651
|
+
/**
|
|
2652
|
+
* The ID of the job that trained the model, returned to the model owner only
|
|
2653
|
+
* (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
2654
|
+
*/
|
|
2655
|
+
jobId?: string;
|
|
2656
|
+
|
|
2597
2657
|
/**
|
|
2598
2658
|
* The model keyword, this is a legacy parameter, please use conceptPrompt in
|
|
2599
2659
|
* parameters
|
|
@@ -2983,8 +3043,7 @@ export namespace TrainTriggerResponse {
|
|
|
2983
3043
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
2984
3044
|
* defined
|
|
2985
3045
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
2986
|
-
* - \`
|
|
2987
|
-
* value
|
|
3046
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
2988
3047
|
*
|
|
2989
3048
|
* By default, the input is not required.
|
|
2990
3049
|
*/
|
|
@@ -3004,8 +3063,7 @@ export namespace TrainTriggerResponse {
|
|
|
3004
3063
|
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3005
3064
|
* defined
|
|
3006
3065
|
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3007
|
-
* - \`
|
|
3008
|
-
* value
|
|
3066
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
3009
3067
|
*
|
|
3010
3068
|
* By default, the input is not required.
|
|
3011
3069
|
*/
|
|
@@ -3016,12 +3074,9 @@ export namespace TrainTriggerResponse {
|
|
|
3016
3074
|
always?: boolean;
|
|
3017
3075
|
|
|
3018
3076
|
/**
|
|
3019
|
-
* Makes this input required when
|
|
3020
|
-
*
|
|
3021
|
-
* - Key: name of the input to check
|
|
3022
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
3077
|
+
* Makes this input required when other inputs have one of the listed values
|
|
3023
3078
|
*/
|
|
3024
|
-
|
|
3079
|
+
conditional?: Required.Conditional;
|
|
3025
3080
|
|
|
3026
3081
|
/**
|
|
3027
3082
|
* Makes this input required when another input is defined:
|
|
@@ -3039,6 +3094,26 @@ export namespace TrainTriggerResponse {
|
|
|
3039
3094
|
*/
|
|
3040
3095
|
ifNotDefined?: unknown;
|
|
3041
3096
|
}
|
|
3097
|
+
|
|
3098
|
+
export namespace Required {
|
|
3099
|
+
/**
|
|
3100
|
+
* Makes this input required when other inputs have one of the listed values
|
|
3101
|
+
*/
|
|
3102
|
+
export interface Conditional {
|
|
3103
|
+
/**
|
|
3104
|
+
* The conditions to check:
|
|
3105
|
+
*
|
|
3106
|
+
* - Key: name of the input to check
|
|
3107
|
+
* - Value: values of that input that satisfy the condition
|
|
3108
|
+
*/
|
|
3109
|
+
values: unknown;
|
|
3110
|
+
|
|
3111
|
+
/**
|
|
3112
|
+
* How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
|
|
3113
|
+
*/
|
|
3114
|
+
operator?: 'and' | 'or';
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3042
3117
|
}
|
|
3043
3118
|
|
|
3044
3119
|
/**
|
|
@@ -4,6 +4,7 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
6
|
import { path } from '../../internal/utils/path';
|
|
7
|
+
import { omitUndefined } from '../../internal/utils/values';
|
|
7
8
|
|
|
8
9
|
export class TrainingImages extends APIResource {
|
|
9
10
|
/**
|
|
@@ -16,8 +17,8 @@ export class TrainingImages extends APIResource {
|
|
|
16
17
|
): APIPromise<unknown> {
|
|
17
18
|
const { modelId, projectId } = params;
|
|
18
19
|
return this._client.delete(path`/models/${modelId}/training-images/${trainingImageID}`, {
|
|
19
|
-
query: { projectId },
|
|
20
20
|
...options,
|
|
21
|
+
query: { projectId, ...omitUndefined(options?.query) },
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -31,9 +32,9 @@ export class TrainingImages extends APIResource {
|
|
|
31
32
|
): APIPromise<TrainingImageAddResponse> {
|
|
32
33
|
const { originalAssets, projectId, ...body } = params;
|
|
33
34
|
return this._client.post(path`/models/${modelID}/training-images`, {
|
|
34
|
-
query: { originalAssets, projectId },
|
|
35
35
|
body,
|
|
36
36
|
...options,
|
|
37
|
+
query: { originalAssets, projectId, ...omitUndefined(options?.query) },
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -47,9 +48,9 @@ export class TrainingImages extends APIResource {
|
|
|
47
48
|
): APIPromise<TrainingImageReplaceResponse> {
|
|
48
49
|
const { modelId, originalAssets, projectId, ...body } = params;
|
|
49
50
|
return this._client.put(path`/models/${modelId}/training-images/${trainingImageID}`, {
|
|
50
|
-
query: { originalAssets, projectId },
|
|
51
51
|
body,
|
|
52
52
|
...options,
|
|
53
|
+
query: { originalAssets, projectId, ...omitUndefined(options?.query) },
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
|
|
@@ -63,9 +64,9 @@ export class TrainingImages extends APIResource {
|
|
|
63
64
|
): APIPromise<TrainingImageReplacePairsResponse> {
|
|
64
65
|
const { body, projectId } = params;
|
|
65
66
|
return this._client.put(path`/models/${modelID}/training-images/pairs`, {
|
|
66
|
-
query: { projectId },
|
|
67
67
|
body: body,
|
|
68
68
|
...options,
|
|
69
|
+
query: { projectId, ...omitUndefined(options?.query) },
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class APIKeys extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create an API key for a particular project
|
|
11
|
+
*/
|
|
12
|
+
create(
|
|
13
|
+
projectID: string,
|
|
14
|
+
body: APIKeyCreateParams,
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<APIKeyCreateResponse> {
|
|
17
|
+
return this._client.post(path`/projects/${projectID}/api-keys`, { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Delete a particular api key
|
|
22
|
+
*/
|
|
23
|
+
delete(keyID: string, params: APIKeyDeleteParams, options?: RequestOptions): APIPromise<unknown> {
|
|
24
|
+
const { projectId } = params;
|
|
25
|
+
return this._client.delete(path`/projects/${projectId}/api-keys/${keyID}`, options);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface APIKeyCreateResponse {
|
|
30
|
+
id: string;
|
|
31
|
+
|
|
32
|
+
authorId: string;
|
|
33
|
+
|
|
34
|
+
createdAt: string;
|
|
35
|
+
|
|
36
|
+
ownerType: 'project' | 'team';
|
|
37
|
+
|
|
38
|
+
secret: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The key's member id (`apiu_...`), taken by the member routes; the api-keys
|
|
42
|
+
* routes take `id`.
|
|
43
|
+
*/
|
|
44
|
+
userId: string;
|
|
45
|
+
|
|
46
|
+
ownerId?: string;
|
|
47
|
+
|
|
48
|
+
teamId?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type APIKeyDeleteResponse = unknown;
|
|
52
|
+
|
|
53
|
+
export interface APIKeyCreateParams {
|
|
54
|
+
/**
|
|
55
|
+
* Optional spending cap (CU) for this key over the billing period: a value >= 0 to
|
|
56
|
+
* cap, or -1 for unlimited. Omit to inherit the default.
|
|
57
|
+
*/
|
|
58
|
+
maxConsumption?: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The API Key name
|
|
62
|
+
*/
|
|
63
|
+
name?: string;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Project role: a built-in role (admin | editor | reader) or a custom inline
|
|
67
|
+
* ";"-separated scope list (e.g. "assets.read;workflows.run"). Defaults to editor.
|
|
68
|
+
*/
|
|
69
|
+
role?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface APIKeyDeleteParams {
|
|
73
|
+
/**
|
|
74
|
+
* The project Id on which the api key exists
|
|
75
|
+
*/
|
|
76
|
+
projectId: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export declare namespace APIKeys {
|
|
80
|
+
export {
|
|
81
|
+
type APIKeyCreateResponse as APIKeyCreateResponse,
|
|
82
|
+
type APIKeyDeleteResponse as APIKeyDeleteResponse,
|
|
83
|
+
type APIKeyCreateParams as APIKeyCreateParams,
|
|
84
|
+
type APIKeyDeleteParams as APIKeyDeleteParams,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Brief extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get the project's Quality Gate brief
|
|
11
|
+
*/
|
|
12
|
+
retrieve(projectID: string, options?: RequestOptions): APIPromise<BriefRetrieveResponse> {
|
|
13
|
+
return this._client.get(path`/projects/${projectID}/brief`, options);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Create or update the project's Quality Gate brief
|
|
18
|
+
*/
|
|
19
|
+
update(
|
|
20
|
+
projectID: string,
|
|
21
|
+
body: BriefUpdateParams,
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): APIPromise<BriefUpdateResponse> {
|
|
24
|
+
return this._client.put(path`/projects/${projectID}/brief`, { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Delete the project's Quality Gate brief
|
|
29
|
+
*/
|
|
30
|
+
delete(projectID: string, options?: RequestOptions): APIPromise<BriefDeleteResponse> {
|
|
31
|
+
return this._client.delete(path`/projects/${projectID}/brief`, options);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface BriefRetrieveResponse {
|
|
36
|
+
/**
|
|
37
|
+
* A brand-style / project-rules / campaign-context brief stored at one scope.
|
|
38
|
+
*/
|
|
39
|
+
brief: BriefRetrieveResponse.Brief;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export namespace BriefRetrieveResponse {
|
|
43
|
+
/**
|
|
44
|
+
* A brand-style / project-rules / campaign-context brief stored at one scope.
|
|
45
|
+
*/
|
|
46
|
+
export interface Brief {
|
|
47
|
+
/**
|
|
48
|
+
* Stable identifier derived from level + scopeId
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Free-text brief: brand style, rules, campaign context
|
|
54
|
+
*/
|
|
55
|
+
body: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* ISO-8601 creation timestamp
|
|
59
|
+
*/
|
|
60
|
+
createdAt: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* User id that last wrote the brief
|
|
64
|
+
*/
|
|
65
|
+
createdBy: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Whether the brief is applied during verification
|
|
69
|
+
*/
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Scope this brief applies to: team or project
|
|
74
|
+
*/
|
|
75
|
+
level: 'project' | 'team';
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Reference assets the verifier compares the image against
|
|
79
|
+
*/
|
|
80
|
+
referenceAssetIds: Array<string>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The id of the team or project that owns this brief
|
|
84
|
+
*/
|
|
85
|
+
scopeId: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* ISO-8601 last-update timestamp
|
|
89
|
+
*/
|
|
90
|
+
updatedAt: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Threshold strictness applied when verifying against this scope
|
|
94
|
+
*/
|
|
95
|
+
sensitivity?: 'high' | 'low' | 'medium';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface BriefUpdateResponse {
|
|
100
|
+
/**
|
|
101
|
+
* A brand-style / project-rules / campaign-context brief stored at one scope.
|
|
102
|
+
*/
|
|
103
|
+
brief: BriefUpdateResponse.Brief;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export namespace BriefUpdateResponse {
|
|
107
|
+
/**
|
|
108
|
+
* A brand-style / project-rules / campaign-context brief stored at one scope.
|
|
109
|
+
*/
|
|
110
|
+
export interface Brief {
|
|
111
|
+
/**
|
|
112
|
+
* Stable identifier derived from level + scopeId
|
|
113
|
+
*/
|
|
114
|
+
id: string;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Free-text brief: brand style, rules, campaign context
|
|
118
|
+
*/
|
|
119
|
+
body: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* ISO-8601 creation timestamp
|
|
123
|
+
*/
|
|
124
|
+
createdAt: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* User id that last wrote the brief
|
|
128
|
+
*/
|
|
129
|
+
createdBy: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Whether the brief is applied during verification
|
|
133
|
+
*/
|
|
134
|
+
enabled: boolean;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Scope this brief applies to: team or project
|
|
138
|
+
*/
|
|
139
|
+
level: 'project' | 'team';
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Reference assets the verifier compares the image against
|
|
143
|
+
*/
|
|
144
|
+
referenceAssetIds: Array<string>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The id of the team or project that owns this brief
|
|
148
|
+
*/
|
|
149
|
+
scopeId: string;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* ISO-8601 last-update timestamp
|
|
153
|
+
*/
|
|
154
|
+
updatedAt: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Threshold strictness applied when verifying against this scope
|
|
158
|
+
*/
|
|
159
|
+
sensitivity?: 'high' | 'low' | 'medium';
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface BriefDeleteResponse {
|
|
164
|
+
deleted: boolean;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface BriefUpdateParams {
|
|
168
|
+
/**
|
|
169
|
+
* Free-text brief content
|
|
170
|
+
*/
|
|
171
|
+
body: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Whether the brief is applied during verification (default true)
|
|
175
|
+
*/
|
|
176
|
+
enabled?: boolean;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Reference assets the verifier compares against (max 10). Send [] to clear.
|
|
180
|
+
*/
|
|
181
|
+
referenceAssetIds?: Array<string>;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Threshold strictness stored for this scope: low, medium, or high. Applied to
|
|
185
|
+
* verifications unless the verify call passes its own sensitivity.
|
|
186
|
+
*/
|
|
187
|
+
sensitivity?: 'high' | 'low' | 'medium';
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export declare namespace Brief {
|
|
191
|
+
export {
|
|
192
|
+
type BriefRetrieveResponse as BriefRetrieveResponse,
|
|
193
|
+
type BriefUpdateResponse as BriefUpdateResponse,
|
|
194
|
+
type BriefDeleteResponse as BriefDeleteResponse,
|
|
195
|
+
type BriefUpdateParams as BriefUpdateParams,
|
|
196
|
+
};
|
|
197
|
+
}
|