@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
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Watermark extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get the project's forced watermark configuration
|
|
7
|
+
*/
|
|
8
|
+
retrieve(projectID: string, options?: RequestOptions): APIPromise<WatermarkRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* Create or update the project's forced watermark configuration
|
|
11
|
+
*/
|
|
12
|
+
update(projectID: string, body: WatermarkUpdateParams, options?: RequestOptions): APIPromise<WatermarkUpdateResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Delete the project's forced watermark configuration
|
|
15
|
+
*/
|
|
16
|
+
delete(projectID: string, options?: RequestOptions): APIPromise<WatermarkDeleteResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Remove the project's watermark logo, falling back to its configured text
|
|
19
|
+
*/
|
|
20
|
+
deleteLogo(projectID: string, options?: RequestOptions): APIPromise<WatermarkDeleteLogoResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Draw the given watermark settings on a sample image, without saving them
|
|
23
|
+
*/
|
|
24
|
+
preview(projectID: string, body: WatermarkPreviewParams, options?: RequestOptions): APIPromise<WatermarkPreviewResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Upload the project's watermark logo, used as the mark instead of its text
|
|
27
|
+
*/
|
|
28
|
+
updateLogo(projectID: string, body: WatermarkUpdateLogoParams, options?: RequestOptions): APIPromise<WatermarkUpdateLogoResponse>;
|
|
29
|
+
}
|
|
30
|
+
export interface WatermarkRetrieveResponse {
|
|
31
|
+
/**
|
|
32
|
+
* Forced-watermark configuration stored at one scope.
|
|
33
|
+
*/
|
|
34
|
+
watermark: WatermarkRetrieveResponse.Watermark;
|
|
35
|
+
}
|
|
36
|
+
export declare namespace WatermarkRetrieveResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Forced-watermark configuration stored at one scope.
|
|
39
|
+
*/
|
|
40
|
+
interface Watermark {
|
|
41
|
+
/**
|
|
42
|
+
* Stable identifier derived from level + scopeId
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* ISO-8601 creation timestamp
|
|
47
|
+
*/
|
|
48
|
+
createdAt: string;
|
|
49
|
+
/**
|
|
50
|
+
* User id that last wrote the configuration
|
|
51
|
+
*/
|
|
52
|
+
createdBy: string;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the watermark is enforced on assets generated in this scope. A disabled
|
|
55
|
+
* project configuration falls back to its team's.
|
|
56
|
+
*/
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Scope this configuration applies to: team or project
|
|
60
|
+
*/
|
|
61
|
+
level: 'project' | 'team';
|
|
62
|
+
/**
|
|
63
|
+
* Mark opacity, 0.05 (barely visible) to 1 (opaque)
|
|
64
|
+
*/
|
|
65
|
+
opacity: number;
|
|
66
|
+
/**
|
|
67
|
+
* Where the mark sits on the image
|
|
68
|
+
*/
|
|
69
|
+
placement: 'bottom-left' | 'bottom-right' | 'center' | 'tiled' | 'top-left' | 'top-right';
|
|
70
|
+
/**
|
|
71
|
+
* Mark rotation in degrees, -90 to 90. 0 is horizontal.
|
|
72
|
+
*/
|
|
73
|
+
rotation: number;
|
|
74
|
+
/**
|
|
75
|
+
* Mark width as a fraction of the image width
|
|
76
|
+
*/
|
|
77
|
+
scale: number;
|
|
78
|
+
/**
|
|
79
|
+
* The id of the team or project that owns this configuration
|
|
80
|
+
*/
|
|
81
|
+
scopeId: string;
|
|
82
|
+
/**
|
|
83
|
+
* Gap between repetitions, as a fraction of the mark's own size. Tiled placement
|
|
84
|
+
* only; 0 repeats the mark edge to edge.
|
|
85
|
+
*/
|
|
86
|
+
spacing: number;
|
|
87
|
+
/**
|
|
88
|
+
* ISO-8601 last-update timestamp
|
|
89
|
+
*/
|
|
90
|
+
updatedAt: string;
|
|
91
|
+
/**
|
|
92
|
+
* Bumped on every write.
|
|
93
|
+
*/
|
|
94
|
+
version: number;
|
|
95
|
+
/**
|
|
96
|
+
* Set when the configuration has been deleted.
|
|
97
|
+
*/
|
|
98
|
+
deletedAt?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the stored logo has no transparency at all.
|
|
101
|
+
*
|
|
102
|
+
* Recorded at upload so the UI can warn without decoding the image again: an
|
|
103
|
+
* opaque logo draws its whole rectangle, which a rotated tiled mark turns into a
|
|
104
|
+
* very visible diamond.
|
|
105
|
+
*/
|
|
106
|
+
logoIsOpaque?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Where the uploaded logo lives, when one is set.
|
|
109
|
+
*/
|
|
110
|
+
logoKey?: string;
|
|
111
|
+
/**
|
|
112
|
+
* Text rendered as the mark, when no logo is set
|
|
113
|
+
*/
|
|
114
|
+
text?: string;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
export interface WatermarkUpdateResponse {
|
|
118
|
+
/**
|
|
119
|
+
* Forced-watermark configuration stored at one scope.
|
|
120
|
+
*/
|
|
121
|
+
watermark: WatermarkUpdateResponse.Watermark;
|
|
122
|
+
}
|
|
123
|
+
export declare namespace WatermarkUpdateResponse {
|
|
124
|
+
/**
|
|
125
|
+
* Forced-watermark configuration stored at one scope.
|
|
126
|
+
*/
|
|
127
|
+
interface Watermark {
|
|
128
|
+
/**
|
|
129
|
+
* Stable identifier derived from level + scopeId
|
|
130
|
+
*/
|
|
131
|
+
id: string;
|
|
132
|
+
/**
|
|
133
|
+
* ISO-8601 creation timestamp
|
|
134
|
+
*/
|
|
135
|
+
createdAt: string;
|
|
136
|
+
/**
|
|
137
|
+
* User id that last wrote the configuration
|
|
138
|
+
*/
|
|
139
|
+
createdBy: string;
|
|
140
|
+
/**
|
|
141
|
+
* Whether the watermark is enforced on assets generated in this scope. A disabled
|
|
142
|
+
* project configuration falls back to its team's.
|
|
143
|
+
*/
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Scope this configuration applies to: team or project
|
|
147
|
+
*/
|
|
148
|
+
level: 'project' | 'team';
|
|
149
|
+
/**
|
|
150
|
+
* Mark opacity, 0.05 (barely visible) to 1 (opaque)
|
|
151
|
+
*/
|
|
152
|
+
opacity: number;
|
|
153
|
+
/**
|
|
154
|
+
* Where the mark sits on the image
|
|
155
|
+
*/
|
|
156
|
+
placement: 'bottom-left' | 'bottom-right' | 'center' | 'tiled' | 'top-left' | 'top-right';
|
|
157
|
+
/**
|
|
158
|
+
* Mark rotation in degrees, -90 to 90. 0 is horizontal.
|
|
159
|
+
*/
|
|
160
|
+
rotation: number;
|
|
161
|
+
/**
|
|
162
|
+
* Mark width as a fraction of the image width
|
|
163
|
+
*/
|
|
164
|
+
scale: number;
|
|
165
|
+
/**
|
|
166
|
+
* The id of the team or project that owns this configuration
|
|
167
|
+
*/
|
|
168
|
+
scopeId: string;
|
|
169
|
+
/**
|
|
170
|
+
* Gap between repetitions, as a fraction of the mark's own size. Tiled placement
|
|
171
|
+
* only; 0 repeats the mark edge to edge.
|
|
172
|
+
*/
|
|
173
|
+
spacing: number;
|
|
174
|
+
/**
|
|
175
|
+
* ISO-8601 last-update timestamp
|
|
176
|
+
*/
|
|
177
|
+
updatedAt: string;
|
|
178
|
+
/**
|
|
179
|
+
* Bumped on every write.
|
|
180
|
+
*/
|
|
181
|
+
version: number;
|
|
182
|
+
/**
|
|
183
|
+
* Set when the configuration has been deleted.
|
|
184
|
+
*/
|
|
185
|
+
deletedAt?: string;
|
|
186
|
+
/**
|
|
187
|
+
* Whether the stored logo has no transparency at all.
|
|
188
|
+
*
|
|
189
|
+
* Recorded at upload so the UI can warn without decoding the image again: an
|
|
190
|
+
* opaque logo draws its whole rectangle, which a rotated tiled mark turns into a
|
|
191
|
+
* very visible diamond.
|
|
192
|
+
*/
|
|
193
|
+
logoIsOpaque?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Where the uploaded logo lives, when one is set.
|
|
196
|
+
*/
|
|
197
|
+
logoKey?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Text rendered as the mark, when no logo is set
|
|
200
|
+
*/
|
|
201
|
+
text?: string;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export interface WatermarkDeleteResponse {
|
|
205
|
+
deleted: boolean;
|
|
206
|
+
}
|
|
207
|
+
export interface WatermarkDeleteLogoResponse {
|
|
208
|
+
/**
|
|
209
|
+
* Forced-watermark configuration stored at one scope.
|
|
210
|
+
*/
|
|
211
|
+
watermark: WatermarkDeleteLogoResponse.Watermark;
|
|
212
|
+
}
|
|
213
|
+
export declare namespace WatermarkDeleteLogoResponse {
|
|
214
|
+
/**
|
|
215
|
+
* Forced-watermark configuration stored at one scope.
|
|
216
|
+
*/
|
|
217
|
+
interface Watermark {
|
|
218
|
+
/**
|
|
219
|
+
* Stable identifier derived from level + scopeId
|
|
220
|
+
*/
|
|
221
|
+
id: string;
|
|
222
|
+
/**
|
|
223
|
+
* ISO-8601 creation timestamp
|
|
224
|
+
*/
|
|
225
|
+
createdAt: string;
|
|
226
|
+
/**
|
|
227
|
+
* User id that last wrote the configuration
|
|
228
|
+
*/
|
|
229
|
+
createdBy: string;
|
|
230
|
+
/**
|
|
231
|
+
* Whether the watermark is enforced on assets generated in this scope. A disabled
|
|
232
|
+
* project configuration falls back to its team's.
|
|
233
|
+
*/
|
|
234
|
+
enabled: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Scope this configuration applies to: team or project
|
|
237
|
+
*/
|
|
238
|
+
level: 'project' | 'team';
|
|
239
|
+
/**
|
|
240
|
+
* Mark opacity, 0.05 (barely visible) to 1 (opaque)
|
|
241
|
+
*/
|
|
242
|
+
opacity: number;
|
|
243
|
+
/**
|
|
244
|
+
* Where the mark sits on the image
|
|
245
|
+
*/
|
|
246
|
+
placement: 'bottom-left' | 'bottom-right' | 'center' | 'tiled' | 'top-left' | 'top-right';
|
|
247
|
+
/**
|
|
248
|
+
* Mark rotation in degrees, -90 to 90. 0 is horizontal.
|
|
249
|
+
*/
|
|
250
|
+
rotation: number;
|
|
251
|
+
/**
|
|
252
|
+
* Mark width as a fraction of the image width
|
|
253
|
+
*/
|
|
254
|
+
scale: number;
|
|
255
|
+
/**
|
|
256
|
+
* The id of the team or project that owns this configuration
|
|
257
|
+
*/
|
|
258
|
+
scopeId: string;
|
|
259
|
+
/**
|
|
260
|
+
* Gap between repetitions, as a fraction of the mark's own size. Tiled placement
|
|
261
|
+
* only; 0 repeats the mark edge to edge.
|
|
262
|
+
*/
|
|
263
|
+
spacing: number;
|
|
264
|
+
/**
|
|
265
|
+
* ISO-8601 last-update timestamp
|
|
266
|
+
*/
|
|
267
|
+
updatedAt: string;
|
|
268
|
+
/**
|
|
269
|
+
* Bumped on every write.
|
|
270
|
+
*/
|
|
271
|
+
version: number;
|
|
272
|
+
/**
|
|
273
|
+
* Set when the configuration has been deleted.
|
|
274
|
+
*/
|
|
275
|
+
deletedAt?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Whether the stored logo has no transparency at all.
|
|
278
|
+
*
|
|
279
|
+
* Recorded at upload so the UI can warn without decoding the image again: an
|
|
280
|
+
* opaque logo draws its whole rectangle, which a rotated tiled mark turns into a
|
|
281
|
+
* very visible diamond.
|
|
282
|
+
*/
|
|
283
|
+
logoIsOpaque?: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Where the uploaded logo lives, when one is set.
|
|
286
|
+
*/
|
|
287
|
+
logoKey?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Text rendered as the mark, when no logo is set
|
|
290
|
+
*/
|
|
291
|
+
text?: string;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Response of the watermark preview routes.
|
|
296
|
+
*/
|
|
297
|
+
export interface WatermarkPreviewResponse {
|
|
298
|
+
/**
|
|
299
|
+
* The sample image with the mark drawn on it, base64-encoded.
|
|
300
|
+
*/
|
|
301
|
+
image: string;
|
|
302
|
+
}
|
|
303
|
+
export interface WatermarkUpdateLogoResponse {
|
|
304
|
+
/**
|
|
305
|
+
* Forced-watermark configuration stored at one scope.
|
|
306
|
+
*/
|
|
307
|
+
watermark: WatermarkUpdateLogoResponse.Watermark;
|
|
308
|
+
}
|
|
309
|
+
export declare namespace WatermarkUpdateLogoResponse {
|
|
310
|
+
/**
|
|
311
|
+
* Forced-watermark configuration stored at one scope.
|
|
312
|
+
*/
|
|
313
|
+
interface Watermark {
|
|
314
|
+
/**
|
|
315
|
+
* Stable identifier derived from level + scopeId
|
|
316
|
+
*/
|
|
317
|
+
id: string;
|
|
318
|
+
/**
|
|
319
|
+
* ISO-8601 creation timestamp
|
|
320
|
+
*/
|
|
321
|
+
createdAt: string;
|
|
322
|
+
/**
|
|
323
|
+
* User id that last wrote the configuration
|
|
324
|
+
*/
|
|
325
|
+
createdBy: string;
|
|
326
|
+
/**
|
|
327
|
+
* Whether the watermark is enforced on assets generated in this scope. A disabled
|
|
328
|
+
* project configuration falls back to its team's.
|
|
329
|
+
*/
|
|
330
|
+
enabled: boolean;
|
|
331
|
+
/**
|
|
332
|
+
* Scope this configuration applies to: team or project
|
|
333
|
+
*/
|
|
334
|
+
level: 'project' | 'team';
|
|
335
|
+
/**
|
|
336
|
+
* Mark opacity, 0.05 (barely visible) to 1 (opaque)
|
|
337
|
+
*/
|
|
338
|
+
opacity: number;
|
|
339
|
+
/**
|
|
340
|
+
* Where the mark sits on the image
|
|
341
|
+
*/
|
|
342
|
+
placement: 'bottom-left' | 'bottom-right' | 'center' | 'tiled' | 'top-left' | 'top-right';
|
|
343
|
+
/**
|
|
344
|
+
* Mark rotation in degrees, -90 to 90. 0 is horizontal.
|
|
345
|
+
*/
|
|
346
|
+
rotation: number;
|
|
347
|
+
/**
|
|
348
|
+
* Mark width as a fraction of the image width
|
|
349
|
+
*/
|
|
350
|
+
scale: number;
|
|
351
|
+
/**
|
|
352
|
+
* The id of the team or project that owns this configuration
|
|
353
|
+
*/
|
|
354
|
+
scopeId: string;
|
|
355
|
+
/**
|
|
356
|
+
* Gap between repetitions, as a fraction of the mark's own size. Tiled placement
|
|
357
|
+
* only; 0 repeats the mark edge to edge.
|
|
358
|
+
*/
|
|
359
|
+
spacing: number;
|
|
360
|
+
/**
|
|
361
|
+
* ISO-8601 last-update timestamp
|
|
362
|
+
*/
|
|
363
|
+
updatedAt: string;
|
|
364
|
+
/**
|
|
365
|
+
* Bumped on every write.
|
|
366
|
+
*/
|
|
367
|
+
version: number;
|
|
368
|
+
/**
|
|
369
|
+
* Set when the configuration has been deleted.
|
|
370
|
+
*/
|
|
371
|
+
deletedAt?: string;
|
|
372
|
+
/**
|
|
373
|
+
* Whether the stored logo has no transparency at all.
|
|
374
|
+
*
|
|
375
|
+
* Recorded at upload so the UI can warn without decoding the image again: an
|
|
376
|
+
* opaque logo draws its whole rectangle, which a rotated tiled mark turns into a
|
|
377
|
+
* very visible diamond.
|
|
378
|
+
*/
|
|
379
|
+
logoIsOpaque?: boolean;
|
|
380
|
+
/**
|
|
381
|
+
* Where the uploaded logo lives, when one is set.
|
|
382
|
+
*/
|
|
383
|
+
logoKey?: string;
|
|
384
|
+
/**
|
|
385
|
+
* Text rendered as the mark, when no logo is set
|
|
386
|
+
*/
|
|
387
|
+
text?: string;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
export interface WatermarkUpdateParams {
|
|
391
|
+
/**
|
|
392
|
+
* Whether the watermark is enforced on assets generated in this scope. A disabled
|
|
393
|
+
* project configuration falls back to its team's.
|
|
394
|
+
*/
|
|
395
|
+
enabled: boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Mark opacity, 0.05 (barely visible) to 1 (opaque)
|
|
398
|
+
*/
|
|
399
|
+
opacity?: number;
|
|
400
|
+
/**
|
|
401
|
+
* Where the mark sits on the image
|
|
402
|
+
*/
|
|
403
|
+
placement?: 'bottom-left' | 'bottom-right' | 'center' | 'tiled' | 'top-left' | 'top-right';
|
|
404
|
+
/**
|
|
405
|
+
* Mark rotation in degrees. 0 is horizontal, negative tilts it up.
|
|
406
|
+
*/
|
|
407
|
+
rotation?: number;
|
|
408
|
+
/**
|
|
409
|
+
* Mark width as a fraction of the image width
|
|
410
|
+
*/
|
|
411
|
+
scale?: number;
|
|
412
|
+
/**
|
|
413
|
+
* Gap between repetitions, as a fraction of the mark's own size. Only drawn for
|
|
414
|
+
* the tiled placement; 0 repeats the mark edge to edge.
|
|
415
|
+
*/
|
|
416
|
+
spacing?: number;
|
|
417
|
+
/**
|
|
418
|
+
* Text rendered as the mark. Ignored while a logo is set.
|
|
419
|
+
*/
|
|
420
|
+
text?: string;
|
|
421
|
+
}
|
|
422
|
+
export interface WatermarkPreviewParams {
|
|
423
|
+
/**
|
|
424
|
+
* Mark opacity, 0.05 (barely visible) to 1 (opaque)
|
|
425
|
+
*/
|
|
426
|
+
opacity?: number;
|
|
427
|
+
/**
|
|
428
|
+
* Where the mark sits on the image
|
|
429
|
+
*/
|
|
430
|
+
placement?: 'bottom-left' | 'bottom-right' | 'center' | 'tiled' | 'top-left' | 'top-right';
|
|
431
|
+
/**
|
|
432
|
+
* Mark rotation in degrees. 0 is horizontal, negative tilts it up.
|
|
433
|
+
*/
|
|
434
|
+
rotation?: number;
|
|
435
|
+
/**
|
|
436
|
+
* Mark width as a fraction of the image width
|
|
437
|
+
*/
|
|
438
|
+
scale?: number;
|
|
439
|
+
/**
|
|
440
|
+
* Gap between repetitions, as a fraction of the mark's own size. Only drawn for
|
|
441
|
+
* the tiled placement; 0 repeats the mark edge to edge.
|
|
442
|
+
*/
|
|
443
|
+
spacing?: number;
|
|
444
|
+
/**
|
|
445
|
+
* Text to draw. Optional only because a logo can stand in for it.
|
|
446
|
+
*/
|
|
447
|
+
text?: string;
|
|
448
|
+
}
|
|
449
|
+
export interface WatermarkUpdateLogoParams {
|
|
450
|
+
/**
|
|
451
|
+
* The logo image, base64-encoded, at most 1 MB and 4 megapixels once decoded. PNG,
|
|
452
|
+
* JPEG and WebP are accepted; SVG is refused. Stored as PNG.
|
|
453
|
+
*/
|
|
454
|
+
logo: string;
|
|
455
|
+
}
|
|
456
|
+
export declare namespace Watermark {
|
|
457
|
+
export { type WatermarkRetrieveResponse as WatermarkRetrieveResponse, type WatermarkUpdateResponse as WatermarkUpdateResponse, type WatermarkDeleteResponse as WatermarkDeleteResponse, type WatermarkDeleteLogoResponse as WatermarkDeleteLogoResponse, type WatermarkPreviewResponse as WatermarkPreviewResponse, type WatermarkUpdateLogoResponse as WatermarkUpdateLogoResponse, type WatermarkUpdateParams as WatermarkUpdateParams, type WatermarkPreviewParams as WatermarkPreviewParams, type WatermarkUpdateLogoParams as WatermarkUpdateLogoParams, };
|
|
458
|
+
}
|
|
459
|
+
//# sourceMappingURL=watermark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watermark.d.ts","sourceRoot":"","sources":["../../src/resources/projects/watermark.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,SAAU,SAAQ,WAAW;IACxC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,yBAAyB,CAAC;IAI5F;;OAEG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAIt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,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;IAE3F;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Watermark = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class Watermark extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get the project's forced watermark configuration
|
|
10
|
+
*/
|
|
11
|
+
retrieve(projectID, options) {
|
|
12
|
+
return this._client.get((0, path_1.path) `/projects/${projectID}/watermark`, options);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create or update the project's forced watermark configuration
|
|
16
|
+
*/
|
|
17
|
+
update(projectID, body, options) {
|
|
18
|
+
return this._client.put((0, path_1.path) `/projects/${projectID}/watermark`, { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Delete the project's forced watermark configuration
|
|
22
|
+
*/
|
|
23
|
+
delete(projectID, options) {
|
|
24
|
+
return this._client.delete((0, path_1.path) `/projects/${projectID}/watermark`, options);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Remove the project's watermark logo, falling back to its configured text
|
|
28
|
+
*/
|
|
29
|
+
deleteLogo(projectID, options) {
|
|
30
|
+
return this._client.delete((0, path_1.path) `/projects/${projectID}/watermark/logo`, options);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Draw the given watermark settings on a sample image, without saving them
|
|
34
|
+
*/
|
|
35
|
+
preview(projectID, body, options) {
|
|
36
|
+
return this._client.post((0, path_1.path) `/projects/${projectID}/watermark/preview`, { body, ...options });
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Upload the project's watermark logo, used as the mark instead of its text
|
|
40
|
+
*/
|
|
41
|
+
updateLogo(projectID, body, options) {
|
|
42
|
+
return this._client.put((0, path_1.path) `/projects/${projectID}/watermark/logo`, { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.Watermark = Watermark;
|
|
46
|
+
//# sourceMappingURL=watermark.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watermark.js","sourceRoot":"","sources":["../../src/resources/projects/watermark.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAA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DC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class Watermark extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Get the project's forced watermark configuration
|
|
7
|
+
*/
|
|
8
|
+
retrieve(projectID, options) {
|
|
9
|
+
return this._client.get(path `/projects/${projectID}/watermark`, options);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create or update the project's forced watermark configuration
|
|
13
|
+
*/
|
|
14
|
+
update(projectID, body, options) {
|
|
15
|
+
return this._client.put(path `/projects/${projectID}/watermark`, { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Delete the project's forced watermark configuration
|
|
19
|
+
*/
|
|
20
|
+
delete(projectID, options) {
|
|
21
|
+
return this._client.delete(path `/projects/${projectID}/watermark`, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Remove the project's watermark logo, falling back to its configured text
|
|
25
|
+
*/
|
|
26
|
+
deleteLogo(projectID, options) {
|
|
27
|
+
return this._client.delete(path `/projects/${projectID}/watermark/logo`, options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Draw the given watermark settings on a sample image, without saving them
|
|
31
|
+
*/
|
|
32
|
+
preview(projectID, body, options) {
|
|
33
|
+
return this._client.post(path `/projects/${projectID}/watermark/preview`, { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Upload the project's watermark logo, used as the mark instead of its text
|
|
37
|
+
*/
|
|
38
|
+
updateLogo(projectID, body, options) {
|
|
39
|
+
return this._client.put(path `/projects/${projectID}/watermark/logo`, { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=watermark.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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AAI,CAAA,aAAa,SAAS,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;CACF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
export declare class Events extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve one delivery event of one of the project's webhook endpoints
|
|
7
|
+
*/
|
|
8
|
+
retrieve(eventID: string, params: EventRetrieveParams, options?: RequestOptions): APIPromise<EventRetrieveResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* List the project's webhook events
|
|
11
|
+
*/
|
|
12
|
+
list(webhookEndpointID: string, params: EventListParams, options?: RequestOptions): APIPromise<EventListResponse>;
|
|
13
|
+
}
|
|
14
|
+
export interface EventRetrieveResponse {
|
|
15
|
+
webhookEvent: EventRetrieveResponse.WebhookEvent;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace EventRetrieveResponse {
|
|
18
|
+
interface WebhookEvent {
|
|
19
|
+
id: string;
|
|
20
|
+
attempts: Array<WebhookEvent.Attempt>;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
endpointId: string;
|
|
23
|
+
payload: unknown;
|
|
24
|
+
sentAt: string;
|
|
25
|
+
status: 'created' | 'failed' | 'retrying' | 'success';
|
|
26
|
+
/**
|
|
27
|
+
* Every event a webhook endpoint can subscribe to: a project endpoint takes the
|
|
28
|
+
* job lifecycle events, a team endpoint takes the alert events.
|
|
29
|
+
*/
|
|
30
|
+
type: '*' | 'asset.download.completed' | 'asset.download.created' | 'asset.download.failed' | 'generation.completed' | 'generation.created' | 'generation.failed' | 'inference.cancelled' | 'inference.completed' | 'inference.created' | 'inference.failed' | 'model.download.completed' | 'model.download.created' | 'model.download.failed' | 'model.training.cancelled' | 'model.training.completed' | 'model.training.failed' | 'model.training.started' | 'team.credit.threshold.crossed';
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
}
|
|
33
|
+
namespace WebhookEvent {
|
|
34
|
+
interface Attempt {
|
|
35
|
+
responseStatusCode: number;
|
|
36
|
+
sentAt: string;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export interface EventListResponse {
|
|
41
|
+
/**
|
|
42
|
+
* A list of the project webhook events
|
|
43
|
+
*/
|
|
44
|
+
items: Array<EventListResponse.Item>;
|
|
45
|
+
/**
|
|
46
|
+
* A token to query the next page of events
|
|
47
|
+
*/
|
|
48
|
+
nextPaginationToken?: string;
|
|
49
|
+
}
|
|
50
|
+
export declare namespace EventListResponse {
|
|
51
|
+
interface Item {
|
|
52
|
+
id: string;
|
|
53
|
+
endpointId: string;
|
|
54
|
+
status: 'created' | 'failed' | 'retrying' | 'success';
|
|
55
|
+
/**
|
|
56
|
+
* Every event a webhook endpoint can subscribe to: a project endpoint takes the
|
|
57
|
+
* job lifecycle events, a team endpoint takes the alert events.
|
|
58
|
+
*/
|
|
59
|
+
type: '*' | 'asset.download.completed' | 'asset.download.created' | 'asset.download.failed' | 'generation.completed' | 'generation.created' | 'generation.failed' | 'inference.cancelled' | 'inference.completed' | 'inference.created' | 'inference.failed' | 'model.download.completed' | 'model.download.created' | 'model.download.failed' | 'model.training.cancelled' | 'model.training.completed' | 'model.training.failed' | 'model.training.started' | 'team.credit.threshold.crossed';
|
|
60
|
+
updatedAt: string;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export interface EventRetrieveParams {
|
|
64
|
+
/**
|
|
65
|
+
* The project Id
|
|
66
|
+
*/
|
|
67
|
+
projectId: string;
|
|
68
|
+
/**
|
|
69
|
+
* The webhook endpoint that delivered the event
|
|
70
|
+
*/
|
|
71
|
+
webhookEndpointId: string;
|
|
72
|
+
}
|
|
73
|
+
export interface EventListParams {
|
|
74
|
+
/**
|
|
75
|
+
* Path param: The project Id
|
|
76
|
+
*/
|
|
77
|
+
projectId: string;
|
|
78
|
+
/**
|
|
79
|
+
* Query param: A token you received in a previous request to query the next page
|
|
80
|
+
* of items
|
|
81
|
+
*/
|
|
82
|
+
paginationToken?: string;
|
|
83
|
+
}
|
|
84
|
+
export declare namespace Events {
|
|
85
|
+
export { type EventRetrieveResponse as EventRetrieveResponse, type EventListResponse as EventListResponse, type EventRetrieveParams as EventRetrieveParams, type EventListParams as EventListParams, };
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=events.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../../../src/resources/projects/webhook-endpoints/events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAInE,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qBAAqB,CAAC;IAQpC;;OAEG;IACH,IAAI,CACF,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iBAAiB,CAAC;CAOjC;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,qBAAqB,CAAC,YAAY,CAAC;CAClD;AAED,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,YAAY;QAC3B,EAAE,EAAE,MAAM,CAAC;QAEX,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAEtC,SAAS,EAAE,MAAM,CAAC;QAElB,UAAU,EAAE,MAAM,CAAC;QAEnB,OAAO,EAAE,OAAO,CAAC;QAEjB,MAAM,EAAE,MAAM,CAAC;QAEf,MAAM,EAAE,SAAS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