openai 7.19.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 +16 -0
- package/package.json +1 -1
- package/resources/admin/organization/admin-api-keys.d.mts +8 -1
- package/resources/admin/organization/admin-api-keys.d.mts.map +1 -1
- package/resources/admin/organization/admin-api-keys.d.ts +8 -1
- 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 +61 -43
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +61 -43
- 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/templates.d.mts +22 -9
- package/resources/beta/agents/environments/templates.d.mts.map +1 -1
- package/resources/beta/agents/environments/templates.d.ts +22 -9
- 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 +8 -1
- package/resources/beta/agents/sessions/artifacts.d.mts.map +1 -1
- package/resources/beta/agents/sessions/artifacts.d.ts +8 -1
- 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/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 +17 -6
- package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.ts +17 -6
- package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/agents/sessions/sessions.js +58 -13
- package/resources/beta/agents/sessions/sessions.js.map +1 -1
- package/resources/beta/agents/sessions/sessions.mjs +58 -13
- 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 +163 -23
- package/resources/beta/agents/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.ts +163 -23
- 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 +11 -5
- package/resources/beta/agents/vaults/vaults.d.mts.map +1 -1
- package/resources/beta/agents/vaults/vaults.d.ts +11 -5
- 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 +4 -5
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +4 -5
- 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/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 +18 -8
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +18 -8
- 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/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/webhooks.d.mts +91 -3
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +91 -3
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +58 -11
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +58 -11
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/resources/admin/organization/admin-api-keys.ts +200 -1
- 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 +253 -43
- package/src/resources/beta/agents/environments/templates.ts +214 -9
- package/src/resources/beta/agents/sessions/artifacts.ts +202 -1
- package/src/resources/beta/agents/sessions/items.ts +202 -1
- package/src/resources/beta/agents/sessions/sessions.ts +209 -6
- 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 +382 -22
- package/src/resources/beta/agents/vaults/index.ts +2 -0
- package/src/resources/beta/agents/vaults/vaults.ts +205 -3
- package/src/resources/beta/assistants.ts +200 -1
- package/src/resources/beta/chatkit/threads.ts +311 -2
- package/src/resources/beta/responses/responses.ts +4 -5
- 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/responses/input-items.ts +202 -1
- package/src/resources/responses/responses.ts +255 -9
- 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/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 +2 -0
- package/src/resources/webhooks/webhooks.ts +301 -2
- 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
|
@@ -8,6 +8,113 @@ import { NextCursorPage, type NextCursorPageParams, PagePromise } from '../../..
|
|
|
8
8
|
import { RequestOptions } from '../../../../internal/request-options';
|
|
9
9
|
import { path } from '../../../../internal/utils/path';
|
|
10
10
|
|
|
11
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
12
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
13
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
14
|
+
'method',
|
|
15
|
+
'path',
|
|
16
|
+
'query',
|
|
17
|
+
'body',
|
|
18
|
+
'headers',
|
|
19
|
+
'maxRetries',
|
|
20
|
+
'stream',
|
|
21
|
+
'timeout',
|
|
22
|
+
'httpAgent',
|
|
23
|
+
'fetchOptions',
|
|
24
|
+
'signal',
|
|
25
|
+
'idempotencyKey',
|
|
26
|
+
'defaultBaseURL',
|
|
27
|
+
'__metadata',
|
|
28
|
+
'__binaryRequest',
|
|
29
|
+
'__binaryResponse',
|
|
30
|
+
'__streamClass',
|
|
31
|
+
'__security',
|
|
32
|
+
'__synthesizeEventData',
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
function normalizeRequestOptionsForQuery(
|
|
36
|
+
value: unknown,
|
|
37
|
+
queryKeys: ReadonlyArray<string>,
|
|
38
|
+
options: RequestOptions | undefined,
|
|
39
|
+
):
|
|
40
|
+
| ({
|
|
41
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
42
|
+
} & {
|
|
43
|
+
[
|
|
44
|
+
K in
|
|
45
|
+
| 'method'
|
|
46
|
+
| 'path'
|
|
47
|
+
| 'body'
|
|
48
|
+
| 'stream'
|
|
49
|
+
| 'httpAgent'
|
|
50
|
+
| 'fetchOptions'
|
|
51
|
+
| 'defaultBaseURL'
|
|
52
|
+
| '__metadata'
|
|
53
|
+
| '__binaryRequest'
|
|
54
|
+
| '__binaryResponse'
|
|
55
|
+
| '__streamClass'
|
|
56
|
+
| '__security'
|
|
57
|
+
| '__synthesizeEventData'
|
|
58
|
+
]?: never;
|
|
59
|
+
})
|
|
60
|
+
| undefined {
|
|
61
|
+
if (typeof value !== 'object' || value === null) return undefined;
|
|
62
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
63
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
64
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(
|
|
65
|
+
([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined),
|
|
66
|
+
);
|
|
67
|
+
const keys = entries.map(([key]) => key);
|
|
68
|
+
const requestOnly = keys.some(
|
|
69
|
+
(key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key),
|
|
70
|
+
);
|
|
71
|
+
if (!requestOnly) return undefined;
|
|
72
|
+
// Declared query fields, including stream, must use the query argument.
|
|
73
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
74
|
+
if (
|
|
75
|
+
options !== undefined ||
|
|
76
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))
|
|
77
|
+
) {
|
|
78
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
79
|
+
}
|
|
80
|
+
// The query position must not gain authority to change the request destination
|
|
81
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
82
|
+
if (
|
|
83
|
+
keys.some(
|
|
84
|
+
(key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key),
|
|
85
|
+
)
|
|
86
|
+
) {
|
|
87
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
88
|
+
}
|
|
89
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
90
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
91
|
+
return Object.fromEntries(
|
|
92
|
+
entries.map(([key, descriptor]) => {
|
|
93
|
+
if ('value' in descriptor) return [key, descriptor.value];
|
|
94
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
95
|
+
}),
|
|
96
|
+
) as {
|
|
97
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
98
|
+
} & {
|
|
99
|
+
[
|
|
100
|
+
K in
|
|
101
|
+
| 'method'
|
|
102
|
+
| 'path'
|
|
103
|
+
| 'body'
|
|
104
|
+
| 'stream'
|
|
105
|
+
| 'httpAgent'
|
|
106
|
+
| 'fetchOptions'
|
|
107
|
+
| 'defaultBaseURL'
|
|
108
|
+
| '__metadata'
|
|
109
|
+
| '__binaryRequest'
|
|
110
|
+
| '__binaryResponse'
|
|
111
|
+
| '__streamClass'
|
|
112
|
+
| '__security'
|
|
113
|
+
| '__synthesizeEventData'
|
|
114
|
+
]?: never;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
11
118
|
export class Roles extends APIResource {
|
|
12
119
|
/**
|
|
13
120
|
* Creates a custom role for a project.
|
|
@@ -85,9 +192,103 @@ export class Roles extends APIResource {
|
|
|
85
192
|
*/
|
|
86
193
|
list(
|
|
87
194
|
projectID: string,
|
|
88
|
-
query
|
|
195
|
+
query?:
|
|
196
|
+
| (RoleListParams &
|
|
197
|
+
(
|
|
198
|
+
| {
|
|
199
|
+
[
|
|
200
|
+
K in
|
|
201
|
+
| 'method'
|
|
202
|
+
| 'path'
|
|
203
|
+
| 'query'
|
|
204
|
+
| 'body'
|
|
205
|
+
| 'headers'
|
|
206
|
+
| 'maxRetries'
|
|
207
|
+
| 'stream'
|
|
208
|
+
| 'timeout'
|
|
209
|
+
| 'httpAgent'
|
|
210
|
+
| 'fetchOptions'
|
|
211
|
+
| 'signal'
|
|
212
|
+
| 'idempotencyKey'
|
|
213
|
+
| 'defaultBaseURL'
|
|
214
|
+
| '__metadata'
|
|
215
|
+
| '__binaryRequest'
|
|
216
|
+
| '__binaryResponse'
|
|
217
|
+
| '__streamClass'
|
|
218
|
+
| '__security'
|
|
219
|
+
| '__synthesizeEventData'
|
|
220
|
+
]?: never;
|
|
221
|
+
}
|
|
222
|
+
| null
|
|
223
|
+
| undefined
|
|
224
|
+
))
|
|
225
|
+
| null
|
|
226
|
+
| undefined,
|
|
227
|
+
options?: RequestOptions,
|
|
228
|
+
): PagePromise<RolesPage, RolesAPI.Role>;
|
|
229
|
+
list(
|
|
230
|
+
projectID: string,
|
|
231
|
+
options?: {
|
|
232
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
233
|
+
} & {
|
|
234
|
+
[
|
|
235
|
+
K in
|
|
236
|
+
| 'method'
|
|
237
|
+
| 'path'
|
|
238
|
+
| 'body'
|
|
239
|
+
| 'stream'
|
|
240
|
+
| 'httpAgent'
|
|
241
|
+
| 'fetchOptions'
|
|
242
|
+
| 'defaultBaseURL'
|
|
243
|
+
| '__metadata'
|
|
244
|
+
| '__binaryRequest'
|
|
245
|
+
| '__binaryResponse'
|
|
246
|
+
| '__streamClass'
|
|
247
|
+
| '__security'
|
|
248
|
+
| '__synthesizeEventData'
|
|
249
|
+
]?: never;
|
|
250
|
+
},
|
|
251
|
+
): PagePromise<RolesPage, RolesAPI.Role>;
|
|
252
|
+
list(
|
|
253
|
+
projectID: string,
|
|
254
|
+
query:
|
|
255
|
+
| RoleListParams
|
|
256
|
+
| ({
|
|
257
|
+
[
|
|
258
|
+
K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query'
|
|
259
|
+
]?: RequestOptions[K];
|
|
260
|
+
} & {
|
|
261
|
+
[
|
|
262
|
+
K in
|
|
263
|
+
| 'method'
|
|
264
|
+
| 'path'
|
|
265
|
+
| 'body'
|
|
266
|
+
| 'stream'
|
|
267
|
+
| 'httpAgent'
|
|
268
|
+
| 'fetchOptions'
|
|
269
|
+
| 'defaultBaseURL'
|
|
270
|
+
| '__metadata'
|
|
271
|
+
| '__binaryRequest'
|
|
272
|
+
| '__binaryResponse'
|
|
273
|
+
| '__streamClass'
|
|
274
|
+
| '__security'
|
|
275
|
+
| '__synthesizeEventData'
|
|
276
|
+
]?: never;
|
|
277
|
+
})
|
|
278
|
+
| null
|
|
279
|
+
| undefined = {},
|
|
89
280
|
options?: RequestOptions,
|
|
90
281
|
): PagePromise<RolesPage, RolesAPI.Role> {
|
|
282
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(
|
|
283
|
+
query,
|
|
284
|
+
['after', 'limit', 'order'],
|
|
285
|
+
options,
|
|
286
|
+
);
|
|
287
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
288
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
289
|
+
query = {};
|
|
290
|
+
}
|
|
291
|
+
query = query as RoleListParams | null | undefined;
|
|
91
292
|
return this._client.getAPIList(path`/projects/${projectID}/roles`, NextCursorPage<RolesAPI.Role>, {
|
|
92
293
|
query,
|
|
93
294
|
...options,
|
|
@@ -12,6 +12,113 @@ import {
|
|
|
12
12
|
import { RequestOptions } from '../../../../../internal/request-options';
|
|
13
13
|
import { path } from '../../../../../internal/utils/path';
|
|
14
14
|
|
|
15
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
16
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
17
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
18
|
+
'method',
|
|
19
|
+
'path',
|
|
20
|
+
'query',
|
|
21
|
+
'body',
|
|
22
|
+
'headers',
|
|
23
|
+
'maxRetries',
|
|
24
|
+
'stream',
|
|
25
|
+
'timeout',
|
|
26
|
+
'httpAgent',
|
|
27
|
+
'fetchOptions',
|
|
28
|
+
'signal',
|
|
29
|
+
'idempotencyKey',
|
|
30
|
+
'defaultBaseURL',
|
|
31
|
+
'__metadata',
|
|
32
|
+
'__binaryRequest',
|
|
33
|
+
'__binaryResponse',
|
|
34
|
+
'__streamClass',
|
|
35
|
+
'__security',
|
|
36
|
+
'__synthesizeEventData',
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
function normalizeRequestOptionsForQuery(
|
|
40
|
+
value: unknown,
|
|
41
|
+
queryKeys: ReadonlyArray<string>,
|
|
42
|
+
options: RequestOptions | undefined,
|
|
43
|
+
):
|
|
44
|
+
| ({
|
|
45
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
46
|
+
} & {
|
|
47
|
+
[
|
|
48
|
+
K in
|
|
49
|
+
| 'method'
|
|
50
|
+
| 'path'
|
|
51
|
+
| 'body'
|
|
52
|
+
| 'stream'
|
|
53
|
+
| 'httpAgent'
|
|
54
|
+
| 'fetchOptions'
|
|
55
|
+
| 'defaultBaseURL'
|
|
56
|
+
| '__metadata'
|
|
57
|
+
| '__binaryRequest'
|
|
58
|
+
| '__binaryResponse'
|
|
59
|
+
| '__streamClass'
|
|
60
|
+
| '__security'
|
|
61
|
+
| '__synthesizeEventData'
|
|
62
|
+
]?: never;
|
|
63
|
+
})
|
|
64
|
+
| undefined {
|
|
65
|
+
if (typeof value !== 'object' || value === null) return undefined;
|
|
66
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
67
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
68
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(
|
|
69
|
+
([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined),
|
|
70
|
+
);
|
|
71
|
+
const keys = entries.map(([key]) => key);
|
|
72
|
+
const requestOnly = keys.some(
|
|
73
|
+
(key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key),
|
|
74
|
+
);
|
|
75
|
+
if (!requestOnly) return undefined;
|
|
76
|
+
// Declared query fields, including stream, must use the query argument.
|
|
77
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
78
|
+
if (
|
|
79
|
+
options !== undefined ||
|
|
80
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))
|
|
81
|
+
) {
|
|
82
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
83
|
+
}
|
|
84
|
+
// The query position must not gain authority to change the request destination
|
|
85
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
86
|
+
if (
|
|
87
|
+
keys.some(
|
|
88
|
+
(key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key),
|
|
89
|
+
)
|
|
90
|
+
) {
|
|
91
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
92
|
+
}
|
|
93
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
94
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
95
|
+
return Object.fromEntries(
|
|
96
|
+
entries.map(([key, descriptor]) => {
|
|
97
|
+
if ('value' in descriptor) return [key, descriptor.value];
|
|
98
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
99
|
+
}),
|
|
100
|
+
) as {
|
|
101
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
102
|
+
} & {
|
|
103
|
+
[
|
|
104
|
+
K in
|
|
105
|
+
| 'method'
|
|
106
|
+
| 'path'
|
|
107
|
+
| 'body'
|
|
108
|
+
| 'stream'
|
|
109
|
+
| 'httpAgent'
|
|
110
|
+
| 'fetchOptions'
|
|
111
|
+
| 'defaultBaseURL'
|
|
112
|
+
| '__metadata'
|
|
113
|
+
| '__binaryRequest'
|
|
114
|
+
| '__binaryResponse'
|
|
115
|
+
| '__streamClass'
|
|
116
|
+
| '__security'
|
|
117
|
+
| '__synthesizeEventData'
|
|
118
|
+
]?: never;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
15
122
|
export class ServiceAccounts extends APIResource {
|
|
16
123
|
apiKeys: APIKeysAPI.APIKeys = new APIKeysAPI.APIKeys(this._client);
|
|
17
124
|
|
|
@@ -103,9 +210,103 @@ export class ServiceAccounts extends APIResource {
|
|
|
103
210
|
*/
|
|
104
211
|
list(
|
|
105
212
|
projectID: string,
|
|
106
|
-
query
|
|
213
|
+
query?:
|
|
214
|
+
| (ServiceAccountListParams &
|
|
215
|
+
(
|
|
216
|
+
| {
|
|
217
|
+
[
|
|
218
|
+
K in
|
|
219
|
+
| 'method'
|
|
220
|
+
| 'path'
|
|
221
|
+
| 'query'
|
|
222
|
+
| 'body'
|
|
223
|
+
| 'headers'
|
|
224
|
+
| 'maxRetries'
|
|
225
|
+
| 'stream'
|
|
226
|
+
| 'timeout'
|
|
227
|
+
| 'httpAgent'
|
|
228
|
+
| 'fetchOptions'
|
|
229
|
+
| 'signal'
|
|
230
|
+
| 'idempotencyKey'
|
|
231
|
+
| 'defaultBaseURL'
|
|
232
|
+
| '__metadata'
|
|
233
|
+
| '__binaryRequest'
|
|
234
|
+
| '__binaryResponse'
|
|
235
|
+
| '__streamClass'
|
|
236
|
+
| '__security'
|
|
237
|
+
| '__synthesizeEventData'
|
|
238
|
+
]?: never;
|
|
239
|
+
}
|
|
240
|
+
| null
|
|
241
|
+
| undefined
|
|
242
|
+
))
|
|
243
|
+
| null
|
|
244
|
+
| undefined,
|
|
245
|
+
options?: RequestOptions,
|
|
246
|
+
): PagePromise<ProjectServiceAccountsPage, ProjectServiceAccount>;
|
|
247
|
+
list(
|
|
248
|
+
projectID: string,
|
|
249
|
+
options?: {
|
|
250
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
251
|
+
} & {
|
|
252
|
+
[
|
|
253
|
+
K in
|
|
254
|
+
| 'method'
|
|
255
|
+
| 'path'
|
|
256
|
+
| 'body'
|
|
257
|
+
| 'stream'
|
|
258
|
+
| 'httpAgent'
|
|
259
|
+
| 'fetchOptions'
|
|
260
|
+
| 'defaultBaseURL'
|
|
261
|
+
| '__metadata'
|
|
262
|
+
| '__binaryRequest'
|
|
263
|
+
| '__binaryResponse'
|
|
264
|
+
| '__streamClass'
|
|
265
|
+
| '__security'
|
|
266
|
+
| '__synthesizeEventData'
|
|
267
|
+
]?: never;
|
|
268
|
+
},
|
|
269
|
+
): PagePromise<ProjectServiceAccountsPage, ProjectServiceAccount>;
|
|
270
|
+
list(
|
|
271
|
+
projectID: string,
|
|
272
|
+
query:
|
|
273
|
+
| ServiceAccountListParams
|
|
274
|
+
| ({
|
|
275
|
+
[
|
|
276
|
+
K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query'
|
|
277
|
+
]?: RequestOptions[K];
|
|
278
|
+
} & {
|
|
279
|
+
[
|
|
280
|
+
K in
|
|
281
|
+
| 'method'
|
|
282
|
+
| 'path'
|
|
283
|
+
| 'body'
|
|
284
|
+
| 'stream'
|
|
285
|
+
| 'httpAgent'
|
|
286
|
+
| 'fetchOptions'
|
|
287
|
+
| 'defaultBaseURL'
|
|
288
|
+
| '__metadata'
|
|
289
|
+
| '__binaryRequest'
|
|
290
|
+
| '__binaryResponse'
|
|
291
|
+
| '__streamClass'
|
|
292
|
+
| '__security'
|
|
293
|
+
| '__synthesizeEventData'
|
|
294
|
+
]?: never;
|
|
295
|
+
})
|
|
296
|
+
| null
|
|
297
|
+
| undefined = {},
|
|
107
298
|
options?: RequestOptions,
|
|
108
299
|
): PagePromise<ProjectServiceAccountsPage, ProjectServiceAccount> {
|
|
300
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(
|
|
301
|
+
query,
|
|
302
|
+
['after', 'limit'],
|
|
303
|
+
options,
|
|
304
|
+
);
|
|
305
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
306
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
307
|
+
query = {};
|
|
308
|
+
}
|
|
309
|
+
query = query as ServiceAccountListParams | null | undefined;
|
|
109
310
|
return this._client.getAPIList(
|
|
110
311
|
path`/organization/projects/${projectID}/service_accounts`,
|
|
111
312
|
ConversationCursorPage<ProjectServiceAccount>,
|
|
@@ -10,6 +10,113 @@ import {
|
|
|
10
10
|
import { RequestOptions } from '../../../../internal/request-options';
|
|
11
11
|
import { path } from '../../../../internal/utils/path';
|
|
12
12
|
|
|
13
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
14
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
15
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
16
|
+
'method',
|
|
17
|
+
'path',
|
|
18
|
+
'query',
|
|
19
|
+
'body',
|
|
20
|
+
'headers',
|
|
21
|
+
'maxRetries',
|
|
22
|
+
'stream',
|
|
23
|
+
'timeout',
|
|
24
|
+
'httpAgent',
|
|
25
|
+
'fetchOptions',
|
|
26
|
+
'signal',
|
|
27
|
+
'idempotencyKey',
|
|
28
|
+
'defaultBaseURL',
|
|
29
|
+
'__metadata',
|
|
30
|
+
'__binaryRequest',
|
|
31
|
+
'__binaryResponse',
|
|
32
|
+
'__streamClass',
|
|
33
|
+
'__security',
|
|
34
|
+
'__synthesizeEventData',
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
function normalizeRequestOptionsForQuery(
|
|
38
|
+
value: unknown,
|
|
39
|
+
queryKeys: ReadonlyArray<string>,
|
|
40
|
+
options: RequestOptions | undefined,
|
|
41
|
+
):
|
|
42
|
+
| ({
|
|
43
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
44
|
+
} & {
|
|
45
|
+
[
|
|
46
|
+
K in
|
|
47
|
+
| 'method'
|
|
48
|
+
| 'path'
|
|
49
|
+
| 'body'
|
|
50
|
+
| 'stream'
|
|
51
|
+
| 'httpAgent'
|
|
52
|
+
| 'fetchOptions'
|
|
53
|
+
| 'defaultBaseURL'
|
|
54
|
+
| '__metadata'
|
|
55
|
+
| '__binaryRequest'
|
|
56
|
+
| '__binaryResponse'
|
|
57
|
+
| '__streamClass'
|
|
58
|
+
| '__security'
|
|
59
|
+
| '__synthesizeEventData'
|
|
60
|
+
]?: never;
|
|
61
|
+
})
|
|
62
|
+
| undefined {
|
|
63
|
+
if (typeof value !== 'object' || value === null) return undefined;
|
|
64
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
65
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
66
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(
|
|
67
|
+
([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined),
|
|
68
|
+
);
|
|
69
|
+
const keys = entries.map(([key]) => key);
|
|
70
|
+
const requestOnly = keys.some(
|
|
71
|
+
(key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key),
|
|
72
|
+
);
|
|
73
|
+
if (!requestOnly) return undefined;
|
|
74
|
+
// Declared query fields, including stream, must use the query argument.
|
|
75
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
76
|
+
if (
|
|
77
|
+
options !== undefined ||
|
|
78
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))
|
|
79
|
+
) {
|
|
80
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
81
|
+
}
|
|
82
|
+
// The query position must not gain authority to change the request destination
|
|
83
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
84
|
+
if (
|
|
85
|
+
keys.some(
|
|
86
|
+
(key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key),
|
|
87
|
+
)
|
|
88
|
+
) {
|
|
89
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
90
|
+
}
|
|
91
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
92
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
93
|
+
return Object.fromEntries(
|
|
94
|
+
entries.map(([key, descriptor]) => {
|
|
95
|
+
if ('value' in descriptor) return [key, descriptor.value];
|
|
96
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
97
|
+
}),
|
|
98
|
+
) as {
|
|
99
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
100
|
+
} & {
|
|
101
|
+
[
|
|
102
|
+
K in
|
|
103
|
+
| 'method'
|
|
104
|
+
| 'path'
|
|
105
|
+
| 'body'
|
|
106
|
+
| 'stream'
|
|
107
|
+
| 'httpAgent'
|
|
108
|
+
| 'fetchOptions'
|
|
109
|
+
| 'defaultBaseURL'
|
|
110
|
+
| '__metadata'
|
|
111
|
+
| '__binaryRequest'
|
|
112
|
+
| '__binaryResponse'
|
|
113
|
+
| '__streamClass'
|
|
114
|
+
| '__security'
|
|
115
|
+
| '__synthesizeEventData'
|
|
116
|
+
]?: never;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
13
120
|
export class SpendAlerts extends APIResource {
|
|
14
121
|
/**
|
|
15
122
|
* Creates a project spend alert.
|
|
@@ -116,9 +223,103 @@ export class SpendAlerts extends APIResource {
|
|
|
116
223
|
*/
|
|
117
224
|
list(
|
|
118
225
|
projectID: string,
|
|
119
|
-
query
|
|
226
|
+
query?:
|
|
227
|
+
| (SpendAlertListParams &
|
|
228
|
+
(
|
|
229
|
+
| {
|
|
230
|
+
[
|
|
231
|
+
K in
|
|
232
|
+
| 'method'
|
|
233
|
+
| 'path'
|
|
234
|
+
| 'query'
|
|
235
|
+
| 'body'
|
|
236
|
+
| 'headers'
|
|
237
|
+
| 'maxRetries'
|
|
238
|
+
| 'stream'
|
|
239
|
+
| 'timeout'
|
|
240
|
+
| 'httpAgent'
|
|
241
|
+
| 'fetchOptions'
|
|
242
|
+
| 'signal'
|
|
243
|
+
| 'idempotencyKey'
|
|
244
|
+
| 'defaultBaseURL'
|
|
245
|
+
| '__metadata'
|
|
246
|
+
| '__binaryRequest'
|
|
247
|
+
| '__binaryResponse'
|
|
248
|
+
| '__streamClass'
|
|
249
|
+
| '__security'
|
|
250
|
+
| '__synthesizeEventData'
|
|
251
|
+
]?: never;
|
|
252
|
+
}
|
|
253
|
+
| null
|
|
254
|
+
| undefined
|
|
255
|
+
))
|
|
256
|
+
| null
|
|
257
|
+
| undefined,
|
|
258
|
+
options?: RequestOptions,
|
|
259
|
+
): PagePromise<ProjectSpendAlertsPage, ProjectSpendAlert>;
|
|
260
|
+
list(
|
|
261
|
+
projectID: string,
|
|
262
|
+
options?: {
|
|
263
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
264
|
+
} & {
|
|
265
|
+
[
|
|
266
|
+
K in
|
|
267
|
+
| 'method'
|
|
268
|
+
| 'path'
|
|
269
|
+
| 'body'
|
|
270
|
+
| 'stream'
|
|
271
|
+
| 'httpAgent'
|
|
272
|
+
| 'fetchOptions'
|
|
273
|
+
| 'defaultBaseURL'
|
|
274
|
+
| '__metadata'
|
|
275
|
+
| '__binaryRequest'
|
|
276
|
+
| '__binaryResponse'
|
|
277
|
+
| '__streamClass'
|
|
278
|
+
| '__security'
|
|
279
|
+
| '__synthesizeEventData'
|
|
280
|
+
]?: never;
|
|
281
|
+
},
|
|
282
|
+
): PagePromise<ProjectSpendAlertsPage, ProjectSpendAlert>;
|
|
283
|
+
list(
|
|
284
|
+
projectID: string,
|
|
285
|
+
query:
|
|
286
|
+
| SpendAlertListParams
|
|
287
|
+
| ({
|
|
288
|
+
[
|
|
289
|
+
K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query'
|
|
290
|
+
]?: RequestOptions[K];
|
|
291
|
+
} & {
|
|
292
|
+
[
|
|
293
|
+
K in
|
|
294
|
+
| 'method'
|
|
295
|
+
| 'path'
|
|
296
|
+
| 'body'
|
|
297
|
+
| 'stream'
|
|
298
|
+
| 'httpAgent'
|
|
299
|
+
| 'fetchOptions'
|
|
300
|
+
| 'defaultBaseURL'
|
|
301
|
+
| '__metadata'
|
|
302
|
+
| '__binaryRequest'
|
|
303
|
+
| '__binaryResponse'
|
|
304
|
+
| '__streamClass'
|
|
305
|
+
| '__security'
|
|
306
|
+
| '__synthesizeEventData'
|
|
307
|
+
]?: never;
|
|
308
|
+
})
|
|
309
|
+
| null
|
|
310
|
+
| undefined = {},
|
|
120
311
|
options?: RequestOptions,
|
|
121
312
|
): PagePromise<ProjectSpendAlertsPage, ProjectSpendAlert> {
|
|
313
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(
|
|
314
|
+
query,
|
|
315
|
+
['after', 'before', 'limit', 'order'],
|
|
316
|
+
options,
|
|
317
|
+
);
|
|
318
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
319
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
320
|
+
query = {};
|
|
321
|
+
}
|
|
322
|
+
query = query as SpendAlertListParams | null | undefined;
|
|
122
323
|
return this._client.getAPIList(
|
|
123
324
|
path`/organization/projects/${projectID}/spend_alerts`,
|
|
124
325
|
ConversationCursorPage<ProjectSpendAlert>,
|