@meetkai/mka1 0.48.32 → 0.48.33
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/README.md +300 -258
- package/bin/mcp-server.js +5543 -3136
- package/bin/mcp-server.js.map +43 -7
- package/dist/commonjs/funcs/budgetsApiKeyEvents.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsApiKeyEvents.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsApiKeyEvents.js +130 -0
- package/dist/commonjs/funcs/budgetsApiKeyEvents.js.map +1 -0
- package/dist/commonjs/funcs/budgetsDeleteApiKey.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsDeleteApiKey.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsDeleteApiKey.js +134 -0
- package/dist/commonjs/funcs/budgetsDeleteApiKey.js.map +1 -0
- package/dist/commonjs/funcs/budgetsDeleteOrg.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsDeleteOrg.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsDeleteOrg.js +134 -0
- package/dist/commonjs/funcs/budgetsDeleteOrg.js.map +1 -0
- package/dist/commonjs/funcs/budgetsGetApiKey.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsGetApiKey.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsGetApiKey.js +130 -0
- package/dist/commonjs/funcs/budgetsGetApiKey.js.map +1 -0
- package/dist/commonjs/funcs/budgetsGetCurrency.d.ts +14 -0
- package/dist/commonjs/funcs/budgetsGetCurrency.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsGetCurrency.js +112 -0
- package/dist/commonjs/funcs/budgetsGetCurrency.js.map +1 -0
- package/dist/commonjs/funcs/budgetsGetOrg.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsGetOrg.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsGetOrg.js +130 -0
- package/dist/commonjs/funcs/budgetsGetOrg.js.map +1 -0
- package/dist/commonjs/funcs/budgetsList.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsList.js +115 -0
- package/dist/commonjs/funcs/budgetsList.js.map +1 -0
- package/dist/commonjs/funcs/budgetsOrgEvents.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsOrgEvents.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsOrgEvents.js +130 -0
- package/dist/commonjs/funcs/budgetsOrgEvents.js.map +1 -0
- package/dist/commonjs/funcs/budgetsSetApiKey.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsSetApiKey.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsSetApiKey.js +131 -0
- package/dist/commonjs/funcs/budgetsSetApiKey.js.map +1 -0
- package/dist/commonjs/funcs/budgetsSetCurrency.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsSetCurrency.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsSetCurrency.js +125 -0
- package/dist/commonjs/funcs/budgetsSetCurrency.js.map +1 -0
- package/dist/commonjs/funcs/budgetsSetOrg.d.ts +17 -0
- package/dist/commonjs/funcs/budgetsSetOrg.d.ts.map +1 -0
- package/dist/commonjs/funcs/budgetsSetOrg.js +131 -0
- package/dist/commonjs/funcs/budgetsSetOrg.js.map +1 -0
- package/dist/commonjs/funcs/usageCosts.d.ts +17 -0
- package/dist/commonjs/funcs/usageCosts.d.ts.map +1 -0
- package/dist/commonjs/funcs/usageCosts.js +131 -0
- package/dist/commonjs/funcs/usageCosts.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +25 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/budgetsApiKeyEvents.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsApiKeyEvents.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsApiKeyEvents.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsApiKeyEvents.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteApiKey.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteApiKey.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteApiKey.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteApiKey.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteOrg.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteOrg.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteOrg.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsDeleteOrg.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetApiKey.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetApiKey.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetApiKey.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetApiKey.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetCurrency.d.ts +3 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetCurrency.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetCurrency.js +24 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetCurrency.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetOrg.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetOrg.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetOrg.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsGetOrg.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsList.d.ts +3 -0
- package/dist/commonjs/mcp-server/tools/budgetsList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsList.js +26 -0
- package/dist/commonjs/mcp-server/tools/budgetsList.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsOrgEvents.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsOrgEvents.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsOrgEvents.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsOrgEvents.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetApiKey.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetApiKey.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetApiKey.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetApiKey.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetCurrency.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetCurrency.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetCurrency.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetCurrency.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetOrg.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetOrg.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetOrg.js +64 -0
- package/dist/commonjs/mcp-server/tools/budgetsSetOrg.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/usageCosts.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/usageCosts.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/usageCosts.js +64 -0
- package/dist/commonjs/mcp-server/tools/usageCosts.js.map +1 -0
- package/dist/commonjs/models/operations/deleteapikeybudget.d.ts +69 -0
- package/dist/commonjs/models/operations/deleteapikeybudget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deleteapikeybudget.js +115 -0
- package/dist/commonjs/models/operations/deleteapikeybudget.js.map +1 -0
- package/dist/commonjs/models/operations/deleteorgbudget.d.ts +69 -0
- package/dist/commonjs/models/operations/deleteorgbudget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deleteorgbudget.js +115 -0
- package/dist/commonjs/models/operations/deleteorgbudget.js.map +1 -0
- package/dist/commonjs/models/operations/getapikeybudgets.d.ts +153 -0
- package/dist/commonjs/models/operations/getapikeybudgets.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getapikeybudgets.js +210 -0
- package/dist/commonjs/models/operations/getapikeybudgets.js.map +1 -0
- package/dist/commonjs/models/operations/getcosts.d.ts +78 -0
- package/dist/commonjs/models/operations/getcosts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getcosts.js +169 -0
- package/dist/commonjs/models/operations/getcosts.js.map +1 -0
- package/dist/commonjs/models/operations/getcurrency.d.ts +20 -0
- package/dist/commonjs/models/operations/getcurrency.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getcurrency.js +58 -0
- package/dist/commonjs/models/operations/getcurrency.js.map +1 -0
- package/dist/commonjs/models/operations/getorgbudgets.d.ts +153 -0
- package/dist/commonjs/models/operations/getorgbudgets.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgbudgets.js +210 -0
- package/dist/commonjs/models/operations/getorgbudgets.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +12 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +12 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listapikeybudgetevents.d.ts +72 -0
- package/dist/commonjs/models/operations/listapikeybudgetevents.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listapikeybudgetevents.js +131 -0
- package/dist/commonjs/models/operations/listapikeybudgetevents.js.map +1 -0
- package/dist/commonjs/models/operations/listbudgets.d.ts +140 -0
- package/dist/commonjs/models/operations/listbudgets.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listbudgets.js +194 -0
- package/dist/commonjs/models/operations/listbudgets.js.map +1 -0
- package/dist/commonjs/models/operations/listorgbudgetevents.d.ts +72 -0
- package/dist/commonjs/models/operations/listorgbudgetevents.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listorgbudgetevents.js +131 -0
- package/dist/commonjs/models/operations/listorgbudgetevents.js.map +1 -0
- package/dist/commonjs/models/operations/setapikeybudget.d.ts +218 -0
- package/dist/commonjs/models/operations/setapikeybudget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/setapikeybudget.js +284 -0
- package/dist/commonjs/models/operations/setapikeybudget.js.map +1 -0
- package/dist/commonjs/models/operations/setcurrency.d.ts +33 -0
- package/dist/commonjs/models/operations/setcurrency.d.ts.map +1 -0
- package/dist/commonjs/models/operations/setcurrency.js +74 -0
- package/dist/commonjs/models/operations/setcurrency.js.map +1 -0
- package/dist/commonjs/models/operations/setorgbudget.d.ts +218 -0
- package/dist/commonjs/models/operations/setorgbudget.d.ts.map +1 -0
- package/dist/commonjs/models/operations/setorgbudget.js +287 -0
- package/dist/commonjs/models/operations/setorgbudget.js.map +1 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.core.d.ts +12 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.core.js +34 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.core.js.map +1 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.js +60 -0
- package/dist/commonjs/react-query/budgetsApiKeyEvents.js.map +1 -0
- package/dist/commonjs/react-query/budgetsDeleteApiKey.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsDeleteApiKey.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsDeleteApiKey.js +47 -0
- package/dist/commonjs/react-query/budgetsDeleteApiKey.js.map +1 -0
- package/dist/commonjs/react-query/budgetsDeleteOrg.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsDeleteOrg.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsDeleteOrg.js +47 -0
- package/dist/commonjs/react-query/budgetsDeleteOrg.js.map +1 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.core.d.ts +12 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.core.js +34 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.core.js.map +1 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.js +60 -0
- package/dist/commonjs/react-query/budgetsGetApiKey.js.map +1 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.core.d.ts +12 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.core.js +34 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.core.js.map +1 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.d.ts +20 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.js +47 -0
- package/dist/commonjs/react-query/budgetsGetCurrency.js.map +1 -0
- package/dist/commonjs/react-query/budgetsGetOrg.core.d.ts +12 -0
- package/dist/commonjs/react-query/budgetsGetOrg.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsGetOrg.core.js +34 -0
- package/dist/commonjs/react-query/budgetsGetOrg.core.js.map +1 -0
- package/dist/commonjs/react-query/budgetsGetOrg.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsGetOrg.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsGetOrg.js +60 -0
- package/dist/commonjs/react-query/budgetsGetOrg.js.map +1 -0
- package/dist/commonjs/react-query/budgetsList.core.d.ts +12 -0
- package/dist/commonjs/react-query/budgetsList.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsList.core.js +34 -0
- package/dist/commonjs/react-query/budgetsList.core.js.map +1 -0
- package/dist/commonjs/react-query/budgetsList.d.ts +26 -0
- package/dist/commonjs/react-query/budgetsList.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsList.js +53 -0
- package/dist/commonjs/react-query/budgetsList.js.map +1 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.core.d.ts +12 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.core.js +34 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.core.js.map +1 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.js +60 -0
- package/dist/commonjs/react-query/budgetsOrgEvents.js.map +1 -0
- package/dist/commonjs/react-query/budgetsSetApiKey.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsSetApiKey.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsSetApiKey.js +47 -0
- package/dist/commonjs/react-query/budgetsSetApiKey.js.map +1 -0
- package/dist/commonjs/react-query/budgetsSetCurrency.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsSetCurrency.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsSetCurrency.js +47 -0
- package/dist/commonjs/react-query/budgetsSetCurrency.js.map +1 -0
- package/dist/commonjs/react-query/budgetsSetOrg.d.ts +28 -0
- package/dist/commonjs/react-query/budgetsSetOrg.d.ts.map +1 -0
- package/dist/commonjs/react-query/budgetsSetOrg.js +47 -0
- package/dist/commonjs/react-query/budgetsSetOrg.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +12 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +12 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/usageCosts.core.d.ts +17 -0
- package/dist/commonjs/react-query/usageCosts.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/usageCosts.core.js +39 -0
- package/dist/commonjs/react-query/usageCosts.core.js.map +1 -0
- package/dist/commonjs/react-query/usageCosts.d.ts +42 -0
- package/dist/commonjs/react-query/usageCosts.d.ts.map +1 -0
- package/dist/commonjs/react-query/usageCosts.js +60 -0
- package/dist/commonjs/react-query/usageCosts.js.map +1 -0
- package/dist/commonjs/sdk/budgets.d.ts +79 -0
- package/dist/commonjs/sdk/budgets.d.ts.map +1 -0
- package/dist/commonjs/sdk/budgets.js +119 -0
- package/dist/commonjs/sdk/budgets.js.map +1 -0
- package/dist/commonjs/sdk/llm.d.ts +2 -2
- package/dist/commonjs/sdk/llm.d.ts.map +1 -1
- package/dist/commonjs/sdk/llm.js +2 -2
- package/dist/commonjs/sdk/llm.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +8 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/sdkusage.d.ts +69 -0
- package/dist/commonjs/sdk/sdkusage.d.ts.map +1 -0
- package/dist/commonjs/sdk/sdkusage.js +102 -0
- package/dist/commonjs/sdk/sdkusage.js.map +1 -0
- package/dist/commonjs/sdk/usage.d.ts +3 -60
- package/dist/commonjs/sdk/usage.d.ts.map +1 -1
- package/dist/commonjs/sdk/usage.js +4 -84
- package/dist/commonjs/sdk/usage.js.map +1 -1
- package/dist/esm/funcs/budgetsApiKeyEvents.d.ts +17 -0
- package/dist/esm/funcs/budgetsApiKeyEvents.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsApiKeyEvents.js +94 -0
- package/dist/esm/funcs/budgetsApiKeyEvents.js.map +1 -0
- package/dist/esm/funcs/budgetsDeleteApiKey.d.ts +17 -0
- package/dist/esm/funcs/budgetsDeleteApiKey.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsDeleteApiKey.js +98 -0
- package/dist/esm/funcs/budgetsDeleteApiKey.js.map +1 -0
- package/dist/esm/funcs/budgetsDeleteOrg.d.ts +17 -0
- package/dist/esm/funcs/budgetsDeleteOrg.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsDeleteOrg.js +98 -0
- package/dist/esm/funcs/budgetsDeleteOrg.js.map +1 -0
- package/dist/esm/funcs/budgetsGetApiKey.d.ts +17 -0
- package/dist/esm/funcs/budgetsGetApiKey.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsGetApiKey.js +94 -0
- package/dist/esm/funcs/budgetsGetApiKey.js.map +1 -0
- package/dist/esm/funcs/budgetsGetCurrency.d.ts +14 -0
- package/dist/esm/funcs/budgetsGetCurrency.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsGetCurrency.js +76 -0
- package/dist/esm/funcs/budgetsGetCurrency.js.map +1 -0
- package/dist/esm/funcs/budgetsGetOrg.d.ts +17 -0
- package/dist/esm/funcs/budgetsGetOrg.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsGetOrg.js +94 -0
- package/dist/esm/funcs/budgetsGetOrg.js.map +1 -0
- package/dist/esm/funcs/budgetsList.d.ts +17 -0
- package/dist/esm/funcs/budgetsList.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsList.js +79 -0
- package/dist/esm/funcs/budgetsList.js.map +1 -0
- package/dist/esm/funcs/budgetsOrgEvents.d.ts +17 -0
- package/dist/esm/funcs/budgetsOrgEvents.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsOrgEvents.js +94 -0
- package/dist/esm/funcs/budgetsOrgEvents.js.map +1 -0
- package/dist/esm/funcs/budgetsSetApiKey.d.ts +17 -0
- package/dist/esm/funcs/budgetsSetApiKey.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsSetApiKey.js +95 -0
- package/dist/esm/funcs/budgetsSetApiKey.js.map +1 -0
- package/dist/esm/funcs/budgetsSetCurrency.d.ts +17 -0
- package/dist/esm/funcs/budgetsSetCurrency.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsSetCurrency.js +89 -0
- package/dist/esm/funcs/budgetsSetCurrency.js.map +1 -0
- package/dist/esm/funcs/budgetsSetOrg.d.ts +17 -0
- package/dist/esm/funcs/budgetsSetOrg.d.ts.map +1 -0
- package/dist/esm/funcs/budgetsSetOrg.js +95 -0
- package/dist/esm/funcs/budgetsSetOrg.js.map +1 -0
- package/dist/esm/funcs/usageCosts.d.ts +17 -0
- package/dist/esm/funcs/usageCosts.d.ts.map +1 -0
- package/dist/esm/funcs/usageCosts.js +95 -0
- package/dist/esm/funcs/usageCosts.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +25 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/budgetsApiKeyEvents.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsApiKeyEvents.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsApiKeyEvents.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsApiKeyEvents.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteApiKey.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteApiKey.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteApiKey.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteApiKey.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteOrg.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteOrg.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteOrg.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsDeleteOrg.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsGetApiKey.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsGetApiKey.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsGetApiKey.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsGetApiKey.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsGetCurrency.d.ts +3 -0
- package/dist/esm/mcp-server/tools/budgetsGetCurrency.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsGetCurrency.js +21 -0
- package/dist/esm/mcp-server/tools/budgetsGetCurrency.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsGetOrg.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsGetOrg.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsGetOrg.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsGetOrg.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsList.d.ts +3 -0
- package/dist/esm/mcp-server/tools/budgetsList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsList.js +23 -0
- package/dist/esm/mcp-server/tools/budgetsList.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsOrgEvents.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsOrgEvents.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsOrgEvents.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsOrgEvents.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsSetApiKey.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsSetApiKey.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsSetApiKey.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsSetApiKey.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsSetCurrency.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsSetCurrency.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsSetCurrency.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsSetCurrency.js.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsSetOrg.d.ts +8 -0
- package/dist/esm/mcp-server/tools/budgetsSetOrg.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/budgetsSetOrg.js +28 -0
- package/dist/esm/mcp-server/tools/budgetsSetOrg.js.map +1 -0
- package/dist/esm/mcp-server/tools/usageCosts.d.ts +8 -0
- package/dist/esm/mcp-server/tools/usageCosts.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/usageCosts.js +28 -0
- package/dist/esm/mcp-server/tools/usageCosts.js.map +1 -0
- package/dist/esm/models/operations/deleteapikeybudget.d.ts +69 -0
- package/dist/esm/models/operations/deleteapikeybudget.d.ts.map +1 -0
- package/dist/esm/models/operations/deleteapikeybudget.js +75 -0
- package/dist/esm/models/operations/deleteapikeybudget.js.map +1 -0
- package/dist/esm/models/operations/deleteorgbudget.d.ts +69 -0
- package/dist/esm/models/operations/deleteorgbudget.d.ts.map +1 -0
- package/dist/esm/models/operations/deleteorgbudget.js +75 -0
- package/dist/esm/models/operations/deleteorgbudget.js.map +1 -0
- package/dist/esm/models/operations/getapikeybudgets.d.ts +153 -0
- package/dist/esm/models/operations/getapikeybudgets.d.ts.map +1 -0
- package/dist/esm/models/operations/getapikeybudgets.js +164 -0
- package/dist/esm/models/operations/getapikeybudgets.js.map +1 -0
- package/dist/esm/models/operations/getcosts.d.ts +78 -0
- package/dist/esm/models/operations/getcosts.d.ts.map +1 -0
- package/dist/esm/models/operations/getcosts.js +127 -0
- package/dist/esm/models/operations/getcosts.js.map +1 -0
- package/dist/esm/models/operations/getcurrency.d.ts +20 -0
- package/dist/esm/models/operations/getcurrency.d.ts.map +1 -0
- package/dist/esm/models/operations/getcurrency.js +20 -0
- package/dist/esm/models/operations/getcurrency.js.map +1 -0
- package/dist/esm/models/operations/getorgbudgets.d.ts +153 -0
- package/dist/esm/models/operations/getorgbudgets.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgbudgets.js +164 -0
- package/dist/esm/models/operations/getorgbudgets.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +12 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +12 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listapikeybudgetevents.d.ts +72 -0
- package/dist/esm/models/operations/listapikeybudgetevents.d.ts.map +1 -0
- package/dist/esm/models/operations/listapikeybudgetevents.js +89 -0
- package/dist/esm/models/operations/listapikeybudgetevents.js.map +1 -0
- package/dist/esm/models/operations/listbudgets.d.ts +140 -0
- package/dist/esm/models/operations/listbudgets.d.ts.map +1 -0
- package/dist/esm/models/operations/listbudgets.js +150 -0
- package/dist/esm/models/operations/listbudgets.js.map +1 -0
- package/dist/esm/models/operations/listorgbudgetevents.d.ts +72 -0
- package/dist/esm/models/operations/listorgbudgetevents.d.ts.map +1 -0
- package/dist/esm/models/operations/listorgbudgetevents.js +89 -0
- package/dist/esm/models/operations/listorgbudgetevents.js.map +1 -0
- package/dist/esm/models/operations/setapikeybudget.d.ts +218 -0
- package/dist/esm/models/operations/setapikeybudget.d.ts.map +1 -0
- package/dist/esm/models/operations/setapikeybudget.js +236 -0
- package/dist/esm/models/operations/setapikeybudget.js.map +1 -0
- package/dist/esm/models/operations/setcurrency.d.ts +33 -0
- package/dist/esm/models/operations/setcurrency.d.ts.map +1 -0
- package/dist/esm/models/operations/setcurrency.js +34 -0
- package/dist/esm/models/operations/setcurrency.js.map +1 -0
- package/dist/esm/models/operations/setorgbudget.d.ts +218 -0
- package/dist/esm/models/operations/setorgbudget.d.ts.map +1 -0
- package/dist/esm/models/operations/setorgbudget.js +239 -0
- package/dist/esm/models/operations/setorgbudget.js.map +1 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.core.d.ts +12 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.core.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.core.js +29 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.core.js.map +1 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.d.ts +28 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.js +50 -0
- package/dist/esm/react-query/budgetsApiKeyEvents.js.map +1 -0
- package/dist/esm/react-query/budgetsDeleteApiKey.d.ts +28 -0
- package/dist/esm/react-query/budgetsDeleteApiKey.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsDeleteApiKey.js +42 -0
- package/dist/esm/react-query/budgetsDeleteApiKey.js.map +1 -0
- package/dist/esm/react-query/budgetsDeleteOrg.d.ts +28 -0
- package/dist/esm/react-query/budgetsDeleteOrg.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsDeleteOrg.js +42 -0
- package/dist/esm/react-query/budgetsDeleteOrg.js.map +1 -0
- package/dist/esm/react-query/budgetsGetApiKey.core.d.ts +12 -0
- package/dist/esm/react-query/budgetsGetApiKey.core.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsGetApiKey.core.js +29 -0
- package/dist/esm/react-query/budgetsGetApiKey.core.js.map +1 -0
- package/dist/esm/react-query/budgetsGetApiKey.d.ts +28 -0
- package/dist/esm/react-query/budgetsGetApiKey.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsGetApiKey.js +50 -0
- package/dist/esm/react-query/budgetsGetApiKey.js.map +1 -0
- package/dist/esm/react-query/budgetsGetCurrency.core.d.ts +12 -0
- package/dist/esm/react-query/budgetsGetCurrency.core.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsGetCurrency.core.js +29 -0
- package/dist/esm/react-query/budgetsGetCurrency.core.js.map +1 -0
- package/dist/esm/react-query/budgetsGetCurrency.d.ts +20 -0
- package/dist/esm/react-query/budgetsGetCurrency.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsGetCurrency.js +38 -0
- package/dist/esm/react-query/budgetsGetCurrency.js.map +1 -0
- package/dist/esm/react-query/budgetsGetOrg.core.d.ts +12 -0
- package/dist/esm/react-query/budgetsGetOrg.core.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsGetOrg.core.js +29 -0
- package/dist/esm/react-query/budgetsGetOrg.core.js.map +1 -0
- package/dist/esm/react-query/budgetsGetOrg.d.ts +28 -0
- package/dist/esm/react-query/budgetsGetOrg.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsGetOrg.js +50 -0
- package/dist/esm/react-query/budgetsGetOrg.js.map +1 -0
- package/dist/esm/react-query/budgetsList.core.d.ts +12 -0
- package/dist/esm/react-query/budgetsList.core.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsList.core.js +29 -0
- package/dist/esm/react-query/budgetsList.core.js.map +1 -0
- package/dist/esm/react-query/budgetsList.d.ts +26 -0
- package/dist/esm/react-query/budgetsList.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsList.js +44 -0
- package/dist/esm/react-query/budgetsList.js.map +1 -0
- package/dist/esm/react-query/budgetsOrgEvents.core.d.ts +12 -0
- package/dist/esm/react-query/budgetsOrgEvents.core.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsOrgEvents.core.js +29 -0
- package/dist/esm/react-query/budgetsOrgEvents.core.js.map +1 -0
- package/dist/esm/react-query/budgetsOrgEvents.d.ts +28 -0
- package/dist/esm/react-query/budgetsOrgEvents.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsOrgEvents.js +50 -0
- package/dist/esm/react-query/budgetsOrgEvents.js.map +1 -0
- package/dist/esm/react-query/budgetsSetApiKey.d.ts +28 -0
- package/dist/esm/react-query/budgetsSetApiKey.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsSetApiKey.js +42 -0
- package/dist/esm/react-query/budgetsSetApiKey.js.map +1 -0
- package/dist/esm/react-query/budgetsSetCurrency.d.ts +28 -0
- package/dist/esm/react-query/budgetsSetCurrency.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsSetCurrency.js +42 -0
- package/dist/esm/react-query/budgetsSetCurrency.js.map +1 -0
- package/dist/esm/react-query/budgetsSetOrg.d.ts +28 -0
- package/dist/esm/react-query/budgetsSetOrg.d.ts.map +1 -0
- package/dist/esm/react-query/budgetsSetOrg.js +42 -0
- package/dist/esm/react-query/budgetsSetOrg.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +12 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +12 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/usageCosts.core.d.ts +17 -0
- package/dist/esm/react-query/usageCosts.core.d.ts.map +1 -0
- package/dist/esm/react-query/usageCosts.core.js +34 -0
- package/dist/esm/react-query/usageCosts.core.js.map +1 -0
- package/dist/esm/react-query/usageCosts.d.ts +42 -0
- package/dist/esm/react-query/usageCosts.d.ts.map +1 -0
- package/dist/esm/react-query/usageCosts.js +50 -0
- package/dist/esm/react-query/usageCosts.js.map +1 -0
- package/dist/esm/sdk/budgets.d.ts +79 -0
- package/dist/esm/sdk/budgets.d.ts.map +1 -0
- package/dist/esm/sdk/budgets.js +115 -0
- package/dist/esm/sdk/budgets.js.map +1 -0
- package/dist/esm/sdk/llm.d.ts +2 -2
- package/dist/esm/sdk/llm.d.ts.map +1 -1
- package/dist/esm/sdk/llm.js +2 -2
- package/dist/esm/sdk/llm.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +8 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/sdkusage.d.ts +69 -0
- package/dist/esm/sdk/sdkusage.d.ts.map +1 -0
- package/dist/esm/sdk/sdkusage.js +98 -0
- package/dist/esm/sdk/sdkusage.js.map +1 -0
- package/dist/esm/sdk/usage.d.ts +3 -60
- package/dist/esm/sdk/usage.d.ts.map +1 -1
- package/dist/esm/sdk/usage.js +4 -84
- package/dist/esm/sdk/usage.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/budgetsApiKeyEvents.ts +180 -0
- package/src/funcs/budgetsDeleteApiKey.ts +184 -0
- package/src/funcs/budgetsDeleteOrg.ts +182 -0
- package/src/funcs/budgetsGetApiKey.ts +179 -0
- package/src/funcs/budgetsGetCurrency.ts +151 -0
- package/src/funcs/budgetsGetOrg.ts +177 -0
- package/src/funcs/budgetsList.ts +154 -0
- package/src/funcs/budgetsOrgEvents.ts +180 -0
- package/src/funcs/budgetsSetApiKey.ts +180 -0
- package/src/funcs/budgetsSetCurrency.ts +172 -0
- package/src/funcs/budgetsSetOrg.ts +178 -0
- package/src/funcs/usageCosts.ts +179 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +25 -1
- package/src/mcp-server/tools/budgetsApiKeyEvents.ts +37 -0
- package/src/mcp-server/tools/budgetsDeleteApiKey.ts +37 -0
- package/src/mcp-server/tools/budgetsDeleteOrg.ts +37 -0
- package/src/mcp-server/tools/budgetsGetApiKey.ts +37 -0
- package/src/mcp-server/tools/budgetsGetCurrency.ts +28 -0
- package/src/mcp-server/tools/budgetsGetOrg.ts +37 -0
- package/src/mcp-server/tools/budgetsList.ts +30 -0
- package/src/mcp-server/tools/budgetsOrgEvents.ts +37 -0
- package/src/mcp-server/tools/budgetsSetApiKey.ts +37 -0
- package/src/mcp-server/tools/budgetsSetCurrency.ts +37 -0
- package/src/mcp-server/tools/budgetsSetOrg.ts +37 -0
- package/src/mcp-server/tools/usageCosts.ts +37 -0
- package/src/models/operations/deleteapikeybudget.ts +176 -0
- package/src/models/operations/deleteorgbudget.ts +170 -0
- package/src/models/operations/getapikeybudgets.ts +386 -0
- package/src/models/operations/getcosts.ts +245 -0
- package/src/models/operations/getcurrency.ts +54 -0
- package/src/models/operations/getorgbudgets.ts +384 -0
- package/src/models/operations/index.ts +12 -0
- package/src/models/operations/listapikeybudgetevents.ts +212 -0
- package/src/models/operations/listbudgets.ts +339 -0
- package/src/models/operations/listorgbudgetevents.ts +206 -0
- package/src/models/operations/setapikeybudget.ts +541 -0
- package/src/models/operations/setcurrency.ts +97 -0
- package/src/models/operations/setorgbudget.ts +510 -0
- package/src/react-query/budgetsApiKeyEvents.core.ts +71 -0
- package/src/react-query/budgetsApiKeyEvents.ts +133 -0
- package/src/react-query/budgetsDeleteApiKey.ts +109 -0
- package/src/react-query/budgetsDeleteOrg.ts +109 -0
- package/src/react-query/budgetsGetApiKey.core.ts +70 -0
- package/src/react-query/budgetsGetApiKey.ts +133 -0
- package/src/react-query/budgetsGetCurrency.core.ts +66 -0
- package/src/react-query/budgetsGetCurrency.ts +106 -0
- package/src/react-query/budgetsGetOrg.core.ts +68 -0
- package/src/react-query/budgetsGetOrg.ts +127 -0
- package/src/react-query/budgetsList.core.ts +64 -0
- package/src/react-query/budgetsList.ts +106 -0
- package/src/react-query/budgetsOrgEvents.core.ts +71 -0
- package/src/react-query/budgetsOrgEvents.ts +133 -0
- package/src/react-query/budgetsSetApiKey.ts +109 -0
- package/src/react-query/budgetsSetCurrency.ts +108 -0
- package/src/react-query/budgetsSetOrg.ts +108 -0
- package/src/react-query/index.ts +12 -0
- package/src/react-query/usageCosts.core.ts +80 -0
- package/src/react-query/usageCosts.ts +138 -0
- package/src/sdk/budgets.ts +200 -0
- package/src/sdk/llm.ts +4 -4
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/sdkusage.ts +172 -0
- package/src/sdk/usage.ts +6 -151
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* cluster = operator ceiling (org-admin read-only); org = self-budget
|
|
14
|
+
*/
|
|
15
|
+
export const SetApiKeyBudgetOwner = {
|
|
16
|
+
Cluster: "cluster",
|
|
17
|
+
Org: "org",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* cluster = operator ceiling (org-admin read-only); org = self-budget
|
|
21
|
+
*/
|
|
22
|
+
export type SetApiKeyBudgetOwner = ClosedEnum<typeof SetApiKeyBudgetOwner>;
|
|
23
|
+
|
|
24
|
+
export const SetApiKeyBudgetPeriod = {
|
|
25
|
+
Daily: "daily",
|
|
26
|
+
Weekly: "weekly",
|
|
27
|
+
Monthly: "monthly",
|
|
28
|
+
} as const;
|
|
29
|
+
export type SetApiKeyBudgetPeriod = ClosedEnum<typeof SetApiKeyBudgetPeriod>;
|
|
30
|
+
|
|
31
|
+
export const SetApiKeyBudgetAction = {
|
|
32
|
+
Alert: "alert",
|
|
33
|
+
Block: "block",
|
|
34
|
+
} as const;
|
|
35
|
+
export type SetApiKeyBudgetAction = ClosedEnum<typeof SetApiKeyBudgetAction>;
|
|
36
|
+
|
|
37
|
+
export type SetApiKeyBudgetThresholds = {
|
|
38
|
+
pct: number;
|
|
39
|
+
action: SetApiKeyBudgetAction;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type SetApiKeyBudgetRequestBody = {
|
|
43
|
+
/**
|
|
44
|
+
* cluster = operator ceiling (org-admin read-only); org = self-budget
|
|
45
|
+
*/
|
|
46
|
+
owner?: SetApiKeyBudgetOwner | undefined;
|
|
47
|
+
period: SetApiKeyBudgetPeriod;
|
|
48
|
+
/**
|
|
49
|
+
* Spend limit in major currency units
|
|
50
|
+
*/
|
|
51
|
+
limit: number;
|
|
52
|
+
thresholds: Array<SetApiKeyBudgetThresholds>;
|
|
53
|
+
webhookUrl?: string | null | undefined;
|
|
54
|
+
webhookSecret?: string | null | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type SetApiKeyBudgetRequest = {
|
|
58
|
+
apiKeyId: string;
|
|
59
|
+
requestBody: SetApiKeyBudgetRequestBody;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const SetApiKeyBudgetScope = {
|
|
63
|
+
Org: "org",
|
|
64
|
+
Apikey: "apikey",
|
|
65
|
+
} as const;
|
|
66
|
+
export type SetApiKeyBudgetScope = ClosedEnum<typeof SetApiKeyBudgetScope>;
|
|
67
|
+
|
|
68
|
+
export const SetApiKeyBudgetBudgetsOwner = {
|
|
69
|
+
Cluster: "cluster",
|
|
70
|
+
Org: "org",
|
|
71
|
+
} as const;
|
|
72
|
+
export type SetApiKeyBudgetBudgetsOwner = ClosedEnum<
|
|
73
|
+
typeof SetApiKeyBudgetBudgetsOwner
|
|
74
|
+
>;
|
|
75
|
+
|
|
76
|
+
export const SetApiKeyBudgetBudgetsPeriod = {
|
|
77
|
+
Daily: "daily",
|
|
78
|
+
Weekly: "weekly",
|
|
79
|
+
Monthly: "monthly",
|
|
80
|
+
} as const;
|
|
81
|
+
export type SetApiKeyBudgetBudgetsPeriod = ClosedEnum<
|
|
82
|
+
typeof SetApiKeyBudgetBudgetsPeriod
|
|
83
|
+
>;
|
|
84
|
+
|
|
85
|
+
export const SetApiKeyBudgetBudgetsAction = {
|
|
86
|
+
Alert: "alert",
|
|
87
|
+
Block: "block",
|
|
88
|
+
} as const;
|
|
89
|
+
export type SetApiKeyBudgetBudgetsAction = ClosedEnum<
|
|
90
|
+
typeof SetApiKeyBudgetBudgetsAction
|
|
91
|
+
>;
|
|
92
|
+
|
|
93
|
+
export type SetApiKeyBudgetBudgetsThresholds = {
|
|
94
|
+
pct: number;
|
|
95
|
+
action: SetApiKeyBudgetBudgetsAction;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export const SetApiKeyBudgetStatus = {
|
|
99
|
+
Ok: "ok",
|
|
100
|
+
Blocked: "blocked",
|
|
101
|
+
} as const;
|
|
102
|
+
export type SetApiKeyBudgetStatus = ClosedEnum<typeof SetApiKeyBudgetStatus>;
|
|
103
|
+
|
|
104
|
+
export type SetApiKeyBudgetSpend = {
|
|
105
|
+
/**
|
|
106
|
+
* Current period bucket, e.g. 2026-07 / 2026-W28 / 2026-07-07
|
|
107
|
+
*/
|
|
108
|
+
window: string;
|
|
109
|
+
/**
|
|
110
|
+
* Live spend this window, major currency units
|
|
111
|
+
*/
|
|
112
|
+
costSpent: number;
|
|
113
|
+
limit: number;
|
|
114
|
+
pct: number;
|
|
115
|
+
status: SetApiKeyBudgetStatus;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* OK
|
|
120
|
+
*/
|
|
121
|
+
export type SetApiKeyBudgetResponseBody = {
|
|
122
|
+
id: string;
|
|
123
|
+
scope: SetApiKeyBudgetScope;
|
|
124
|
+
scopeId: string;
|
|
125
|
+
owner: SetApiKeyBudgetBudgetsOwner;
|
|
126
|
+
period: SetApiKeyBudgetBudgetsPeriod;
|
|
127
|
+
limit: number;
|
|
128
|
+
thresholds: Array<SetApiKeyBudgetBudgetsThresholds>;
|
|
129
|
+
alertWebhookUrl: string | null;
|
|
130
|
+
spend: SetApiKeyBudgetSpend;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const SetApiKeyBudgetOwner$inboundSchema: z.ZodNativeEnum<
|
|
135
|
+
typeof SetApiKeyBudgetOwner
|
|
136
|
+
> = z.nativeEnum(SetApiKeyBudgetOwner);
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const SetApiKeyBudgetOwner$outboundSchema: z.ZodNativeEnum<
|
|
139
|
+
typeof SetApiKeyBudgetOwner
|
|
140
|
+
> = SetApiKeyBudgetOwner$inboundSchema;
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const SetApiKeyBudgetPeriod$inboundSchema: z.ZodNativeEnum<
|
|
144
|
+
typeof SetApiKeyBudgetPeriod
|
|
145
|
+
> = z.nativeEnum(SetApiKeyBudgetPeriod);
|
|
146
|
+
/** @internal */
|
|
147
|
+
export const SetApiKeyBudgetPeriod$outboundSchema: z.ZodNativeEnum<
|
|
148
|
+
typeof SetApiKeyBudgetPeriod
|
|
149
|
+
> = SetApiKeyBudgetPeriod$inboundSchema;
|
|
150
|
+
|
|
151
|
+
/** @internal */
|
|
152
|
+
export const SetApiKeyBudgetAction$inboundSchema: z.ZodNativeEnum<
|
|
153
|
+
typeof SetApiKeyBudgetAction
|
|
154
|
+
> = z.nativeEnum(SetApiKeyBudgetAction);
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const SetApiKeyBudgetAction$outboundSchema: z.ZodNativeEnum<
|
|
157
|
+
typeof SetApiKeyBudgetAction
|
|
158
|
+
> = SetApiKeyBudgetAction$inboundSchema;
|
|
159
|
+
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const SetApiKeyBudgetThresholds$inboundSchema: z.ZodType<
|
|
162
|
+
SetApiKeyBudgetThresholds,
|
|
163
|
+
z.ZodTypeDef,
|
|
164
|
+
unknown
|
|
165
|
+
> = z.object({
|
|
166
|
+
pct: z.number().int(),
|
|
167
|
+
action: SetApiKeyBudgetAction$inboundSchema,
|
|
168
|
+
});
|
|
169
|
+
/** @internal */
|
|
170
|
+
export type SetApiKeyBudgetThresholds$Outbound = {
|
|
171
|
+
pct: number;
|
|
172
|
+
action: string;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/** @internal */
|
|
176
|
+
export const SetApiKeyBudgetThresholds$outboundSchema: z.ZodType<
|
|
177
|
+
SetApiKeyBudgetThresholds$Outbound,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
SetApiKeyBudgetThresholds
|
|
180
|
+
> = z.object({
|
|
181
|
+
pct: z.number().int(),
|
|
182
|
+
action: SetApiKeyBudgetAction$outboundSchema,
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
export function setApiKeyBudgetThresholdsToJSON(
|
|
186
|
+
setApiKeyBudgetThresholds: SetApiKeyBudgetThresholds,
|
|
187
|
+
): string {
|
|
188
|
+
return JSON.stringify(
|
|
189
|
+
SetApiKeyBudgetThresholds$outboundSchema.parse(setApiKeyBudgetThresholds),
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
export function setApiKeyBudgetThresholdsFromJSON(
|
|
193
|
+
jsonString: string,
|
|
194
|
+
): SafeParseResult<SetApiKeyBudgetThresholds, SDKValidationError> {
|
|
195
|
+
return safeParse(
|
|
196
|
+
jsonString,
|
|
197
|
+
(x) => SetApiKeyBudgetThresholds$inboundSchema.parse(JSON.parse(x)),
|
|
198
|
+
`Failed to parse 'SetApiKeyBudgetThresholds' from JSON`,
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** @internal */
|
|
203
|
+
export const SetApiKeyBudgetRequestBody$inboundSchema: z.ZodType<
|
|
204
|
+
SetApiKeyBudgetRequestBody,
|
|
205
|
+
z.ZodTypeDef,
|
|
206
|
+
unknown
|
|
207
|
+
> = z.object({
|
|
208
|
+
owner: SetApiKeyBudgetOwner$inboundSchema.default("org"),
|
|
209
|
+
period: SetApiKeyBudgetPeriod$inboundSchema,
|
|
210
|
+
limit: z.number(),
|
|
211
|
+
thresholds: z.array(z.lazy(() => SetApiKeyBudgetThresholds$inboundSchema)),
|
|
212
|
+
webhook_url: z.nullable(z.string()).optional(),
|
|
213
|
+
webhook_secret: z.nullable(z.string()).optional(),
|
|
214
|
+
}).transform((v) => {
|
|
215
|
+
return remap$(v, {
|
|
216
|
+
"webhook_url": "webhookUrl",
|
|
217
|
+
"webhook_secret": "webhookSecret",
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
/** @internal */
|
|
221
|
+
export type SetApiKeyBudgetRequestBody$Outbound = {
|
|
222
|
+
owner: string;
|
|
223
|
+
period: string;
|
|
224
|
+
limit: number;
|
|
225
|
+
thresholds: Array<SetApiKeyBudgetThresholds$Outbound>;
|
|
226
|
+
webhook_url?: string | null | undefined;
|
|
227
|
+
webhook_secret?: string | null | undefined;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/** @internal */
|
|
231
|
+
export const SetApiKeyBudgetRequestBody$outboundSchema: z.ZodType<
|
|
232
|
+
SetApiKeyBudgetRequestBody$Outbound,
|
|
233
|
+
z.ZodTypeDef,
|
|
234
|
+
SetApiKeyBudgetRequestBody
|
|
235
|
+
> = z.object({
|
|
236
|
+
owner: SetApiKeyBudgetOwner$outboundSchema.default("org"),
|
|
237
|
+
period: SetApiKeyBudgetPeriod$outboundSchema,
|
|
238
|
+
limit: z.number(),
|
|
239
|
+
thresholds: z.array(z.lazy(() => SetApiKeyBudgetThresholds$outboundSchema)),
|
|
240
|
+
webhookUrl: z.nullable(z.string()).optional(),
|
|
241
|
+
webhookSecret: z.nullable(z.string()).optional(),
|
|
242
|
+
}).transform((v) => {
|
|
243
|
+
return remap$(v, {
|
|
244
|
+
webhookUrl: "webhook_url",
|
|
245
|
+
webhookSecret: "webhook_secret",
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
export function setApiKeyBudgetRequestBodyToJSON(
|
|
250
|
+
setApiKeyBudgetRequestBody: SetApiKeyBudgetRequestBody,
|
|
251
|
+
): string {
|
|
252
|
+
return JSON.stringify(
|
|
253
|
+
SetApiKeyBudgetRequestBody$outboundSchema.parse(setApiKeyBudgetRequestBody),
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
export function setApiKeyBudgetRequestBodyFromJSON(
|
|
257
|
+
jsonString: string,
|
|
258
|
+
): SafeParseResult<SetApiKeyBudgetRequestBody, SDKValidationError> {
|
|
259
|
+
return safeParse(
|
|
260
|
+
jsonString,
|
|
261
|
+
(x) => SetApiKeyBudgetRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
262
|
+
`Failed to parse 'SetApiKeyBudgetRequestBody' from JSON`,
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** @internal */
|
|
267
|
+
export const SetApiKeyBudgetRequest$inboundSchema: z.ZodType<
|
|
268
|
+
SetApiKeyBudgetRequest,
|
|
269
|
+
z.ZodTypeDef,
|
|
270
|
+
unknown
|
|
271
|
+
> = z.object({
|
|
272
|
+
apiKeyId: z.string(),
|
|
273
|
+
RequestBody: z.lazy(() => SetApiKeyBudgetRequestBody$inboundSchema),
|
|
274
|
+
}).transform((v) => {
|
|
275
|
+
return remap$(v, {
|
|
276
|
+
"RequestBody": "requestBody",
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
/** @internal */
|
|
280
|
+
export type SetApiKeyBudgetRequest$Outbound = {
|
|
281
|
+
apiKeyId: string;
|
|
282
|
+
RequestBody: SetApiKeyBudgetRequestBody$Outbound;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
/** @internal */
|
|
286
|
+
export const SetApiKeyBudgetRequest$outboundSchema: z.ZodType<
|
|
287
|
+
SetApiKeyBudgetRequest$Outbound,
|
|
288
|
+
z.ZodTypeDef,
|
|
289
|
+
SetApiKeyBudgetRequest
|
|
290
|
+
> = z.object({
|
|
291
|
+
apiKeyId: z.string(),
|
|
292
|
+
requestBody: z.lazy(() => SetApiKeyBudgetRequestBody$outboundSchema),
|
|
293
|
+
}).transform((v) => {
|
|
294
|
+
return remap$(v, {
|
|
295
|
+
requestBody: "RequestBody",
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
export function setApiKeyBudgetRequestToJSON(
|
|
300
|
+
setApiKeyBudgetRequest: SetApiKeyBudgetRequest,
|
|
301
|
+
): string {
|
|
302
|
+
return JSON.stringify(
|
|
303
|
+
SetApiKeyBudgetRequest$outboundSchema.parse(setApiKeyBudgetRequest),
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
export function setApiKeyBudgetRequestFromJSON(
|
|
307
|
+
jsonString: string,
|
|
308
|
+
): SafeParseResult<SetApiKeyBudgetRequest, SDKValidationError> {
|
|
309
|
+
return safeParse(
|
|
310
|
+
jsonString,
|
|
311
|
+
(x) => SetApiKeyBudgetRequest$inboundSchema.parse(JSON.parse(x)),
|
|
312
|
+
`Failed to parse 'SetApiKeyBudgetRequest' from JSON`,
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const SetApiKeyBudgetScope$inboundSchema: z.ZodNativeEnum<
|
|
318
|
+
typeof SetApiKeyBudgetScope
|
|
319
|
+
> = z.nativeEnum(SetApiKeyBudgetScope);
|
|
320
|
+
/** @internal */
|
|
321
|
+
export const SetApiKeyBudgetScope$outboundSchema: z.ZodNativeEnum<
|
|
322
|
+
typeof SetApiKeyBudgetScope
|
|
323
|
+
> = SetApiKeyBudgetScope$inboundSchema;
|
|
324
|
+
|
|
325
|
+
/** @internal */
|
|
326
|
+
export const SetApiKeyBudgetBudgetsOwner$inboundSchema: z.ZodNativeEnum<
|
|
327
|
+
typeof SetApiKeyBudgetBudgetsOwner
|
|
328
|
+
> = z.nativeEnum(SetApiKeyBudgetBudgetsOwner);
|
|
329
|
+
/** @internal */
|
|
330
|
+
export const SetApiKeyBudgetBudgetsOwner$outboundSchema: z.ZodNativeEnum<
|
|
331
|
+
typeof SetApiKeyBudgetBudgetsOwner
|
|
332
|
+
> = SetApiKeyBudgetBudgetsOwner$inboundSchema;
|
|
333
|
+
|
|
334
|
+
/** @internal */
|
|
335
|
+
export const SetApiKeyBudgetBudgetsPeriod$inboundSchema: z.ZodNativeEnum<
|
|
336
|
+
typeof SetApiKeyBudgetBudgetsPeriod
|
|
337
|
+
> = z.nativeEnum(SetApiKeyBudgetBudgetsPeriod);
|
|
338
|
+
/** @internal */
|
|
339
|
+
export const SetApiKeyBudgetBudgetsPeriod$outboundSchema: z.ZodNativeEnum<
|
|
340
|
+
typeof SetApiKeyBudgetBudgetsPeriod
|
|
341
|
+
> = SetApiKeyBudgetBudgetsPeriod$inboundSchema;
|
|
342
|
+
|
|
343
|
+
/** @internal */
|
|
344
|
+
export const SetApiKeyBudgetBudgetsAction$inboundSchema: z.ZodNativeEnum<
|
|
345
|
+
typeof SetApiKeyBudgetBudgetsAction
|
|
346
|
+
> = z.nativeEnum(SetApiKeyBudgetBudgetsAction);
|
|
347
|
+
/** @internal */
|
|
348
|
+
export const SetApiKeyBudgetBudgetsAction$outboundSchema: z.ZodNativeEnum<
|
|
349
|
+
typeof SetApiKeyBudgetBudgetsAction
|
|
350
|
+
> = SetApiKeyBudgetBudgetsAction$inboundSchema;
|
|
351
|
+
|
|
352
|
+
/** @internal */
|
|
353
|
+
export const SetApiKeyBudgetBudgetsThresholds$inboundSchema: z.ZodType<
|
|
354
|
+
SetApiKeyBudgetBudgetsThresholds,
|
|
355
|
+
z.ZodTypeDef,
|
|
356
|
+
unknown
|
|
357
|
+
> = z.object({
|
|
358
|
+
pct: z.number().int(),
|
|
359
|
+
action: SetApiKeyBudgetBudgetsAction$inboundSchema,
|
|
360
|
+
});
|
|
361
|
+
/** @internal */
|
|
362
|
+
export type SetApiKeyBudgetBudgetsThresholds$Outbound = {
|
|
363
|
+
pct: number;
|
|
364
|
+
action: string;
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
/** @internal */
|
|
368
|
+
export const SetApiKeyBudgetBudgetsThresholds$outboundSchema: z.ZodType<
|
|
369
|
+
SetApiKeyBudgetBudgetsThresholds$Outbound,
|
|
370
|
+
z.ZodTypeDef,
|
|
371
|
+
SetApiKeyBudgetBudgetsThresholds
|
|
372
|
+
> = z.object({
|
|
373
|
+
pct: z.number().int(),
|
|
374
|
+
action: SetApiKeyBudgetBudgetsAction$outboundSchema,
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
export function setApiKeyBudgetBudgetsThresholdsToJSON(
|
|
378
|
+
setApiKeyBudgetBudgetsThresholds: SetApiKeyBudgetBudgetsThresholds,
|
|
379
|
+
): string {
|
|
380
|
+
return JSON.stringify(
|
|
381
|
+
SetApiKeyBudgetBudgetsThresholds$outboundSchema.parse(
|
|
382
|
+
setApiKeyBudgetBudgetsThresholds,
|
|
383
|
+
),
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
export function setApiKeyBudgetBudgetsThresholdsFromJSON(
|
|
387
|
+
jsonString: string,
|
|
388
|
+
): SafeParseResult<SetApiKeyBudgetBudgetsThresholds, SDKValidationError> {
|
|
389
|
+
return safeParse(
|
|
390
|
+
jsonString,
|
|
391
|
+
(x) => SetApiKeyBudgetBudgetsThresholds$inboundSchema.parse(JSON.parse(x)),
|
|
392
|
+
`Failed to parse 'SetApiKeyBudgetBudgetsThresholds' from JSON`,
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/** @internal */
|
|
397
|
+
export const SetApiKeyBudgetStatus$inboundSchema: z.ZodNativeEnum<
|
|
398
|
+
typeof SetApiKeyBudgetStatus
|
|
399
|
+
> = z.nativeEnum(SetApiKeyBudgetStatus);
|
|
400
|
+
/** @internal */
|
|
401
|
+
export const SetApiKeyBudgetStatus$outboundSchema: z.ZodNativeEnum<
|
|
402
|
+
typeof SetApiKeyBudgetStatus
|
|
403
|
+
> = SetApiKeyBudgetStatus$inboundSchema;
|
|
404
|
+
|
|
405
|
+
/** @internal */
|
|
406
|
+
export const SetApiKeyBudgetSpend$inboundSchema: z.ZodType<
|
|
407
|
+
SetApiKeyBudgetSpend,
|
|
408
|
+
z.ZodTypeDef,
|
|
409
|
+
unknown
|
|
410
|
+
> = z.object({
|
|
411
|
+
window: z.string(),
|
|
412
|
+
cost_spent: z.number(),
|
|
413
|
+
limit: z.number(),
|
|
414
|
+
pct: z.number().int(),
|
|
415
|
+
status: SetApiKeyBudgetStatus$inboundSchema,
|
|
416
|
+
}).transform((v) => {
|
|
417
|
+
return remap$(v, {
|
|
418
|
+
"cost_spent": "costSpent",
|
|
419
|
+
});
|
|
420
|
+
});
|
|
421
|
+
/** @internal */
|
|
422
|
+
export type SetApiKeyBudgetSpend$Outbound = {
|
|
423
|
+
window: string;
|
|
424
|
+
cost_spent: number;
|
|
425
|
+
limit: number;
|
|
426
|
+
pct: number;
|
|
427
|
+
status: string;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/** @internal */
|
|
431
|
+
export const SetApiKeyBudgetSpend$outboundSchema: z.ZodType<
|
|
432
|
+
SetApiKeyBudgetSpend$Outbound,
|
|
433
|
+
z.ZodTypeDef,
|
|
434
|
+
SetApiKeyBudgetSpend
|
|
435
|
+
> = z.object({
|
|
436
|
+
window: z.string(),
|
|
437
|
+
costSpent: z.number(),
|
|
438
|
+
limit: z.number(),
|
|
439
|
+
pct: z.number().int(),
|
|
440
|
+
status: SetApiKeyBudgetStatus$outboundSchema,
|
|
441
|
+
}).transform((v) => {
|
|
442
|
+
return remap$(v, {
|
|
443
|
+
costSpent: "cost_spent",
|
|
444
|
+
});
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
export function setApiKeyBudgetSpendToJSON(
|
|
448
|
+
setApiKeyBudgetSpend: SetApiKeyBudgetSpend,
|
|
449
|
+
): string {
|
|
450
|
+
return JSON.stringify(
|
|
451
|
+
SetApiKeyBudgetSpend$outboundSchema.parse(setApiKeyBudgetSpend),
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
export function setApiKeyBudgetSpendFromJSON(
|
|
455
|
+
jsonString: string,
|
|
456
|
+
): SafeParseResult<SetApiKeyBudgetSpend, SDKValidationError> {
|
|
457
|
+
return safeParse(
|
|
458
|
+
jsonString,
|
|
459
|
+
(x) => SetApiKeyBudgetSpend$inboundSchema.parse(JSON.parse(x)),
|
|
460
|
+
`Failed to parse 'SetApiKeyBudgetSpend' from JSON`,
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/** @internal */
|
|
465
|
+
export const SetApiKeyBudgetResponseBody$inboundSchema: z.ZodType<
|
|
466
|
+
SetApiKeyBudgetResponseBody,
|
|
467
|
+
z.ZodTypeDef,
|
|
468
|
+
unknown
|
|
469
|
+
> = z.object({
|
|
470
|
+
id: z.string(),
|
|
471
|
+
scope: SetApiKeyBudgetScope$inboundSchema,
|
|
472
|
+
scope_id: z.string(),
|
|
473
|
+
owner: SetApiKeyBudgetBudgetsOwner$inboundSchema,
|
|
474
|
+
period: SetApiKeyBudgetBudgetsPeriod$inboundSchema,
|
|
475
|
+
limit: z.number(),
|
|
476
|
+
thresholds: z.array(
|
|
477
|
+
z.lazy(() => SetApiKeyBudgetBudgetsThresholds$inboundSchema),
|
|
478
|
+
),
|
|
479
|
+
alert_webhook_url: z.nullable(z.string()),
|
|
480
|
+
spend: z.lazy(() => SetApiKeyBudgetSpend$inboundSchema),
|
|
481
|
+
}).transform((v) => {
|
|
482
|
+
return remap$(v, {
|
|
483
|
+
"scope_id": "scopeId",
|
|
484
|
+
"alert_webhook_url": "alertWebhookUrl",
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
/** @internal */
|
|
488
|
+
export type SetApiKeyBudgetResponseBody$Outbound = {
|
|
489
|
+
id: string;
|
|
490
|
+
scope: string;
|
|
491
|
+
scope_id: string;
|
|
492
|
+
owner: string;
|
|
493
|
+
period: string;
|
|
494
|
+
limit: number;
|
|
495
|
+
thresholds: Array<SetApiKeyBudgetBudgetsThresholds$Outbound>;
|
|
496
|
+
alert_webhook_url: string | null;
|
|
497
|
+
spend: SetApiKeyBudgetSpend$Outbound;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/** @internal */
|
|
501
|
+
export const SetApiKeyBudgetResponseBody$outboundSchema: z.ZodType<
|
|
502
|
+
SetApiKeyBudgetResponseBody$Outbound,
|
|
503
|
+
z.ZodTypeDef,
|
|
504
|
+
SetApiKeyBudgetResponseBody
|
|
505
|
+
> = z.object({
|
|
506
|
+
id: z.string(),
|
|
507
|
+
scope: SetApiKeyBudgetScope$outboundSchema,
|
|
508
|
+
scopeId: z.string(),
|
|
509
|
+
owner: SetApiKeyBudgetBudgetsOwner$outboundSchema,
|
|
510
|
+
period: SetApiKeyBudgetBudgetsPeriod$outboundSchema,
|
|
511
|
+
limit: z.number(),
|
|
512
|
+
thresholds: z.array(
|
|
513
|
+
z.lazy(() => SetApiKeyBudgetBudgetsThresholds$outboundSchema),
|
|
514
|
+
),
|
|
515
|
+
alertWebhookUrl: z.nullable(z.string()),
|
|
516
|
+
spend: z.lazy(() => SetApiKeyBudgetSpend$outboundSchema),
|
|
517
|
+
}).transform((v) => {
|
|
518
|
+
return remap$(v, {
|
|
519
|
+
scopeId: "scope_id",
|
|
520
|
+
alertWebhookUrl: "alert_webhook_url",
|
|
521
|
+
});
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
export function setApiKeyBudgetResponseBodyToJSON(
|
|
525
|
+
setApiKeyBudgetResponseBody: SetApiKeyBudgetResponseBody,
|
|
526
|
+
): string {
|
|
527
|
+
return JSON.stringify(
|
|
528
|
+
SetApiKeyBudgetResponseBody$outboundSchema.parse(
|
|
529
|
+
setApiKeyBudgetResponseBody,
|
|
530
|
+
),
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
export function setApiKeyBudgetResponseBodyFromJSON(
|
|
534
|
+
jsonString: string,
|
|
535
|
+
): SafeParseResult<SetApiKeyBudgetResponseBody, SDKValidationError> {
|
|
536
|
+
return safeParse(
|
|
537
|
+
jsonString,
|
|
538
|
+
(x) => SetApiKeyBudgetResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
539
|
+
`Failed to parse 'SetApiKeyBudgetResponseBody' from JSON`,
|
|
540
|
+
);
|
|
541
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type SetCurrencyRequestBody = {
|
|
11
|
+
currency: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
export type SetCurrencyResponseBody = {
|
|
18
|
+
currency: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const SetCurrencyRequestBody$inboundSchema: z.ZodType<
|
|
23
|
+
SetCurrencyRequestBody,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
currency: z.string(),
|
|
28
|
+
});
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type SetCurrencyRequestBody$Outbound = {
|
|
31
|
+
currency: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const SetCurrencyRequestBody$outboundSchema: z.ZodType<
|
|
36
|
+
SetCurrencyRequestBody$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
SetCurrencyRequestBody
|
|
39
|
+
> = z.object({
|
|
40
|
+
currency: z.string(),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export function setCurrencyRequestBodyToJSON(
|
|
44
|
+
setCurrencyRequestBody: SetCurrencyRequestBody,
|
|
45
|
+
): string {
|
|
46
|
+
return JSON.stringify(
|
|
47
|
+
SetCurrencyRequestBody$outboundSchema.parse(setCurrencyRequestBody),
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export function setCurrencyRequestBodyFromJSON(
|
|
51
|
+
jsonString: string,
|
|
52
|
+
): SafeParseResult<SetCurrencyRequestBody, SDKValidationError> {
|
|
53
|
+
return safeParse(
|
|
54
|
+
jsonString,
|
|
55
|
+
(x) => SetCurrencyRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
56
|
+
`Failed to parse 'SetCurrencyRequestBody' from JSON`,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const SetCurrencyResponseBody$inboundSchema: z.ZodType<
|
|
62
|
+
SetCurrencyResponseBody,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
unknown
|
|
65
|
+
> = z.object({
|
|
66
|
+
currency: z.string(),
|
|
67
|
+
});
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type SetCurrencyResponseBody$Outbound = {
|
|
70
|
+
currency: string;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const SetCurrencyResponseBody$outboundSchema: z.ZodType<
|
|
75
|
+
SetCurrencyResponseBody$Outbound,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
SetCurrencyResponseBody
|
|
78
|
+
> = z.object({
|
|
79
|
+
currency: z.string(),
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export function setCurrencyResponseBodyToJSON(
|
|
83
|
+
setCurrencyResponseBody: SetCurrencyResponseBody,
|
|
84
|
+
): string {
|
|
85
|
+
return JSON.stringify(
|
|
86
|
+
SetCurrencyResponseBody$outboundSchema.parse(setCurrencyResponseBody),
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
export function setCurrencyResponseBodyFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<SetCurrencyResponseBody, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) => SetCurrencyResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
95
|
+
`Failed to parse 'SetCurrencyResponseBody' from JSON`,
|
|
96
|
+
);
|
|
97
|
+
}
|