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
|
@@ -2,6 +2,58 @@
|
|
|
2
2
|
import { APIResource } from "../../../../core/resource.mjs";
|
|
3
3
|
import { ConversationCursorPage, } from "../../../../core/pagination.mjs";
|
|
4
4
|
import { path } from "../../../../internal/utils/path.mjs";
|
|
5
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
6
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
7
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
8
|
+
'method',
|
|
9
|
+
'path',
|
|
10
|
+
'query',
|
|
11
|
+
'body',
|
|
12
|
+
'headers',
|
|
13
|
+
'maxRetries',
|
|
14
|
+
'stream',
|
|
15
|
+
'timeout',
|
|
16
|
+
'httpAgent',
|
|
17
|
+
'fetchOptions',
|
|
18
|
+
'signal',
|
|
19
|
+
'idempotencyKey',
|
|
20
|
+
'defaultBaseURL',
|
|
21
|
+
'__metadata',
|
|
22
|
+
'__binaryRequest',
|
|
23
|
+
'__binaryResponse',
|
|
24
|
+
'__streamClass',
|
|
25
|
+
'__security',
|
|
26
|
+
'__synthesizeEventData',
|
|
27
|
+
]);
|
|
28
|
+
function normalizeRequestOptionsForQuery(value, queryKeys, options) {
|
|
29
|
+
if (typeof value !== 'object' || value === null)
|
|
30
|
+
return undefined;
|
|
31
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
32
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
33
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined));
|
|
34
|
+
const keys = entries.map(([key]) => key);
|
|
35
|
+
const requestOnly = keys.some((key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key));
|
|
36
|
+
if (!requestOnly)
|
|
37
|
+
return undefined;
|
|
38
|
+
// Declared query fields, including stream, must use the query argument.
|
|
39
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
40
|
+
if (options !== undefined ||
|
|
41
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))) {
|
|
42
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
43
|
+
}
|
|
44
|
+
// The query position must not gain authority to change the request destination
|
|
45
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
46
|
+
if (keys.some((key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key))) {
|
|
47
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
48
|
+
}
|
|
49
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
50
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
51
|
+
return Object.fromEntries(entries.map(([key, descriptor]) => {
|
|
52
|
+
if ('value' in descriptor)
|
|
53
|
+
return [key, descriptor.value];
|
|
54
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
5
57
|
export class APIKeys extends APIResource {
|
|
6
58
|
/**
|
|
7
59
|
* Retrieves an API key in the project.
|
|
@@ -22,20 +74,13 @@ export class APIKeys extends APIResource {
|
|
|
22
74
|
__security: { adminAPIKeyAuth: true },
|
|
23
75
|
});
|
|
24
76
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Returns a list of API keys in the project.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```ts
|
|
30
|
-
* // Automatically fetches more pages as needed.
|
|
31
|
-
* for await (const projectAPIKey of client.admin.organization.projects.apiKeys.list(
|
|
32
|
-
* 'project_id',
|
|
33
|
-
* )) {
|
|
34
|
-
* // ...
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
77
|
list(projectID, query = {}, options) {
|
|
78
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(query, ['after', 'limit', 'owner_project_access'], options);
|
|
79
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
80
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
81
|
+
query = {};
|
|
82
|
+
}
|
|
83
|
+
query = query;
|
|
39
84
|
return this._client.getAPIList(path `/organization/projects/${projectID}/api_keys`, (ConversationCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
40
85
|
}
|
|
41
86
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys.mjs","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/api-keys.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,EAAE,WAAW,EAAE,sCAAkC;AAExD,OAAO,EACL,sBAAsB,GAGvB,wCAAoC;AAErC,OAAO,EAAE,IAAI,EAAE,4CAAwC;AAEvD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,QAAgB,EAChB,MAA4B,EAC5B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,0BAA0B,UAAU,aAAa,QAAQ,EAAE,EAAE;YACvF,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;
|
|
1
|
+
{"version":3,"file":"api-keys.mjs","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/api-keys.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,EAAE,WAAW,EAAE,sCAAkC;AAExD,OAAO,EACL,sBAAsB,GAGvB,wCAAoC;AAErC,OAAO,EAAE,IAAI,EAAE,4CAAwC;AAEvD,6EAA6E;AAC7E,6EAA6E;AAC7E,MAAM,mCAAmC,GAAG,IAAI,GAAG,CAAC;IAClD,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,WAAW;IACX,cAAc;IACd,QAAQ;IACR,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,uBAAuB;CACxB,CAAC,CAAC;AAEH,SAAS,+BAA+B,CACtC,KAAc,EACd,SAAgC,EAChC,OAAmC;IAuBnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAClE,2EAA2E;IAC3E,6EAA6E;IAC7E,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAC5E,CAAC,CAAC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ACJ,QAAgB,EAChB,MAA0B,EAC1B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,0BAA0B,UAAU,aAAa,QAAQ,EAAE,EAAE;YAC1F,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -15,7 +15,14 @@ export declare class Certificates extends APIResource {
|
|
|
15
15
|
* }
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
list(projectID: string, query?: CertificateListParams
|
|
18
|
+
list(projectID: string, query?: (CertificateListParams & ({
|
|
19
|
+
[K in 'method' | 'path' | 'query' | 'body' | 'headers' | 'maxRetries' | 'stream' | 'timeout' | 'httpAgent' | 'fetchOptions' | 'signal' | 'idempotencyKey' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
20
|
+
} | null | undefined)) | null | undefined, options?: RequestOptions): PagePromise<CertificateListResponsesPage, CertificateListResponse>;
|
|
21
|
+
list(projectID: string, options?: {
|
|
22
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
23
|
+
} & {
|
|
24
|
+
[K in 'method' | 'path' | 'body' | 'stream' | 'httpAgent' | 'fetchOptions' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
25
|
+
}): PagePromise<CertificateListResponsesPage, CertificateListResponse>;
|
|
19
26
|
/**
|
|
20
27
|
* Activate certificates at the project level.
|
|
21
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificates.d.mts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,IAAI,EACJ,WAAW,EACZ,wCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,iDAA6C;
|
|
1
|
+
{"version":3,"file":"certificates.d.mts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,IAAI,EACJ,WAAW,EACZ,wCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,iDAA6C;AA8GtE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EACF,CAAC,qBAAqB,GACpB,CACI;SAEI,CAAC,IACG,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,SAAS,GACT,WAAW,GACX,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,uBAAuB,CAC5B,CAAC,EAAE,KAAK;KACV,GACD,IAAI,GACJ,SAAS,CACZ,CAAC,GACJ,IAAI,GACJ,SAAS,EACb,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,uBAAuB,CAAC;IACrE,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;SACP,CAAC,IAAI,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,OAAO,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC;KACxG,GAAG;SAEA,CAAC,IACG,QAAQ,GACR,MAAM,GACN,MAAM,GACN,QAAQ,GACR,W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,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -15,7 +15,14 @@ export declare class Certificates extends APIResource {
|
|
|
15
15
|
* }
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
list(projectID: string, query?: CertificateListParams
|
|
18
|
+
list(projectID: string, query?: (CertificateListParams & ({
|
|
19
|
+
[K in 'method' | 'path' | 'query' | 'body' | 'headers' | 'maxRetries' | 'stream' | 'timeout' | 'httpAgent' | 'fetchOptions' | 'signal' | 'idempotencyKey' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
20
|
+
} | null | undefined)) | null | undefined, options?: RequestOptions): PagePromise<CertificateListResponsesPage, CertificateListResponse>;
|
|
21
|
+
list(projectID: string, options?: {
|
|
22
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
23
|
+
} & {
|
|
24
|
+
[K in 'method' | 'path' | 'body' | 'stream' | 'httpAgent' | 'fetchOptions' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
25
|
+
}): PagePromise<CertificateListResponsesPage, CertificateListResponse>;
|
|
19
26
|
/**
|
|
20
27
|
* Activate certificates at the project level.
|
|
21
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificates.d.ts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,IAAI,EACJ,WAAW,EACZ,uCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,gDAA6C;
|
|
1
|
+
{"version":3,"file":"certificates.d.ts","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EACL,sBAAsB,EACtB,KAAK,4BAA4B,EACjC,IAAI,EACJ,WAAW,EACZ,uCAAoC;AACrC,OAAO,EAAE,cAAc,EAAE,gDAA6C;AA8GtE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EACF,CAAC,qBAAqB,GACpB,CACI;SAEI,CAAC,IACG,QAAQ,GACR,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,SAAS,GACT,WAAW,GACX,cAAc,GACd,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,uBAAuB,CAC5B,CAAC,EAAE,KAAK;KACV,GACD,IAAI,GACJ,SAAS,CACZ,CAAC,GACJ,IAAI,GACJ,SAAS,EACb,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,4BAA4B,EAAE,uBAAuB,CAAC;IACrE,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;SACP,CAAC,IAAI,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,OAAO,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,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W,2BAA2B;IAC1C,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -5,21 +5,66 @@ exports.Certificates = void 0;
|
|
|
5
5
|
const resource_1 = require("../../../../core/resource.js");
|
|
6
6
|
const pagination_1 = require("../../../../core/pagination.js");
|
|
7
7
|
const path_1 = require("../../../../internal/utils/path.js");
|
|
8
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
9
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
10
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
11
|
+
'method',
|
|
12
|
+
'path',
|
|
13
|
+
'query',
|
|
14
|
+
'body',
|
|
15
|
+
'headers',
|
|
16
|
+
'maxRetries',
|
|
17
|
+
'stream',
|
|
18
|
+
'timeout',
|
|
19
|
+
'httpAgent',
|
|
20
|
+
'fetchOptions',
|
|
21
|
+
'signal',
|
|
22
|
+
'idempotencyKey',
|
|
23
|
+
'defaultBaseURL',
|
|
24
|
+
'__metadata',
|
|
25
|
+
'__binaryRequest',
|
|
26
|
+
'__binaryResponse',
|
|
27
|
+
'__streamClass',
|
|
28
|
+
'__security',
|
|
29
|
+
'__synthesizeEventData',
|
|
30
|
+
]);
|
|
31
|
+
function normalizeRequestOptionsForQuery(value, queryKeys, options) {
|
|
32
|
+
if (typeof value !== 'object' || value === null)
|
|
33
|
+
return undefined;
|
|
34
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
35
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
36
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined));
|
|
37
|
+
const keys = entries.map(([key]) => key);
|
|
38
|
+
const requestOnly = keys.some((key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key));
|
|
39
|
+
if (!requestOnly)
|
|
40
|
+
return undefined;
|
|
41
|
+
// Declared query fields, including stream, must use the query argument.
|
|
42
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
43
|
+
if (options !== undefined ||
|
|
44
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))) {
|
|
45
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
46
|
+
}
|
|
47
|
+
// The query position must not gain authority to change the request destination
|
|
48
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
49
|
+
if (keys.some((key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key))) {
|
|
50
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
51
|
+
}
|
|
52
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
53
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
54
|
+
return Object.fromEntries(entries.map(([key, descriptor]) => {
|
|
55
|
+
if ('value' in descriptor)
|
|
56
|
+
return [key, descriptor.value];
|
|
57
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
8
60
|
class Certificates extends resource_1.APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* List certificates for this project.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* // Automatically fetches more pages as needed.
|
|
15
|
-
* for await (const certificateListResponse of client.admin.organization.projects.certificates.list(
|
|
16
|
-
* 'project_id',
|
|
17
|
-
* )) {
|
|
18
|
-
* // ...
|
|
19
|
-
* }
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
61
|
list(projectID, query = {}, options) {
|
|
62
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(query, ['after', 'limit', 'order'], options);
|
|
63
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
64
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
65
|
+
query = {};
|
|
66
|
+
}
|
|
67
|
+
query = query;
|
|
23
68
|
return this._client.getAPIList((0, path_1.path) `/organization/projects/${projectID}/certificates`, (pagination_1.ConversationCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
24
69
|
}
|
|
25
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificates.js","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":";AAAA,qFAAqF;;;AAErF,2DAAwD;AACxD,+DAKqC;AAErC,6DAAuD;AAEvD,MAAa,YAAa,SAAQ,sBAAW;
|
|
1
|
+
{"version":3,"file":"certificates.js","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":";AAAA,qFAAqF;;;AAErF,2DAAwD;AACxD,+DAKqC;AAErC,6DAAuD;AAEvD,6EAA6E;AAC7E,6EAA6E;AAC7E,MAAM,mCAAmC,GAAG,IAAI,GAAG,CAAC;IAClD,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,WAAW;IACX,cAAc;IACd,QAAQ;IACR,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,uBAAuB;CACxB,CAAC,CAAC;AAEH,SAAS,+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B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,0BAA0B,SAAS,wBAAwB,EAC/D,CAAA,iBAAiC,CAAA,EACjC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAC5E,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAU,CACR,SAAiB,EACjB,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,0BAA0B,SAAS,0BAA0B,EACjE,CAAA,iBAAmC,CAAA,EACnC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAC5E,CAAC;IACJ,CAAC;CACF;AA9KD,oCA8KC"}
|
|
@@ -2,21 +2,66 @@
|
|
|
2
2
|
import { APIResource } from "../../../../core/resource.mjs";
|
|
3
3
|
import { ConversationCursorPage, Page, } from "../../../../core/pagination.mjs";
|
|
4
4
|
import { path } from "../../../../internal/utils/path.mjs";
|
|
5
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
6
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
7
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
8
|
+
'method',
|
|
9
|
+
'path',
|
|
10
|
+
'query',
|
|
11
|
+
'body',
|
|
12
|
+
'headers',
|
|
13
|
+
'maxRetries',
|
|
14
|
+
'stream',
|
|
15
|
+
'timeout',
|
|
16
|
+
'httpAgent',
|
|
17
|
+
'fetchOptions',
|
|
18
|
+
'signal',
|
|
19
|
+
'idempotencyKey',
|
|
20
|
+
'defaultBaseURL',
|
|
21
|
+
'__metadata',
|
|
22
|
+
'__binaryRequest',
|
|
23
|
+
'__binaryResponse',
|
|
24
|
+
'__streamClass',
|
|
25
|
+
'__security',
|
|
26
|
+
'__synthesizeEventData',
|
|
27
|
+
]);
|
|
28
|
+
function normalizeRequestOptionsForQuery(value, queryKeys, options) {
|
|
29
|
+
if (typeof value !== 'object' || value === null)
|
|
30
|
+
return undefined;
|
|
31
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
32
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
33
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined));
|
|
34
|
+
const keys = entries.map(([key]) => key);
|
|
35
|
+
const requestOnly = keys.some((key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key));
|
|
36
|
+
if (!requestOnly)
|
|
37
|
+
return undefined;
|
|
38
|
+
// Declared query fields, including stream, must use the query argument.
|
|
39
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
40
|
+
if (options !== undefined ||
|
|
41
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))) {
|
|
42
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
43
|
+
}
|
|
44
|
+
// The query position must not gain authority to change the request destination
|
|
45
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
46
|
+
if (keys.some((key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key))) {
|
|
47
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
48
|
+
}
|
|
49
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
50
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
51
|
+
return Object.fromEntries(entries.map(([key, descriptor]) => {
|
|
52
|
+
if ('value' in descriptor)
|
|
53
|
+
return [key, descriptor.value];
|
|
54
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
5
57
|
export class Certificates extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* List certificates for this project.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* // Automatically fetches more pages as needed.
|
|
12
|
-
* for await (const certificateListResponse of client.admin.organization.projects.certificates.list(
|
|
13
|
-
* 'project_id',
|
|
14
|
-
* )) {
|
|
15
|
-
* // ...
|
|
16
|
-
* }
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
58
|
list(projectID, query = {}, options) {
|
|
59
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(query, ['after', 'limit', 'order'], options);
|
|
60
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
61
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
62
|
+
query = {};
|
|
63
|
+
}
|
|
64
|
+
query = query;
|
|
20
65
|
return this._client.getAPIList(path `/organization/projects/${projectID}/certificates`, (ConversationCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
21
66
|
}
|
|
22
67
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificates.mjs","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,EACL,sBAAsB,EAEtB,IAAI,GAEL,wCAAoC;AAErC,OAAO,EAAE,IAAI,EAAE,4CAAwC;AAEvD,MAAM,OAAO,YAAa,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"file":"certificates.mjs","sourceRoot":"","sources":["../../../../src/resources/admin/organization/projects/certificates.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,EACL,sBAAsB,EAEtB,IAAI,GAEL,wCAAoC;AAErC,OAAO,EAAE,IAAI,EAAE,4CAAwC;AAEvD,6EAA6E;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,KAAK,GAAG,KAAiD,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,0BAA0B,SAAS,eAAe,EACtD,CAAA,sBAA+C,CAAA,EAC/C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAC7D,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CACN,SAAiB,EACjB,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,0BAA0B,SAAS,wBAAwB,EAC/D,CAAA,IAAiC,CAAA,EACjC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAC5E,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,UAAU,CACR,SAAiB,EACjB,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,0BAA0B,SAAS,0BAA0B,EACjE,CAAA,IAAmC,CAAA,EACnC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAC5E,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -45,7 +45,14 @@ export declare class Groups extends APIResource {
|
|
|
45
45
|
* }
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
list(projectID: string, query?: GroupListParams
|
|
48
|
+
list(projectID: string, query?: (GroupListParams & ({
|
|
49
|
+
[K in 'method' | 'path' | 'query' | 'body' | 'headers' | 'maxRetries' | 'stream' | 'timeout' | 'httpAgent' | 'fetchOptions' | 'signal' | 'idempotencyKey' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
50
|
+
} | null | undefined)) | null | undefined, options?: RequestOptions): PagePromise<ProjectGroupsPage, ProjectGroup>;
|
|
51
|
+
list(projectID: string, options?: {
|
|
52
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
53
|
+
} & {
|
|
54
|
+
[K in 'method' | 'path' | 'body' | 'stream' | 'httpAgent' | 'fetchOptions' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
55
|
+
}): PagePromise<ProjectGroupsPage, ProjectGroup>;
|
|
49
56
|
/**
|
|
50
57
|
* Revokes a group's access to a project.
|
|
51
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.mts","sourceRoot":"","sources":["../../../../../src/resources/admin/organization/projects/groups/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,yCAAqC;AAC3D,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,EACN,oBAAgB;AACjB,OAAO,EAAE,UAAU,EAAE,4CAAwC;AAC7D,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,2CAAuC;AACxG,OAAO,EAAE,cAAc,EAAE,oDAAgD;
|
|
1
|
+
{"version":3,"file":"groups.d.mts","sourceRoot":"","sources":["../../../../../src/resources/admin/organization/projects/groups/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,yCAAqC;AAC3D,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EA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AE,OAAO,GAAG,cAAc,CAAC;CACvC;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -45,7 +45,14 @@ export declare class Groups extends APIResource {
|
|
|
45
45
|
* }
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
|
-
list(projectID: string, query?: GroupListParams
|
|
48
|
+
list(projectID: string, query?: (GroupListParams & ({
|
|
49
|
+
[K in 'method' | 'path' | 'query' | 'body' | 'headers' | 'maxRetries' | 'stream' | 'timeout' | 'httpAgent' | 'fetchOptions' | 'signal' | 'idempotencyKey' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
50
|
+
} | null | undefined)) | null | undefined, options?: RequestOptions): PagePromise<ProjectGroupsPage, ProjectGroup>;
|
|
51
|
+
list(projectID: string, options?: {
|
|
52
|
+
[K in 'headers' | 'maxRetries' | 'timeout' | 'signal' | 'idempotencyKey' | 'query']?: RequestOptions[K];
|
|
53
|
+
} & {
|
|
54
|
+
[K in 'method' | 'path' | 'body' | 'stream' | 'httpAgent' | 'fetchOptions' | 'defaultBaseURL' | '__metadata' | '__binaryRequest' | '__binaryResponse' | '__streamClass' | '__security' | '__synthesizeEventData']?: never;
|
|
55
|
+
}): PagePromise<ProjectGroupsPage, ProjectGroup>;
|
|
49
56
|
/**
|
|
50
57
|
* Revokes a group's access to a project.
|
|
51
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../../src/resources/admin/organization/projects/groups/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,wCAAqC;AAC3D,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,EACN,mBAAgB;AACjB,OAAO,EAAE,UAAU,EAAE,2CAAwC;AAC7D,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,0CAAuC;AACxG,OAAO,EAAE,cAAc,EAAE,mDAAgD;
|
|
1
|
+
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../../src/resources/admin/organization/projects/groups/groups.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,wCAAqC;AAC3D,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd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CACvC;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -8,6 +8,58 @@ const RolesAPI = tslib_1.__importStar(require("./roles.js"));
|
|
|
8
8
|
const roles_1 = require("./roles.js");
|
|
9
9
|
const pagination_1 = require("../../../../../core/pagination.js");
|
|
10
10
|
const path_1 = require("../../../../../internal/utils/path.js");
|
|
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
|
+
function normalizeRequestOptionsForQuery(value, queryKeys, options) {
|
|
35
|
+
if (typeof value !== 'object' || value === null)
|
|
36
|
+
return undefined;
|
|
37
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
38
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
39
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined));
|
|
40
|
+
const keys = entries.map(([key]) => key);
|
|
41
|
+
const requestOnly = keys.some((key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key));
|
|
42
|
+
if (!requestOnly)
|
|
43
|
+
return undefined;
|
|
44
|
+
// Declared query fields, including stream, must use the query argument.
|
|
45
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
46
|
+
if (options !== undefined ||
|
|
47
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))) {
|
|
48
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
49
|
+
}
|
|
50
|
+
// The query position must not gain authority to change the request destination
|
|
51
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
52
|
+
if (keys.some((key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key))) {
|
|
53
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
54
|
+
}
|
|
55
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
56
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
57
|
+
return Object.fromEntries(entries.map(([key, descriptor]) => {
|
|
58
|
+
if ('value' in descriptor)
|
|
59
|
+
return [key, descriptor.value];
|
|
60
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
11
63
|
class Groups extends resource_1.APIResource {
|
|
12
64
|
constructor() {
|
|
13
65
|
super(...arguments);
|
|
@@ -52,20 +104,13 @@ class Groups extends resource_1.APIResource {
|
|
|
52
104
|
__security: { adminAPIKeyAuth: true },
|
|
53
105
|
});
|
|
54
106
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Lists the groups that have access to a project.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* // Automatically fetches more pages as needed.
|
|
61
|
-
* for await (const projectGroup of client.admin.organization.projects.groups.list(
|
|
62
|
-
* 'project_id',
|
|
63
|
-
* )) {
|
|
64
|
-
* // ...
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
107
|
list(projectID, query = {}, options) {
|
|
108
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(query, ['after', 'limit', 'order'], options);
|
|
109
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
110
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
111
|
+
query = {};
|
|
112
|
+
}
|
|
113
|
+
query = query;
|
|
69
114
|
return this._client.getAPIList((0, path_1.path) `/organization/projects/${projectID}/groups`, (pagination_1.NextCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
70
115
|
}
|
|
71
116
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../../src/resources/admin/organization/projects/groups/groups.ts"],"names":[],"mappings":";AAAA,qFAAqF;;;;AAErF,8DAA2D;AAC3D,6DAAoC;AACpC,sCAWiB;AAEjB,kEAAwG;AAExG,gEAA0D;AAE1D,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"groups.js","sourceRoot":"","sources":["../../../../../src/resources/admin/organization/projects/groups/groups.ts"],"names":[],"mappings":";AAAA,qFAAqF;;;;AAErF,8DAA2D;AAC3D,6DAAoC;AACpC,sCAWiB;AAEjB,kEAAwG;AAExG,gEAA0D;AAE1D,6EAA6E;AAC7E,6EAA6E;AAC7E,MAAM,mCAAmC,GAAG,IAAI,GAAG,CAAC;IAClD,QAAQ;IACR,MAAM;IACN,OAAO;IACP,MAAM;IACN,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,WAAW;IACX,cAAc;IACd,QAAQ;IACR,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,YAAY;IACZ,uBAAuB;CACxB,CAAC,CAAC;AAEH,SAAS,+BAA+B,CACtC,KAAc,EACd,SAAgC,EAChC,OAAmC;IAuBnC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAClE,2EAA2E;IAC3E,6EAA6E;IAC7E,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAC5E,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,UAAU,CAAC,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS,CAAC,CAC1G,CAAC;IACF,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,G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SAAS,EAChD,CAAA,2BAA4B,CAAA,EAC5B,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,EAAE,CAC7D,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,OAAe,EACf,MAAyB,EACzB,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,0BAA0B,UAAU,WAAW,OAAO,EAAE,EAAE;YACvF,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;CACF;AA1LD,wBA0LC;AA4FD,MAAM,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -4,6 +4,58 @@ import * as RolesAPI from "./roles.mjs";
|
|
|
4
4
|
import { Roles, } from "./roles.mjs";
|
|
5
5
|
import { NextCursorPage } from "../../../../../core/pagination.mjs";
|
|
6
6
|
import { path } from "../../../../../internal/utils/path.mjs";
|
|
7
|
+
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
8
|
+
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
9
|
+
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
10
|
+
'method',
|
|
11
|
+
'path',
|
|
12
|
+
'query',
|
|
13
|
+
'body',
|
|
14
|
+
'headers',
|
|
15
|
+
'maxRetries',
|
|
16
|
+
'stream',
|
|
17
|
+
'timeout',
|
|
18
|
+
'httpAgent',
|
|
19
|
+
'fetchOptions',
|
|
20
|
+
'signal',
|
|
21
|
+
'idempotencyKey',
|
|
22
|
+
'defaultBaseURL',
|
|
23
|
+
'__metadata',
|
|
24
|
+
'__binaryRequest',
|
|
25
|
+
'__binaryResponse',
|
|
26
|
+
'__streamClass',
|
|
27
|
+
'__security',
|
|
28
|
+
'__synthesizeEventData',
|
|
29
|
+
]);
|
|
30
|
+
function normalizeRequestOptionsForQuery(value, queryKeys, options) {
|
|
31
|
+
if (typeof value !== 'object' || value === null)
|
|
32
|
+
return undefined;
|
|
33
|
+
// Optional never fields can still be explicitly undefined unless consumers
|
|
34
|
+
// enable exactOptionalPropertyTypes. Snapshot data without invoking getters.
|
|
35
|
+
const entries = Object.entries(Object.getOwnPropertyDescriptors(value)).filter(([, descriptor]) => descriptor.enumerable && (!('value' in descriptor) || descriptor.value !== undefined));
|
|
36
|
+
const keys = entries.map(([key]) => key);
|
|
37
|
+
const requestOnly = keys.some((key) => normalizeRequestOptionsForQueryKeys.has(key) && !queryKeys.includes(key));
|
|
38
|
+
if (!requestOnly)
|
|
39
|
+
return undefined;
|
|
40
|
+
// Declared query fields, including stream, must use the query argument.
|
|
41
|
+
// Mixing them with request-only options is ambiguous and could change the return type.
|
|
42
|
+
if (options !== undefined ||
|
|
43
|
+
keys.some((key) => !normalizeRequestOptionsForQueryKeys.has(key) || queryKeys.includes(key))) {
|
|
44
|
+
throw new TypeError('Query parameters and request options must be passed as separate arguments.');
|
|
45
|
+
}
|
|
46
|
+
// The query position must not gain authority to change the request destination
|
|
47
|
+
// or transport. Those overrides require the explicit request options argument.
|
|
48
|
+
if (keys.some((key) => !['headers', 'maxRetries', 'timeout', 'signal', 'idempotencyKey', 'query'].includes(key))) {
|
|
49
|
+
throw new TypeError('Pass transport overrides in the explicit request options argument.');
|
|
50
|
+
}
|
|
51
|
+
// Copy only the validated fields. Spreading value would reintroduce undefined
|
|
52
|
+
// transport overrides, and deleting them would mutate the caller's object.
|
|
53
|
+
return Object.fromEntries(entries.map(([key, descriptor]) => {
|
|
54
|
+
if ('value' in descriptor)
|
|
55
|
+
return [key, descriptor.value];
|
|
56
|
+
return [key, descriptor.get ? Reflect.apply(descriptor.get, value, []) : undefined];
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
7
59
|
export class Groups extends APIResource {
|
|
8
60
|
constructor() {
|
|
9
61
|
super(...arguments);
|
|
@@ -48,20 +100,13 @@ export class Groups extends APIResource {
|
|
|
48
100
|
__security: { adminAPIKeyAuth: true },
|
|
49
101
|
});
|
|
50
102
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Lists the groups that have access to a project.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* // Automatically fetches more pages as needed.
|
|
57
|
-
* for await (const projectGroup of client.admin.organization.projects.groups.list(
|
|
58
|
-
* 'project_id',
|
|
59
|
-
* )) {
|
|
60
|
-
* // ...
|
|
61
|
-
* }
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
103
|
list(projectID, query = {}, options) {
|
|
104
|
+
const normalizeRequestOptionsForQueryOptions = normalizeRequestOptionsForQuery(query, ['after', 'limit', 'order'], options);
|
|
105
|
+
if (normalizeRequestOptionsForQueryOptions !== undefined) {
|
|
106
|
+
options = normalizeRequestOptionsForQueryOptions;
|
|
107
|
+
query = {};
|
|
108
|
+
}
|
|
109
|
+
query = query;
|
|
65
110
|
return this._client.getAPIList(path `/organization/projects/${projectID}/groups`, (NextCursorPage), { query, ...options, __security: { adminAPIKeyAuth: true } });
|
|
66
111
|
}
|
|
67
112
|
/**
|