openai 7.18.0 → 7.20.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 +28 -0
- package/README.md +6 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +13 -7
- package/client.js.map +1 -1
- package/client.mjs +13 -7
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +11 -7
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +11 -7
- package/internal/parse.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +1 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +1 -0
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/admin/organization/admin-api-keys.d.mts +13 -2
- package/resources/admin/organization/admin-api-keys.d.mts.map +1 -1
- package/resources/admin/organization/admin-api-keys.d.ts +13 -2
- package/resources/admin/organization/admin-api-keys.d.ts.map +1 -1
- package/resources/admin/organization/admin-api-keys.js +58 -11
- package/resources/admin/organization/admin-api-keys.js.map +1 -1
- package/resources/admin/organization/admin-api-keys.mjs +58 -11
- package/resources/admin/organization/admin-api-keys.mjs.map +1 -1
- package/resources/admin/organization/audit-logs.d.mts +56 -3
- package/resources/admin/organization/audit-logs.d.mts.map +1 -1
- package/resources/admin/organization/audit-logs.d.ts +56 -3
- package/resources/admin/organization/audit-logs.d.ts.map +1 -1
- package/resources/admin/organization/audit-logs.js +69 -11
- package/resources/admin/organization/audit-logs.js.map +1 -1
- package/resources/admin/organization/audit-logs.mjs +69 -11
- package/resources/admin/organization/audit-logs.mjs.map +1 -1
- package/resources/admin/organization/certificates.d.mts +16 -2
- package/resources/admin/organization/certificates.d.mts.map +1 -1
- package/resources/admin/organization/certificates.d.ts +16 -2
- package/resources/admin/organization/certificates.d.ts.map +1 -1
- package/resources/admin/organization/certificates.js +64 -24
- package/resources/admin/organization/certificates.js.map +1 -1
- package/resources/admin/organization/certificates.mjs +64 -24
- package/resources/admin/organization/certificates.mjs.map +1 -1
- package/resources/admin/organization/external-storage.d.mts +141 -0
- package/resources/admin/organization/external-storage.d.mts.map +1 -0
- package/resources/admin/organization/external-storage.d.ts +141 -0
- package/resources/admin/organization/external-storage.d.ts.map +1 -0
- package/resources/admin/organization/external-storage.js +146 -0
- package/resources/admin/organization/external-storage.js.map +1 -0
- package/resources/admin/organization/external-storage.mjs +142 -0
- package/resources/admin/organization/external-storage.mjs.map +1 -0
- package/resources/admin/organization/groups/groups.d.mts +8 -1
- package/resources/admin/organization/groups/groups.d.mts.map +1 -1
- package/resources/admin/organization/groups/groups.d.ts +8 -1
- package/resources/admin/organization/groups/groups.d.ts.map +1 -1
- package/resources/admin/organization/groups/groups.js +58 -11
- package/resources/admin/organization/groups/groups.js.map +1 -1
- package/resources/admin/organization/groups/groups.mjs +58 -11
- package/resources/admin/organization/groups/groups.mjs.map +1 -1
- package/resources/admin/organization/groups/roles.d.mts +8 -1
- package/resources/admin/organization/groups/roles.d.mts.map +1 -1
- package/resources/admin/organization/groups/roles.d.ts +8 -1
- package/resources/admin/organization/groups/roles.d.ts.map +1 -1
- package/resources/admin/organization/groups/roles.js +58 -13
- package/resources/admin/organization/groups/roles.js.map +1 -1
- package/resources/admin/organization/groups/roles.mjs +58 -13
- package/resources/admin/organization/groups/roles.mjs.map +1 -1
- package/resources/admin/organization/groups/users.d.mts +8 -1
- package/resources/admin/organization/groups/users.d.mts.map +1 -1
- package/resources/admin/organization/groups/users.d.ts +8 -1
- package/resources/admin/organization/groups/users.d.ts.map +1 -1
- package/resources/admin/organization/groups/users.js +58 -13
- package/resources/admin/organization/groups/users.js.map +1 -1
- package/resources/admin/organization/groups/users.mjs +58 -13
- package/resources/admin/organization/groups/users.mjs.map +1 -1
- package/resources/admin/organization/index.d.mts +1 -0
- package/resources/admin/organization/index.d.mts.map +1 -1
- package/resources/admin/organization/index.d.ts +1 -0
- package/resources/admin/organization/index.d.ts.map +1 -1
- package/resources/admin/organization/index.js +3 -1
- package/resources/admin/organization/index.js.map +1 -1
- package/resources/admin/organization/index.mjs +1 -0
- package/resources/admin/organization/index.mjs.map +1 -1
- package/resources/admin/organization/invites.d.mts +8 -1
- package/resources/admin/organization/invites.d.mts.map +1 -1
- package/resources/admin/organization/invites.d.ts +8 -1
- package/resources/admin/organization/invites.d.ts.map +1 -1
- package/resources/admin/organization/invites.js +58 -11
- package/resources/admin/organization/invites.js.map +1 -1
- package/resources/admin/organization/invites.mjs +58 -11
- package/resources/admin/organization/invites.mjs.map +1 -1
- package/resources/admin/organization/organization.d.mts +4 -0
- package/resources/admin/organization/organization.d.mts.map +1 -1
- package/resources/admin/organization/organization.d.ts +4 -0
- package/resources/admin/organization/organization.d.ts.map +1 -1
- package/resources/admin/organization/organization.js +4 -0
- package/resources/admin/organization/organization.js.map +1 -1
- package/resources/admin/organization/organization.mjs +4 -0
- package/resources/admin/organization/organization.mjs.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.mts +8 -1
- package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.ts +8 -1
- package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/api-keys.js +58 -13
- package/resources/admin/organization/projects/api-keys.js.map +1 -1
- package/resources/admin/organization/projects/api-keys.mjs +58 -13
- package/resources/admin/organization/projects/api-keys.mjs.map +1 -1
- package/resources/admin/organization/projects/certificates.d.mts +8 -1
- package/resources/admin/organization/projects/certificates.d.mts.map +1 -1
- package/resources/admin/organization/projects/certificates.d.ts +8 -1
- package/resources/admin/organization/projects/certificates.d.ts.map +1 -1
- package/resources/admin/organization/projects/certificates.js +58 -13
- package/resources/admin/organization/projects/certificates.js.map +1 -1
- package/resources/admin/organization/projects/certificates.mjs +58 -13
- package/resources/admin/organization/projects/certificates.mjs.map +1 -1
- package/resources/admin/organization/projects/groups/groups.d.mts +8 -1
- package/resources/admin/organization/projects/groups/groups.d.mts.map +1 -1
- package/resources/admin/organization/projects/groups/groups.d.ts +8 -1
- package/resources/admin/organization/projects/groups/groups.d.ts.map +1 -1
- package/resources/admin/organization/projects/groups/groups.js +58 -13
- package/resources/admin/organization/projects/groups/groups.js.map +1 -1
- package/resources/admin/organization/projects/groups/groups.mjs +58 -13
- package/resources/admin/organization/projects/groups/groups.mjs.map +1 -1
- package/resources/admin/organization/projects/projects.d.mts +8 -1
- package/resources/admin/organization/projects/projects.d.mts.map +1 -1
- package/resources/admin/organization/projects/projects.d.ts +8 -1
- package/resources/admin/organization/projects/projects.d.ts.map +1 -1
- package/resources/admin/organization/projects/projects.js +58 -11
- package/resources/admin/organization/projects/projects.js.map +1 -1
- package/resources/admin/organization/projects/projects.mjs +58 -11
- package/resources/admin/organization/projects/projects.mjs.map +1 -1
- package/resources/admin/organization/projects/rate-limits.d.mts +8 -1
- package/resources/admin/organization/projects/rate-limits.d.mts.map +1 -1
- package/resources/admin/organization/projects/rate-limits.d.ts +8 -1
- package/resources/admin/organization/projects/rate-limits.d.ts.map +1 -1
- package/resources/admin/organization/projects/rate-limits.js +58 -13
- package/resources/admin/organization/projects/rate-limits.js.map +1 -1
- package/resources/admin/organization/projects/rate-limits.mjs +58 -13
- package/resources/admin/organization/projects/rate-limits.mjs.map +1 -1
- package/resources/admin/organization/projects/roles.d.mts +8 -1
- package/resources/admin/organization/projects/roles.d.mts.map +1 -1
- package/resources/admin/organization/projects/roles.d.ts +8 -1
- package/resources/admin/organization/projects/roles.d.ts.map +1 -1
- package/resources/admin/organization/projects/roles.js +58 -13
- package/resources/admin/organization/projects/roles.js.map +1 -1
- package/resources/admin/organization/projects/roles.mjs +58 -13
- package/resources/admin/organization/projects/roles.mjs.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts +8 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts +8 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.js +58 -13
- package/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs +58 -13
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.d.mts +8 -1
- package/resources/admin/organization/projects/spend-alerts.d.mts.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.d.ts +8 -1
- package/resources/admin/organization/projects/spend-alerts.d.ts.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.js +58 -13
- package/resources/admin/organization/projects/spend-alerts.js.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.mjs +58 -13
- package/resources/admin/organization/projects/spend-alerts.mjs.map +1 -1
- package/resources/admin/organization/projects/users/users.d.mts +8 -1
- package/resources/admin/organization/projects/users/users.d.mts.map +1 -1
- package/resources/admin/organization/projects/users/users.d.ts +8 -1
- package/resources/admin/organization/projects/users/users.d.ts.map +1 -1
- package/resources/admin/organization/projects/users/users.js +58 -13
- package/resources/admin/organization/projects/users/users.js.map +1 -1
- package/resources/admin/organization/projects/users/users.mjs +58 -13
- package/resources/admin/organization/projects/users/users.mjs.map +1 -1
- package/resources/admin/organization/roles.d.mts +8 -1
- package/resources/admin/organization/roles.d.mts.map +1 -1
- package/resources/admin/organization/roles.d.ts +8 -1
- package/resources/admin/organization/roles.d.ts.map +1 -1
- package/resources/admin/organization/roles.js +58 -11
- package/resources/admin/organization/roles.js.map +1 -1
- package/resources/admin/organization/roles.mjs +58 -11
- package/resources/admin/organization/roles.mjs.map +1 -1
- package/resources/admin/organization/spend-alerts.d.mts +8 -1
- package/resources/admin/organization/spend-alerts.d.mts.map +1 -1
- package/resources/admin/organization/spend-alerts.d.ts +8 -1
- package/resources/admin/organization/spend-alerts.d.ts.map +1 -1
- package/resources/admin/organization/spend-alerts.js +58 -11
- package/resources/admin/organization/spend-alerts.js.map +1 -1
- package/resources/admin/organization/spend-alerts.mjs +58 -11
- package/resources/admin/organization/spend-alerts.mjs.map +1 -1
- package/resources/admin/organization/users/roles.d.mts +8 -1
- package/resources/admin/organization/users/roles.d.mts.map +1 -1
- package/resources/admin/organization/users/roles.d.ts +8 -1
- package/resources/admin/organization/users/roles.d.ts.map +1 -1
- package/resources/admin/organization/users/roles.js +58 -13
- package/resources/admin/organization/users/roles.js.map +1 -1
- package/resources/admin/organization/users/roles.mjs +58 -13
- package/resources/admin/organization/users/roles.mjs.map +1 -1
- package/resources/admin/organization/users/users.d.mts +8 -1
- package/resources/admin/organization/users/users.d.mts.map +1 -1
- package/resources/admin/organization/users/users.d.ts +8 -1
- package/resources/admin/organization/users/users.d.ts.map +1 -1
- package/resources/admin/organization/users/users.js +58 -11
- package/resources/admin/organization/users/users.js.map +1 -1
- package/resources/admin/organization/users/users.mjs +58 -11
- package/resources/admin/organization/users/users.mjs.map +1 -1
- package/resources/batches.d.mts +8 -1
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +8 -1
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +58 -3
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +58 -3
- package/resources/batches.mjs.map +1 -1
- package/resources/beta/agents/agents.d.mts +67 -46
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +67 -46
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js +58 -12
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs +58 -12
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/environments/files.d.mts +5 -1
- package/resources/beta/agents/environments/files.d.mts.map +1 -1
- package/resources/beta/agents/environments/files.d.ts +5 -1
- package/resources/beta/agents/environments/files.d.ts.map +1 -1
- package/resources/beta/agents/environments/templates.d.mts +24 -13
- package/resources/beta/agents/environments/templates.d.mts.map +1 -1
- package/resources/beta/agents/environments/templates.d.ts +24 -13
- package/resources/beta/agents/environments/templates.d.ts.map +1 -1
- package/resources/beta/agents/environments/templates.js +58 -12
- package/resources/beta/agents/environments/templates.js.map +1 -1
- package/resources/beta/agents/environments/templates.mjs +58 -12
- package/resources/beta/agents/environments/templates.mjs.map +1 -1
- package/resources/beta/agents/sessions/artifacts.d.mts +17 -2
- package/resources/beta/agents/sessions/artifacts.d.mts.map +1 -1
- package/resources/beta/agents/sessions/artifacts.d.ts +17 -2
- package/resources/beta/agents/sessions/artifacts.d.ts.map +1 -1
- package/resources/beta/agents/sessions/artifacts.js +58 -14
- package/resources/beta/agents/sessions/artifacts.js.map +1 -1
- package/resources/beta/agents/sessions/artifacts.mjs +58 -14
- package/resources/beta/agents/sessions/artifacts.mjs.map +1 -1
- package/resources/beta/agents/sessions/events.d.mts +4 -1
- package/resources/beta/agents/sessions/events.d.mts.map +1 -1
- package/resources/beta/agents/sessions/events.d.ts +4 -1
- package/resources/beta/agents/sessions/events.d.ts.map +1 -1
- package/resources/beta/agents/sessions/events.js +4 -1
- package/resources/beta/agents/sessions/events.js.map +1 -1
- package/resources/beta/agents/sessions/events.mjs +4 -1
- package/resources/beta/agents/sessions/events.mjs.map +1 -1
- package/resources/beta/agents/sessions/items.d.mts +8 -1
- package/resources/beta/agents/sessions/items.d.mts.map +1 -1
- package/resources/beta/agents/sessions/items.d.ts +8 -1
- package/resources/beta/agents/sessions/items.d.ts.map +1 -1
- package/resources/beta/agents/sessions/items.js +58 -15
- package/resources/beta/agents/sessions/items.js.map +1 -1
- package/resources/beta/agents/sessions/items.mjs +58 -15
- package/resources/beta/agents/sessions/items.mjs.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.mts +25 -8
- package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.ts +25 -8
- package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/agents/sessions/sessions.js +61 -14
- package/resources/beta/agents/sessions/sessions.js.map +1 -1
- package/resources/beta/agents/sessions/sessions.mjs +61 -14
- package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.d.mts +8 -1
- package/resources/beta/agents/sessions/subagents/subagents.d.mts.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.d.ts +8 -1
- package/resources/beta/agents/sessions/subagents/subagents.d.ts.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.js +58 -14
- package/resources/beta/agents/sessions/subagents/subagents.js.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.mjs +58 -14
- package/resources/beta/agents/sessions/subagents/subagents.mjs.map +1 -1
- package/resources/beta/agents/sessions/turns.d.mts +11 -3
- package/resources/beta/agents/sessions/turns.d.mts.map +1 -1
- package/resources/beta/agents/sessions/turns.d.ts +11 -3
- package/resources/beta/agents/sessions/turns.d.ts.map +1 -1
- package/resources/beta/agents/sessions/turns.js +58 -15
- package/resources/beta/agents/sessions/turns.js.map +1 -1
- package/resources/beta/agents/sessions/turns.mjs +58 -15
- package/resources/beta/agents/sessions/turns.mjs.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.mts +169 -24
- package/resources/beta/agents/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.ts +169 -24
- package/resources/beta/agents/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/agents/vaults/credentials.js +58 -15
- package/resources/beta/agents/vaults/credentials.js.map +1 -1
- package/resources/beta/agents/vaults/credentials.mjs +58 -15
- package/resources/beta/agents/vaults/credentials.mjs.map +1 -1
- package/resources/beta/agents/vaults/index.d.mts +1 -1
- package/resources/beta/agents/vaults/index.d.mts.map +1 -1
- package/resources/beta/agents/vaults/index.d.ts +1 -1
- package/resources/beta/agents/vaults/index.d.ts.map +1 -1
- package/resources/beta/agents/vaults/index.js.map +1 -1
- package/resources/beta/agents/vaults/index.mjs.map +1 -1
- package/resources/beta/agents/vaults/vaults.d.mts +17 -6
- package/resources/beta/agents/vaults/vaults.d.mts.map +1 -1
- package/resources/beta/agents/vaults/vaults.d.ts +17 -6
- package/resources/beta/agents/vaults/vaults.d.ts.map +1 -1
- package/resources/beta/agents/vaults/vaults.js +58 -12
- package/resources/beta/agents/vaults/vaults.js.map +1 -1
- package/resources/beta/agents/vaults/vaults.mjs +58 -12
- package/resources/beta/agents/vaults/vaults.mjs.map +1 -1
- package/resources/beta/assistants.d.mts +8 -1
- package/resources/beta/assistants.d.mts.map +1 -1
- package/resources/beta/assistants.d.ts +8 -1
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/assistants.js +58 -5
- package/resources/beta/assistants.js.map +1 -1
- package/resources/beta/assistants.mjs +58 -5
- package/resources/beta/assistants.mjs.map +1 -1
- package/resources/beta/chatkit/threads.d.mts +16 -2
- package/resources/beta/chatkit/threads.d.mts.map +1 -1
- package/resources/beta/chatkit/threads.d.ts +16 -2
- package/resources/beta/chatkit/threads.d.ts.map +1 -1
- package/resources/beta/chatkit/threads.js +64 -24
- package/resources/beta/chatkit/threads.js.map +1 -1
- package/resources/beta/chatkit/threads.mjs +64 -24
- package/resources/beta/chatkit/threads.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +15 -12
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +15 -12
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/beta/threads/messages.d.mts +8 -1
- package/resources/beta/threads/messages.d.mts.map +1 -1
- package/resources/beta/threads/messages.d.ts +8 -1
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js +58 -5
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs +58 -5
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.mts +8 -1
- package/resources/beta/threads/runs/runs.d.mts.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +8 -1
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js +58 -5
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs +58 -5
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +13 -3
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +13 -3
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js +58 -12
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs +58 -12
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/chat/completions/messages.d.mts +8 -1
- package/resources/chat/completions/messages.d.mts.map +1 -1
- package/resources/chat/completions/messages.d.ts +8 -1
- package/resources/chat/completions/messages.d.ts.map +1 -1
- package/resources/chat/completions/messages.js +58 -14
- package/resources/chat/completions/messages.js.map +1 -1
- package/resources/chat/completions/messages.mjs +58 -14
- package/resources/chat/completions/messages.mjs.map +1 -1
- package/resources/containers/containers.d.mts +8 -1
- package/resources/containers/containers.d.mts.map +1 -1
- package/resources/containers/containers.d.ts +8 -1
- package/resources/containers/containers.d.ts.map +1 -1
- package/resources/containers/containers.js +58 -3
- package/resources/containers/containers.js.map +1 -1
- package/resources/containers/containers.mjs +58 -3
- package/resources/containers/containers.mjs.map +1 -1
- package/resources/containers/files/files.d.mts +8 -1
- package/resources/containers/files/files.d.mts.map +1 -1
- package/resources/containers/files/files.d.ts +8 -1
- package/resources/containers/files/files.d.ts.map +1 -1
- package/resources/containers/files/files.js +58 -3
- package/resources/containers/files/files.js.map +1 -1
- package/resources/containers/files/files.mjs +58 -3
- package/resources/containers/files/files.mjs.map +1 -1
- package/resources/conversations/conversations.d.mts +3 -4
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +3 -4
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/items.d.mts +8 -1
- package/resources/conversations/items.d.mts.map +1 -1
- package/resources/conversations/items.d.ts +8 -1
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/conversations/items.js +58 -3
- package/resources/conversations/items.js.map +1 -1
- package/resources/conversations/items.mjs +58 -3
- package/resources/conversations/items.mjs.map +1 -1
- package/resources/evals/evals.d.mts +8 -1
- package/resources/evals/evals.d.mts.map +1 -1
- package/resources/evals/evals.d.ts +8 -1
- package/resources/evals/evals.d.ts.map +1 -1
- package/resources/evals/evals.js +58 -3
- package/resources/evals/evals.js.map +1 -1
- package/resources/evals/evals.mjs +58 -3
- package/resources/evals/evals.mjs.map +1 -1
- package/resources/evals/runs/runs.d.mts +8 -1
- package/resources/evals/runs/runs.d.mts.map +1 -1
- package/resources/evals/runs/runs.d.ts +8 -1
- package/resources/evals/runs/runs.d.ts.map +1 -1
- package/resources/evals/runs/runs.js +58 -3
- package/resources/evals/runs/runs.js.map +1 -1
- package/resources/evals/runs/runs.mjs +58 -3
- package/resources/evals/runs/runs.mjs.map +1 -1
- package/resources/files.d.mts +8 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +8 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +58 -3
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +58 -3
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.mts +16 -2
- package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.ts +16 -2
- package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.js +64 -26
- package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.mjs +64 -26
- package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.mts +8 -1
- package/resources/fine-tuning/jobs/checkpoints.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.ts +8 -1
- package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.js +58 -13
- package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.mjs +58 -13
- package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.mts +16 -2
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +16 -2
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +64 -24
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +64 -24
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/images.d.mts +3 -4
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +3 -4
- package/resources/images.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/realtime/client-secrets.d.mts +7 -3
- package/resources/realtime/client-secrets.d.mts.map +1 -1
- package/resources/realtime/client-secrets.d.ts +7 -3
- package/resources/realtime/client-secrets.d.ts.map +1 -1
- package/resources/realtime/realtime.d.mts +17 -8
- package/resources/realtime/realtime.d.mts.map +1 -1
- package/resources/realtime/realtime.d.ts +17 -8
- package/resources/realtime/realtime.d.ts.map +1 -1
- package/resources/realtime/realtime.js.map +1 -1
- package/resources/realtime/realtime.mjs.map +1 -1
- package/resources/responses/input-items.d.mts +8 -1
- package/resources/responses/input-items.d.mts.map +1 -1
- package/resources/responses/input-items.d.ts +8 -1
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/input-items.js +58 -13
- package/resources/responses/input-items.js.map +1 -1
- package/resources/responses/input-items.mjs +58 -13
- package/resources/responses/input-items.mjs.map +1 -1
- package/resources/responses/responses.d.mts +26 -12
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +26 -12
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +58 -0
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +58 -0
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/safety/cases.d.mts +26 -0
- package/resources/safety/cases.d.mts.map +1 -0
- package/resources/safety/cases.d.ts +26 -0
- package/resources/safety/cases.d.ts.map +1 -0
- package/resources/safety/cases.js +16 -0
- package/resources/safety/cases.js.map +1 -0
- package/resources/safety/cases.mjs +12 -0
- package/resources/safety/cases.mjs.map +1 -0
- package/resources/safety/index.d.mts +1 -0
- package/resources/safety/index.d.mts.map +1 -1
- package/resources/safety/index.d.ts +1 -0
- package/resources/safety/index.d.ts.map +1 -1
- package/resources/safety/index.js +3 -1
- package/resources/safety/index.js.map +1 -1
- package/resources/safety/index.mjs +1 -0
- package/resources/safety/index.mjs.map +1 -1
- package/resources/safety/safety.d.mts +4 -0
- package/resources/safety/safety.d.mts.map +1 -1
- package/resources/safety/safety.d.ts +4 -0
- package/resources/safety/safety.d.ts.map +1 -1
- package/resources/safety/safety.js +4 -0
- package/resources/safety/safety.js.map +1 -1
- package/resources/safety/safety.mjs +4 -0
- package/resources/safety/safety.mjs.map +1 -1
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/skills/skills.d.mts +8 -1
- package/resources/skills/skills.d.mts.map +1 -1
- package/resources/skills/skills.d.ts +8 -1
- package/resources/skills/skills.d.ts.map +1 -1
- package/resources/skills/skills.js +58 -3
- package/resources/skills/skills.js.map +1 -1
- package/resources/skills/skills.mjs +58 -3
- package/resources/skills/skills.mjs.map +1 -1
- package/resources/skills/versions/versions.d.mts +8 -1
- package/resources/skills/versions/versions.d.mts.map +1 -1
- package/resources/skills/versions/versions.d.ts +8 -1
- package/resources/skills/versions/versions.d.ts.map +1 -1
- package/resources/skills/versions/versions.js +58 -3
- package/resources/skills/versions/versions.js.map +1 -1
- package/resources/skills/versions/versions.mjs +58 -3
- package/resources/skills/versions/versions.mjs.map +1 -1
- package/resources/vector-stores/files.d.mts +8 -1
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts +8 -1
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +58 -3
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +58 -3
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts +8 -1
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +8 -1
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +58 -3
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +58 -3
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/videos.d.mts +16 -2
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +16 -2
- package/resources/videos.d.ts.map +1 -1
- package/resources/videos.js +64 -12
- package/resources/videos.js.map +1 -1
- package/resources/videos.mjs +64 -12
- package/resources/videos.mjs.map +1 -1
- package/resources/webhooks/event-types.d.mts +17 -0
- package/resources/webhooks/event-types.d.mts.map +1 -0
- package/resources/webhooks/event-types.d.ts +17 -0
- package/resources/webhooks/event-types.d.ts.map +1 -0
- package/resources/webhooks/event-types.js +21 -0
- package/resources/webhooks/event-types.js.map +1 -0
- package/resources/webhooks/event-types.mjs +17 -0
- package/resources/webhooks/event-types.mjs.map +1 -0
- package/resources/webhooks/index.d.mts +1 -0
- package/resources/webhooks/index.d.mts.map +1 -1
- package/resources/webhooks/index.d.ts +1 -0
- package/resources/webhooks/index.d.ts.map +1 -1
- package/resources/webhooks/index.js +3 -0
- package/resources/webhooks/index.js.map +1 -1
- package/resources/webhooks/index.mjs +1 -0
- package/resources/webhooks/index.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts +368 -2
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +368 -2
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +168 -0
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +168 -0
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +16 -10
- package/src/internal/parse.ts +14 -10
- package/src/internal/utils/log.ts +1 -0
- package/src/resources/admin/organization/admin-api-keys.ts +206 -2
- package/src/resources/admin/organization/audit-logs.ts +270 -1
- package/src/resources/admin/organization/certificates.ts +295 -2
- package/src/resources/admin/organization/external-storage.ts +420 -0
- package/src/resources/admin/organization/groups/groups.ts +200 -1
- package/src/resources/admin/organization/groups/roles.ts +202 -1
- package/src/resources/admin/organization/groups/users.ts +202 -1
- package/src/resources/admin/organization/index.ts +10 -0
- package/src/resources/admin/organization/invites.ts +200 -1
- package/src/resources/admin/organization/organization.ts +24 -0
- package/src/resources/admin/organization/projects/api-keys.ts +202 -1
- package/src/resources/admin/organization/projects/certificates.ts +202 -1
- package/src/resources/admin/organization/projects/groups/groups.ts +202 -1
- package/src/resources/admin/organization/projects/projects.ts +200 -1
- package/src/resources/admin/organization/projects/rate-limits.ts +202 -1
- package/src/resources/admin/organization/projects/roles.ts +202 -1
- package/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +202 -1
- package/src/resources/admin/organization/projects/spend-alerts.ts +202 -1
- package/src/resources/admin/organization/projects/users/users.ts +202 -1
- package/src/resources/admin/organization/roles.ts +200 -1
- package/src/resources/admin/organization/spend-alerts.ts +200 -1
- package/src/resources/admin/organization/users/roles.ts +202 -1
- package/src/resources/admin/organization/users/users.ts +200 -1
- package/src/resources/batches.ts +200 -1
- package/src/resources/beta/agents/agents.ts +260 -46
- package/src/resources/beta/agents/environments/files.ts +6 -1
- package/src/resources/beta/agents/environments/templates.ts +216 -13
- package/src/resources/beta/agents/sessions/artifacts.ts +213 -2
- package/src/resources/beta/agents/sessions/events.ts +4 -1
- package/src/resources/beta/agents/sessions/items.ts +202 -1
- package/src/resources/beta/agents/sessions/sessions.ts +218 -8
- package/src/resources/beta/agents/sessions/subagents/subagents.ts +202 -1
- package/src/resources/beta/agents/sessions/turns.ts +205 -3
- package/src/resources/beta/agents/vaults/credentials.ts +389 -23
- package/src/resources/beta/agents/vaults/index.ts +2 -0
- package/src/resources/beta/agents/vaults/vaults.ts +212 -4
- package/src/resources/beta/assistants.ts +200 -1
- package/src/resources/beta/chatkit/threads.ts +311 -2
- package/src/resources/beta/responses/responses.ts +15 -12
- package/src/resources/beta/threads/messages.ts +202 -1
- package/src/resources/beta/threads/runs/runs.ts +202 -1
- package/src/resources/chat/completions/completions.ts +205 -3
- package/src/resources/chat/completions/messages.ts +202 -1
- package/src/resources/containers/containers.ts +200 -1
- package/src/resources/containers/files/files.ts +202 -1
- package/src/resources/conversations/conversations.ts +3 -4
- package/src/resources/conversations/items.ts +202 -1
- package/src/resources/evals/evals.ts +200 -1
- package/src/resources/evals/runs/runs.ts +202 -1
- package/src/resources/files.ts +200 -1
- package/src/resources/fine-tuning/checkpoints/permissions.ts +297 -2
- package/src/resources/fine-tuning/jobs/checkpoints.ts +202 -1
- package/src/resources/fine-tuning/jobs/jobs.ts +295 -2
- package/src/resources/images.ts +3 -4
- package/src/resources/index.ts +1 -1
- package/src/resources/realtime/client-secrets.ts +7 -3
- package/src/resources/realtime/realtime.ts +17 -8
- package/src/resources/responses/input-items.ts +202 -1
- package/src/resources/responses/responses.ts +263 -13
- package/src/resources/safety/cases.ts +39 -0
- package/src/resources/safety/index.ts +1 -0
- package/src/resources/safety/safety.ts +6 -0
- package/src/resources/shared.ts +2 -2
- package/src/resources/skills/skills.ts +200 -1
- package/src/resources/skills/versions/versions.ts +202 -1
- package/src/resources/vector-stores/files.ts +202 -1
- package/src/resources/vector-stores/vector-stores.ts +200 -1
- package/src/resources/videos.ts +295 -2
- package/src/resources/webhooks/api.md +42 -21
- package/src/resources/webhooks/event-types.ts +21 -0
- package/src/resources/webhooks/index.ts +1 -0
- package/src/resources/webhooks/webhooks.ts +752 -1
- 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,7 +4,352 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import { buildHeaders, HeadersLike } from '../../internal/headers';
|
|
5
5
|
import { verifyWebhookSignature, webhookSignatureRequiresSigning } from '../../lib/webhook-signature';
|
|
6
6
|
|
|
7
|
+
import * as EventTypesAPI from './event-types';
|
|
8
|
+
import { EventTypes } from './event-types';
|
|
9
|
+
import { APIPromise } from '../../core/api-promise';
|
|
10
|
+
import { CursorPage, type CursorPageParams, PagePromise } from '../../core/pagination';
|
|
11
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
12
|
+
import { path } from '../../internal/utils/path';
|
|
13
|
+
|
|
14
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
15
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
16
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
17
|
+
'method',
|
|
18
|
+
'path',
|
|
19
|
+
'query',
|
|
20
|
+
'body',
|
|
21
|
+
'headers',
|
|
22
|
+
'maxRetries',
|
|
23
|
+
'stream',
|
|
24
|
+
'timeout',
|
|
25
|
+
'httpAgent',
|
|
26
|
+
'fetchOptions',
|
|
27
|
+
'signal',
|
|
28
|
+
'idempotencyKey',
|
|
29
|
+
'defaultBaseURL',
|
|
30
|
+
'__metadata',
|
|
31
|
+
'__binaryRequest',
|
|
32
|
+
'__binaryResponse',
|
|
33
|
+
'__streamClass',
|
|
34
|
+
'__security',
|
|
35
|
+
'__synthesizeEventData',
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
function normalizeRequestOptionsForQuery(
|
|
39
|
+
value: unknown,
|
|
40
|
+
queryKeys: ReadonlyArray<string>,
|
|
41
|
+
options: RequestOptions | undefined,
|
|
42
|
+
):
|
|
43
|
+
| ({
|
|
44
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
45
|
+
} & {
|
|
46
|
+
[
|
|
47
|
+
K in
|
|
48
|
+
| 'method'
|
|
49
|
+
| 'path'
|
|
50
|
+
| 'body'
|
|
51
|
+
| 'stream'
|
|
52
|
+
| 'httpAgent'
|
|
53
|
+
| 'fetchOptions'
|
|
54
|
+
| 'defaultBaseURL'
|
|
55
|
+
| '__metadata'
|
|
56
|
+
| '__binaryRequest'
|
|
57
|
+
| '__binaryResponse'
|
|
58
|
+
| '__streamClass'
|
|
59
|
+
| '__security'
|
|
60
|
+
| '__synthesizeEventData'
|
|
61
|
+
]?: never;
|
|
62
|
+
})
|
|
63
|
+
| undefined {
|
|
64
|
+
if (typeof value !== 'object' || value === null) return undefined;
|
|
65
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
66
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
67
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(
|
|
68
|
+
([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined),
|
|
69
|
+
);
|
|
70
|
+
const keys = entries.map(([key]) => key);
|
|
71
|
+
const requestOnly = keys.some(
|
|
72
|
+
(key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key),
|
|
73
|
+
);
|
|
74
|
+
if (!requestOnly) return undefined;
|
|
75
|
+
// Declared query fields, including stream, must use the query argument.
|
|
76
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
77
|
+
if (
|
|
78
|
+
options !== undefined ||
|
|
79
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))
|
|
80
|
+
) {
|
|
81
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
82
|
+
}
|
|
83
|
+
// The query position must not gain authority to change the request destination
|
|
84
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
85
|
+
if (
|
|
86
|
+
keys.some(
|
|
87
|
+
(key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key),
|
|
88
|
+
)
|
|
89
|
+
) {
|
|
90
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
91
|
+
}
|
|
92
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
93
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
94
|
+
return Object.fromEntries(
|
|
95
|
+
entries.map(([key, descriptor]) => {
|
|
96
|
+
if ('value' in descriptor) return [key, descriptor.value];
|
|
97
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
98
|
+
}),
|
|
99
|
+
) as {
|
|
100
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
101
|
+
} & {
|
|
102
|
+
[
|
|
103
|
+
K in
|
|
104
|
+
| 'method'
|
|
105
|
+
| 'path'
|
|
106
|
+
| 'body'
|
|
107
|
+
| 'stream'
|
|
108
|
+
| 'httpAgent'
|
|
109
|
+
| 'fetchOptions'
|
|
110
|
+
| 'defaultBaseURL'
|
|
111
|
+
| '__metadata'
|
|
112
|
+
| '__binaryRequest'
|
|
113
|
+
| '__binaryResponse'
|
|
114
|
+
| '__streamClass'
|
|
115
|
+
| '__security'
|
|
116
|
+
| '__synthesizeEventData'
|
|
117
|
+
]?: never;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
7
121
|
export class Webhooks extends APIResource {
|
|
122
|
+
eventTypes: EventTypesAPI.EventTypes = new EventTypesAPI.EventTypes(this._client);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Creates a webhook endpoint for the authenticated project.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* const webhookEndpointWithSecret =
|
|
130
|
+
* await client.webhooks.create({
|
|
131
|
+
* event_types: ['batch.completed'],
|
|
132
|
+
* name: 'x',
|
|
133
|
+
* url: 'https://',
|
|
134
|
+
* });
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookEndpointWithSecret> {
|
|
138
|
+
return this._client.post('/webhook_endpoints', { body, ...options, __security: { bearerAuth: true } });
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Retrieves a webhook endpoint for the authenticated project.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```ts
|
|
146
|
+
* const webhookEndpoint = await client.webhooks.retrieve(
|
|
147
|
+
* 'whe_123',
|
|
148
|
+
* );
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
retrieve(webhookEndpointID: string, options?: RequestOptions): APIPromise<WebhookEndpoint> {
|
|
152
|
+
return this._client.get(path`/webhook_endpoints/${webhookEndpointID}`, {
|
|
153
|
+
...options,
|
|
154
|
+
__security: { bearerAuth: true },
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Updates a webhook endpoint for the authenticated project.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* const webhookEndpoint = await client.webhooks.update('whe_123');
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
update(
|
|
167
|
+
webhookEndpointID: string,
|
|
168
|
+
body: WebhookUpdateParams | null | undefined = {},
|
|
169
|
+
options?: RequestOptions,
|
|
170
|
+
): APIPromise<WebhookEndpoint> {
|
|
171
|
+
return this._client.post(path`/webhook_endpoints/${webhookEndpointID}`, {
|
|
172
|
+
body,
|
|
173
|
+
...options,
|
|
174
|
+
__security: { bearerAuth: true },
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Returns webhook endpoints for the authenticated project in newest-first order.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```ts
|
|
183
|
+
* // Automatically fetches more pages as needed.
|
|
184
|
+
* for await (const webhookEndpoint of client.webhooks.list()) {
|
|
185
|
+
* // ...
|
|
186
|
+
* }
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
list(
|
|
190
|
+
query?:
|
|
191
|
+
| (WebhookListParams &
|
|
192
|
+
(
|
|
193
|
+
| {
|
|
194
|
+
[
|
|
195
|
+
K in
|
|
196
|
+
| 'method'
|
|
197
|
+
| 'path'
|
|
198
|
+
| 'query'
|
|
199
|
+
| 'body'
|
|
200
|
+
| 'headers'
|
|
201
|
+
| 'maxRetries'
|
|
202
|
+
| 'stream'
|
|
203
|
+
| 'timeout'
|
|
204
|
+
| 'httpAgent'
|
|
205
|
+
| 'fetchOptions'
|
|
206
|
+
| 'signal'
|
|
207
|
+
| 'idempotencyKey'
|
|
208
|
+
| 'defaultBaseURL'
|
|
209
|
+
| '__metadata'
|
|
210
|
+
| '__binaryRequest'
|
|
211
|
+
| '__binaryResponse'
|
|
212
|
+
| '__streamClass'
|
|
213
|
+
| '__security'
|
|
214
|
+
| '__synthesizeEventData'
|
|
215
|
+
]?: never;
|
|
216
|
+
}
|
|
217
|
+
| null
|
|
218
|
+
| undefined
|
|
219
|
+
))
|
|
220
|
+
| null
|
|
221
|
+
| undefined,
|
|
222
|
+
options?: RequestOptions,
|
|
223
|
+
): PagePromise<WebhookEndpointsPage, WebhookEndpoint>;
|
|
224
|
+
list(
|
|
225
|
+
options?: {
|
|
226
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
227
|
+
} & {
|
|
228
|
+
[
|
|
229
|
+
K in
|
|
230
|
+
| 'method'
|
|
231
|
+
| 'path'
|
|
232
|
+
| 'body'
|
|
233
|
+
| 'stream'
|
|
234
|
+
| 'httpAgent'
|
|
235
|
+
| 'fetchOptions'
|
|
236
|
+
| 'defaultBaseURL'
|
|
237
|
+
| '__metadata'
|
|
238
|
+
| '__binaryRequest'
|
|
239
|
+
| '__binaryResponse'
|
|
240
|
+
| '__streamClass'
|
|
241
|
+
| '__security'
|
|
242
|
+
| '__synthesizeEventData'
|
|
243
|
+
]?: never;
|
|
244
|
+
},
|
|
245
|
+
): PagePromise<WebhookEndpointsPage, WebhookEndpoint>;
|
|
246
|
+
list(
|
|
247
|
+
query:
|
|
248
|
+
| WebhookListParams
|
|
249
|
+
| ({
|
|
250
|
+
[
|
|
251
|
+
K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query'
|
|
252
|
+
]?: RequestOptions[K];
|
|
253
|
+
} & {
|
|
254
|
+
[
|
|
255
|
+
K in
|
|
256
|
+
| 'method'
|
|
257
|
+
| 'path'
|
|
258
|
+
| 'body'
|
|
259
|
+
| 'stream'
|
|
260
|
+
| 'httpAgent'
|
|
261
|
+
| 'fetchOptions'
|
|
262
|
+
| 'defaultBaseURL'
|
|
263
|
+
| '__metadata'
|
|
264
|
+
| '__binaryRequest'
|
|
265
|
+
| '__binaryResponse'
|
|
266
|
+
| '__streamClass'
|
|
267
|
+
| '__security'
|
|
268
|
+
| '__synthesizeEventData'
|
|
269
|
+
]?: never;
|
|
270
|
+
})
|
|
271
|
+
| null
|
|
272
|
+
| undefined = {},
|
|
273
|
+
options?: RequestOptions,
|
|
274
|
+
): PagePromise<WebhookEndpointsPage, WebhookEndpoint> {
|
|
275
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(
|
|
276
|
+
query,
|
|
277
|
+
['after', 'limit'],
|
|
278
|
+
options,
|
|
279
|
+
);
|
|
280
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
281
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
282
|
+
query = {};
|
|
283
|
+
}
|
|
284
|
+
query = query as WebhookListParams | null | undefined;
|
|
285
|
+
return this._client.getAPIList('/webhook_endpoints', CursorPage<WebhookEndpoint>, {
|
|
286
|
+
query,
|
|
287
|
+
...options,
|
|
288
|
+
__security: { bearerAuth: true },
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Deletes a webhook endpoint for the authenticated project.
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* ```ts
|
|
297
|
+
* const deletedWebhookEndpoint = await client.webhooks.delete(
|
|
298
|
+
* 'whe_123',
|
|
299
|
+
* );
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
delete(webhookEndpointID: string, options?: RequestOptions): APIPromise<DeletedWebhookEndpoint> {
|
|
303
|
+
return this._client.delete(path`/webhook_endpoints/${webhookEndpointID}`, {
|
|
304
|
+
...options,
|
|
305
|
+
__security: { bearerAuth: true },
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Rotates the signing secret for a webhook endpoint in the authenticated project.
|
|
311
|
+
*
|
|
312
|
+
* @example
|
|
313
|
+
* ```ts
|
|
314
|
+
* const webhookEndpointWithSecret =
|
|
315
|
+
* await client.webhooks.rotateSecret('whe_123');
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
rotateSecret(
|
|
319
|
+
webhookEndpointID: string,
|
|
320
|
+
body: WebhookRotateSecretParams | null | undefined = {},
|
|
321
|
+
options?: RequestOptions,
|
|
322
|
+
): APIPromise<WebhookEndpointWithSecret> {
|
|
323
|
+
return this._client.post(path`/webhook_endpoints/${webhookEndpointID}/rotate_secret`, {
|
|
324
|
+
body,
|
|
325
|
+
...options,
|
|
326
|
+
__security: { bearerAuth: true },
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Sends a sample event to a webhook endpoint for the authenticated project.
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```ts
|
|
335
|
+
* const webhookEndpointTestResult =
|
|
336
|
+
* await client.webhooks.test('whe_123', {
|
|
337
|
+
* event_type: 'batch.completed',
|
|
338
|
+
* });
|
|
339
|
+
* ```
|
|
340
|
+
*/
|
|
341
|
+
test(
|
|
342
|
+
webhookEndpointID: string,
|
|
343
|
+
body: WebhookTestParams,
|
|
344
|
+
options?: RequestOptions,
|
|
345
|
+
): APIPromise<WebhookEndpointTestResult> {
|
|
346
|
+
return this._client.post(path`/webhook_endpoints/${webhookEndpointID}/test`, {
|
|
347
|
+
body,
|
|
348
|
+
...options,
|
|
349
|
+
__security: { bearerAuth: true },
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
|
|
8
353
|
/**
|
|
9
354
|
* Validates that the given payload was sent by OpenAI and parses the payload.
|
|
10
355
|
*/
|
|
@@ -80,6 +425,8 @@ export class Webhooks extends APIResource {
|
|
|
80
425
|
}
|
|
81
426
|
}
|
|
82
427
|
|
|
428
|
+
export type WebhookEndpointsPage = CursorPage<WebhookEndpoint>;
|
|
429
|
+
|
|
83
430
|
/**
|
|
84
431
|
* Sent when a batch API request has been cancelled.
|
|
85
432
|
*/
|
|
@@ -248,6 +595,23 @@ export namespace BatchFailedWebhookEvent {
|
|
|
248
595
|
}
|
|
249
596
|
}
|
|
250
597
|
|
|
598
|
+
export interface DeletedWebhookEndpoint {
|
|
599
|
+
/**
|
|
600
|
+
* The ID of the deleted webhook endpoint.
|
|
601
|
+
*/
|
|
602
|
+
id: string;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Whether the endpoint was deleted.
|
|
606
|
+
*/
|
|
607
|
+
deleted: boolean;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* The object type, which is always webhook_endpoint.deleted.
|
|
611
|
+
*/
|
|
612
|
+
object: 'webhook_endpoint.deleted';
|
|
613
|
+
}
|
|
614
|
+
|
|
251
615
|
/**
|
|
252
616
|
* Sent when an eval run has been canceled.
|
|
253
617
|
*/
|
|
@@ -552,6 +916,14 @@ export namespace LiveCallIncomingWebhookEvent {
|
|
|
552
916
|
* untrusted call metadata.
|
|
553
917
|
*/
|
|
554
918
|
sip_headers: Array<Data.SipHeader>;
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Media protection selected on the SIP leg during SDP negotiation. `srtp`
|
|
922
|
+
* indicates SRTP; `rtp` indicates unencrypted RTP. Omitted when unknown. This does
|
|
923
|
+
* not describe SIP signaling security or confirm that media has flowed. Clients
|
|
924
|
+
* should handle unrecognized values as unknown.
|
|
925
|
+
*/
|
|
926
|
+
sip_media_security?: 'rtp' | 'srtp' | (string & {});
|
|
555
927
|
}
|
|
556
928
|
|
|
557
929
|
export namespace Data {
|
|
@@ -626,6 +998,14 @@ export namespace LiveTransportIncomingWebhookEvent {
|
|
|
626
998
|
* The incoming transport type. Always `sip`.
|
|
627
999
|
*/
|
|
628
1000
|
type: 'sip';
|
|
1001
|
+
|
|
1002
|
+
/**
|
|
1003
|
+
* Media protection selected on the SIP leg during SDP negotiation. `srtp`
|
|
1004
|
+
* indicates SRTP; `rtp` indicates unencrypted RTP. Omitted when unknown. This does
|
|
1005
|
+
* not describe SIP signaling security or confirm that media has flowed. Clients
|
|
1006
|
+
* should handle unrecognized values as unknown.
|
|
1007
|
+
*/
|
|
1008
|
+
sip_media_security?: 'rtp' | 'srtp' | (string & {});
|
|
629
1009
|
}
|
|
630
1010
|
|
|
631
1011
|
export namespace Data {
|
|
@@ -696,6 +1076,14 @@ export namespace RealtimeCallIncomingWebhookEvent {
|
|
|
696
1076
|
* untrusted call metadata.
|
|
697
1077
|
*/
|
|
698
1078
|
sip_headers: Array<Data.SipHeader>;
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* Media protection selected on the SIP leg during SDP negotiation. `srtp`
|
|
1082
|
+
* indicates SRTP; `rtp` indicates unencrypted RTP. Omitted when unknown. This does
|
|
1083
|
+
* not describe SIP signaling security or confirm that media has flowed. Clients
|
|
1084
|
+
* should handle unrecognized values as unknown.
|
|
1085
|
+
*/
|
|
1086
|
+
sip_media_security?: 'rtp' | 'srtp' | (string & {});
|
|
699
1087
|
}
|
|
700
1088
|
|
|
701
1089
|
export namespace Data {
|
|
@@ -920,6 +1308,42 @@ export namespace SafetyAlertCreatedWebhookEvent {
|
|
|
920
1308
|
}
|
|
921
1309
|
}
|
|
922
1310
|
|
|
1311
|
+
/**
|
|
1312
|
+
* Sent when a deactivation is issued for a safety identifier in your organization.
|
|
1313
|
+
*/
|
|
1314
|
+
export interface SafetyDeactivationIssuedWebhookEvent {
|
|
1315
|
+
/**
|
|
1316
|
+
* The unique ID of the webhook event.
|
|
1317
|
+
*/
|
|
1318
|
+
id: string;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* The Unix timestamp in seconds when the event was created.
|
|
1322
|
+
*/
|
|
1323
|
+
created_at: number;
|
|
1324
|
+
|
|
1325
|
+
data: SafetyDeactivationIssuedWebhookEvent.Data;
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* Always `event`.
|
|
1329
|
+
*/
|
|
1330
|
+
object: 'event';
|
|
1331
|
+
|
|
1332
|
+
/**
|
|
1333
|
+
* Always `safety.deactivation_issued`.
|
|
1334
|
+
*/
|
|
1335
|
+
type: 'safety.deactivation_issued';
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export namespace SafetyDeactivationIssuedWebhookEvent {
|
|
1339
|
+
export interface Data {
|
|
1340
|
+
/**
|
|
1341
|
+
* The safety case ID to pass to `GET /v1/safety/cases/{id}`.
|
|
1342
|
+
*/
|
|
1343
|
+
id: string;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
|
|
923
1347
|
/**
|
|
924
1348
|
* Sent when an approved safety alert is available for an enterprise workspace.
|
|
925
1349
|
*/
|
|
@@ -956,6 +1380,42 @@ export namespace SafetyOrgAlertCreatedWebhookEvent {
|
|
|
956
1380
|
}
|
|
957
1381
|
}
|
|
958
1382
|
|
|
1383
|
+
/**
|
|
1384
|
+
* Sent when a warning is issued for a safety identifier in your organization.
|
|
1385
|
+
*/
|
|
1386
|
+
export interface SafetyWarningIssuedWebhookEvent {
|
|
1387
|
+
/**
|
|
1388
|
+
* The unique ID of the webhook event.
|
|
1389
|
+
*/
|
|
1390
|
+
id: string;
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* The Unix timestamp in seconds when the event was created.
|
|
1394
|
+
*/
|
|
1395
|
+
created_at: number;
|
|
1396
|
+
|
|
1397
|
+
data: SafetyWarningIssuedWebhookEvent.Data;
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* Always `event`.
|
|
1401
|
+
*/
|
|
1402
|
+
object: 'event';
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* Always `safety.warning_issued`.
|
|
1406
|
+
*/
|
|
1407
|
+
type: 'safety.warning_issued';
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
export namespace SafetyWarningIssuedWebhookEvent {
|
|
1411
|
+
export interface Data {
|
|
1412
|
+
/**
|
|
1413
|
+
* The safety case ID to pass to `GET /v1/safety/cases/{id}`.
|
|
1414
|
+
*/
|
|
1415
|
+
id: string;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
|
|
959
1419
|
/**
|
|
960
1420
|
* Sent when a batch API request has been cancelled.
|
|
961
1421
|
*/
|
|
@@ -978,7 +1438,282 @@ export type UnwrapWebhookEvent =
|
|
|
978
1438
|
| ResponseFailedWebhookEvent
|
|
979
1439
|
| ResponseIncompleteWebhookEvent
|
|
980
1440
|
| SafetyAlertCreatedWebhookEvent
|
|
981
|
-
|
|
|
1441
|
+
| SafetyDeactivationIssuedWebhookEvent
|
|
1442
|
+
| SafetyOrgAlertCreatedWebhookEvent
|
|
1443
|
+
| SafetyWarningIssuedWebhookEvent;
|
|
1444
|
+
|
|
1445
|
+
export interface WebhookEndpoint {
|
|
1446
|
+
/**
|
|
1447
|
+
* The unique ID of the webhook endpoint.
|
|
1448
|
+
*/
|
|
1449
|
+
id: string;
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* The Unix timestamp when the endpoint was created.
|
|
1453
|
+
*/
|
|
1454
|
+
created_at: number;
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* The event types that trigger deliveries to this endpoint.
|
|
1458
|
+
*/
|
|
1459
|
+
event_types: Array<string>;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* The human-readable name of the endpoint.
|
|
1463
|
+
*/
|
|
1464
|
+
name: string;
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* The object type, which is always webhook_endpoint.
|
|
1468
|
+
*/
|
|
1469
|
+
object: 'webhook_endpoint';
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* A masked hint for the endpoint's signing secret.
|
|
1473
|
+
*/
|
|
1474
|
+
signing_secret_hint: string | null;
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* The HTTPS URL that receives webhook deliveries.
|
|
1478
|
+
*/
|
|
1479
|
+
url: string;
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* The Unix timestamp of the last endpoint configuration or signing-secret change.
|
|
1483
|
+
* Initialized at creation; tests and unchanged updates do not advance it.
|
|
1484
|
+
*/
|
|
1485
|
+
updated_at?: number;
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
export interface WebhookEndpointList {
|
|
1489
|
+
/**
|
|
1490
|
+
* The webhook endpoints in this page.
|
|
1491
|
+
*/
|
|
1492
|
+
data: Array<WebhookEndpoint>;
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
* The ID of the first endpoint in this page.
|
|
1496
|
+
*/
|
|
1497
|
+
first_id: string | null;
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* Whether more webhook endpoints are available.
|
|
1501
|
+
*/
|
|
1502
|
+
has_more: boolean;
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* The ID of the last endpoint in this page.
|
|
1506
|
+
*/
|
|
1507
|
+
last_id: string | null;
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* The object type, which is always list.
|
|
1511
|
+
*/
|
|
1512
|
+
object: 'list';
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
export interface WebhookEndpointTestResult {
|
|
1516
|
+
/**
|
|
1517
|
+
* The event type sent in the test.
|
|
1518
|
+
*/
|
|
1519
|
+
event_type: string;
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* The object type, which is always webhook_endpoint.test.
|
|
1523
|
+
*/
|
|
1524
|
+
object: 'webhook_endpoint.test';
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
* The HTTP status code returned by the endpoint.
|
|
1528
|
+
*/
|
|
1529
|
+
status_code: number;
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
* Whether the test request completed. Always true for returned results; use
|
|
1533
|
+
* status_code to determine the endpoint response.
|
|
1534
|
+
*/
|
|
1535
|
+
success: true;
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* The ID of the webhook endpoint that received the test.
|
|
1539
|
+
*/
|
|
1540
|
+
webhook_endpoint_id: string;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
export interface WebhookEndpointWithSecret {
|
|
1544
|
+
/**
|
|
1545
|
+
* The unique ID of the webhook endpoint.
|
|
1546
|
+
*/
|
|
1547
|
+
id: string;
|
|
1548
|
+
|
|
1549
|
+
/**
|
|
1550
|
+
* The Unix timestamp when the endpoint was created.
|
|
1551
|
+
*/
|
|
1552
|
+
created_at: number;
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* The event types that trigger deliveries to this endpoint.
|
|
1556
|
+
*/
|
|
1557
|
+
event_types: Array<string>;
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* The human-readable name of the endpoint.
|
|
1561
|
+
*/
|
|
1562
|
+
name: string;
|
|
1563
|
+
|
|
1564
|
+
/**
|
|
1565
|
+
* The object type, which is always webhook_endpoint.
|
|
1566
|
+
*/
|
|
1567
|
+
object: 'webhook_endpoint';
|
|
1568
|
+
|
|
1569
|
+
/**
|
|
1570
|
+
* The endpoint's signing secret. This is returned only when the endpoint is
|
|
1571
|
+
* created or the secret is rotated.
|
|
1572
|
+
*/
|
|
1573
|
+
signing_secret: string;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* A masked hint for the endpoint's signing secret.
|
|
1577
|
+
*/
|
|
1578
|
+
signing_secret_hint: string | null;
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* The HTTPS URL that receives webhook deliveries.
|
|
1582
|
+
*/
|
|
1583
|
+
url: string;
|
|
1584
|
+
|
|
1585
|
+
/**
|
|
1586
|
+
* The Unix timestamp of the last endpoint configuration or signing-secret change.
|
|
1587
|
+
* Initialized at creation; tests and unchanged updates do not advance it.
|
|
1588
|
+
*/
|
|
1589
|
+
updated_at?: number;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
export interface WebhookEventTypeList {
|
|
1593
|
+
/**
|
|
1594
|
+
* The webhook event types available to the authenticated project.
|
|
1595
|
+
*/
|
|
1596
|
+
data: Array<string>;
|
|
1597
|
+
|
|
1598
|
+
/**
|
|
1599
|
+
* The object type, which is always list.
|
|
1600
|
+
*/
|
|
1601
|
+
object: 'list';
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
export interface WebhookCreateParams {
|
|
1605
|
+
/**
|
|
1606
|
+
* The event types that trigger deliveries to this endpoint.
|
|
1607
|
+
*/
|
|
1608
|
+
event_types: Array<
|
|
1609
|
+
| 'batch.completed'
|
|
1610
|
+
| 'batch.failed'
|
|
1611
|
+
| 'batch.expired'
|
|
1612
|
+
| 'batch.cancelled'
|
|
1613
|
+
| 'response.completed'
|
|
1614
|
+
| 'response.failed'
|
|
1615
|
+
| 'response.cancelled'
|
|
1616
|
+
| 'response.incomplete'
|
|
1617
|
+
| 'eval.run.succeeded'
|
|
1618
|
+
| 'eval.run.failed'
|
|
1619
|
+
| 'eval.run.canceled'
|
|
1620
|
+
| 'fine_tuning.job.succeeded'
|
|
1621
|
+
| 'fine_tuning.job.failed'
|
|
1622
|
+
| 'fine_tuning.job.cancelled'
|
|
1623
|
+
| 'realtime.call.incoming'
|
|
1624
|
+
| 'video.completed'
|
|
1625
|
+
| 'video.failed'
|
|
1626
|
+
| 'safety.alert.created'
|
|
1627
|
+
>;
|
|
1628
|
+
|
|
1629
|
+
/**
|
|
1630
|
+
* A human-readable name for the webhook endpoint.
|
|
1631
|
+
*/
|
|
1632
|
+
name: string;
|
|
1633
|
+
|
|
1634
|
+
/**
|
|
1635
|
+
* The HTTPS URL that receives webhook deliveries.
|
|
1636
|
+
*/
|
|
1637
|
+
url: string;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
export interface WebhookUpdateParams {
|
|
1641
|
+
/**
|
|
1642
|
+
* The complete set of event types that should trigger deliveries.
|
|
1643
|
+
*/
|
|
1644
|
+
event_types?: Array<
|
|
1645
|
+
| 'batch.completed'
|
|
1646
|
+
| 'batch.failed'
|
|
1647
|
+
| 'batch.expired'
|
|
1648
|
+
| 'batch.cancelled'
|
|
1649
|
+
| 'response.completed'
|
|
1650
|
+
| 'response.failed'
|
|
1651
|
+
| 'response.cancelled'
|
|
1652
|
+
| 'response.incomplete'
|
|
1653
|
+
| 'eval.run.succeeded'
|
|
1654
|
+
| 'eval.run.failed'
|
|
1655
|
+
| 'eval.run.canceled'
|
|
1656
|
+
| 'fine_tuning.job.succeeded'
|
|
1657
|
+
| 'fine_tuning.job.failed'
|
|
1658
|
+
| 'fine_tuning.job.cancelled'
|
|
1659
|
+
| 'realtime.call.incoming'
|
|
1660
|
+
| 'video.completed'
|
|
1661
|
+
| 'video.failed'
|
|
1662
|
+
| 'safety.alert.created'
|
|
1663
|
+
>;
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* A new human-readable name for the webhook endpoint.
|
|
1667
|
+
*/
|
|
1668
|
+
name?: string;
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* A new HTTPS URL that receives webhook deliveries.
|
|
1672
|
+
*/
|
|
1673
|
+
url?: string;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
export interface WebhookListParams extends Omit<CursorPageParams, 'after'> {
|
|
1677
|
+
/**
|
|
1678
|
+
* ID of the last webhook endpoint from the previous page.
|
|
1679
|
+
*/
|
|
1680
|
+
after?: string | null;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
export interface WebhookRotateSecretParams {
|
|
1684
|
+
/**
|
|
1685
|
+
* Whether to keep the previous signing secret valid for 24 hours after rotation.
|
|
1686
|
+
* Defaults to false, which invalidates the previous secret immediately.
|
|
1687
|
+
*/
|
|
1688
|
+
keep_old_secret_active_for_24_hours?: boolean;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
export interface WebhookTestParams {
|
|
1692
|
+
/**
|
|
1693
|
+
* The event type to send as a sample delivery.
|
|
1694
|
+
*/
|
|
1695
|
+
event_type:
|
|
1696
|
+
| 'batch.completed'
|
|
1697
|
+
| 'batch.failed'
|
|
1698
|
+
| 'batch.expired'
|
|
1699
|
+
| 'batch.cancelled'
|
|
1700
|
+
| 'response.completed'
|
|
1701
|
+
| 'response.failed'
|
|
1702
|
+
| 'response.cancelled'
|
|
1703
|
+
| 'response.incomplete'
|
|
1704
|
+
| 'eval.run.succeeded'
|
|
1705
|
+
| 'eval.run.failed'
|
|
1706
|
+
| 'eval.run.canceled'
|
|
1707
|
+
| 'fine_tuning.job.succeeded'
|
|
1708
|
+
| 'fine_tuning.job.failed'
|
|
1709
|
+
| 'fine_tuning.job.cancelled'
|
|
1710
|
+
| 'realtime.call.incoming'
|
|
1711
|
+
| 'video.completed'
|
|
1712
|
+
| 'video.failed'
|
|
1713
|
+
| 'safety.alert.created';
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
Webhooks.EventTypes = EventTypes;
|
|
982
1717
|
|
|
983
1718
|
export declare namespace Webhooks {
|
|
984
1719
|
export {
|
|
@@ -986,6 +1721,7 @@ export declare namespace Webhooks {
|
|
|
986
1721
|
type BatchCompletedWebhookEvent as BatchCompletedWebhookEvent,
|
|
987
1722
|
type BatchExpiredWebhookEvent as BatchExpiredWebhookEvent,
|
|
988
1723
|
type BatchFailedWebhookEvent as BatchFailedWebhookEvent,
|
|
1724
|
+
type DeletedWebhookEndpoint as DeletedWebhookEndpoint,
|
|
989
1725
|
type EvalRunCanceledWebhookEvent as EvalRunCanceledWebhookEvent,
|
|
990
1726
|
type EvalRunFailedWebhookEvent as EvalRunFailedWebhookEvent,
|
|
991
1727
|
type EvalRunSucceededWebhookEvent as EvalRunSucceededWebhookEvent,
|
|
@@ -1000,7 +1736,22 @@ export declare namespace Webhooks {
|
|
|
1000
1736
|
type ResponseFailedWebhookEvent as ResponseFailedWebhookEvent,
|
|
1001
1737
|
type ResponseIncompleteWebhookEvent as ResponseIncompleteWebhookEvent,
|
|
1002
1738
|
type SafetyAlertCreatedWebhookEvent as SafetyAlertCreatedWebhookEvent,
|
|
1739
|
+
type SafetyDeactivationIssuedWebhookEvent as SafetyDeactivationIssuedWebhookEvent,
|
|
1003
1740
|
type SafetyOrgAlertCreatedWebhookEvent as SafetyOrgAlertCreatedWebhookEvent,
|
|
1741
|
+
type SafetyWarningIssuedWebhookEvent as SafetyWarningIssuedWebhookEvent,
|
|
1004
1742
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
1743
|
+
type WebhookEndpoint as WebhookEndpoint,
|
|
1744
|
+
type WebhookEndpointList as WebhookEndpointList,
|
|
1745
|
+
type WebhookEndpointTestResult as WebhookEndpointTestResult,
|
|
1746
|
+
type WebhookEndpointWithSecret as WebhookEndpointWithSecret,
|
|
1747
|
+
type WebhookEventTypeList as WebhookEventTypeList,
|
|
1748
|
+
type WebhookEndpointsPage as WebhookEndpointsPage,
|
|
1749
|
+
type WebhookCreateParams as WebhookCreateParams,
|
|
1750
|
+
type WebhookUpdateParams as WebhookUpdateParams,
|
|
1751
|
+
type WebhookListParams as WebhookListParams,
|
|
1752
|
+
type WebhookRotateSecretParams as WebhookRotateSecretParams,
|
|
1753
|
+
type WebhookTestParams as WebhookTestParams,
|
|
1005
1754
|
};
|
|
1755
|
+
|
|
1756
|
+
export { EventTypes as EventTypes };
|
|
1006
1757
|
}
|