levelfour 1.7.0 → 1.9.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/dist/api/resources/accounts/client/Client.d.mts +34 -0
- package/dist/api/resources/accounts/client/Client.d.ts +34 -0
- package/dist/api/resources/accounts/client/Client.js +204 -0
- package/dist/api/resources/accounts/client/Client.mjs +204 -0
- package/dist/api/resources/anthropic/client/Client.d.mts +150 -7
- package/dist/api/resources/anthropic/client/Client.d.ts +150 -7
- package/dist/api/resources/anthropic/client/Client.js +761 -85
- package/dist/api/resources/anthropic/client/Client.mjs +761 -85
- package/dist/api/resources/anthropic/client/requests/GetActivityBreakdownApiV1ProvidersAnthropicActivityBreakdownGetRequest.d.mts +19 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityBreakdownApiV1ProvidersAnthropicActivityBreakdownGetRequest.d.ts +19 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityBreakdownApiV1ProvidersAnthropicActivityBreakdownGetRequest.js +17 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityBreakdownApiV1ProvidersAnthropicActivityBreakdownGetRequest.mjs +1 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityFailuresApiV1ProvidersAnthropicActivityFailuresGetRequest.d.mts +13 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityFailuresApiV1ProvidersAnthropicActivityFailuresGetRequest.d.ts +13 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityFailuresApiV1ProvidersAnthropicActivityFailuresGetRequest.js +17 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityFailuresApiV1ProvidersAnthropicActivityFailuresGetRequest.mjs +1 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityMcpApiV1ProvidersAnthropicActivityMcpGetRequest.d.mts +13 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityMcpApiV1ProvidersAnthropicActivityMcpGetRequest.d.ts +13 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityMcpApiV1ProvidersAnthropicActivityMcpGetRequest.js +17 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityMcpApiV1ProvidersAnthropicActivityMcpGetRequest.mjs +1 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityPermissionModesApiV1ProvidersAnthropicActivityPermissionModesGetRequest.d.mts +13 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityPermissionModesApiV1ProvidersAnthropicActivityPermissionModesGetRequest.d.ts +13 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityPermissionModesApiV1ProvidersAnthropicActivityPermissionModesGetRequest.js +17 -0
- package/dist/api/resources/anthropic/client/requests/GetActivityPermissionModesApiV1ProvidersAnthropicActivityPermissionModesGetRequest.mjs +1 -0
- package/dist/api/resources/anthropic/client/requests/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequest.d.mts +2 -0
- package/dist/api/resources/anthropic/client/requests/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequest.d.ts +2 -0
- package/dist/api/resources/anthropic/client/requests/GetUsageDistributionApiV1ProvidersAnthropicUsageDistributionGetRequest.d.mts +3 -0
- package/dist/api/resources/anthropic/client/requests/GetUsageDistributionApiV1ProvidersAnthropicUsageDistributionGetRequest.d.ts +3 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionApiV1ProvidersAnthropicUsagePeoplePersonSessionsSessionGetRequest.d.mts +11 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionApiV1ProvidersAnthropicUsagePeoplePersonSessionsSessionGetRequest.d.ts +11 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionApiV1ProvidersAnthropicUsagePeoplePersonSessionsSessionGetRequest.js +17 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonSessionApiV1ProvidersAnthropicUsagePeoplePersonSessionsSessionGetRequest.mjs +1 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonToolsApiV1ProvidersAnthropicUsagePeoplePersonToolsGetRequest.d.mts +15 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonToolsApiV1ProvidersAnthropicUsagePeoplePersonToolsGetRequest.d.ts +15 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonToolsApiV1ProvidersAnthropicUsagePeoplePersonToolsGetRequest.js +17 -0
- package/dist/api/resources/anthropic/client/requests/GetUsagePersonToolsApiV1ProvidersAnthropicUsagePeoplePersonToolsGetRequest.mjs +1 -0
- package/dist/api/resources/anthropic/client/requests/index.d.mts +6 -0
- package/dist/api/resources/anthropic/client/requests/index.d.ts +6 -0
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.d.mts +1 -0
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.d.ts +1 -0
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.js +2 -1
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestSort.mjs +2 -1
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestState.d.mts +10 -0
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestState.d.ts +10 -0
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestState.js +37 -0
- package/dist/api/resources/anthropic/types/GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequestState.mjs +13 -0
- package/dist/api/resources/anthropic/types/GetUsageDistributionApiV1ProvidersAnthropicUsageDistributionGetRequestBasis.d.mts +6 -0
- package/dist/api/resources/anthropic/types/GetUsageDistributionApiV1ProvidersAnthropicUsageDistributionGetRequestBasis.d.ts +6 -0
- package/dist/api/resources/anthropic/types/GetUsageDistributionApiV1ProvidersAnthropicUsageDistributionGetRequestBasis.js +32 -0
- package/dist/api/resources/anthropic/types/GetUsageDistributionApiV1ProvidersAnthropicUsageDistributionGetRequestBasis.mjs +8 -0
- package/dist/api/resources/anthropic/types/index.d.mts +2 -0
- package/dist/api/resources/anthropic/types/index.d.ts +2 -0
- package/dist/api/resources/anthropic/types/index.js +5 -1
- package/dist/api/resources/anthropic/types/index.mjs +2 -0
- package/dist/api/types/AiBreakdownData.d.mts +28 -0
- package/dist/api/types/AiBreakdownData.d.ts +28 -0
- package/dist/api/types/AiBreakdownData.js +44 -0
- package/dist/api/types/AiBreakdownData.mjs +20 -0
- package/dist/api/types/AiBreakdownDay.d.mts +5 -0
- package/dist/api/types/AiBreakdownDay.d.ts +5 -0
- package/dist/api/types/{AnthropicUsageMeasures.js → AiBreakdownDay.js} +3 -3
- package/dist/api/types/AiBreakdownDay.mjs +1 -0
- package/dist/api/types/AiBreakdownItem.d.mts +12 -0
- package/dist/api/types/AiBreakdownItem.d.ts +12 -0
- package/dist/api/types/AiBreakdownItem.js +17 -0
- package/dist/api/types/AiBreakdownItem.mjs +1 -0
- package/dist/api/types/AiBreakdownResponse.d.mts +6 -0
- package/dist/api/types/AiBreakdownResponse.d.ts +6 -0
- package/dist/api/types/AiBreakdownResponse.js +17 -0
- package/dist/api/types/AiBreakdownResponse.mjs +1 -0
- package/dist/api/types/AiFailureKind.d.mts +14 -0
- package/dist/api/types/AiFailureKind.d.ts +14 -0
- package/dist/api/types/AiFailureKind.js +38 -0
- package/dist/api/types/AiFailureKind.mjs +14 -0
- package/dist/api/types/AiFailuresData.d.mts +9 -0
- package/dist/api/types/AiFailuresData.d.ts +9 -0
- package/dist/api/types/AiFailuresData.js +17 -0
- package/dist/api/types/AiFailuresData.mjs +1 -0
- package/dist/api/types/AiFailuresResponse.d.mts +6 -0
- package/dist/api/types/AiFailuresResponse.d.ts +6 -0
- package/dist/api/types/AiFailuresResponse.js +17 -0
- package/dist/api/types/AiFailuresResponse.mjs +1 -0
- package/dist/api/types/AiMcpConnections.d.mts +8 -0
- package/dist/api/types/AiMcpConnections.d.ts +8 -0
- package/dist/api/types/AiMcpConnections.js +17 -0
- package/dist/api/types/AiMcpConnections.mjs +1 -0
- package/dist/api/types/AiMcpServer.d.mts +12 -0
- package/dist/api/types/AiMcpServer.d.ts +12 -0
- package/dist/api/types/AiMcpServer.js +17 -0
- package/dist/api/types/AiMcpServer.mjs +1 -0
- package/dist/api/types/AiMcpServersData.d.mts +5 -0
- package/dist/api/types/AiMcpServersData.d.ts +5 -0
- package/dist/api/types/AiMcpServersData.js +17 -0
- package/dist/api/types/AiMcpServersData.mjs +1 -0
- package/dist/api/types/AiMcpServersResponse.d.mts +6 -0
- package/dist/api/types/AiMcpServersResponse.d.ts +6 -0
- package/dist/api/types/AiMcpServersResponse.js +17 -0
- package/dist/api/types/AiMcpServersResponse.mjs +1 -0
- package/dist/api/types/AiPermissionMode.d.mts +5 -0
- package/dist/api/types/AiPermissionMode.d.ts +5 -0
- package/dist/api/types/AiPermissionMode.js +17 -0
- package/dist/api/types/AiPermissionMode.mjs +1 -0
- package/dist/api/types/AiPermissionModesData.d.mts +5 -0
- package/dist/api/types/AiPermissionModesData.d.ts +5 -0
- package/dist/api/types/AiPermissionModesData.js +17 -0
- package/dist/api/types/AiPermissionModesData.mjs +1 -0
- package/dist/api/types/AiPermissionModesResponse.d.mts +6 -0
- package/dist/api/types/AiPermissionModesResponse.d.ts +6 -0
- package/dist/api/types/AiPermissionModesResponse.js +17 -0
- package/dist/api/types/AiPermissionModesResponse.mjs +1 -0
- package/dist/api/types/AiPersonData.d.mts +20 -0
- package/dist/api/types/AiPersonData.d.ts +20 -0
- package/dist/api/types/AiPersonData.js +5 -0
- package/dist/api/types/AiPersonData.mjs +5 -0
- package/dist/api/types/AiPersonFailing.d.mts +17 -0
- package/dist/api/types/AiPersonFailing.d.ts +17 -0
- package/dist/api/types/AiPersonFailing.js +38 -0
- package/dist/api/types/AiPersonFailing.mjs +14 -0
- package/dist/api/types/AiPersonFailures.d.mts +17 -0
- package/dist/api/types/AiPersonFailures.d.ts +17 -0
- package/dist/api/types/AiPersonFailures.js +38 -0
- package/dist/api/types/AiPersonFailures.mjs +14 -0
- package/dist/api/types/AiPersonModel.d.mts +9 -0
- package/dist/api/types/AiPersonModel.d.ts +9 -0
- package/dist/api/types/AiPersonModel.js +17 -0
- package/dist/api/types/AiPersonModel.mjs +1 -0
- package/dist/api/types/AiPersonToolUse.d.mts +10 -0
- package/dist/api/types/AiPersonToolUse.d.ts +10 -0
- package/dist/api/types/AiPersonToolUse.js +17 -0
- package/dist/api/types/AiPersonToolUse.mjs +1 -0
- package/dist/api/types/AiPersonToolsData.d.mts +7 -0
- package/dist/api/types/AiPersonToolsData.d.ts +7 -0
- package/dist/api/types/AiPersonToolsData.js +17 -0
- package/dist/api/types/AiPersonToolsData.mjs +1 -0
- package/dist/api/types/AiPersonToolsResponse.d.mts +6 -0
- package/dist/api/types/AiPersonToolsResponse.d.ts +6 -0
- package/dist/api/types/AiPersonToolsResponse.js +17 -0
- package/dist/api/types/AiPersonToolsResponse.mjs +1 -0
- package/dist/api/types/AiSession.d.mts +23 -2
- package/dist/api/types/AiSession.d.ts +23 -2
- package/dist/api/types/AiSession.js +20 -0
- package/dist/api/types/AiSession.mjs +12 -0
- package/dist/api/types/AiSessionBucket.d.mts +8 -0
- package/dist/api/types/AiSessionBucket.d.ts +8 -0
- package/dist/api/types/AiSessionBucket.js +17 -0
- package/dist/api/types/AiSessionBucket.mjs +1 -0
- package/dist/api/types/AiSessionDetail.d.mts +45 -0
- package/dist/api/types/AiSessionDetail.d.ts +45 -0
- package/dist/api/types/AiSessionDetail.js +37 -0
- package/dist/api/types/AiSessionDetail.mjs +13 -0
- package/dist/api/types/AiSessionDetailResponse.d.mts +6 -0
- package/dist/api/types/AiSessionDetailResponse.d.ts +6 -0
- package/dist/api/types/AiSessionDetailResponse.js +17 -0
- package/dist/api/types/AiSessionDetailResponse.mjs +1 -0
- package/dist/api/types/AiSessionFailing.d.mts +28 -0
- package/dist/api/types/AiSessionFailing.d.ts +28 -0
- package/dist/api/types/AiSessionFailing.js +44 -0
- package/dist/api/types/AiSessionFailing.mjs +20 -0
- package/dist/api/types/AiSessionTool.d.mts +8 -0
- package/dist/api/types/AiSessionTool.d.ts +8 -0
- package/dist/api/types/AiSessionTool.js +17 -0
- package/dist/api/types/AiSessionTool.mjs +1 -0
- package/dist/api/types/AiTokensByType.d.mts +9 -0
- package/dist/api/types/AiTokensByType.d.ts +9 -0
- package/dist/api/types/AiTokensByType.js +17 -0
- package/dist/api/types/AiTokensByType.mjs +1 -0
- package/dist/api/types/AnthropicActivityData.d.mts +2 -0
- package/dist/api/types/AnthropicActivityData.d.ts +2 -0
- package/dist/api/types/AnthropicOverallResponseTimes.d.mts +10 -0
- package/dist/api/types/AnthropicOverallResponseTimes.d.ts +10 -0
- package/dist/api/types/AnthropicOverallResponseTimes.js +17 -0
- package/dist/api/types/AnthropicOverallResponseTimes.mjs +1 -0
- package/dist/api/types/AnthropicUsageBand.d.mts +8 -4
- package/dist/api/types/AnthropicUsageBand.d.ts +8 -4
- package/dist/api/types/AnthropicUsageData.d.mts +1 -1
- package/dist/api/types/AnthropicUsageData.d.ts +1 -1
- package/dist/api/types/AnthropicUsageDistributionData.d.mts +1 -1
- package/dist/api/types/AnthropicUsageDistributionData.d.ts +1 -1
- package/dist/api/types/AnthropicUsageTotals.d.mts +15 -0
- package/dist/api/types/AnthropicUsageTotals.d.ts +15 -0
- package/dist/api/types/AnthropicUsageTotals.js +17 -0
- package/dist/api/types/AnthropicUsageTotals.mjs +1 -0
- package/dist/api/types/AzureSubscriptionItem.d.mts +2 -0
- package/dist/api/types/AzureSubscriptionItem.d.ts +2 -0
- package/dist/api/types/BlockerTotals.d.mts +12 -0
- package/dist/api/types/BlockerTotals.d.ts +12 -0
- package/dist/api/types/BreakdownAsked.d.mts +36 -0
- package/dist/api/types/BreakdownAsked.d.ts +36 -0
- package/dist/api/types/BreakdownAsked.js +48 -0
- package/dist/api/types/BreakdownAsked.mjs +24 -0
- package/dist/api/types/ClaudeTeamAdoption.d.mts +11 -0
- package/dist/api/types/ClaudeTeamAdoption.d.ts +11 -0
- package/dist/api/types/ClaudeTeamAdoption.js +17 -0
- package/dist/api/types/ClaudeTeamAdoption.mjs +1 -0
- package/dist/api/types/ClaudeTeamAdoptionDay.d.mts +9 -0
- package/dist/api/types/ClaudeTeamAdoptionDay.d.ts +9 -0
- package/dist/api/types/ClaudeTeamAdoptionDay.js +17 -0
- package/dist/api/types/ClaudeTeamAdoptionDay.mjs +1 -0
- package/dist/api/types/ClaudeTeamPeopleData.d.mts +4 -0
- package/dist/api/types/ClaudeTeamPeopleData.d.ts +4 -0
- package/dist/api/types/ClaudeTeamPerson.d.mts +31 -0
- package/dist/api/types/ClaudeTeamPerson.d.ts +31 -0
- package/dist/api/types/ClaudeTeamPerson.js +17 -0
- package/dist/api/types/ClaudeTeamPerson.mjs +17 -0
- package/dist/api/types/ClaudeTeamStates.d.mts +11 -0
- package/dist/api/types/ClaudeTeamStates.d.ts +11 -0
- package/dist/api/types/ClaudeTeamStates.js +17 -0
- package/dist/api/types/ClaudeTeamStates.mjs +1 -0
- package/dist/api/types/ClaudeTeamSummaryData.d.mts +10 -0
- package/dist/api/types/ClaudeTeamSummaryData.d.ts +10 -0
- package/dist/api/types/ConsolidationBlocker.d.mts +13 -0
- package/dist/api/types/ConsolidationBlocker.d.ts +13 -0
- package/dist/api/types/ConsolidationBlocker.js +4 -0
- package/dist/api/types/ConsolidationBlocker.mjs +4 -0
- package/dist/api/types/ContainerDetail.d.mts +2 -0
- package/dist/api/types/ContainerDetail.d.ts +2 -0
- package/dist/api/types/ContainerJvmDay.d.mts +20 -0
- package/dist/api/types/ContainerJvmDay.d.ts +20 -0
- package/dist/api/types/ContainerJvmDay.js +17 -0
- package/dist/api/types/ContainerJvmDay.mjs +1 -0
- package/dist/api/types/ContainerJvmMeasured.d.mts +50 -0
- package/dist/api/types/ContainerJvmMeasured.d.ts +50 -0
- package/dist/api/types/ContainerJvmMeasured.js +41 -0
- package/dist/api/types/ContainerJvmMeasured.mjs +17 -0
- package/dist/api/types/FleetNodePool.d.mts +2 -0
- package/dist/api/types/FleetNodePool.d.ts +2 -0
- package/dist/api/types/FleetWorkloadFacets.d.mts +5 -0
- package/dist/api/types/FleetWorkloadFacets.d.ts +5 -0
- package/dist/api/types/FleetWorkloadFacets.js +17 -0
- package/dist/api/types/FleetWorkloadFacets.mjs +1 -0
- package/dist/api/types/FleetWorkloadListData.d.mts +1 -0
- package/dist/api/types/FleetWorkloadListData.d.ts +1 -0
- package/dist/api/types/Indicator.d.mts +1 -0
- package/dist/api/types/Indicator.d.ts +1 -0
- package/dist/api/types/Indicator.js +1 -0
- package/dist/api/types/Indicator.mjs +1 -0
- package/dist/api/types/IndicatorCount.d.mts +1 -0
- package/dist/api/types/IndicatorCount.d.ts +1 -0
- package/dist/api/types/IndicatorCount.js +1 -0
- package/dist/api/types/IndicatorCount.mjs +1 -0
- package/dist/api/types/JvmFlags.d.mts +38 -0
- package/dist/api/types/JvmFlags.d.ts +38 -0
- package/dist/api/types/JvmFlags.js +41 -0
- package/dist/api/types/JvmFlags.mjs +17 -0
- package/dist/api/types/JvmMeasured.d.mts +52 -0
- package/dist/api/types/JvmMeasured.d.ts +52 -0
- package/dist/api/types/JvmMeasured.js +41 -0
- package/dist/api/types/JvmMeasured.mjs +17 -0
- package/dist/api/types/JvmReaderHealth.d.mts +8 -0
- package/dist/api/types/JvmReaderHealth.d.ts +8 -0
- package/dist/api/types/JvmReaderHealth.js +17 -0
- package/dist/api/types/JvmReaderHealth.mjs +1 -0
- package/dist/api/types/JvmReaderNodeHealth.d.mts +21 -0
- package/dist/api/types/JvmReaderNodeHealth.d.ts +21 -0
- package/dist/api/types/JvmReaderNodeHealth.js +37 -0
- package/dist/api/types/JvmReaderNodeHealth.mjs +13 -0
- package/dist/api/types/JvmReaderResponse.d.mts +6 -0
- package/dist/api/types/JvmReaderResponse.d.ts +6 -0
- package/dist/api/types/JvmReaderResponse.js +17 -0
- package/dist/api/types/JvmReaderResponse.mjs +1 -0
- package/dist/api/types/KarpenterPool.d.mts +2 -0
- package/dist/api/types/KarpenterPool.d.ts +2 -0
- package/dist/api/types/NodePoolUsage.d.mts +2 -0
- package/dist/api/types/NodePoolUsage.d.ts +2 -0
- package/dist/api/types/ReliabilityFacetCount.d.mts +17 -0
- package/dist/api/types/ReliabilityFacetCount.d.ts +17 -0
- package/dist/api/types/ReliabilityFacetCount.js +41 -0
- package/dist/api/types/ReliabilityFacetCount.mjs +17 -0
- package/dist/api/types/ReliabilityTotals.d.mts +2 -2
- package/dist/api/types/ReliabilityTotals.d.ts +2 -2
- package/dist/api/types/SessionsAsked.d.mts +4 -0
- package/dist/api/types/SessionsAsked.d.ts +4 -0
- package/dist/api/types/TerraformIntegrationData.d.mts +13 -0
- package/dist/api/types/TerraformIntegrationData.d.ts +13 -0
- package/dist/api/types/TerraformIntegrationData.js +17 -0
- package/dist/api/types/TerraformIntegrationData.mjs +1 -0
- package/dist/api/types/TerraformIntegrationResponse.d.mts +6 -0
- package/dist/api/types/TerraformIntegrationResponse.d.ts +6 -0
- package/dist/api/types/TerraformIntegrationResponse.js +17 -0
- package/dist/api/types/TerraformIntegrationResponse.mjs +1 -0
- package/dist/api/types/UnhealthyReason.d.mts +16 -0
- package/dist/api/types/UnhealthyReason.d.ts +16 -0
- package/dist/api/types/UnhealthyReason.js +35 -0
- package/dist/api/types/UnhealthyReason.mjs +11 -0
- package/dist/api/types/WorkloadJvm.d.mts +15 -0
- package/dist/api/types/WorkloadJvm.d.ts +15 -0
- package/dist/api/types/WorkloadJvm.js +17 -0
- package/dist/api/types/WorkloadJvm.mjs +1 -0
- package/dist/api/types/WorkloadListData.d.mts +1 -1
- package/dist/api/types/WorkloadListData.d.ts +1 -1
- package/dist/api/types/WorkloadListItem.d.mts +94 -0
- package/dist/api/types/WorkloadListItem.d.ts +94 -0
- package/dist/api/types/WorkloadListItem.js +42 -0
- package/dist/api/types/WorkloadListItem.mjs +18 -0
- package/dist/api/types/index.d.mts +46 -1
- package/dist/api/types/index.d.ts +46 -1
- package/dist/api/types/index.js +92 -2
- package/dist/api/types/index.mjs +46 -1
- package/dist/version.d.mts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/api/types/AnthropicUsageMeasures.d.mts +0 -9
- package/dist/api/types/AnthropicUsageMeasures.d.ts +0 -9
- package/dist/api/types/AnthropicUsageMeasures.mjs +0 -1
|
@@ -114,7 +114,7 @@ class AnthropicClient {
|
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
117
|
-
* Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. totals covers the range, with each person counted once. daily has one entry per day of the range, at zero on a day nobody used Claude.
|
|
117
|
+
* Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. totals covers the range, with each person counted once, and says how much input was read from the prompt cache, what that saved against sending it as input and what writing to the cache cost, at each model's list rates on the range's last day. daily has one entry per day of the range, at zero on a day nobody used Claude.
|
|
118
118
|
*
|
|
119
119
|
* @param {LevelFour.GetUsageApiV1ProvidersAnthropicUsageGetRequest} request
|
|
120
120
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -341,7 +341,7 @@ class AnthropicClient {
|
|
|
341
341
|
);
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
344
|
-
* Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. Each person is counted in the band their usage value over the range falls in, and every band is answered, including one with nobody in it. top_decile and rest set the tenth of the people who used the most beside everyone else.
|
|
344
|
+
* Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. Each person is counted in the band their usage value over the range falls in, and every band is answered, including one with nobody in it. basis=tokens bands people by their tokens a week over the range, cache reads left out: over 5M, 1M to 5M, 200K to 1M and under 200K, then no use for the people seen in the 400 days before the range ends who used nothing in it. top_decile and rest set the tenth of the people who used the most beside everyone else, by usage value whatever the basis.
|
|
345
345
|
*
|
|
346
346
|
* @param {LevelFour.GetUsageDistributionApiV1ProvidersAnthropicUsageDistributionGetRequest} request
|
|
347
347
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -365,8 +365,9 @@ class AnthropicClient {
|
|
|
365
365
|
return core.HttpResponsePromise.fromPromise(this.__getUsageDistribution(request, requestOptions));
|
|
366
366
|
}
|
|
367
367
|
async __getUsageDistribution(request, requestOptions) {
|
|
368
|
-
const { start, end } = request;
|
|
368
|
+
const { basis, start, end } = request;
|
|
369
369
|
const _queryParams = {
|
|
370
|
+
basis: basis != null ? basis : void 0,
|
|
370
371
|
start,
|
|
371
372
|
end
|
|
372
373
|
};
|
|
@@ -564,7 +565,7 @@ class AnthropicClient {
|
|
|
564
565
|
);
|
|
565
566
|
}
|
|
566
567
|
/**
|
|
567
|
-
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. sections has one entry per kind of activity over the range, with its largest rows. response_times estimates, per model, how long a request took and how long its first token took: the times are kept in buckets, so each figure can be off by the width of one. people says how many people each kind of activity reached, and names nobody.
|
|
568
|
+
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. sections has one entry per kind of activity over the range, with its largest rows. response_times estimates, per model, how long a request took and how long its first token took, and overall the same over every model: the times are kept in buckets, so each figure can be off by the width of one. people says how many people each kind of activity reached, and names nobody.
|
|
568
569
|
*
|
|
569
570
|
* @param {LevelFour.GetActivityApiV1ProvidersAnthropicActivityGetRequest} request
|
|
570
571
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -897,9 +898,9 @@ class AnthropicClient {
|
|
|
897
898
|
);
|
|
898
899
|
}
|
|
899
900
|
/**
|
|
900
|
-
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. Each
|
|
901
|
+
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. Each MCP server a tool was called through or connected to in the range: the people who did either, the connections that opened and the ones that failed. failing is true once a connection failed, and those servers come first, then the most connections. A server is named only when the install sends server names; the connections of one that does not are under a server of null. Read from the session detail kept since migration 198. Names nobody.
|
|
901
902
|
*
|
|
902
|
-
* @param {LevelFour.
|
|
903
|
+
* @param {LevelFour.GetActivityMcpApiV1ProvidersAnthropicActivityMcpGetRequest} request
|
|
903
904
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
904
905
|
*
|
|
905
906
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -912,15 +913,15 @@ class AnthropicClient {
|
|
|
912
913
|
* @throws {@link LevelFour.InternalServerError}
|
|
913
914
|
*
|
|
914
915
|
* @example
|
|
915
|
-
* await client.anthropic.
|
|
916
|
+
* await client.anthropic.getActivityMcp({
|
|
916
917
|
* start: "start",
|
|
917
918
|
* end: "end"
|
|
918
919
|
* })
|
|
919
920
|
*/
|
|
920
|
-
|
|
921
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
921
|
+
getActivityMcp(request, requestOptions) {
|
|
922
|
+
return core.HttpResponsePromise.fromPromise(this.__getActivityMcp(request, requestOptions));
|
|
922
923
|
}
|
|
923
|
-
async
|
|
924
|
+
async __getActivityMcp(request, requestOptions) {
|
|
924
925
|
const { start, end } = request;
|
|
925
926
|
const _queryParams = {
|
|
926
927
|
start,
|
|
@@ -935,7 +936,7 @@ class AnthropicClient {
|
|
|
935
936
|
const _response = await core.fetcher({
|
|
936
937
|
url: core.url.join(
|
|
937
938
|
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
938
|
-
"api/v1/providers/anthropic/activity/
|
|
939
|
+
"api/v1/providers/anthropic/activity/mcp"
|
|
939
940
|
),
|
|
940
941
|
method: "GET",
|
|
941
942
|
headers: _headers,
|
|
@@ -947,10 +948,7 @@ class AnthropicClient {
|
|
|
947
948
|
logging: this._options.logging
|
|
948
949
|
});
|
|
949
950
|
if (_response.ok) {
|
|
950
|
-
return {
|
|
951
|
-
data: _response.body,
|
|
952
|
-
rawResponse: _response.rawResponse
|
|
953
|
-
};
|
|
951
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
954
952
|
}
|
|
955
953
|
if (_response.error.reason === "status-code") {
|
|
956
954
|
switch (_response.error.statusCode) {
|
|
@@ -1006,12 +1004,13 @@ class AnthropicClient {
|
|
|
1006
1004
|
_response.error,
|
|
1007
1005
|
_response.rawResponse,
|
|
1008
1006
|
"GET",
|
|
1009
|
-
"/api/v1/providers/anthropic/activity/
|
|
1007
|
+
"/api/v1/providers/anthropic/activity/mcp"
|
|
1010
1008
|
);
|
|
1011
1009
|
}
|
|
1012
1010
|
/**
|
|
1013
|
-
*
|
|
1011
|
+
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. Each session with a request or a failure in the range, under the mode its latest change switched it to, whenever that was, or default for one that never switched. The range is 92 days at most, and 422 range_too_long past it. Read from the session detail kept since migration 198. Names nobody.
|
|
1014
1012
|
*
|
|
1013
|
+
* @param {LevelFour.GetActivityPermissionModesApiV1ProvidersAnthropicActivityPermissionModesGetRequest} request
|
|
1015
1014
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1016
1015
|
*
|
|
1017
1016
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -1024,12 +1023,20 @@ class AnthropicClient {
|
|
|
1024
1023
|
* @throws {@link LevelFour.InternalServerError}
|
|
1025
1024
|
*
|
|
1026
1025
|
* @example
|
|
1027
|
-
* await client.anthropic.
|
|
1026
|
+
* await client.anthropic.getActivityPermissionModes({
|
|
1027
|
+
* start: "start",
|
|
1028
|
+
* end: "end"
|
|
1029
|
+
* })
|
|
1028
1030
|
*/
|
|
1029
|
-
|
|
1030
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1031
|
+
getActivityPermissionModes(request, requestOptions) {
|
|
1032
|
+
return core.HttpResponsePromise.fromPromise(this.__getActivityPermissionModes(request, requestOptions));
|
|
1031
1033
|
}
|
|
1032
|
-
async
|
|
1034
|
+
async __getActivityPermissionModes(request, requestOptions) {
|
|
1035
|
+
const { start, end } = request;
|
|
1036
|
+
const _queryParams = {
|
|
1037
|
+
start,
|
|
1038
|
+
end
|
|
1039
|
+
};
|
|
1033
1040
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
1034
1041
|
const _headers = mergeHeaders(
|
|
1035
1042
|
_authRequest.headers,
|
|
@@ -1039,11 +1046,11 @@ class AnthropicClient {
|
|
|
1039
1046
|
const _response = await core.fetcher({
|
|
1040
1047
|
url: core.url.join(
|
|
1041
1048
|
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1042
|
-
"api/v1/providers/anthropic/
|
|
1049
|
+
"api/v1/providers/anthropic/activity/permission-modes"
|
|
1043
1050
|
),
|
|
1044
1051
|
method: "GET",
|
|
1045
1052
|
headers: _headers,
|
|
1046
|
-
queryParameters: requestOptions?.queryParams,
|
|
1053
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
1047
1054
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
1048
1055
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
1049
1056
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -1107,13 +1114,13 @@ class AnthropicClient {
|
|
|
1107
1114
|
_response.error,
|
|
1108
1115
|
_response.rawResponse,
|
|
1109
1116
|
"GET",
|
|
1110
|
-
"/api/v1/providers/anthropic/
|
|
1117
|
+
"/api/v1/providers/anthropic/activity/permission-modes"
|
|
1111
1118
|
);
|
|
1112
1119
|
}
|
|
1113
1120
|
/**
|
|
1114
|
-
*
|
|
1121
|
+
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. Each list names at most three people, the largest figure first, and nobody whose figure is zero. behind_on_version and without_managed_settings count everyone they apply to among the people who reported usage in the range, and name three. The answer names people, so it is sent with Cache-Control: no-store.
|
|
1115
1122
|
*
|
|
1116
|
-
* @param {LevelFour.
|
|
1123
|
+
* @param {LevelFour.GetActivityPeopleApiV1ProvidersAnthropicActivityPeopleGetRequest} request
|
|
1117
1124
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1118
1125
|
*
|
|
1119
1126
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -1126,15 +1133,15 @@ class AnthropicClient {
|
|
|
1126
1133
|
* @throws {@link LevelFour.InternalServerError}
|
|
1127
1134
|
*
|
|
1128
1135
|
* @example
|
|
1129
|
-
* await client.anthropic.
|
|
1136
|
+
* await client.anthropic.getActivityPeople({
|
|
1130
1137
|
* start: "start",
|
|
1131
1138
|
* end: "end"
|
|
1132
1139
|
* })
|
|
1133
1140
|
*/
|
|
1134
|
-
|
|
1135
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1141
|
+
getActivityPeople(request, requestOptions) {
|
|
1142
|
+
return core.HttpResponsePromise.fromPromise(this.__getActivityPeople(request, requestOptions));
|
|
1136
1143
|
}
|
|
1137
|
-
async
|
|
1144
|
+
async __getActivityPeople(request, requestOptions) {
|
|
1138
1145
|
const { start, end } = request;
|
|
1139
1146
|
const _queryParams = {
|
|
1140
1147
|
start,
|
|
@@ -1149,7 +1156,7 @@ class AnthropicClient {
|
|
|
1149
1156
|
const _response = await core.fetcher({
|
|
1150
1157
|
url: core.url.join(
|
|
1151
1158
|
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1152
|
-
"api/v1/providers/anthropic/
|
|
1159
|
+
"api/v1/providers/anthropic/activity/people"
|
|
1153
1160
|
),
|
|
1154
1161
|
method: "GET",
|
|
1155
1162
|
headers: _headers,
|
|
@@ -1161,7 +1168,10 @@ class AnthropicClient {
|
|
|
1161
1168
|
logging: this._options.logging
|
|
1162
1169
|
});
|
|
1163
1170
|
if (_response.ok) {
|
|
1164
|
-
return {
|
|
1171
|
+
return {
|
|
1172
|
+
data: _response.body,
|
|
1173
|
+
rawResponse: _response.rawResponse
|
|
1174
|
+
};
|
|
1165
1175
|
}
|
|
1166
1176
|
if (_response.error.reason === "status-code") {
|
|
1167
1177
|
switch (_response.error.statusCode) {
|
|
@@ -1217,13 +1227,13 @@ class AnthropicClient {
|
|
|
1217
1227
|
_response.error,
|
|
1218
1228
|
_response.rawResponse,
|
|
1219
1229
|
"GET",
|
|
1220
|
-
"/api/v1/providers/anthropic/
|
|
1230
|
+
"/api/v1/providers/anthropic/activity/people"
|
|
1221
1231
|
);
|
|
1222
1232
|
}
|
|
1223
1233
|
/**
|
|
1224
|
-
*
|
|
1234
|
+
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. The measure over the range for each person, each area of the AI area's spreadsheet or each repository, the 50 largest first, with previous over the range of the same length just before it and the people behind each. An area or repository of null is none, which is also what the area and repository filters take for it. By repository, or with a repository filter, the measure comes from what the sessions' metrics said, kept since migration 198, so it is one of pull_requests, commits, lines_added and lines_removed, and 422 measure_not_by_repository otherwise. granularity=daily adds each day of the range with a value for every key listed. The answer can name people, so it is sent with Cache-Control: no-store.
|
|
1225
1235
|
*
|
|
1226
|
-
* @param {LevelFour.
|
|
1236
|
+
* @param {LevelFour.GetActivityBreakdownApiV1ProvidersAnthropicActivityBreakdownGetRequest} request
|
|
1227
1237
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1228
1238
|
*
|
|
1229
1239
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -1236,16 +1246,19 @@ class AnthropicClient {
|
|
|
1236
1246
|
* @throws {@link LevelFour.InternalServerError}
|
|
1237
1247
|
*
|
|
1238
1248
|
* @example
|
|
1239
|
-
* await client.anthropic.
|
|
1240
|
-
* asked: {
|
|
1249
|
+
* await client.anthropic.getActivityBreakdown({
|
|
1250
|
+
* asked: {
|
|
1251
|
+
* measure: "pull_requests",
|
|
1252
|
+
* group_by: "person"
|
|
1253
|
+
* },
|
|
1241
1254
|
* start: "start",
|
|
1242
1255
|
* end: "end"
|
|
1243
1256
|
* })
|
|
1244
1257
|
*/
|
|
1245
|
-
|
|
1246
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1258
|
+
getActivityBreakdown(request, requestOptions) {
|
|
1259
|
+
return core.HttpResponsePromise.fromPromise(this.__getActivityBreakdown(request, requestOptions));
|
|
1247
1260
|
}
|
|
1248
|
-
async
|
|
1261
|
+
async __getActivityBreakdown(request, requestOptions) {
|
|
1249
1262
|
const { asked, start, end } = request;
|
|
1250
1263
|
const _queryParams = {
|
|
1251
1264
|
asked,
|
|
@@ -1261,7 +1274,7 @@ class AnthropicClient {
|
|
|
1261
1274
|
const _response = await core.fetcher({
|
|
1262
1275
|
url: core.url.join(
|
|
1263
1276
|
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1264
|
-
"api/v1/providers/anthropic/
|
|
1277
|
+
"api/v1/providers/anthropic/activity/breakdown"
|
|
1265
1278
|
),
|
|
1266
1279
|
method: "GET",
|
|
1267
1280
|
headers: _headers,
|
|
@@ -1273,10 +1286,7 @@ class AnthropicClient {
|
|
|
1273
1286
|
logging: this._options.logging
|
|
1274
1287
|
});
|
|
1275
1288
|
if (_response.ok) {
|
|
1276
|
-
return {
|
|
1277
|
-
data: _response.body,
|
|
1278
|
-
rawResponse: _response.rawResponse
|
|
1279
|
-
};
|
|
1289
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1280
1290
|
}
|
|
1281
1291
|
if (_response.error.reason === "status-code") {
|
|
1282
1292
|
switch (_response.error.statusCode) {
|
|
@@ -1332,13 +1342,13 @@ class AnthropicClient {
|
|
|
1332
1342
|
_response.error,
|
|
1333
1343
|
_response.rawResponse,
|
|
1334
1344
|
"GET",
|
|
1335
|
-
"/api/v1/providers/anthropic/
|
|
1345
|
+
"/api/v1/providers/anthropic/activity/breakdown"
|
|
1336
1346
|
);
|
|
1337
1347
|
}
|
|
1338
1348
|
/**
|
|
1339
|
-
*
|
|
1349
|
+
* Activity is what Claude Code and Cowork reported about themselves, kept as daily totals: names, counts and durations, never the text of a prompt, a response or a command. Pass one day as start and end to drill into it. kinds adds up the failed requests by what the API answered: 400 invalid request, 429 rate limited, 529 overloaded, connection when no answer came, other for the rest. people and sessions name the 100 with the most, each with the kind most of theirs were, and a session says whether it recovered, a request succeeding after its last failure, or stopped, over every day it ran. The range is 31 days at most, and 422 range_too_long past it. Read from the session detail kept since migration 198, so a failure that named no session is not here. The answer names people, so it is sent with Cache-Control: no-store.
|
|
1340
1350
|
*
|
|
1341
|
-
* @param {LevelFour.
|
|
1351
|
+
* @param {LevelFour.GetActivityFailuresApiV1ProvidersAnthropicActivityFailuresGetRequest} request
|
|
1342
1352
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1343
1353
|
*
|
|
1344
1354
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -1351,15 +1361,20 @@ class AnthropicClient {
|
|
|
1351
1361
|
* @throws {@link LevelFour.InternalServerError}
|
|
1352
1362
|
*
|
|
1353
1363
|
* @example
|
|
1354
|
-
* await client.anthropic.
|
|
1355
|
-
*
|
|
1364
|
+
* await client.anthropic.getActivityFailures({
|
|
1365
|
+
* start: "start",
|
|
1366
|
+
* end: "end"
|
|
1356
1367
|
* })
|
|
1357
1368
|
*/
|
|
1358
|
-
|
|
1359
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1369
|
+
getActivityFailures(request, requestOptions) {
|
|
1370
|
+
return core.HttpResponsePromise.fromPromise(this.__getActivityFailures(request, requestOptions));
|
|
1360
1371
|
}
|
|
1361
|
-
async
|
|
1362
|
-
const {
|
|
1372
|
+
async __getActivityFailures(request, requestOptions) {
|
|
1373
|
+
const { start, end } = request;
|
|
1374
|
+
const _queryParams = {
|
|
1375
|
+
start,
|
|
1376
|
+
end
|
|
1377
|
+
};
|
|
1363
1378
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
1364
1379
|
const _headers = mergeHeaders(
|
|
1365
1380
|
_authRequest.headers,
|
|
@@ -1369,7 +1384,108 @@ class AnthropicClient {
|
|
|
1369
1384
|
const _response = await core.fetcher({
|
|
1370
1385
|
url: core.url.join(
|
|
1371
1386
|
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1372
|
-
|
|
1387
|
+
"api/v1/providers/anthropic/activity/failures"
|
|
1388
|
+
),
|
|
1389
|
+
method: "GET",
|
|
1390
|
+
headers: _headers,
|
|
1391
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
1392
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
1393
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
1394
|
+
abortSignal: requestOptions?.abortSignal,
|
|
1395
|
+
fetchFn: this._options?.fetch,
|
|
1396
|
+
logging: this._options.logging
|
|
1397
|
+
});
|
|
1398
|
+
if (_response.ok) {
|
|
1399
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1400
|
+
}
|
|
1401
|
+
if (_response.error.reason === "status-code") {
|
|
1402
|
+
switch (_response.error.statusCode) {
|
|
1403
|
+
case 400:
|
|
1404
|
+
throw new LevelFour.BadRequestError(
|
|
1405
|
+
_response.error.body,
|
|
1406
|
+
_response.rawResponse
|
|
1407
|
+
);
|
|
1408
|
+
case 401:
|
|
1409
|
+
throw new LevelFour.UnauthorizedError(
|
|
1410
|
+
_response.error.body,
|
|
1411
|
+
_response.rawResponse
|
|
1412
|
+
);
|
|
1413
|
+
case 403:
|
|
1414
|
+
throw new LevelFour.ForbiddenError(
|
|
1415
|
+
_response.error.body,
|
|
1416
|
+
_response.rawResponse
|
|
1417
|
+
);
|
|
1418
|
+
case 404:
|
|
1419
|
+
throw new LevelFour.NotFoundError(
|
|
1420
|
+
_response.error.body,
|
|
1421
|
+
_response.rawResponse
|
|
1422
|
+
);
|
|
1423
|
+
case 409:
|
|
1424
|
+
throw new LevelFour.ConflictError(
|
|
1425
|
+
_response.error.body,
|
|
1426
|
+
_response.rawResponse
|
|
1427
|
+
);
|
|
1428
|
+
case 422:
|
|
1429
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
1430
|
+
_response.error.body,
|
|
1431
|
+
_response.rawResponse
|
|
1432
|
+
);
|
|
1433
|
+
case 429:
|
|
1434
|
+
throw new LevelFour.TooManyRequestsError(
|
|
1435
|
+
_response.error.body,
|
|
1436
|
+
_response.rawResponse
|
|
1437
|
+
);
|
|
1438
|
+
case 500:
|
|
1439
|
+
throw new LevelFour.InternalServerError(
|
|
1440
|
+
_response.error.body,
|
|
1441
|
+
_response.rawResponse
|
|
1442
|
+
);
|
|
1443
|
+
default:
|
|
1444
|
+
throw new errors.LevelFourError({
|
|
1445
|
+
statusCode: _response.error.statusCode,
|
|
1446
|
+
body: _response.error.body,
|
|
1447
|
+
rawResponse: _response.rawResponse
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
return handleNonStatusCodeError(
|
|
1452
|
+
_response.error,
|
|
1453
|
+
_response.rawResponse,
|
|
1454
|
+
"GET",
|
|
1455
|
+
"/api/v1/providers/anthropic/activity/failures"
|
|
1456
|
+
);
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* Measured from today in UTC, with no range: how many people had nothing reported for them in the last 14 days and in the last 30, and the ten away the longest. Someone is last seen on the latest day any of their usage or activity was reported, and someone last seen more than 400 days ago is not counted. The answer names people, so it is sent with Cache-Control: no-store.
|
|
1460
|
+
*
|
|
1461
|
+
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1462
|
+
*
|
|
1463
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
1464
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
1465
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
1466
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
1467
|
+
* @throws {@link LevelFour.ConflictError}
|
|
1468
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
1469
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
1470
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
1471
|
+
*
|
|
1472
|
+
* @example
|
|
1473
|
+
* await client.anthropic.getUsageInactive()
|
|
1474
|
+
*/
|
|
1475
|
+
getUsageInactive(requestOptions) {
|
|
1476
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsageInactive(requestOptions));
|
|
1477
|
+
}
|
|
1478
|
+
async __getUsageInactive(requestOptions) {
|
|
1479
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
1480
|
+
const _headers = mergeHeaders(
|
|
1481
|
+
_authRequest.headers,
|
|
1482
|
+
this._options?.headers,
|
|
1483
|
+
requestOptions?.headers
|
|
1484
|
+
);
|
|
1485
|
+
const _response = await core.fetcher({
|
|
1486
|
+
url: core.url.join(
|
|
1487
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1488
|
+
"api/v1/providers/anthropic/usage/inactive"
|
|
1373
1489
|
),
|
|
1374
1490
|
method: "GET",
|
|
1375
1491
|
headers: _headers,
|
|
@@ -1437,13 +1553,13 @@ class AnthropicClient {
|
|
|
1437
1553
|
_response.error,
|
|
1438
1554
|
_response.rawResponse,
|
|
1439
1555
|
"GET",
|
|
1440
|
-
"/api/v1/providers/anthropic/usage/
|
|
1556
|
+
"/api/v1/providers/anthropic/usage/inactive"
|
|
1441
1557
|
);
|
|
1442
1558
|
}
|
|
1443
1559
|
/**
|
|
1444
|
-
*
|
|
1560
|
+
* Everyone who reported usage in the range is one of three: new when they were first seen inside it, continuing when they also reported usage in the range of the same length just before, and returning otherwise. At most five are named: up to three of the new and up to two of the returning, each kind taking the places the other leaves empty. The answer names people, so it is sent with Cache-Control: no-store.
|
|
1445
1561
|
*
|
|
1446
|
-
* @param {LevelFour.
|
|
1562
|
+
* @param {LevelFour.GetUsageAdoptionApiV1ProvidersAnthropicUsageAdoptionGetRequest} request
|
|
1447
1563
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1448
1564
|
*
|
|
1449
1565
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -1456,20 +1572,17 @@ class AnthropicClient {
|
|
|
1456
1572
|
* @throws {@link LevelFour.InternalServerError}
|
|
1457
1573
|
*
|
|
1458
1574
|
* @example
|
|
1459
|
-
* await client.anthropic.
|
|
1460
|
-
* person: "person",
|
|
1461
|
-
* asked: {},
|
|
1575
|
+
* await client.anthropic.getUsageAdoption({
|
|
1462
1576
|
* start: "start",
|
|
1463
1577
|
* end: "end"
|
|
1464
1578
|
* })
|
|
1465
1579
|
*/
|
|
1466
|
-
|
|
1467
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1580
|
+
getUsageAdoption(request, requestOptions) {
|
|
1581
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsageAdoption(request, requestOptions));
|
|
1468
1582
|
}
|
|
1469
|
-
async
|
|
1470
|
-
const {
|
|
1583
|
+
async __getUsageAdoption(request, requestOptions) {
|
|
1584
|
+
const { start, end } = request;
|
|
1471
1585
|
const _queryParams = {
|
|
1472
|
-
asked,
|
|
1473
1586
|
start,
|
|
1474
1587
|
end
|
|
1475
1588
|
};
|
|
@@ -1482,7 +1595,7 @@ class AnthropicClient {
|
|
|
1482
1595
|
const _response = await core.fetcher({
|
|
1483
1596
|
url: core.url.join(
|
|
1484
1597
|
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1485
|
-
|
|
1598
|
+
"api/v1/providers/anthropic/usage/adoption"
|
|
1486
1599
|
),
|
|
1487
1600
|
method: "GET",
|
|
1488
1601
|
headers: _headers,
|
|
@@ -1550,13 +1663,13 @@ class AnthropicClient {
|
|
|
1550
1663
|
_response.error,
|
|
1551
1664
|
_response.rawResponse,
|
|
1552
1665
|
"GET",
|
|
1553
|
-
"/api/v1/providers/anthropic/usage/
|
|
1666
|
+
"/api/v1/providers/anthropic/usage/adoption"
|
|
1554
1667
|
);
|
|
1555
1668
|
}
|
|
1556
1669
|
/**
|
|
1557
|
-
*
|
|
1670
|
+
* One row per person usage or activity was reported for in the range, however many products they report through: the largest usage value first, then the most requests, then the name. summary covers the whole range whatever search, group and page narrow the rows to, and its group keys, with anonymous for installs that reported neither an email nor an account, are what group takes. first_seen and last_seen are the first and last day anything was reported for the person, inside the range or not. format=csv answers every row search and group keep, as a spreadsheet. The answer names people, so it is sent with Cache-Control: no-store.
|
|
1558
1671
|
*
|
|
1559
|
-
* @param {LevelFour.
|
|
1672
|
+
* @param {LevelFour.GetUsagePeopleApiV1ProvidersAnthropicUsagePeopleGetRequest} request
|
|
1560
1673
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1561
1674
|
*
|
|
1562
1675
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -1569,17 +1682,19 @@ class AnthropicClient {
|
|
|
1569
1682
|
* @throws {@link LevelFour.InternalServerError}
|
|
1570
1683
|
*
|
|
1571
1684
|
* @example
|
|
1572
|
-
* await client.anthropic.
|
|
1685
|
+
* await client.anthropic.getUsagePeople({
|
|
1686
|
+
* asked: {},
|
|
1573
1687
|
* start: "start",
|
|
1574
1688
|
* end: "end"
|
|
1575
1689
|
* })
|
|
1576
1690
|
*/
|
|
1577
|
-
|
|
1578
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1691
|
+
getUsagePeople(request, requestOptions) {
|
|
1692
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsagePeople(request, requestOptions));
|
|
1579
1693
|
}
|
|
1580
|
-
async
|
|
1581
|
-
const { start, end } = request;
|
|
1694
|
+
async __getUsagePeople(request, requestOptions) {
|
|
1695
|
+
const { asked, start, end } = request;
|
|
1582
1696
|
const _queryParams = {
|
|
1697
|
+
asked,
|
|
1583
1698
|
start,
|
|
1584
1699
|
end
|
|
1585
1700
|
};
|
|
@@ -1592,7 +1707,7 @@ class AnthropicClient {
|
|
|
1592
1707
|
const _response = await core.fetcher({
|
|
1593
1708
|
url: core.url.join(
|
|
1594
1709
|
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1595
|
-
"api/v1/providers/anthropic/
|
|
1710
|
+
"api/v1/providers/anthropic/usage/people"
|
|
1596
1711
|
),
|
|
1597
1712
|
method: "GET",
|
|
1598
1713
|
headers: _headers,
|
|
@@ -1604,7 +1719,10 @@ class AnthropicClient {
|
|
|
1604
1719
|
logging: this._options.logging
|
|
1605
1720
|
});
|
|
1606
1721
|
if (_response.ok) {
|
|
1607
|
-
return {
|
|
1722
|
+
return {
|
|
1723
|
+
data: _response.body,
|
|
1724
|
+
rawResponse: _response.rawResponse
|
|
1725
|
+
};
|
|
1608
1726
|
}
|
|
1609
1727
|
if (_response.error.reason === "status-code") {
|
|
1610
1728
|
switch (_response.error.statusCode) {
|
|
@@ -1660,13 +1778,13 @@ class AnthropicClient {
|
|
|
1660
1778
|
_response.error,
|
|
1661
1779
|
_response.rawResponse,
|
|
1662
1780
|
"GET",
|
|
1663
|
-
"/api/v1/providers/anthropic/
|
|
1781
|
+
"/api/v1/providers/anthropic/usage/people"
|
|
1664
1782
|
);
|
|
1665
1783
|
}
|
|
1666
1784
|
/**
|
|
1667
|
-
*
|
|
1785
|
+
* Usage is what Claude Code and Cowork reported about themselves, valued at API list price. It is not what the organization is billed, and it includes the current day. The last twelve weeks of tokens by product, and the person's tokens in 7 and 30 days, usage value, last use and idle weeks. Over the 30 days, their tokens by kind, each model they used and their failed requests in all and by day and kind. What their install last said of its version, against the newest one an install seen in 30 days is on, and of managed settings. A Claude Team plan adds the person's seat and its price, their area, extra usage and the seat change their use calls for, as /team/people reads them. 404 person_not_found for someone the tenant never heard of. The answer names a person, so it is sent with Cache-Control: no-store.
|
|
1668
1786
|
*
|
|
1669
|
-
* @param {LevelFour.
|
|
1787
|
+
* @param {LevelFour.GetUsagePersonApiV1ProvidersAnthropicUsagePeoplePersonGetRequest} request
|
|
1670
1788
|
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1671
1789
|
*
|
|
1672
1790
|
* @throws {@link LevelFour.BadRequestError}
|
|
@@ -1679,13 +1797,570 @@ class AnthropicClient {
|
|
|
1679
1797
|
* @throws {@link LevelFour.InternalServerError}
|
|
1680
1798
|
*
|
|
1681
1799
|
* @example
|
|
1682
|
-
* await client.anthropic.
|
|
1800
|
+
* await client.anthropic.getUsagePerson({
|
|
1801
|
+
* person: "person"
|
|
1802
|
+
* })
|
|
1683
1803
|
*/
|
|
1684
|
-
|
|
1685
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1804
|
+
getUsagePerson(request, requestOptions) {
|
|
1805
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsagePerson(request, requestOptions));
|
|
1686
1806
|
}
|
|
1687
|
-
async
|
|
1688
|
-
const {
|
|
1807
|
+
async __getUsagePerson(request, requestOptions) {
|
|
1808
|
+
const { person } = request;
|
|
1809
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
1810
|
+
const _headers = mergeHeaders(
|
|
1811
|
+
_authRequest.headers,
|
|
1812
|
+
this._options?.headers,
|
|
1813
|
+
requestOptions?.headers
|
|
1814
|
+
);
|
|
1815
|
+
const _response = await core.fetcher({
|
|
1816
|
+
url: core.url.join(
|
|
1817
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1818
|
+
`api/v1/providers/anthropic/usage/people/${core.url.encodePathParam(person)}`
|
|
1819
|
+
),
|
|
1820
|
+
method: "GET",
|
|
1821
|
+
headers: _headers,
|
|
1822
|
+
queryParameters: requestOptions?.queryParams,
|
|
1823
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
1824
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
1825
|
+
abortSignal: requestOptions?.abortSignal,
|
|
1826
|
+
fetchFn: this._options?.fetch,
|
|
1827
|
+
logging: this._options.logging
|
|
1828
|
+
});
|
|
1829
|
+
if (_response.ok) {
|
|
1830
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1831
|
+
}
|
|
1832
|
+
if (_response.error.reason === "status-code") {
|
|
1833
|
+
switch (_response.error.statusCode) {
|
|
1834
|
+
case 400:
|
|
1835
|
+
throw new LevelFour.BadRequestError(
|
|
1836
|
+
_response.error.body,
|
|
1837
|
+
_response.rawResponse
|
|
1838
|
+
);
|
|
1839
|
+
case 401:
|
|
1840
|
+
throw new LevelFour.UnauthorizedError(
|
|
1841
|
+
_response.error.body,
|
|
1842
|
+
_response.rawResponse
|
|
1843
|
+
);
|
|
1844
|
+
case 403:
|
|
1845
|
+
throw new LevelFour.ForbiddenError(
|
|
1846
|
+
_response.error.body,
|
|
1847
|
+
_response.rawResponse
|
|
1848
|
+
);
|
|
1849
|
+
case 404:
|
|
1850
|
+
throw new LevelFour.NotFoundError(
|
|
1851
|
+
_response.error.body,
|
|
1852
|
+
_response.rawResponse
|
|
1853
|
+
);
|
|
1854
|
+
case 409:
|
|
1855
|
+
throw new LevelFour.ConflictError(
|
|
1856
|
+
_response.error.body,
|
|
1857
|
+
_response.rawResponse
|
|
1858
|
+
);
|
|
1859
|
+
case 422:
|
|
1860
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
1861
|
+
_response.error.body,
|
|
1862
|
+
_response.rawResponse
|
|
1863
|
+
);
|
|
1864
|
+
case 429:
|
|
1865
|
+
throw new LevelFour.TooManyRequestsError(
|
|
1866
|
+
_response.error.body,
|
|
1867
|
+
_response.rawResponse
|
|
1868
|
+
);
|
|
1869
|
+
case 500:
|
|
1870
|
+
throw new LevelFour.InternalServerError(
|
|
1871
|
+
_response.error.body,
|
|
1872
|
+
_response.rawResponse
|
|
1873
|
+
);
|
|
1874
|
+
default:
|
|
1875
|
+
throw new errors.LevelFourError({
|
|
1876
|
+
statusCode: _response.error.statusCode,
|
|
1877
|
+
body: _response.error.body,
|
|
1878
|
+
rawResponse: _response.rawResponse
|
|
1879
|
+
});
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
return handleNonStatusCodeError(
|
|
1883
|
+
_response.error,
|
|
1884
|
+
_response.rawResponse,
|
|
1885
|
+
"GET",
|
|
1886
|
+
"/api/v1/providers/anthropic/usage/people/{person}"
|
|
1887
|
+
);
|
|
1888
|
+
}
|
|
1889
|
+
/**
|
|
1890
|
+
* Each session or conversation the person's tool named in the range, the latest first: when it started, its product, model and repository, its requests, tokens by kind and usage value, how long it ran from the first request to the last, its active time, its failed requests and how it ended, read from every day it ran. A session whose detail was kept before migration 198 has null failed requests and an unknown outcome. day keeps the sessions with a request that day and failed=true the ones with a failed request. What was said in it is never kept. Empty until the tool reports sessions. The answer names a person, so it is sent with Cache-Control: no-store.
|
|
1891
|
+
*
|
|
1892
|
+
* @param {LevelFour.GetUsagePersonSessionsApiV1ProvidersAnthropicUsagePeoplePersonSessionsGetRequest} request
|
|
1893
|
+
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1894
|
+
*
|
|
1895
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
1896
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
1897
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
1898
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
1899
|
+
* @throws {@link LevelFour.ConflictError}
|
|
1900
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
1901
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
1902
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
1903
|
+
*
|
|
1904
|
+
* @example
|
|
1905
|
+
* await client.anthropic.getUsagePersonSessions({
|
|
1906
|
+
* person: "person",
|
|
1907
|
+
* asked: {},
|
|
1908
|
+
* start: "start",
|
|
1909
|
+
* end: "end"
|
|
1910
|
+
* })
|
|
1911
|
+
*/
|
|
1912
|
+
getUsagePersonSessions(request, requestOptions) {
|
|
1913
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsagePersonSessions(request, requestOptions));
|
|
1914
|
+
}
|
|
1915
|
+
async __getUsagePersonSessions(request, requestOptions) {
|
|
1916
|
+
const { person, asked, start, end } = request;
|
|
1917
|
+
const _queryParams = {
|
|
1918
|
+
asked,
|
|
1919
|
+
start,
|
|
1920
|
+
end
|
|
1921
|
+
};
|
|
1922
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
1923
|
+
const _headers = mergeHeaders(
|
|
1924
|
+
_authRequest.headers,
|
|
1925
|
+
this._options?.headers,
|
|
1926
|
+
requestOptions?.headers
|
|
1927
|
+
);
|
|
1928
|
+
const _response = await core.fetcher({
|
|
1929
|
+
url: core.url.join(
|
|
1930
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
1931
|
+
`api/v1/providers/anthropic/usage/people/${core.url.encodePathParam(person)}/sessions`
|
|
1932
|
+
),
|
|
1933
|
+
method: "GET",
|
|
1934
|
+
headers: _headers,
|
|
1935
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
1936
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
1937
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
1938
|
+
abortSignal: requestOptions?.abortSignal,
|
|
1939
|
+
fetchFn: this._options?.fetch,
|
|
1940
|
+
logging: this._options.logging
|
|
1941
|
+
});
|
|
1942
|
+
if (_response.ok) {
|
|
1943
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1944
|
+
}
|
|
1945
|
+
if (_response.error.reason === "status-code") {
|
|
1946
|
+
switch (_response.error.statusCode) {
|
|
1947
|
+
case 400:
|
|
1948
|
+
throw new LevelFour.BadRequestError(
|
|
1949
|
+
_response.error.body,
|
|
1950
|
+
_response.rawResponse
|
|
1951
|
+
);
|
|
1952
|
+
case 401:
|
|
1953
|
+
throw new LevelFour.UnauthorizedError(
|
|
1954
|
+
_response.error.body,
|
|
1955
|
+
_response.rawResponse
|
|
1956
|
+
);
|
|
1957
|
+
case 403:
|
|
1958
|
+
throw new LevelFour.ForbiddenError(
|
|
1959
|
+
_response.error.body,
|
|
1960
|
+
_response.rawResponse
|
|
1961
|
+
);
|
|
1962
|
+
case 404:
|
|
1963
|
+
throw new LevelFour.NotFoundError(
|
|
1964
|
+
_response.error.body,
|
|
1965
|
+
_response.rawResponse
|
|
1966
|
+
);
|
|
1967
|
+
case 409:
|
|
1968
|
+
throw new LevelFour.ConflictError(
|
|
1969
|
+
_response.error.body,
|
|
1970
|
+
_response.rawResponse
|
|
1971
|
+
);
|
|
1972
|
+
case 422:
|
|
1973
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
1974
|
+
_response.error.body,
|
|
1975
|
+
_response.rawResponse
|
|
1976
|
+
);
|
|
1977
|
+
case 429:
|
|
1978
|
+
throw new LevelFour.TooManyRequestsError(
|
|
1979
|
+
_response.error.body,
|
|
1980
|
+
_response.rawResponse
|
|
1981
|
+
);
|
|
1982
|
+
case 500:
|
|
1983
|
+
throw new LevelFour.InternalServerError(
|
|
1984
|
+
_response.error.body,
|
|
1985
|
+
_response.rawResponse
|
|
1986
|
+
);
|
|
1987
|
+
default:
|
|
1988
|
+
throw new errors.LevelFourError({
|
|
1989
|
+
statusCode: _response.error.statusCode,
|
|
1990
|
+
body: _response.error.body,
|
|
1991
|
+
rawResponse: _response.rawResponse
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
return handleNonStatusCodeError(
|
|
1996
|
+
_response.error,
|
|
1997
|
+
_response.rawResponse,
|
|
1998
|
+
"GET",
|
|
1999
|
+
"/api/v1/providers/anthropic/usage/people/{person}/sessions"
|
|
2000
|
+
);
|
|
2001
|
+
}
|
|
2002
|
+
/**
|
|
2003
|
+
* The session's figures as the list has them, with when its last request was sent, the mode it last switched to, its ten-minute timeline of requests and failures by kind, and its tools and MCP servers. collected is false for a session from before migration 198, whose timeline and tools are empty. 404 session_not_found when the person has no such session. The answer names a person, so it is sent with Cache-Control: no-store.
|
|
2004
|
+
*
|
|
2005
|
+
* @param {LevelFour.GetUsagePersonSessionApiV1ProvidersAnthropicUsagePeoplePersonSessionsSessionGetRequest} request
|
|
2006
|
+
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2007
|
+
*
|
|
2008
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
2009
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
2010
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
2011
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
2012
|
+
* @throws {@link LevelFour.ConflictError}
|
|
2013
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
2014
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
2015
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
2016
|
+
*
|
|
2017
|
+
* @example
|
|
2018
|
+
* await client.anthropic.getUsagePersonSession({
|
|
2019
|
+
* person: "person",
|
|
2020
|
+
* session: "session"
|
|
2021
|
+
* })
|
|
2022
|
+
*/
|
|
2023
|
+
getUsagePersonSession(request, requestOptions) {
|
|
2024
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsagePersonSession(request, requestOptions));
|
|
2025
|
+
}
|
|
2026
|
+
async __getUsagePersonSession(request, requestOptions) {
|
|
2027
|
+
const { person, session } = request;
|
|
2028
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
2029
|
+
const _headers = mergeHeaders(
|
|
2030
|
+
_authRequest.headers,
|
|
2031
|
+
this._options?.headers,
|
|
2032
|
+
requestOptions?.headers
|
|
2033
|
+
);
|
|
2034
|
+
const _response = await core.fetcher({
|
|
2035
|
+
url: core.url.join(
|
|
2036
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
2037
|
+
`api/v1/providers/anthropic/usage/people/${core.url.encodePathParam(person)}/sessions/${core.url.encodePathParam(session)}`
|
|
2038
|
+
),
|
|
2039
|
+
method: "GET",
|
|
2040
|
+
headers: _headers,
|
|
2041
|
+
queryParameters: requestOptions?.queryParams,
|
|
2042
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
2043
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
2044
|
+
abortSignal: requestOptions?.abortSignal,
|
|
2045
|
+
fetchFn: this._options?.fetch,
|
|
2046
|
+
logging: this._options.logging
|
|
2047
|
+
});
|
|
2048
|
+
if (_response.ok) {
|
|
2049
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
2050
|
+
}
|
|
2051
|
+
if (_response.error.reason === "status-code") {
|
|
2052
|
+
switch (_response.error.statusCode) {
|
|
2053
|
+
case 400:
|
|
2054
|
+
throw new LevelFour.BadRequestError(
|
|
2055
|
+
_response.error.body,
|
|
2056
|
+
_response.rawResponse
|
|
2057
|
+
);
|
|
2058
|
+
case 401:
|
|
2059
|
+
throw new LevelFour.UnauthorizedError(
|
|
2060
|
+
_response.error.body,
|
|
2061
|
+
_response.rawResponse
|
|
2062
|
+
);
|
|
2063
|
+
case 403:
|
|
2064
|
+
throw new LevelFour.ForbiddenError(
|
|
2065
|
+
_response.error.body,
|
|
2066
|
+
_response.rawResponse
|
|
2067
|
+
);
|
|
2068
|
+
case 404:
|
|
2069
|
+
throw new LevelFour.NotFoundError(
|
|
2070
|
+
_response.error.body,
|
|
2071
|
+
_response.rawResponse
|
|
2072
|
+
);
|
|
2073
|
+
case 409:
|
|
2074
|
+
throw new LevelFour.ConflictError(
|
|
2075
|
+
_response.error.body,
|
|
2076
|
+
_response.rawResponse
|
|
2077
|
+
);
|
|
2078
|
+
case 422:
|
|
2079
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
2080
|
+
_response.error.body,
|
|
2081
|
+
_response.rawResponse
|
|
2082
|
+
);
|
|
2083
|
+
case 429:
|
|
2084
|
+
throw new LevelFour.TooManyRequestsError(
|
|
2085
|
+
_response.error.body,
|
|
2086
|
+
_response.rawResponse
|
|
2087
|
+
);
|
|
2088
|
+
case 500:
|
|
2089
|
+
throw new LevelFour.InternalServerError(
|
|
2090
|
+
_response.error.body,
|
|
2091
|
+
_response.rawResponse
|
|
2092
|
+
);
|
|
2093
|
+
default:
|
|
2094
|
+
throw new errors.LevelFourError({
|
|
2095
|
+
statusCode: _response.error.statusCode,
|
|
2096
|
+
body: _response.error.body,
|
|
2097
|
+
rawResponse: _response.rawResponse
|
|
2098
|
+
});
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
return handleNonStatusCodeError(
|
|
2102
|
+
_response.error,
|
|
2103
|
+
_response.rawResponse,
|
|
2104
|
+
"GET",
|
|
2105
|
+
"/api/v1/providers/anthropic/usage/people/{person}/sessions/{session}"
|
|
2106
|
+
);
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* Each tool the person's sessions called in the range, the most calls first, with the MCP server an MCP tool was called through, its failed calls and its success rate, and apart from them the MCP servers they connected to. Read from the session detail kept since migration 198. The answer names a person, so it is sent with Cache-Control: no-store.
|
|
2110
|
+
*
|
|
2111
|
+
* @param {LevelFour.GetUsagePersonToolsApiV1ProvidersAnthropicUsagePeoplePersonToolsGetRequest} request
|
|
2112
|
+
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2113
|
+
*
|
|
2114
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
2115
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
2116
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
2117
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
2118
|
+
* @throws {@link LevelFour.ConflictError}
|
|
2119
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
2120
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
2121
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
2122
|
+
*
|
|
2123
|
+
* @example
|
|
2124
|
+
* await client.anthropic.getUsagePersonTools({
|
|
2125
|
+
* person: "person",
|
|
2126
|
+
* start: "start",
|
|
2127
|
+
* end: "end"
|
|
2128
|
+
* })
|
|
2129
|
+
*/
|
|
2130
|
+
getUsagePersonTools(request, requestOptions) {
|
|
2131
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsagePersonTools(request, requestOptions));
|
|
2132
|
+
}
|
|
2133
|
+
async __getUsagePersonTools(request, requestOptions) {
|
|
2134
|
+
const { person, start, end } = request;
|
|
2135
|
+
const _queryParams = {
|
|
2136
|
+
start,
|
|
2137
|
+
end
|
|
2138
|
+
};
|
|
2139
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
2140
|
+
const _headers = mergeHeaders(
|
|
2141
|
+
_authRequest.headers,
|
|
2142
|
+
this._options?.headers,
|
|
2143
|
+
requestOptions?.headers
|
|
2144
|
+
);
|
|
2145
|
+
const _response = await core.fetcher({
|
|
2146
|
+
url: core.url.join(
|
|
2147
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
2148
|
+
`api/v1/providers/anthropic/usage/people/${core.url.encodePathParam(person)}/tools`
|
|
2149
|
+
),
|
|
2150
|
+
method: "GET",
|
|
2151
|
+
headers: _headers,
|
|
2152
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
2153
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
2154
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
2155
|
+
abortSignal: requestOptions?.abortSignal,
|
|
2156
|
+
fetchFn: this._options?.fetch,
|
|
2157
|
+
logging: this._options.logging
|
|
2158
|
+
});
|
|
2159
|
+
if (_response.ok) {
|
|
2160
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
2161
|
+
}
|
|
2162
|
+
if (_response.error.reason === "status-code") {
|
|
2163
|
+
switch (_response.error.statusCode) {
|
|
2164
|
+
case 400:
|
|
2165
|
+
throw new LevelFour.BadRequestError(
|
|
2166
|
+
_response.error.body,
|
|
2167
|
+
_response.rawResponse
|
|
2168
|
+
);
|
|
2169
|
+
case 401:
|
|
2170
|
+
throw new LevelFour.UnauthorizedError(
|
|
2171
|
+
_response.error.body,
|
|
2172
|
+
_response.rawResponse
|
|
2173
|
+
);
|
|
2174
|
+
case 403:
|
|
2175
|
+
throw new LevelFour.ForbiddenError(
|
|
2176
|
+
_response.error.body,
|
|
2177
|
+
_response.rawResponse
|
|
2178
|
+
);
|
|
2179
|
+
case 404:
|
|
2180
|
+
throw new LevelFour.NotFoundError(
|
|
2181
|
+
_response.error.body,
|
|
2182
|
+
_response.rawResponse
|
|
2183
|
+
);
|
|
2184
|
+
case 409:
|
|
2185
|
+
throw new LevelFour.ConflictError(
|
|
2186
|
+
_response.error.body,
|
|
2187
|
+
_response.rawResponse
|
|
2188
|
+
);
|
|
2189
|
+
case 422:
|
|
2190
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
2191
|
+
_response.error.body,
|
|
2192
|
+
_response.rawResponse
|
|
2193
|
+
);
|
|
2194
|
+
case 429:
|
|
2195
|
+
throw new LevelFour.TooManyRequestsError(
|
|
2196
|
+
_response.error.body,
|
|
2197
|
+
_response.rawResponse
|
|
2198
|
+
);
|
|
2199
|
+
case 500:
|
|
2200
|
+
throw new LevelFour.InternalServerError(
|
|
2201
|
+
_response.error.body,
|
|
2202
|
+
_response.rawResponse
|
|
2203
|
+
);
|
|
2204
|
+
default:
|
|
2205
|
+
throw new errors.LevelFourError({
|
|
2206
|
+
statusCode: _response.error.statusCode,
|
|
2207
|
+
body: _response.error.body,
|
|
2208
|
+
rawResponse: _response.rawResponse
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
return handleNonStatusCodeError(
|
|
2213
|
+
_response.error,
|
|
2214
|
+
_response.rawResponse,
|
|
2215
|
+
"GET",
|
|
2216
|
+
"/api/v1/providers/anthropic/usage/people/{person}/tools"
|
|
2217
|
+
);
|
|
2218
|
+
}
|
|
2219
|
+
/**
|
|
2220
|
+
* What a Claude Team plan cost in the range, seats and extra usage apart, from the Members lists and spend reports uploaded for it, and how that moved against the range of the same length before. seats is the latest Members list. savings_found adds up what the seat changes /team/people recommends save a month. monthly is the last six months through the end of the range. month_to_date is the bill of the month the range ends in, estimate that plus the daily average of the range's last 7 days for each day left in it, and last_month the month before. adoption counts the people who sent a request in the 7 days that end each day of the range, and the engaged among them, active on 3 or more of those days, beside the seats. Before the first upload, has_members and has_spend are false and every figure is zero.
|
|
2221
|
+
*
|
|
2222
|
+
* @param {LevelFour.GetTeamSummaryApiV1ProvidersAnthropicTeamSummaryGetRequest} request
|
|
2223
|
+
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2224
|
+
*
|
|
2225
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
2226
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
2227
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
2228
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
2229
|
+
* @throws {@link LevelFour.ConflictError}
|
|
2230
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
2231
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
2232
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
2233
|
+
*
|
|
2234
|
+
* @example
|
|
2235
|
+
* await client.anthropic.getTeamSummary({
|
|
2236
|
+
* start: "start",
|
|
2237
|
+
* end: "end"
|
|
2238
|
+
* })
|
|
2239
|
+
*/
|
|
2240
|
+
getTeamSummary(request, requestOptions) {
|
|
2241
|
+
return core.HttpResponsePromise.fromPromise(this.__getTeamSummary(request, requestOptions));
|
|
2242
|
+
}
|
|
2243
|
+
async __getTeamSummary(request, requestOptions) {
|
|
2244
|
+
const { start, end } = request;
|
|
2245
|
+
const _queryParams = {
|
|
2246
|
+
start,
|
|
2247
|
+
end
|
|
2248
|
+
};
|
|
2249
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
2250
|
+
const _headers = mergeHeaders(
|
|
2251
|
+
_authRequest.headers,
|
|
2252
|
+
this._options?.headers,
|
|
2253
|
+
requestOptions?.headers
|
|
2254
|
+
);
|
|
2255
|
+
const _response = await core.fetcher({
|
|
2256
|
+
url: core.url.join(
|
|
2257
|
+
await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment),
|
|
2258
|
+
"api/v1/providers/anthropic/team/summary"
|
|
2259
|
+
),
|
|
2260
|
+
method: "GET",
|
|
2261
|
+
headers: _headers,
|
|
2262
|
+
queryParameters: { ..._queryParams, ...requestOptions?.queryParams },
|
|
2263
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
2264
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
2265
|
+
abortSignal: requestOptions?.abortSignal,
|
|
2266
|
+
fetchFn: this._options?.fetch,
|
|
2267
|
+
logging: this._options.logging
|
|
2268
|
+
});
|
|
2269
|
+
if (_response.ok) {
|
|
2270
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
2271
|
+
}
|
|
2272
|
+
if (_response.error.reason === "status-code") {
|
|
2273
|
+
switch (_response.error.statusCode) {
|
|
2274
|
+
case 400:
|
|
2275
|
+
throw new LevelFour.BadRequestError(
|
|
2276
|
+
_response.error.body,
|
|
2277
|
+
_response.rawResponse
|
|
2278
|
+
);
|
|
2279
|
+
case 401:
|
|
2280
|
+
throw new LevelFour.UnauthorizedError(
|
|
2281
|
+
_response.error.body,
|
|
2282
|
+
_response.rawResponse
|
|
2283
|
+
);
|
|
2284
|
+
case 403:
|
|
2285
|
+
throw new LevelFour.ForbiddenError(
|
|
2286
|
+
_response.error.body,
|
|
2287
|
+
_response.rawResponse
|
|
2288
|
+
);
|
|
2289
|
+
case 404:
|
|
2290
|
+
throw new LevelFour.NotFoundError(
|
|
2291
|
+
_response.error.body,
|
|
2292
|
+
_response.rawResponse
|
|
2293
|
+
);
|
|
2294
|
+
case 409:
|
|
2295
|
+
throw new LevelFour.ConflictError(
|
|
2296
|
+
_response.error.body,
|
|
2297
|
+
_response.rawResponse
|
|
2298
|
+
);
|
|
2299
|
+
case 422:
|
|
2300
|
+
throw new LevelFour.UnprocessableEntityError(
|
|
2301
|
+
_response.error.body,
|
|
2302
|
+
_response.rawResponse
|
|
2303
|
+
);
|
|
2304
|
+
case 429:
|
|
2305
|
+
throw new LevelFour.TooManyRequestsError(
|
|
2306
|
+
_response.error.body,
|
|
2307
|
+
_response.rawResponse
|
|
2308
|
+
);
|
|
2309
|
+
case 500:
|
|
2310
|
+
throw new LevelFour.InternalServerError(
|
|
2311
|
+
_response.error.body,
|
|
2312
|
+
_response.rawResponse
|
|
2313
|
+
);
|
|
2314
|
+
default:
|
|
2315
|
+
throw new errors.LevelFourError({
|
|
2316
|
+
statusCode: _response.error.statusCode,
|
|
2317
|
+
body: _response.error.body,
|
|
2318
|
+
rawResponse: _response.rawResponse
|
|
2319
|
+
});
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
return handleNonStatusCodeError(
|
|
2323
|
+
_response.error,
|
|
2324
|
+
_response.rawResponse,
|
|
2325
|
+
"GET",
|
|
2326
|
+
"/api/v1/providers/anthropic/team/summary"
|
|
2327
|
+
);
|
|
2328
|
+
}
|
|
2329
|
+
/**
|
|
2330
|
+
* One row per person the latest Members list names, the spend reports count or Claude Code reported, over the 7 and 30 days that end on the last day the spend reports cover. Tokens count every product the spend report names, and a product telemetry also counts is taken at whichever counted more. recommendation is the one rule a seat meets: remove for a seat unused for more than two weeks in a row, upgrade for a Standard seat whose extra usage in 30 days passed what Premium costs above it, downgrade for a Premium seat used less than the weekly token threshold in /team/settings. rules counts each rule over everyone, whatever the filters keep. A spend report that holds overage alone hides Chat inside the allowance: on one, downgrade reads Claude Code and Cowork telemetry for the people who report it, and remove is not available. Each row adds the requests that failed the person and the rate limits among them in the 30 days, the version their install reported last against latest_version, the newest an install seen in 30 days is on, whether its settings are managed, and states. state keeps the people in one state, and states counts each over the people the other filters keep. The largest saving comes first. format=csv answers every row the filters keep. The answer names people, so it is sent with Cache-Control: no-store.
|
|
2331
|
+
*
|
|
2332
|
+
* @param {LevelFour.GetTeamPeopleApiV1ProvidersAnthropicTeamPeopleGetRequest} request
|
|
2333
|
+
* @param {AnthropicClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
2334
|
+
*
|
|
2335
|
+
* @throws {@link LevelFour.BadRequestError}
|
|
2336
|
+
* @throws {@link LevelFour.UnauthorizedError}
|
|
2337
|
+
* @throws {@link LevelFour.ForbiddenError}
|
|
2338
|
+
* @throws {@link LevelFour.NotFoundError}
|
|
2339
|
+
* @throws {@link LevelFour.ConflictError}
|
|
2340
|
+
* @throws {@link LevelFour.UnprocessableEntityError}
|
|
2341
|
+
* @throws {@link LevelFour.TooManyRequestsError}
|
|
2342
|
+
* @throws {@link LevelFour.InternalServerError}
|
|
2343
|
+
*
|
|
2344
|
+
* @example
|
|
2345
|
+
* await client.anthropic.getTeamPeople()
|
|
2346
|
+
*/
|
|
2347
|
+
getTeamPeople(request = {}, requestOptions) {
|
|
2348
|
+
return core.HttpResponsePromise.fromPromise(this.__getTeamPeople(request, requestOptions));
|
|
2349
|
+
}
|
|
2350
|
+
async __getTeamPeople(request = {}, requestOptions) {
|
|
2351
|
+
const {
|
|
2352
|
+
page,
|
|
2353
|
+
page_size: pageSize,
|
|
2354
|
+
search,
|
|
2355
|
+
area,
|
|
2356
|
+
seat,
|
|
2357
|
+
product,
|
|
2358
|
+
recommendation,
|
|
2359
|
+
state,
|
|
2360
|
+
sort,
|
|
2361
|
+
order,
|
|
2362
|
+
format
|
|
2363
|
+
} = request;
|
|
1689
2364
|
const _queryParams = {
|
|
1690
2365
|
page,
|
|
1691
2366
|
page_size: pageSize,
|
|
@@ -1694,6 +2369,7 @@ class AnthropicClient {
|
|
|
1694
2369
|
seat: seat !== void 0 ? seat : void 0,
|
|
1695
2370
|
product,
|
|
1696
2371
|
recommendation: recommendation !== void 0 ? recommendation : void 0,
|
|
2372
|
+
state: state !== void 0 ? state : void 0,
|
|
1697
2373
|
sort: sort != null ? sort : void 0,
|
|
1698
2374
|
order: order != null ? order : void 0,
|
|
1699
2375
|
format: format != null ? format : void 0
|