@orq-ai/node 4.11.0-rc.16 → 4.11.0-rc.18
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 +55 -36
- package/funcs/budgetsCheck.d.ts +17 -0
- package/funcs/budgetsCheck.d.ts.map +1 -0
- package/funcs/budgetsCheck.js +115 -0
- package/funcs/budgetsCheck.js.map +1 -0
- package/funcs/budgetsCreate.d.ts +17 -0
- package/funcs/budgetsCreate.d.ts.map +1 -0
- package/funcs/budgetsCreate.js +115 -0
- package/funcs/budgetsCreate.js.map +1 -0
- package/funcs/budgetsDelete.d.ts +18 -0
- package/funcs/budgetsDelete.d.ts.map +1 -0
- package/funcs/budgetsDelete.js +121 -0
- package/funcs/budgetsDelete.js.map +1 -0
- package/funcs/budgetsGet.d.ts +18 -0
- package/funcs/budgetsGet.d.ts.map +1 -0
- package/funcs/budgetsGet.js +121 -0
- package/funcs/budgetsGet.js.map +1 -0
- package/funcs/budgetsGetConsumption.d.ts +18 -0
- package/funcs/budgetsGetConsumption.d.ts.map +1 -0
- package/funcs/budgetsGetConsumption.js +121 -0
- package/funcs/budgetsGetConsumption.js.map +1 -0
- package/funcs/budgetsList.d.ts +18 -0
- package/funcs/budgetsList.d.ts.map +1 -0
- package/funcs/budgetsList.js +126 -0
- package/funcs/budgetsList.js.map +1 -0
- package/funcs/budgetsResetConsumption.d.ts +18 -0
- package/funcs/budgetsResetConsumption.d.ts.map +1 -0
- package/funcs/budgetsResetConsumption.js +124 -0
- package/funcs/budgetsResetConsumption.js.map +1 -0
- package/funcs/budgetsUpdate.d.ts +18 -0
- package/funcs/budgetsUpdate.d.ts.map +1 -0
- package/funcs/budgetsUpdate.js +124 -0
- package/funcs/budgetsUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/apikeybudgetscope.d.ts +23 -0
- package/models/components/apikeybudgetscope.d.ts.map +1 -0
- package/models/components/apikeybudgetscope.js +67 -0
- package/models/components/apikeybudgetscope.js.map +1 -0
- package/models/components/budget.d.ts +60 -0
- package/models/components/budget.d.ts.map +1 -0
- package/models/components/budget.js +73 -0
- package/models/components/budget.js.map +1 -0
- package/models/components/budgetlimits.d.ts +29 -0
- package/models/components/budgetlimits.d.ts.map +1 -0
- package/models/components/budgetlimits.js +72 -0
- package/models/components/budgetlimits.js.map +1 -0
- package/models/components/budgetmatch.d.ts +26 -0
- package/models/components/budgetmatch.d.ts.map +1 -0
- package/models/components/budgetmatch.js +58 -0
- package/models/components/budgetmatch.js.map +1 -0
- package/models/components/budgetperiod.d.ts +16 -0
- package/models/components/budgetperiod.d.ts.map +1 -0
- package/models/components/budgetperiod.js +53 -0
- package/models/components/budgetperiod.js.map +1 -0
- package/models/components/budgetrejection.d.ts +17 -0
- package/models/components/budgetrejection.d.ts.map +1 -0
- package/models/components/budgetrejection.js +60 -0
- package/models/components/budgetrejection.js.map +1 -0
- package/models/components/budgetscope.d.ts +71 -0
- package/models/components/budgetscope.d.ts.map +1 -0
- package/models/components/budgetscope.js +83 -0
- package/models/components/budgetscope.js.map +1 -0
- package/models/components/budgetscopekind.d.ts +15 -0
- package/models/components/budgetscopekind.d.ts.map +1 -0
- package/models/components/budgetscopekind.js +52 -0
- package/models/components/budgetscopekind.js.map +1 -0
- package/models/components/checkbudgetsrequest.d.ts +72 -0
- package/models/components/checkbudgetsrequest.d.ts.map +1 -0
- package/models/components/checkbudgetsrequest.js +69 -0
- package/models/components/checkbudgetsrequest.js.map +1 -0
- package/models/components/checkbudgetsresponse.d.ts +34 -0
- package/models/components/checkbudgetsresponse.d.ts.map +1 -0
- package/models/components/checkbudgetsresponse.js +56 -0
- package/models/components/checkbudgetsresponse.js.map +1 -0
- package/models/components/createbudgetrequest.d.ts +62 -0
- package/models/components/createbudgetrequest.d.ts.map +1 -0
- package/models/components/createbudgetrequest.js +65 -0
- package/models/components/createbudgetrequest.js.map +1 -0
- package/models/components/createbudgetresponse.d.ts +14 -0
- package/models/components/createbudgetresponse.d.ts.map +1 -0
- package/models/components/createbudgetresponse.js +51 -0
- package/models/components/createbudgetresponse.js.map +1 -0
- package/models/components/deletebudgetresponse.d.ts +8 -0
- package/models/components/deletebudgetresponse.d.ts.map +1 -0
- package/models/components/deletebudgetresponse.js +48 -0
- package/models/components/deletebudgetresponse.js.map +1 -0
- package/models/components/dimensioninfo.d.ts +15 -0
- package/models/components/dimensioninfo.d.ts.map +1 -0
- package/models/components/dimensioninfo.js +57 -0
- package/models/components/dimensioninfo.js.map +1 -0
- package/models/components/getbudgetconsumptionresponse.d.ts +34 -0
- package/models/components/getbudgetconsumptionresponse.d.ts.map +1 -0
- package/models/components/getbudgetconsumptionresponse.js +63 -0
- package/models/components/getbudgetconsumptionresponse.js.map +1 -0
- package/models/components/getbudgetresponse.d.ts +14 -0
- package/models/components/getbudgetresponse.d.ts.map +1 -0
- package/models/components/getbudgetresponse.js +51 -0
- package/models/components/getbudgetresponse.js.map +1 -0
- package/models/components/identity.d.ts +4 -4
- package/models/components/identity.d.ts.map +1 -1
- package/models/components/identity.js +6 -6
- package/models/components/identity.js.map +1 -1
- package/models/components/identitybudgetscope.d.ts +23 -0
- package/models/components/identitybudgetscope.d.ts.map +1 -0
- package/models/components/identitybudgetscope.js +67 -0
- package/models/components/identitybudgetscope.js.map +1 -0
- package/models/components/index.d.ts +27 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +27 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listbudgetsresponse.d.ts +25 -0
- package/models/components/listbudgetsresponse.d.ts.map +1 -0
- package/models/components/listbudgetsresponse.js +58 -0
- package/models/components/listbudgetsresponse.js.map +1 -0
- package/models/components/modelbudgetscope.d.ts +24 -0
- package/models/components/modelbudgetscope.d.ts.map +1 -0
- package/models/components/modelbudgetscope.js +67 -0
- package/models/components/modelbudgetscope.js.map +1 -0
- package/models/components/projectbudgetscope.d.ts +20 -0
- package/models/components/projectbudgetscope.d.ts.map +1 -0
- package/models/components/projectbudgetscope.js +67 -0
- package/models/components/projectbudgetscope.js.map +1 -0
- package/models/components/providerbudgetscope.d.ts +23 -0
- package/models/components/providerbudgetscope.d.ts.map +1 -0
- package/models/components/providerbudgetscope.js +58 -0
- package/models/components/providerbudgetscope.js.map +1 -0
- package/models/components/ratelimit.d.ts +23 -0
- package/models/components/ratelimit.d.ts.map +1 -0
- package/models/components/ratelimit.js +67 -0
- package/models/components/ratelimit.js.map +1 -0
- package/models/components/reasoningpart.js +1 -1
- package/models/components/resetbudgetconsumptionrequest.d.ts +8 -0
- package/models/components/resetbudgetconsumptionrequest.d.ts.map +1 -0
- package/models/components/resetbudgetconsumptionrequest.js +47 -0
- package/models/components/resetbudgetconsumptionrequest.js.map +1 -0
- package/models/components/resetbudgetconsumptionresponse.d.ts +17 -0
- package/models/components/resetbudgetconsumptionresponse.d.ts.map +1 -0
- package/models/components/resetbudgetconsumptionresponse.js +51 -0
- package/models/components/resetbudgetconsumptionresponse.js.map +1 -0
- package/models/components/updatebudgetrequest.d.ts +50 -0
- package/models/components/updatebudgetrequest.d.ts.map +1 -0
- package/models/components/updatebudgetrequest.js +65 -0
- package/models/components/updatebudgetrequest.js.map +1 -0
- package/models/components/updatebudgetresponse.d.ts +14 -0
- package/models/components/updatebudgetresponse.d.ts.map +1 -0
- package/models/components/updatebudgetresponse.js +51 -0
- package/models/components/updatebudgetresponse.js.map +1 -0
- package/models/components/workspacebudgetscope.d.ts +16 -0
- package/models/components/workspacebudgetscope.d.ts.map +1 -0
- package/models/components/workspacebudgetscope.js +54 -0
- package/models/components/workspacebudgetscope.js.map +1 -0
- package/models/operations/budgetdelete.d.ts +15 -0
- package/models/operations/budgetdelete.d.ts.map +1 -0
- package/models/operations/budgetdelete.js +54 -0
- package/models/operations/budgetdelete.js.map +1 -0
- package/models/operations/budgetget.d.ts +15 -0
- package/models/operations/budgetget.d.ts.map +1 -0
- package/models/operations/budgetget.js +54 -0
- package/models/operations/budgetget.js.map +1 -0
- package/models/operations/budgetgetconsumption.d.ts +15 -0
- package/models/operations/budgetgetconsumption.d.ts.map +1 -0
- package/models/operations/budgetgetconsumption.js +54 -0
- package/models/operations/budgetgetconsumption.js.map +1 -0
- package/models/operations/budgetlist.d.ts +67 -0
- package/models/operations/budgetlist.d.ts.map +1 -0
- package/models/operations/budgetlist.js +66 -0
- package/models/operations/budgetlist.js.map +1 -0
- package/models/operations/budgetresetconsumption.d.ts +18 -0
- package/models/operations/budgetresetconsumption.d.ts.map +1 -0
- package/models/operations/budgetresetconsumption.js +57 -0
- package/models/operations/budgetresetconsumption.js.map +1 -0
- package/models/operations/budgetupdate.d.ts +18 -0
- package/models/operations/budgetupdate.d.ts.map +1 -0
- package/models/operations/budgetupdate.js +57 -0
- package/models/operations/budgetupdate.js.map +1 -0
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/index.d.ts +6 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +6 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/invokeeval.d.ts +1 -0
- package/models/operations/invokeeval.d.ts.map +1 -1
- package/models/operations/invokeeval.js +2 -0
- package/models/operations/invokeeval.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updatetool.js +7 -7
- package/package.json +7 -7
- package/sdk/budgets.d.ts +62 -0
- package/sdk/budgets.d.ts.map +1 -0
- package/sdk/budgets.js +92 -0
- package/sdk/budgets.js.map +1 -0
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/budgetsCheck.ts +162 -0
- package/src/funcs/budgetsCreate.ts +162 -0
- package/src/funcs/budgetsDelete.ts +168 -0
- package/src/funcs/budgetsGet.ts +168 -0
- package/src/funcs/budgetsGetConsumption.ts +169 -0
- package/src/funcs/budgetsList.ts +175 -0
- package/src/funcs/budgetsResetConsumption.ts +174 -0
- package/src/funcs/budgetsUpdate.ts +171 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/apikeybudgetscope.ts +66 -0
- package/src/models/components/budget.ts +102 -0
- package/src/models/components/budgetlimits.ts +76 -0
- package/src/models/components/budgetmatch.ts +56 -0
- package/src/models/components/budgetperiod.ts +23 -0
- package/src/models/components/budgetrejection.ts +48 -0
- package/src/models/components/budgetscope.ts +150 -0
- package/src/models/components/budgetscopekind.ts +22 -0
- package/src/models/components/checkbudgetsrequest.ts +111 -0
- package/src/models/components/checkbudgetsresponse.ts +62 -0
- package/src/models/components/createbudgetrequest.ts +109 -0
- package/src/models/components/createbudgetresponse.ts +35 -0
- package/src/models/components/deletebudgetresponse.ts +27 -0
- package/src/models/components/dimensioninfo.ts +43 -0
- package/src/models/components/getbudgetconsumptionresponse.ts +67 -0
- package/src/models/components/getbudgetresponse.ts +35 -0
- package/src/models/components/identity.ts +9 -9
- package/src/models/components/identitybudgetscope.ts +66 -0
- package/src/models/components/index.ts +27 -0
- package/src/models/components/listbudgetsresponse.ts +53 -0
- package/src/models/components/modelbudgetscope.ts +67 -0
- package/src/models/components/projectbudgetscope.ts +63 -0
- package/src/models/components/providerbudgetscope.ts +57 -0
- package/src/models/components/ratelimit.ts +62 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/resetbudgetconsumptionrequest.ts +27 -0
- package/src/models/components/resetbudgetconsumptionresponse.ts +38 -0
- package/src/models/components/updatebudgetrequest.ts +94 -0
- package/src/models/components/updatebudgetresponse.ts +35 -0
- package/src/models/components/workspacebudgetscope.ts +46 -0
- package/src/models/operations/budgetdelete.ts +39 -0
- package/src/models/operations/budgetget.ts +39 -0
- package/src/models/operations/budgetgetconsumption.ts +41 -0
- package/src/models/operations/budgetlist.ts +102 -0
- package/src/models/operations/budgetresetconsumption.ts +48 -0
- package/src/models/operations/budgetupdate.ts +44 -0
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/invokeeval.ts +3 -0
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/budgets.ts +154 -0
- package/src/sdk/feedback.ts +2 -2
- package/src/sdk/sdk.ts +6 -0
package/README.md
CHANGED
|
@@ -167,6 +167,17 @@ run();
|
|
|
167
167
|
* [delete](docs/sdks/apikeys/README.md#delete) - Delete an API key
|
|
168
168
|
* [update](docs/sdks/apikeys/README.md#update) - Update an API key
|
|
169
169
|
|
|
170
|
+
### [Budgets](docs/sdks/budgets/README.md)
|
|
171
|
+
|
|
172
|
+
* [list](docs/sdks/budgets/README.md#list) - List budgets
|
|
173
|
+
* [create](docs/sdks/budgets/README.md#create) - Create a new budget
|
|
174
|
+
* [check](docs/sdks/budgets/README.md#check) - Check budget enforcement
|
|
175
|
+
* [get](docs/sdks/budgets/README.md#get) - Retrieve a budget
|
|
176
|
+
* [delete](docs/sdks/budgets/README.md#delete) - Delete a budget
|
|
177
|
+
* [update](docs/sdks/budgets/README.md#update) - Update a budget
|
|
178
|
+
* [getConsumption](docs/sdks/budgets/README.md#getconsumption) - Get current-period consumption
|
|
179
|
+
* [resetConsumption](docs/sdks/budgets/README.md#resetconsumption) - Reset budget consumption
|
|
180
|
+
|
|
170
181
|
### [Chunking](docs/sdks/chunking/README.md)
|
|
171
182
|
|
|
172
183
|
* [parse](docs/sdks/chunking/README.md#parse) - Parse text
|
|
@@ -462,6 +473,14 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
462
473
|
- [`apiKeysList`](docs/sdks/apikeys/README.md#list) - List API keys
|
|
463
474
|
- [`apiKeysListCapabilities`](docs/sdks/apikeys/README.md#listcapabilities) - List capability catalog
|
|
464
475
|
- [`apiKeysUpdate`](docs/sdks/apikeys/README.md#update) - Update an API key
|
|
476
|
+
- [`budgetsCheck`](docs/sdks/budgets/README.md#check) - Check budget enforcement
|
|
477
|
+
- [`budgetsCreate`](docs/sdks/budgets/README.md#create) - Create a new budget
|
|
478
|
+
- [`budgetsDelete`](docs/sdks/budgets/README.md#delete) - Delete a budget
|
|
479
|
+
- [`budgetsGet`](docs/sdks/budgets/README.md#get) - Retrieve a budget
|
|
480
|
+
- [`budgetsGetConsumption`](docs/sdks/budgets/README.md#getconsumption) - Get current-period consumption
|
|
481
|
+
- [`budgetsList`](docs/sdks/budgets/README.md#list) - List budgets
|
|
482
|
+
- [`budgetsResetConsumption`](docs/sdks/budgets/README.md#resetconsumption) - Reset budget consumption
|
|
483
|
+
- [`budgetsUpdate`](docs/sdks/budgets/README.md#update) - Update a budget
|
|
465
484
|
- [`chunkingParse`](docs/sdks/chunking/README.md#parse) - Parse text
|
|
466
485
|
- [`datasetsClear`](docs/sdks/datasets/README.md#clear) - Delete all datapoints
|
|
467
486
|
- [`datasetsCreate`](docs/sdks/datasets/README.md#create) - Create a dataset
|
|
@@ -933,42 +952,42 @@ run();
|
|
|
933
952
|
|
|
934
953
|
|
|
935
954
|
**Inherit from [`OrqError`](./src/models/errors/orqerror.ts)**:
|
|
936
|
-
* [`HonoApiError`](./src/models/errors/honoapierror.ts): Applicable to 10 of
|
|
937
|
-
* [`InvokeEvalResponseBody`](./src/models/errors/invokeevalresponsebody.ts): Bad request. Status code `400`. Applicable to 1 of
|
|
938
|
-
* [`PostV2AgentsKeyCardRefreshResponseBody`](./src/models/errors/postv2agentskeycardrefreshresponsebody.ts): Invalid request - Agent is not an A2A agent or card fetch failed. Status code `400`. Applicable to 1 of
|
|
939
|
-
* [`PostV2FeedbackResponseBody`](./src/models/errors/postv2feedbackresponsebody.ts): Bad Request. Status code `400`. Applicable to 1 of
|
|
940
|
-
* [`CreateAgentScheduleResponseBody`](./src/models/errors/createagentscheduleresponsebody.ts): Invalid schedule type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of
|
|
941
|
-
* [`UpdateAgentScheduleResponseBody`](./src/models/errors/updateagentscheduleresponsebody.ts): Invalid type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of
|
|
942
|
-
* [`TriggerAgentScheduleResponseBody`](./src/models/errors/triggeragentscheduleresponsebody.ts): Schedule is inactive. Status code `400`. Applicable to 1 of
|
|
943
|
-
* [`GetEvalsResponseBody`](./src/models/errors/getevalsresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of
|
|
944
|
-
* [`CreateEvalResponseBody`](./src/models/errors/createevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of
|
|
945
|
-
* [`UpdateEvalResponseBody`](./src/models/errors/updateevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of
|
|
946
|
-
* [`DeleteEvalResponseBody`](./src/models/errors/deleteevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of
|
|
947
|
-
* [`InvokeEvalEvalsResponseBody`](./src/models/errors/invokeevalevalsresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of
|
|
948
|
-
* [`GetV2EvaluatorsIdVersionsResponseBody`](./src/models/errors/getv2evaluatorsidversionsresponsebody.ts): Evaluator not found. Status code `404`. Applicable to 1 of
|
|
949
|
-
* [`DeleteAgentResponseBody`](./src/models/errors/deleteagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or has already been deleted. Status code `404`. Applicable to 1 of
|
|
950
|
-
* [`RetrieveAgentRequestResponseBody`](./src/models/errors/retrieveagentrequestresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to access it. Status code `404`. Applicable to 1 of
|
|
951
|
-
* [`UpdateAgentResponseBody`](./src/models/errors/updateagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to modify it. Status code `404`. Applicable to 1 of
|
|
952
|
-
* [`StreamRunAgentResponseBody`](./src/models/errors/streamrunagentresponsebody.ts): Model not found. Status code `404`. Applicable to 1 of
|
|
953
|
-
* [`StreamAgentResponseBody`](./src/models/errors/streamagentresponsebody.ts): Agent not found. Status code `404`. Applicable to 1 of
|
|
954
|
-
* [`PostV2AgentsKeyCardRefreshAgentsResponseBody`](./src/models/errors/postv2agentskeycardrefreshagentsresponsebody.ts): Agent not found. Status code `404`. Applicable to 1 of
|
|
955
|
-
* [`UpdatePromptResponseBody`](./src/models/errors/updatepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of
|
|
956
|
-
* [`DeletePromptResponseBody`](./src/models/errors/deletepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of
|
|
957
|
-
* [`GetPromptVersionResponseBody`](./src/models/errors/getpromptversionresponsebody.ts): Not Found - The prompt or prompt version does not exist. Status code `404`. Applicable to 1 of
|
|
958
|
-
* [`UpdateToolResponseBody`](./src/models/errors/updatetoolresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of
|
|
959
|
-
* [`GetV2ToolsToolIdVersionsResponseBody`](./src/models/errors/getv2toolstoolidversionsresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of
|
|
960
|
-
* [`GetV2ToolsToolIdVersionsVersionIdResponseBody`](./src/models/errors/getv2toolstoolidversionsversionidresponsebody.ts): Tool or version not found. Status code `404`. Applicable to 1 of
|
|
961
|
-
* [`PostV2FeedbackRemoveResponseBody`](./src/models/errors/postv2feedbackremoveresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of
|
|
962
|
-
* [`PostV2FeedbackFeedbackResponseBody`](./src/models/errors/postv2feedbackfeedbackresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of
|
|
963
|
-
* [`CreateAgentScheduleSchedulesResponseBody`](./src/models/errors/createagentscheduleschedulesresponsebody.ts): Agent (or agent version, when agent_tag is set) not found. Status code `404`. Applicable to 1 of
|
|
964
|
-
* [`DeleteAgentScheduleResponseBody`](./src/models/errors/deleteagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of
|
|
965
|
-
* [`RetrieveAgentScheduleResponseBody`](./src/models/errors/retrieveagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of
|
|
966
|
-
* [`UpdateAgentScheduleSchedulesResponseBody`](./src/models/errors/updateagentscheduleschedulesresponsebody.ts): Schedule or agent version not found. Status code `404`. Applicable to 1 of
|
|
967
|
-
* [`TriggerAgentScheduleSchedulesResponseBody`](./src/models/errors/triggeragentscheduleschedulesresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of
|
|
968
|
-
* [`CreateModerationResponseBody`](./src/models/errors/createmoderationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of
|
|
969
|
-
* [`CreateTranscriptionResponseBody`](./src/models/errors/createtranscriptionresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of
|
|
970
|
-
* [`CreateTranslationResponseBody`](./src/models/errors/createtranslationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of
|
|
971
|
-
* [`InvokeEvalEvalsResponseResponseBody`](./src/models/errors/invokeevalevalsresponseresponsebody.ts): Error running the evaluator. Status code `500`. Applicable to 1 of
|
|
955
|
+
* [`HonoApiError`](./src/models/errors/honoapierror.ts): Applicable to 10 of 187 methods.*
|
|
956
|
+
* [`InvokeEvalResponseBody`](./src/models/errors/invokeevalresponsebody.ts): Bad request. Status code `400`. Applicable to 1 of 187 methods.*
|
|
957
|
+
* [`PostV2AgentsKeyCardRefreshResponseBody`](./src/models/errors/postv2agentskeycardrefreshresponsebody.ts): Invalid request - Agent is not an A2A agent or card fetch failed. Status code `400`. Applicable to 1 of 187 methods.*
|
|
958
|
+
* [`PostV2FeedbackResponseBody`](./src/models/errors/postv2feedbackresponsebody.ts): Bad Request. Status code `400`. Applicable to 1 of 187 methods.*
|
|
959
|
+
* [`CreateAgentScheduleResponseBody`](./src/models/errors/createagentscheduleresponsebody.ts): Invalid schedule type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of 187 methods.*
|
|
960
|
+
* [`UpdateAgentScheduleResponseBody`](./src/models/errors/updateagentscheduleresponsebody.ts): Invalid type, expression, or sub-hour cadence. Status code `400`. Applicable to 1 of 187 methods.*
|
|
961
|
+
* [`TriggerAgentScheduleResponseBody`](./src/models/errors/triggeragentscheduleresponsebody.ts): Schedule is inactive. Status code `400`. Applicable to 1 of 187 methods.*
|
|
962
|
+
* [`GetEvalsResponseBody`](./src/models/errors/getevalsresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 187 methods.*
|
|
963
|
+
* [`CreateEvalResponseBody`](./src/models/errors/createevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 187 methods.*
|
|
964
|
+
* [`UpdateEvalResponseBody`](./src/models/errors/updateevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 187 methods.*
|
|
965
|
+
* [`DeleteEvalResponseBody`](./src/models/errors/deleteevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 187 methods.*
|
|
966
|
+
* [`InvokeEvalEvalsResponseBody`](./src/models/errors/invokeevalevalsresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 187 methods.*
|
|
967
|
+
* [`GetV2EvaluatorsIdVersionsResponseBody`](./src/models/errors/getv2evaluatorsidversionsresponsebody.ts): Evaluator not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
968
|
+
* [`DeleteAgentResponseBody`](./src/models/errors/deleteagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or has already been deleted. Status code `404`. Applicable to 1 of 187 methods.*
|
|
969
|
+
* [`RetrieveAgentRequestResponseBody`](./src/models/errors/retrieveagentrequestresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to access it. Status code `404`. Applicable to 1 of 187 methods.*
|
|
970
|
+
* [`UpdateAgentResponseBody`](./src/models/errors/updateagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to modify it. Status code `404`. Applicable to 1 of 187 methods.*
|
|
971
|
+
* [`StreamRunAgentResponseBody`](./src/models/errors/streamrunagentresponsebody.ts): Model not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
972
|
+
* [`StreamAgentResponseBody`](./src/models/errors/streamagentresponsebody.ts): Agent not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
973
|
+
* [`PostV2AgentsKeyCardRefreshAgentsResponseBody`](./src/models/errors/postv2agentskeycardrefreshagentsresponsebody.ts): Agent not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
974
|
+
* [`UpdatePromptResponseBody`](./src/models/errors/updatepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
975
|
+
* [`DeletePromptResponseBody`](./src/models/errors/deletepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
976
|
+
* [`GetPromptVersionResponseBody`](./src/models/errors/getpromptversionresponsebody.ts): Not Found - The prompt or prompt version does not exist. Status code `404`. Applicable to 1 of 187 methods.*
|
|
977
|
+
* [`UpdateToolResponseBody`](./src/models/errors/updatetoolresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
978
|
+
* [`GetV2ToolsToolIdVersionsResponseBody`](./src/models/errors/getv2toolstoolidversionsresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
979
|
+
* [`GetV2ToolsToolIdVersionsVersionIdResponseBody`](./src/models/errors/getv2toolstoolidversionsversionidresponsebody.ts): Tool or version not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
980
|
+
* [`PostV2FeedbackRemoveResponseBody`](./src/models/errors/postv2feedbackremoveresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 187 methods.*
|
|
981
|
+
* [`PostV2FeedbackFeedbackResponseBody`](./src/models/errors/postv2feedbackfeedbackresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 187 methods.*
|
|
982
|
+
* [`CreateAgentScheduleSchedulesResponseBody`](./src/models/errors/createagentscheduleschedulesresponsebody.ts): Agent (or agent version, when agent_tag is set) not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
983
|
+
* [`DeleteAgentScheduleResponseBody`](./src/models/errors/deleteagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 187 methods.*
|
|
984
|
+
* [`RetrieveAgentScheduleResponseBody`](./src/models/errors/retrieveagentscheduleresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 187 methods.*
|
|
985
|
+
* [`UpdateAgentScheduleSchedulesResponseBody`](./src/models/errors/updateagentscheduleschedulesresponsebody.ts): Schedule or agent version not found. Status code `404`. Applicable to 1 of 187 methods.*
|
|
986
|
+
* [`TriggerAgentScheduleSchedulesResponseBody`](./src/models/errors/triggeragentscheduleschedulesresponsebody.ts): Schedule not found, or belongs to a different agent. Status code `404`. Applicable to 1 of 187 methods.*
|
|
987
|
+
* [`CreateModerationResponseBody`](./src/models/errors/createmoderationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 187 methods.*
|
|
988
|
+
* [`CreateTranscriptionResponseBody`](./src/models/errors/createtranscriptionresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 187 methods.*
|
|
989
|
+
* [`CreateTranslationResponseBody`](./src/models/errors/createtranslationresponsebody.ts): Returns validation error. Status code `422`. Applicable to 1 of 187 methods.*
|
|
990
|
+
* [`InvokeEvalEvalsResponseResponseBody`](./src/models/errors/invokeevalevalsresponseresponsebody.ts): Error running the evaluator. Status code `500`. Applicable to 1 of 187 methods.*
|
|
972
991
|
* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
|
|
973
992
|
|
|
974
993
|
</details>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Check budget enforcement
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Internal endpoint used by the gateway to resolve applicable budgets and check enforcement gates for a request. Returns allowed/rejected status with dimension info for rate-limit headers.
|
|
15
|
+
*/
|
|
16
|
+
export declare function budgetsCheck(client: OrqCore, request: components.CheckBudgetsRequest, options?: RequestOptions): APIPromise<Result<components.CheckBudgetsResponse, OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=budgetsCheck.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgetsCheck.d.ts","sourceRoot":"","sources":["../src/funcs/budgetsCheck.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,oBAAoB,EAC7B,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.budgetsCheck = budgetsCheck;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const http_js_1 = require("../lib/http.js");
|
|
42
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
+
const security_js_1 = require("../lib/security.js");
|
|
46
|
+
const url_js_1 = require("../lib/url.js");
|
|
47
|
+
const components = __importStar(require("../models/components/index.js"));
|
|
48
|
+
const async_js_1 = require("../types/async.js");
|
|
49
|
+
/**
|
|
50
|
+
* Check budget enforcement
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Internal endpoint used by the gateway to resolve applicable budgets and check enforcement gates for a request. Returns allowed/rejected status with dimension info for rate-limit headers.
|
|
54
|
+
*/
|
|
55
|
+
function budgetsCheck(client, request, options) {
|
|
56
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
57
|
+
}
|
|
58
|
+
async function $do(client, request, options) {
|
|
59
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.CheckBudgetsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
60
|
+
if (!parsed.ok) {
|
|
61
|
+
return [parsed, { status: "invalid" }];
|
|
62
|
+
}
|
|
63
|
+
const payload = parsed.value;
|
|
64
|
+
const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
|
|
65
|
+
const path = (0, url_js_1.pathToFunc)("/v2/budgets/check")();
|
|
66
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
Accept: "application/json",
|
|
69
|
+
}));
|
|
70
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
71
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
72
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
73
|
+
const context = {
|
|
74
|
+
options: client._options,
|
|
75
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
76
|
+
operationID: "BudgetCheck",
|
|
77
|
+
oAuth2Scopes: null,
|
|
78
|
+
resolvedSecurity: requestSecurity,
|
|
79
|
+
securitySource: client._options.apiKey,
|
|
80
|
+
retryConfig: options?.retries
|
|
81
|
+
|| client._options.retryConfig
|
|
82
|
+
|| { strategy: "none" },
|
|
83
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
84
|
+
};
|
|
85
|
+
const requestRes = client._createRequest(context, {
|
|
86
|
+
security: requestSecurity,
|
|
87
|
+
method: "POST",
|
|
88
|
+
baseURL: options?.serverURL,
|
|
89
|
+
path: path,
|
|
90
|
+
headers: headers,
|
|
91
|
+
body: body,
|
|
92
|
+
userAgent: client._options.userAgent,
|
|
93
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
94
|
+
}, options);
|
|
95
|
+
if (!requestRes.ok) {
|
|
96
|
+
return [requestRes, { status: "invalid" }];
|
|
97
|
+
}
|
|
98
|
+
const req = requestRes.value;
|
|
99
|
+
const doResult = await client._do(req, {
|
|
100
|
+
context,
|
|
101
|
+
isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
|
|
102
|
+
retryConfig: context.retryConfig,
|
|
103
|
+
retryCodes: context.retryCodes,
|
|
104
|
+
});
|
|
105
|
+
if (!doResult.ok) {
|
|
106
|
+
return [doResult, { status: "request-error", request: req }];
|
|
107
|
+
}
|
|
108
|
+
const response = doResult.value;
|
|
109
|
+
const [result] = await M.match(M.json(200, components.CheckBudgetsResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
|
|
110
|
+
if (!result.ok) {
|
|
111
|
+
return [result, { status: "complete", request: req, response }];
|
|
112
|
+
}
|
|
113
|
+
return [result, { status: "complete", request: req, response }];
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=budgetsCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgetsCheck.js","sourceRoot":"","sources":["../src/funcs/budgetsCheck.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BH,oCAsBC;AAlDD,sDAAiD;AACjD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAW5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,YAAY,CAC1B,MAAe,EACf,OAAuC,EACvC,OAAwB;IAcxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAAuC,EACvC,OAAwB;IAiBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EACrE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC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AAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Create a new budget
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of `limits.amount`, `limits.token_limit`, or `rate_limit.requests_per_minute` MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id).
|
|
15
|
+
*/
|
|
16
|
+
export declare function budgetsCreate(client: OrqCore, request: components.CreateBudgetRequest, options?: RequestOptions): APIPromise<Result<components.CreateBudgetResponse, OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=budgetsCreate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgetsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/budgetsCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,oBAAoB,EAC7B,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.budgetsCreate = budgetsCreate;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const http_js_1 = require("../lib/http.js");
|
|
42
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
+
const security_js_1 = require("../lib/security.js");
|
|
46
|
+
const url_js_1 = require("../lib/url.js");
|
|
47
|
+
const components = __importStar(require("../models/components/index.js"));
|
|
48
|
+
const async_js_1 = require("../types/async.js");
|
|
49
|
+
/**
|
|
50
|
+
* Create a new budget
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Creates a new budget in the workspace. Exactly one scope variant must be set (workspace / project / identity / api_key / provider / model). At least one of `limits.amount`, `limits.token_limit`, or `rate_limit.requests_per_minute` MUST be provided. Uniqueness is enforced across (workspace_id, scope_kind, scope_target_id).
|
|
54
|
+
*/
|
|
55
|
+
function budgetsCreate(client, request, options) {
|
|
56
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
57
|
+
}
|
|
58
|
+
async function $do(client, request, options) {
|
|
59
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.CreateBudgetRequest$outboundSchema.parse(value), "Input validation failed");
|
|
60
|
+
if (!parsed.ok) {
|
|
61
|
+
return [parsed, { status: "invalid" }];
|
|
62
|
+
}
|
|
63
|
+
const payload = parsed.value;
|
|
64
|
+
const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
|
|
65
|
+
const path = (0, url_js_1.pathToFunc)("/v2/budgets")();
|
|
66
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
Accept: "application/json",
|
|
69
|
+
}));
|
|
70
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
71
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
72
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
73
|
+
const context = {
|
|
74
|
+
options: client._options,
|
|
75
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
76
|
+
operationID: "BudgetCreate",
|
|
77
|
+
oAuth2Scopes: null,
|
|
78
|
+
resolvedSecurity: requestSecurity,
|
|
79
|
+
securitySource: client._options.apiKey,
|
|
80
|
+
retryConfig: options?.retries
|
|
81
|
+
|| client._options.retryConfig
|
|
82
|
+
|| { strategy: "none" },
|
|
83
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
84
|
+
};
|
|
85
|
+
const requestRes = client._createRequest(context, {
|
|
86
|
+
security: requestSecurity,
|
|
87
|
+
method: "POST",
|
|
88
|
+
baseURL: options?.serverURL,
|
|
89
|
+
path: path,
|
|
90
|
+
headers: headers,
|
|
91
|
+
body: body,
|
|
92
|
+
userAgent: client._options.userAgent,
|
|
93
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
94
|
+
}, options);
|
|
95
|
+
if (!requestRes.ok) {
|
|
96
|
+
return [requestRes, { status: "invalid" }];
|
|
97
|
+
}
|
|
98
|
+
const req = requestRes.value;
|
|
99
|
+
const doResult = await client._do(req, {
|
|
100
|
+
context,
|
|
101
|
+
isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
|
|
102
|
+
retryConfig: context.retryConfig,
|
|
103
|
+
retryCodes: context.retryCodes,
|
|
104
|
+
});
|
|
105
|
+
if (!doResult.ok) {
|
|
106
|
+
return [doResult, { status: "request-error", request: req }];
|
|
107
|
+
}
|
|
108
|
+
const response = doResult.value;
|
|
109
|
+
const [result] = await M.match(M.json(200, components.CreateBudgetResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
|
|
110
|
+
if (!result.ok) {
|
|
111
|
+
return [result, { status: "complete", request: req, response }];
|
|
112
|
+
}
|
|
113
|
+
return [result, { status: "complete", request: req, response }];
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=budgetsCreate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgetsCreate.js","sourceRoot":"","sources":["../src/funcs/budgetsCreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;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E;QACrC,OAAO;QACP,iBAAiB,EAAE,CAAC,UAAkB,EAAE,EAAE,CACxC,IAAA,yBAAe,EAAC,EAAE,MAAM,EAAE,UAAU,EAAc,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrE,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAW5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,kCAAkC,CAAC,EAC1D,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Delete a budget
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Permanently deletes a budget. Consumption counters in Redis for this budget are cleared immediately. The response body is empty on success.
|
|
16
|
+
*/
|
|
17
|
+
export declare function budgetsDelete(client: OrqCore, request: operations.BudgetDeleteRequest, options?: RequestOptions): APIPromise<Result<components.DeleteBudgetResponse, OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=budgetsDelete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgetsDelete.d.ts","sourceRoot":"","sources":["../src/funcs/budgetsDelete.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,oBAAoB,EAC7B,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.budgetsDelete = budgetsDelete;
|
|
40
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
+
const http_js_1 = require("../lib/http.js");
|
|
42
|
+
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
+
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
+
const security_js_1 = require("../lib/security.js");
|
|
46
|
+
const url_js_1 = require("../lib/url.js");
|
|
47
|
+
const components = __importStar(require("../models/components/index.js"));
|
|
48
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
+
const async_js_1 = require("../types/async.js");
|
|
50
|
+
/**
|
|
51
|
+
* Delete a budget
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Permanently deletes a budget. Consumption counters in Redis for this budget are cleared immediately. The response body is empty on success.
|
|
55
|
+
*/
|
|
56
|
+
function budgetsDelete(client, request, options) {
|
|
57
|
+
return new async_js_1.APIPromise($do(client, request, options));
|
|
58
|
+
}
|
|
59
|
+
async function $do(client, request, options) {
|
|
60
|
+
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.BudgetDeleteRequest$outboundSchema.parse(value), "Input validation failed");
|
|
61
|
+
if (!parsed.ok) {
|
|
62
|
+
return [parsed, { status: "invalid" }];
|
|
63
|
+
}
|
|
64
|
+
const payload = parsed.value;
|
|
65
|
+
const body = null;
|
|
66
|
+
const pathParams = {
|
|
67
|
+
budget_id: (0, encodings_js_1.encodeSimple)("budget_id", payload.budget_id, {
|
|
68
|
+
explode: false,
|
|
69
|
+
charEncoding: "percent",
|
|
70
|
+
}),
|
|
71
|
+
};
|
|
72
|
+
const path = (0, url_js_1.pathToFunc)("/v2/budgets/{budget_id}")(pathParams);
|
|
73
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
74
|
+
Accept: "application/json",
|
|
75
|
+
}));
|
|
76
|
+
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
77
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
78
|
+
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
79
|
+
const context = {
|
|
80
|
+
options: client._options,
|
|
81
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
+
operationID: "BudgetDelete",
|
|
83
|
+
oAuth2Scopes: null,
|
|
84
|
+
resolvedSecurity: requestSecurity,
|
|
85
|
+
securitySource: client._options.apiKey,
|
|
86
|
+
retryConfig: options?.retries
|
|
87
|
+
|| client._options.retryConfig
|
|
88
|
+
|| { strategy: "none" },
|
|
89
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
90
|
+
};
|
|
91
|
+
const requestRes = client._createRequest(context, {
|
|
92
|
+
security: requestSecurity,
|
|
93
|
+
method: "DELETE",
|
|
94
|
+
baseURL: options?.serverURL,
|
|
95
|
+
path: path,
|
|
96
|
+
headers: headers,
|
|
97
|
+
body: body,
|
|
98
|
+
userAgent: client._options.userAgent,
|
|
99
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
100
|
+
}, options);
|
|
101
|
+
if (!requestRes.ok) {
|
|
102
|
+
return [requestRes, { status: "invalid" }];
|
|
103
|
+
}
|
|
104
|
+
const req = requestRes.value;
|
|
105
|
+
const doResult = await client._do(req, {
|
|
106
|
+
context,
|
|
107
|
+
isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
|
|
108
|
+
retryConfig: context.retryConfig,
|
|
109
|
+
retryCodes: context.retryCodes,
|
|
110
|
+
});
|
|
111
|
+
if (!doResult.ok) {
|
|
112
|
+
return [doResult, { status: "request-error", request: req }];
|
|
113
|
+
}
|
|
114
|
+
const response = doResult.value;
|
|
115
|
+
const [result] = await M.match(M.json(200, components.DeleteBudgetResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
|
|
116
|
+
if (!result.ok) {
|
|
117
|
+
return [result, { status: "complete", request: req, response }];
|
|
118
|
+
}
|
|
119
|
+
return [result, { status: "complete", request: req, response }];
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=budgetsDelete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgetsDelete.js","sourceRoot":"","sources":["../src/funcs/budgetsDelete.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,sCAsBC;AAnDD,sDAAmD;AACnD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAW5D,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;GAKG;AACH,SAAgB,aAAa,CAC3B,MAAe,EACf,OAAuC,EACvC,OAAwB;IAcxB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAe,EACf,OAAuC,EACvC,OAAwB;IAiBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EACrE,yBAAyB,CAC1B,CAAC;I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AG,MAAM,CAAC,CAAC,KAAK,CAW5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,kCAAkC,CAAC,EAC1D,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACjB,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve a budget
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Retrieves the metadata for an existing budget by its unique identifier. Returns `NotFound` when the budget does not exist in the caller's workspace.
|
|
16
|
+
*/
|
|
17
|
+
export declare function budgetsGet(client: OrqCore, request: operations.BudgetGetRequest, options?: RequestOptions): APIPromise<Result<components.GetBudgetResponse, OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=budgetsGet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budgetsGet.d.ts","sourceRoot":"","sources":["../src/funcs/budgetsGet.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,iBAAiB,EAC1B,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|