@openrouter/sdk 1.3.21 → 1.3.22
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/esm/funcs/alphaDecisionsCreate.js +5 -5
- package/esm/funcs/analyticsGetAnalyticsMeta.js +4 -4
- package/esm/funcs/analyticsGetUserActivity.js +5 -5
- package/esm/funcs/analyticsQueryAnalytics.js +4 -4
- package/esm/funcs/apiKeysCreate.js +4 -4
- package/esm/funcs/apiKeysDelete.js +4 -4
- package/esm/funcs/apiKeysGet.js +4 -4
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +4 -4
- package/esm/funcs/apiKeysList.js +4 -4
- package/esm/funcs/apiKeysUpdate.js +4 -4
- package/esm/funcs/benchmarksGetBenchmarks.js +5 -5
- package/esm/funcs/byokCreate.js +5 -5
- package/esm/funcs/byokDelete.js +5 -5
- package/esm/funcs/byokGet.js +5 -5
- package/esm/funcs/byokList.js +5 -5
- package/esm/funcs/byokUpdate.js +5 -5
- package/esm/funcs/chatSend.js +4 -4
- package/esm/funcs/classificationsGetTaskClassifications.js +5 -5
- package/esm/funcs/containersDownloadContainerFileContent.js +4 -4
- package/esm/funcs/containersGetContainerFile.js +5 -5
- package/esm/funcs/containersListContainerFiles.js +5 -5
- package/esm/funcs/containersPromoteContainerFile.js +5 -5
- package/esm/funcs/creditsGetCredits.js +4 -4
- package/esm/funcs/datasetsGetAppRankings.js +5 -5
- package/esm/funcs/datasetsGetRankingsDaily.js +5 -5
- package/esm/funcs/datasetsGetSessionCost.js +5 -5
- package/esm/funcs/embeddingsGenerate.js +5 -5
- package/esm/funcs/embeddingsListModels.js +5 -5
- package/esm/funcs/endpointsList.js +4 -4
- package/esm/funcs/endpointsListZdrEndpoints.js +4 -4
- package/esm/funcs/filesDelete.js +5 -5
- package/esm/funcs/filesDownload.js +4 -4
- package/esm/funcs/filesList.js +4 -4
- package/esm/funcs/filesRetrieve.js +5 -5
- package/esm/funcs/filesUpload.js +5 -5
- package/esm/funcs/generationsGetGeneration.js +5 -5
- package/esm/funcs/generationsListGenerationContent.js +5 -5
- package/esm/funcs/generationsSubmitFeedback.js +5 -5
- package/esm/funcs/guardrailsBulkAssignKeys.js +5 -5
- package/esm/funcs/guardrailsBulkAssignMembers.js +5 -5
- package/esm/funcs/guardrailsBulkUnassignKeys.js +5 -5
- package/esm/funcs/guardrailsBulkUnassignMembers.js +5 -5
- package/esm/funcs/guardrailsCreate.js +5 -5
- package/esm/funcs/guardrailsDelete.js +5 -5
- package/esm/funcs/guardrailsGet.js +5 -5
- package/esm/funcs/guardrailsList.js +5 -5
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +5 -5
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +4 -4
- package/esm/funcs/guardrailsListKeyAssignments.js +5 -5
- package/esm/funcs/guardrailsListMemberAssignments.js +5 -5
- package/esm/funcs/guardrailsUpdate.js +5 -5
- package/esm/funcs/imagesGenerate.js +4 -4
- package/esm/funcs/imagesListModelEndpoints.js +5 -5
- package/esm/funcs/imagesListModels.js +5 -5
- package/esm/funcs/internsChat.js +8 -8
- package/esm/funcs/internsCreateIntern.js +5 -5
- package/esm/funcs/internsDeleteIntern.js +5 -5
- package/esm/funcs/internsGetIntern.js +5 -5
- package/esm/funcs/internsInvoke.js +7 -7
- package/esm/funcs/internsListInterns.js +5 -5
- package/esm/funcs/internsProvisionIntern.js +5 -5
- package/esm/funcs/internsSuspendIntern.js +5 -5
- package/esm/funcs/internsUpdateIntern.js +5 -5
- package/esm/funcs/modelsCount.js +5 -5
- package/esm/funcs/modelsGet.js +5 -5
- package/esm/funcs/modelsList.js +4 -4
- package/esm/funcs/modelsListForUser.js +5 -5
- package/esm/funcs/oAuthCreateAuthCode.js +4 -4
- package/esm/funcs/oAuthCreateOauthToken.js +5 -5
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +4 -4
- package/esm/funcs/oAuthListOauthJwks.js +5 -5
- package/esm/funcs/observabilityCreate.js +5 -5
- package/esm/funcs/observabilityDelete.js +5 -5
- package/esm/funcs/observabilityGet.js +5 -5
- package/esm/funcs/observabilityList.js +4 -4
- package/esm/funcs/observabilityUpdate.js +5 -5
- package/esm/funcs/organizationListMembers.js +5 -5
- package/esm/funcs/presetsCreatePresetsChatCompletions.js +5 -5
- package/esm/funcs/presetsCreatePresetsMessages.js +5 -5
- package/esm/funcs/presetsCreatePresetsResponses.js +5 -5
- package/esm/funcs/presetsGet.js +5 -5
- package/esm/funcs/presetsGetVersion.js +5 -5
- package/esm/funcs/presetsList.js +5 -5
- package/esm/funcs/presetsListVersions.js +5 -5
- package/esm/funcs/providersList.js +4 -4
- package/esm/funcs/rerankRerank.js +5 -5
- package/esm/funcs/responsesSend.js +4 -4
- package/esm/funcs/scimCreate.js +5 -5
- package/esm/funcs/scimCreateSyncJob.js +5 -5
- package/esm/funcs/scimDelete.js +5 -5
- package/esm/funcs/scimGetSyncJob.js +5 -5
- package/esm/funcs/scimListGroups.js +5 -5
- package/esm/funcs/scimListMappings.js +5 -5
- package/esm/funcs/scimRead.js +5 -5
- package/esm/funcs/scimUpdate.js +5 -5
- package/esm/funcs/sttCreateTranscription.js +5 -5
- package/esm/funcs/sttCreateTranscriptionMultipart.js +5 -5
- package/esm/funcs/systemOneCreate.js +5 -5
- package/esm/funcs/ttsCreateSpeech.js +4 -4
- package/esm/funcs/vaultCopyVaultSecretsToIntern.js +5 -5
- package/esm/funcs/vaultDeleteInternVaultSecret.js +4 -4
- package/esm/funcs/vaultDeleteVaultSecret.js +4 -4
- package/esm/funcs/vaultListInternVaultSecrets.js +5 -5
- package/esm/funcs/vaultListVaultSecrets.js +5 -5
- package/esm/funcs/vaultStoreInternVaultSecret.js +5 -5
- package/esm/funcs/vaultStoreVaultSecret.js +5 -5
- package/esm/funcs/videoGenerationGenerate.js +5 -5
- package/esm/funcs/videoGenerationGetGeneration.js +5 -5
- package/esm/funcs/videoGenerationGetVideoContent.js +4 -4
- package/esm/funcs/videoGenerationListVideosModels.js +5 -5
- package/esm/funcs/workspacesBulkAddMembers.js +5 -5
- package/esm/funcs/workspacesBulkRemoveMembers.js +5 -5
- package/esm/funcs/workspacesCreate.js +5 -5
- package/esm/funcs/workspacesDelete.js +5 -5
- package/esm/funcs/workspacesDeleteBudget.js +5 -5
- package/esm/funcs/workspacesGet.js +5 -5
- package/esm/funcs/workspacesGetBudget.js +5 -5
- package/esm/funcs/workspacesList.js +5 -5
- package/esm/funcs/workspacesListBudgets.js +5 -5
- package/esm/funcs/workspacesListMembers.js +5 -5
- package/esm/funcs/workspacesSetBudget.js +5 -5
- package/esm/funcs/workspacesUpdate.js +5 -5
- package/esm/lib/anthropic-compat.d.ts +2 -2
- package/esm/lib/async-params.d.ts +4 -4
- package/esm/lib/chat-compat.d.ts +3 -2
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/conversation-state.d.ts +7 -5
- package/esm/lib/model-result.d.ts +7 -4
- package/esm/lib/next-turn-params.d.ts +4 -4
- package/esm/lib/stream-transformers.d.ts +26 -17
- package/esm/lib/stream-type-guards.d.ts +41 -21
- package/esm/lib/tool-orchestrator.d.ts +7 -5
- package/esm/lib/tool-types.d.ts +14 -10
- package/esm/lib/turn-context.d.ts +6 -4
- package/esm/lib/turn-context.js +2 -2
- package/esm/models/customtoolcallitem.d.ts +8 -8
- package/esm/models/customtoolcallitem.js +4 -4
- package/esm/models/errors/badgatewayresponseerror.js +2 -2
- package/esm/models/errors/badrequestresponseerror.js +2 -2
- package/esm/models/errors/conflictresponseerror.js +2 -2
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +2 -2
- package/esm/models/errors/forbiddenresponseerror.js +2 -2
- package/esm/models/errors/gatewaytimeoutresponseerror.js +2 -2
- package/esm/models/errors/goneresponseerror.js +2 -2
- package/esm/models/errors/internalserverresponseerror.js +2 -2
- package/esm/models/errors/internchaterrorresponse.js +2 -2
- package/esm/models/errors/internlifecycleerror.js +2 -2
- package/esm/models/errors/notfoundresponseerror.js +2 -2
- package/esm/models/errors/oautherrorresponse.js +2 -2
- package/esm/models/errors/payloadtoolargeresponseerror.js +2 -2
- package/esm/models/errors/paymentrequiredresponseerror.js +2 -2
- package/esm/models/errors/provideroverloadedresponseerror.js +2 -2
- package/esm/models/errors/requesttimeoutresponseerror.js +2 -2
- package/esm/models/errors/serviceunavailableresponseerror.js +2 -2
- package/esm/models/errors/toomanyrequestsresponseerror.js +2 -2
- package/esm/models/errors/unauthorizedresponseerror.js +2 -2
- package/esm/models/errors/unprocessableentityresponseerror.js +2 -2
- package/esm/models/functioncallitem.d.ts +12 -12
- package/esm/models/functioncallitem.js +6 -6
- package/esm/models/inputsunion.d.ts +4 -6
- package/esm/models/inputsunion.js +2 -8
- package/esm/models/operations/bulkaddworkspacemembers.js +2 -2
- package/esm/models/operations/bulkassignkeystoguardrail.js +2 -2
- package/esm/models/operations/bulkassignmemberstoguardrail.js +2 -2
- package/esm/models/operations/bulkremoveworkspacemembers.js +2 -2
- package/esm/models/operations/bulkunassignkeysfromguardrail.js +2 -2
- package/esm/models/operations/bulkunassignmembersfromguardrail.js +2 -2
- package/esm/models/operations/copyvaultsecretstointern.js +2 -2
- package/esm/models/operations/createapialphadecisions.js +2 -2
- package/esm/models/operations/createaudiospeech.js +2 -2
- package/esm/models/operations/createaudiotranscriptions.js +2 -2
- package/esm/models/operations/createbyokkey.js +2 -2
- package/esm/models/operations/createembeddings.js +10 -10
- package/esm/models/operations/createguardrail.js +2 -2
- package/esm/models/operations/createimages.js +4 -4
- package/esm/models/operations/createintern.js +2 -2
- package/esm/models/operations/createinternchatcompletion.js +6 -6
- package/esm/models/operations/createoauthtoken.js +2 -2
- package/esm/models/operations/createobservabilitydestination.js +2 -2
- package/esm/models/operations/createpresetschatcompletions.js +2 -2
- package/esm/models/operations/createpresetsmessages.js +2 -2
- package/esm/models/operations/createpresetsresponses.js +2 -2
- package/esm/models/operations/creatererank.js +3 -3
- package/esm/models/operations/createresponses.js +5 -5
- package/esm/models/operations/createscimgroupmapping.js +2 -2
- package/esm/models/operations/createscimsyncjob.js +2 -2
- package/esm/models/operations/createsystemone.js +2 -2
- package/esm/models/operations/createvideos.js +2 -2
- package/esm/models/operations/createworkspace.js +2 -2
- package/esm/models/operations/deletefile.js +2 -2
- package/esm/models/operations/deleteintern.js +2 -2
- package/esm/models/operations/deleteworkspacebudget.js +2 -2
- package/esm/models/operations/downloadfilecontent.js +2 -2
- package/esm/models/operations/getapprankings.js +2 -2
- package/esm/models/operations/getcurrentkey.js +2 -2
- package/esm/models/operations/getfilemetadata.js +2 -2
- package/esm/models/operations/getmodels.js +2 -2
- package/esm/models/operations/getsessioncost.js +2 -2
- package/esm/models/operations/getworkspacebudget.js +2 -2
- package/esm/models/operations/invokeintern.js +3 -3
- package/esm/models/operations/listbyokkeys.js +2 -2
- package/esm/models/operations/listembeddingsmodels.js +2 -2
- package/esm/models/operations/listendpoints.js +2 -2
- package/esm/models/operations/listendpointszdr.js +2 -2
- package/esm/models/operations/listfiles.js +3 -3
- package/esm/models/operations/listguardrailkeyassignments.js +2 -2
- package/esm/models/operations/listguardrailmemberassignments.js +2 -2
- package/esm/models/operations/listguardrails.js +2 -2
- package/esm/models/operations/listkeyassignments.js +2 -2
- package/esm/models/operations/listmemberassignments.js +2 -2
- package/esm/models/operations/listmodelsuser.js +2 -2
- package/esm/models/operations/listobservabilitydestinations.js +2 -2
- package/esm/models/operations/listpresets.js +2 -2
- package/esm/models/operations/listpresetversions.js +2 -2
- package/esm/models/operations/listscimgroupmappings.js +2 -2
- package/esm/models/operations/listscimgroups.js +2 -2
- package/esm/models/operations/listworkspacemembers.js +2 -2
- package/esm/models/operations/listworkspaces.js +2 -2
- package/esm/models/operations/sendchatcompletionrequest.js +5 -5
- package/esm/models/operations/storeinternvaultsecret.js +2 -2
- package/esm/models/operations/storevaultsecret.js +2 -2
- package/esm/models/operations/submitgenerationfeedback.js +2 -2
- package/esm/models/operations/updatebyokkey.js +2 -2
- package/esm/models/operations/updateguardrail.js +2 -2
- package/esm/models/operations/updateintern.js +2 -2
- package/esm/models/operations/updateobservabilitydestination.js +2 -2
- package/esm/models/operations/updatescimgroupmapping.js +2 -2
- package/esm/models/operations/updateworkspace.js +2 -2
- package/esm/models/operations/uploadfile.js +2 -2
- package/esm/models/operations/upsertworkspacebudget.js +3 -3
- package/esm/models/outputcustomtoolcallitem.d.ts +2 -26
- package/esm/models/outputcustomtoolcallitem.js +1 -28
- package/esm/models/outputfunctioncallitem.d.ts +1 -44
- package/esm/models/outputfunctioncallitem.js +1 -64
- package/esm/models/outputitems.d.ts +2 -6
- package/esm/models/outputitems.js +2 -2
- package/jsr.json +1 -1
- package/package.json +11 -9
- package/scripts/unbarrel-imports.js +296 -0
|
@@ -9,14 +9,14 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js"; import { UnprocessableEntityResponseError$inboundSchema as errors_UnprocessableEntityResponseError$inboundSchema } from "../models/errors/unprocessableentityresponseerror.js";
|
|
13
|
+
import { CreateResponsesRequest$outboundSchema as operations_CreateResponsesRequest$outboundSchema, CreateResponsesResponse$inboundSchema as operations_CreateResponsesResponse$inboundSchema } from "../models/operations/createresponses.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
export function responsesSend(client, request, options) {
|
|
16
16
|
return new APIPromise($do(client, request, options));
|
|
17
17
|
}
|
|
18
18
|
async function $do(client, request, options) {
|
|
19
|
-
const parsed = safeParse(request, (value) =>
|
|
19
|
+
const parsed = safeParse(request, (value) => operations_CreateResponsesRequest$outboundSchema.parse(value), "Input validation failed");
|
|
20
20
|
if (!parsed.ok) {
|
|
21
21
|
return [parsed, { status: "invalid" }];
|
|
22
22
|
}
|
|
@@ -85,7 +85,7 @@ async function $do(client, request, options) {
|
|
|
85
85
|
const responseFields = {
|
|
86
86
|
HttpMeta: { Response: response, Request: req },
|
|
87
87
|
};
|
|
88
|
-
const [result] = await M.match(M.json(200,
|
|
88
|
+
const [result] = await M.match(M.json(200, operations_CreateResponsesResponse$inboundSchema), M.sse(200, operations_CreateResponsesResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(422, errors_UnprocessableEntityResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
89
89
|
if (!result.ok) {
|
|
90
90
|
return [result, { status: "complete", request: req, response }];
|
|
91
91
|
}
|
package/esm/funcs/scimCreate.js
CHANGED
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { CreateScimGroupMappingResponse$inboundSchema as models_CreateScimGroupMappingResponse$inboundSchema } from "../models/createscimgroupmappingresponse.js";
|
|
14
|
+
import { CreateScimGroupMappingRequest$outboundSchema as operations_CreateScimGroupMappingRequest$outboundSchema } from "../models/operations/createscimgroupmapping.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Create a SCIM group mapping
|
|
@@ -23,7 +23,7 @@ export function scimCreate(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_CreateScimGroupMappingRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -91,7 +91,7 @@ async function $do(client, request, options) {
|
|
|
91
91
|
const responseFields = {
|
|
92
92
|
HttpMeta: { Response: response, Request: req },
|
|
93
93
|
};
|
|
94
|
-
const [result] = await M.match(M.json(201,
|
|
94
|
+
const [result] = await M.match(M.json(201, models_CreateScimGroupMappingResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
95
95
|
if (!result.ok) {
|
|
96
96
|
return [result, { status: "complete", request: req, response }];
|
|
97
97
|
}
|
|
@@ -9,8 +9,8 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { CreateScimSyncJobRequest$outboundSchema as operations_CreateScimSyncJobRequest$outboundSchema, CreateScimSyncJobResponse$inboundSchema as operations_CreateScimSyncJobResponse$inboundSchema } from "../models/operations/createscimsyncjob.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
/**
|
|
16
16
|
* Start a SCIM directory sync
|
|
@@ -22,7 +22,7 @@ export function scimCreateSyncJob(client, request, options) {
|
|
|
22
22
|
return new APIPromise($do(client, request, options));
|
|
23
23
|
}
|
|
24
24
|
async function $do(client, request, options) {
|
|
25
|
-
const parsed = safeParse(request, (value) =>
|
|
25
|
+
const parsed = safeParse(request, (value) => operations_CreateScimSyncJobRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
26
26
|
if (!parsed.ok) {
|
|
27
27
|
return [parsed, { status: "invalid" }];
|
|
28
28
|
}
|
|
@@ -87,10 +87,10 @@ async function $do(client, request, options) {
|
|
|
87
87
|
const responseFields = {
|
|
88
88
|
HttpMeta: { Response: response, Request: req },
|
|
89
89
|
};
|
|
90
|
-
const [result] = await M.match(M.json(202,
|
|
90
|
+
const [result] = await M.match(M.json(202, operations_CreateScimSyncJobResponse$inboundSchema, {
|
|
91
91
|
hdrs: true,
|
|
92
92
|
key: "Result",
|
|
93
|
-
}), M.jsonErr(401,
|
|
93
|
+
}), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
94
94
|
if (!result.ok) {
|
|
95
95
|
return [result, { status: "complete", request: req, response }];
|
|
96
96
|
}
|
package/esm/funcs/scimDelete.js
CHANGED
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { DeleteScimGroupMappingResponse$inboundSchema as models_DeleteScimGroupMappingResponse$inboundSchema } from "../models/deletescimgroupmappingresponse.js";
|
|
14
|
+
import { DeleteScimGroupMappingRequest$outboundSchema as operations_DeleteScimGroupMappingRequest$outboundSchema } from "../models/operations/deletescimgroupmapping.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Delete a SCIM group mapping
|
|
@@ -23,7 +23,7 @@ export function scimDelete(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_DeleteScimGroupMappingRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -98,7 +98,7 @@ async function $do(client, request, options) {
|
|
|
98
98
|
const responseFields = {
|
|
99
99
|
HttpMeta: { Response: response, Request: req },
|
|
100
100
|
};
|
|
101
|
-
const [result] = await M.match(M.json(200,
|
|
101
|
+
const [result] = await M.match(M.json(200, models_DeleteScimGroupMappingResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
102
102
|
if (!result.ok) {
|
|
103
103
|
return [result, { status: "complete", request: req, response }];
|
|
104
104
|
}
|
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { GetScimSyncJobResponse$inboundSchema as models_GetScimSyncJobResponse$inboundSchema } from "../models/getscimsyncjobresponse.js";
|
|
14
|
+
import { GetScimSyncJobRequest$outboundSchema as operations_GetScimSyncJobRequest$outboundSchema } from "../models/operations/getscimsyncjob.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Get SCIM directory sync status
|
|
@@ -23,7 +23,7 @@ export function scimGetSyncJob(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_GetScimSyncJobRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -94,7 +94,7 @@ async function $do(client, request, options) {
|
|
|
94
94
|
const responseFields = {
|
|
95
95
|
HttpMeta: { Response: response, Request: req },
|
|
96
96
|
};
|
|
97
|
-
const [result] = await M.match(M.json(200,
|
|
97
|
+
const [result] = await M.match(M.json(200, models_GetScimSyncJobResponse$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
98
98
|
if (!result.ok) {
|
|
99
99
|
return [result, { status: "complete", request: req, response }];
|
|
100
100
|
}
|
|
@@ -9,8 +9,8 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { ListScimGroupsRequest$outboundSchema as operations_ListScimGroupsRequest$outboundSchema, ListScimGroupsResponse$inboundSchema as operations_ListScimGroupsResponse$inboundSchema } from "../models/operations/listscimgroups.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
16
16
|
/**
|
|
@@ -23,7 +23,7 @@ export function scimListGroups(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_ListScimGroupsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -93,9 +93,9 @@ async function $do(client, request, options) {
|
|
|
93
93
|
const responseFields = {
|
|
94
94
|
HttpMeta: { Response: response, Request: req },
|
|
95
95
|
};
|
|
96
|
-
const [result, raw] = await M.match(M.json(200,
|
|
96
|
+
const [result, raw] = await M.match(M.json(200, operations_ListScimGroupsResponse$inboundSchema, {
|
|
97
97
|
key: "Result",
|
|
98
|
-
}), M.jsonErr(401,
|
|
98
|
+
}), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
99
99
|
if (!result.ok) {
|
|
100
100
|
return [haltIterator(result), {
|
|
101
101
|
status: "complete",
|
|
@@ -9,8 +9,8 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
12
|
+
import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { ListScimGroupMappingsRequest$outboundSchema as operations_ListScimGroupMappingsRequest$outboundSchema, ListScimGroupMappingsResponse$inboundSchema as operations_ListScimGroupMappingsResponse$inboundSchema } from "../models/operations/listscimgroupmappings.js";
|
|
14
14
|
import { APIPromise } from "../types/async.js";
|
|
15
15
|
import { createPageIterator, haltIterator, } from "../types/operations.js";
|
|
16
16
|
/**
|
|
@@ -23,7 +23,7 @@ export function scimListMappings(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_ListScimGroupMappingsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [haltIterator(parsed), { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -93,9 +93,9 @@ async function $do(client, request, options) {
|
|
|
93
93
|
const responseFields = {
|
|
94
94
|
HttpMeta: { Response: response, Request: req },
|
|
95
95
|
};
|
|
96
|
-
const [result, raw] = await M.match(M.json(200,
|
|
96
|
+
const [result, raw] = await M.match(M.json(200, operations_ListScimGroupMappingsResponse$inboundSchema, {
|
|
97
97
|
key: "Result",
|
|
98
|
-
}), M.jsonErr(401,
|
|
98
|
+
}), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
99
99
|
if (!result.ok) {
|
|
100
100
|
return [haltIterator(result), {
|
|
101
101
|
status: "complete",
|
package/esm/funcs/scimRead.js
CHANGED
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { GetScimGroupMappingResponse$inboundSchema as models_GetScimGroupMappingResponse$inboundSchema } from "../models/getscimgroupmappingresponse.js";
|
|
14
|
+
import { GetScimGroupMappingRequest$outboundSchema as operations_GetScimGroupMappingRequest$outboundSchema } from "../models/operations/getscimgroupmapping.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Get a SCIM group mapping
|
|
@@ -23,7 +23,7 @@ export function scimRead(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_GetScimGroupMappingRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -94,7 +94,7 @@ async function $do(client, request, options) {
|
|
|
94
94
|
const responseFields = {
|
|
95
95
|
HttpMeta: { Response: response, Request: req },
|
|
96
96
|
};
|
|
97
|
-
const [result] = await M.match(M.json(200,
|
|
97
|
+
const [result] = await M.match(M.json(200, models_GetScimGroupMappingResponse$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
98
98
|
if (!result.ok) {
|
|
99
99
|
return [result, { status: "complete", request: req, response }];
|
|
100
100
|
}
|
package/esm/funcs/scimUpdate.js
CHANGED
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { UpdateScimGroupMappingResponse$inboundSchema as models_UpdateScimGroupMappingResponse$inboundSchema } from "../models/updatescimgroupmappingresponse.js";
|
|
14
|
+
import { UpdateScimGroupMappingRequest$outboundSchema as operations_UpdateScimGroupMappingRequest$outboundSchema } from "../models/operations/updatescimgroupmapping.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Update a SCIM group mapping
|
|
@@ -23,7 +23,7 @@ export function scimUpdate(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_UpdateScimGroupMappingRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -97,7 +97,7 @@ async function $do(client, request, options) {
|
|
|
97
97
|
const responseFields = {
|
|
98
98
|
HttpMeta: { Response: response, Request: req },
|
|
99
99
|
};
|
|
100
|
-
const [result] = await M.match(M.json(200,
|
|
100
|
+
const [result] = await M.match(M.json(200, models_UpdateScimGroupMappingResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
101
101
|
if (!result.ok) {
|
|
102
102
|
return [result, { status: "complete", request: req, response }];
|
|
103
103
|
}
|
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { STTResponse$inboundSchema as models_STTResponse$inboundSchema } from "../models/sttresponse.js";
|
|
14
|
+
import { CreateAudioTranscriptionsRequest$outboundSchema as operations_CreateAudioTranscriptionsRequest$outboundSchema } from "../models/operations/createaudiotranscriptions.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Create transcription
|
|
@@ -23,7 +23,7 @@ export function sttCreateTranscription(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_CreateAudioTranscriptionsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -89,7 +89,7 @@ async function $do(client, request, options) {
|
|
|
89
89
|
const responseFields = {
|
|
90
90
|
HttpMeta: { Response: response, Request: req },
|
|
91
91
|
};
|
|
92
|
-
const [result] = await M.match(M.json(200,
|
|
92
|
+
const [result] = await M.match(M.json(200, models_STTResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
93
93
|
if (!result.ok) {
|
|
94
94
|
return [result, { status: "complete", request: req, response }];
|
|
95
95
|
}
|
|
@@ -10,9 +10,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
10
10
|
import { safeParse } from "../lib/schemas.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
13
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
14
|
+
import { STTResponse$inboundSchema as models_STTResponse$inboundSchema } from "../models/sttresponse.js";
|
|
15
|
+
import { CreateAudioTranscriptionsMultipartRequest$outboundSchema as operations_CreateAudioTranscriptionsMultipartRequest$outboundSchema } from "../models/operations/createaudiotranscriptionsmultipart.js";
|
|
16
16
|
import { APIPromise } from "../types/async.js";
|
|
17
17
|
import { isBlobLike } from "../types/blobs.js";
|
|
18
18
|
import { isReadableStream } from "../types/streams.js";
|
|
@@ -26,7 +26,7 @@ export function sttCreateTranscriptionMultipart(client, request, options) {
|
|
|
26
26
|
return new APIPromise($do(client, request, options));
|
|
27
27
|
}
|
|
28
28
|
async function $do(client, request, options) {
|
|
29
|
-
const parsed = safeParse(request, (value) =>
|
|
29
|
+
const parsed = safeParse(request, (value) => operations_CreateAudioTranscriptionsMultipartRequest$outboundSchema.parse(value), "Input validation failed");
|
|
30
30
|
if (!parsed.ok) {
|
|
31
31
|
return [parsed, { status: "invalid" }];
|
|
32
32
|
}
|
|
@@ -130,7 +130,7 @@ async function $do(client, request, options) {
|
|
|
130
130
|
const responseFields = {
|
|
131
131
|
HttpMeta: { Response: response, Request: req },
|
|
132
132
|
};
|
|
133
|
-
const [result] = await M.match(M.json(200,
|
|
133
|
+
const [result] = await M.match(M.json(200, models_STTResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
134
134
|
if (!result.ok) {
|
|
135
135
|
return [result, { status: "complete", request: req, response }];
|
|
136
136
|
}
|
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { DecisionsResponse$inboundSchema as models_DecisionsResponse$inboundSchema } from "../models/decisionsresponse.js";
|
|
14
|
+
import { CreateSystemoneRequest$outboundSchema as operations_CreateSystemoneRequest$outboundSchema } from "../models/operations/createsystemone.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Submit a System One request
|
|
@@ -23,7 +23,7 @@ export function systemOneCreate(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_CreateSystemoneRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -89,7 +89,7 @@ async function $do(client, request, options) {
|
|
|
89
89
|
const responseFields = {
|
|
90
90
|
HttpMeta: { Response: response, Request: req },
|
|
91
91
|
};
|
|
92
|
-
const [result] = await M.match(M.json(200,
|
|
92
|
+
const [result] = await M.match(M.json(200, models_DecisionsResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
93
93
|
if (!result.ok) {
|
|
94
94
|
return [result, { status: "complete", request: req, response }];
|
|
95
95
|
}
|
|
@@ -10,8 +10,8 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
10
10
|
import { safeParse } from "../lib/schemas.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
14
|
+
import { CreateAudioSpeechRequest$outboundSchema as operations_CreateAudioSpeechRequest$outboundSchema } from "../models/operations/createaudiospeech.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Create speech
|
|
@@ -23,7 +23,7 @@ export function ttsCreateSpeech(client, request, options) {
|
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
24
24
|
}
|
|
25
25
|
async function $do(client, request, options) {
|
|
26
|
-
const parsed = safeParse(request, (value) =>
|
|
26
|
+
const parsed = safeParse(request, (value) => operations_CreateAudioSpeechRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
27
|
if (!parsed.ok) {
|
|
28
28
|
return [parsed, { status: "invalid" }];
|
|
29
29
|
}
|
|
@@ -89,7 +89,7 @@ async function $do(client, request, options) {
|
|
|
89
89
|
const responseFields = {
|
|
90
90
|
HttpMeta: { Response: response, Request: req },
|
|
91
91
|
};
|
|
92
|
-
const [result] = await M.match(M.stream(200, z.custom(x => x instanceof ReadableStream), { ctype: "audio/*" }), M.jsonErr(400,
|
|
92
|
+
const [result] = await M.match(M.stream(200, z.custom(x => x instanceof ReadableStream), { ctype: "audio/*" }), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
93
93
|
if (!result.ok) {
|
|
94
94
|
return [result, { status: "complete", request: req, response }];
|
|
95
95
|
}
|
|
@@ -9,9 +9,9 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
12
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { VaultSecretCopyResponse$inboundSchema as models_VaultSecretCopyResponse$inboundSchema } from "../models/vaultsecretcopyresponse.js";
|
|
14
|
+
import { CopyVaultSecretsToInternRequest$outboundSchema as operations_CopyVaultSecretsToInternRequest$outboundSchema } from "../models/operations/copyvaultsecretstointern.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Copy workspace secrets to an intern
|
|
@@ -25,7 +25,7 @@ export function vaultCopyVaultSecretsToIntern(client, request, options) {
|
|
|
25
25
|
return new APIPromise($do(client, request, options));
|
|
26
26
|
}
|
|
27
27
|
async function $do(client, request, options) {
|
|
28
|
-
const parsed = safeParse(request, (value) =>
|
|
28
|
+
const parsed = safeParse(request, (value) => operations_CopyVaultSecretsToInternRequest$outboundSchema.parse(value), "Input validation failed");
|
|
29
29
|
if (!parsed.ok) {
|
|
30
30
|
return [parsed, { status: "invalid" }];
|
|
31
31
|
}
|
|
@@ -99,7 +99,7 @@ async function $do(client, request, options) {
|
|
|
99
99
|
const responseFields = {
|
|
100
100
|
HttpMeta: { Response: response, Request: req },
|
|
101
101
|
};
|
|
102
|
-
const [result] = await M.match(M.json(200,
|
|
102
|
+
const [result] = await M.match(M.json(200, models_VaultSecretCopyResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
103
103
|
if (!result.ok) {
|
|
104
104
|
return [result, { status: "complete", request: req, response }];
|
|
105
105
|
}
|
|
@@ -10,8 +10,8 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
10
10
|
import { safeParse } from "../lib/schemas.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
14
|
+
import { DeleteInternVaultSecretRequest$outboundSchema as operations_DeleteInternVaultSecretRequest$outboundSchema } from "../models/operations/deleteinternvaultsecret.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Delete an intern secret
|
|
@@ -25,7 +25,7 @@ export function vaultDeleteInternVaultSecret(client, request, options) {
|
|
|
25
25
|
return new APIPromise($do(client, request, options));
|
|
26
26
|
}
|
|
27
27
|
async function $do(client, request, options) {
|
|
28
|
-
const parsed = safeParse(request, (value) =>
|
|
28
|
+
const parsed = safeParse(request, (value) => operations_DeleteInternVaultSecretRequest$outboundSchema.parse(value), "Input validation failed");
|
|
29
29
|
if (!parsed.ok) {
|
|
30
30
|
return [parsed, { status: "invalid" }];
|
|
31
31
|
}
|
|
@@ -100,7 +100,7 @@ async function $do(client, request, options) {
|
|
|
100
100
|
const responseFields = {
|
|
101
101
|
HttpMeta: { Response: response, Request: req },
|
|
102
102
|
};
|
|
103
|
-
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400,
|
|
103
|
+
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
104
104
|
if (!result.ok) {
|
|
105
105
|
return [result, { status: "complete", request: req, response }];
|
|
106
106
|
}
|
|
@@ -10,8 +10,8 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
10
10
|
import { safeParse } from "../lib/schemas.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
14
|
+
import { DeleteVaultSecretRequest$outboundSchema as operations_DeleteVaultSecretRequest$outboundSchema } from "../models/operations/deletevaultsecret.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
17
|
* Delete a workspace secret
|
|
@@ -25,7 +25,7 @@ export function vaultDeleteVaultSecret(client, request, options) {
|
|
|
25
25
|
return new APIPromise($do(client, request, options));
|
|
26
26
|
}
|
|
27
27
|
async function $do(client, request, options) {
|
|
28
|
-
const parsed = safeParse(request, (value) =>
|
|
28
|
+
const parsed = safeParse(request, (value) => operations_DeleteVaultSecretRequest$outboundSchema.parse(value), "Input validation failed");
|
|
29
29
|
if (!parsed.ok) {
|
|
30
30
|
return [parsed, { status: "invalid" }];
|
|
31
31
|
}
|
|
@@ -96,7 +96,7 @@ async function $do(client, request, options) {
|
|
|
96
96
|
const responseFields = {
|
|
97
97
|
HttpMeta: { Response: response, Request: req },
|
|
98
98
|
};
|
|
99
|
-
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400,
|
|
99
|
+
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
100
100
|
if (!result.ok) {
|
|
101
101
|
return [result, { status: "complete", request: req, response }];
|
|
102
102
|
}
|